Annotation of embedaddon/libpdel/ppp/ppp_bundle.h, revision 1.1.1.1

1.1       misho       1: 
                      2: /*
                      3:  * Copyright (c) 2001-2002 Packet Design, LLC.
                      4:  * All rights reserved.
                      5:  * 
                      6:  * Subject to the following obligations and disclaimer of warranty,
                      7:  * use and redistribution of this software, in source or object code
                      8:  * forms, with or without modifications are expressly permitted by
                      9:  * Packet Design; provided, however, that:
                     10:  * 
                     11:  *    (i)  Any and all reproductions of the source or object code
                     12:  *         must include the copyright notice above and the following
                     13:  *         disclaimer of warranties; and
                     14:  *    (ii) No rights are granted, in any manner or form, to use
                     15:  *         Packet Design trademarks, including the mark "PACKET DESIGN"
                     16:  *         on advertising, endorsements, or otherwise except as such
                     17:  *         appears in the above copyright notice or in the software.
                     18:  * 
                     19:  * THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND
                     20:  * TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO
                     21:  * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING
                     22:  * THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED
                     23:  * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
                     24:  * OR NON-INFRINGEMENT.  PACKET DESIGN DOES NOT WARRANT, GUARANTEE,
                     25:  * OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS
                     26:  * OF THE USE OF THIS SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY,
                     27:  * RELIABILITY OR OTHERWISE.  IN NO EVENT SHALL PACKET DESIGN BE
                     28:  * LIABLE FOR ANY DAMAGES RESULTING FROM OR ARISING OUT OF ANY USE
                     29:  * OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY DIRECT,
                     30:  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL
                     31:  * DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF
                     32:  * USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF
                     33:  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     34:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
                     35:  * THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF
                     36:  * THE POSSIBILITY OF SUCH DAMAGE.
                     37:  *
                     38:  * Author: Archie Cobbs <archie@freebsd.org>
                     39:  */
                     40: 
                     41: #ifndef _PDEL_PPP_PPP_BUNDLE_H_
                     42: #define _PDEL_PPP_PPP_BUNDLE_H_
                     43: 
                     44: /************************************************************************
                     45:                        PUBLIC DECLARATIONS
                     46: ************************************************************************/
                     47: 
                     48: struct ppp_eid;
                     49: struct ppp_node;
                     50: struct ppp_link;
                     51: struct ppp_bundle;
                     52: struct ppp_ipcp_req;
                     53: struct ppp_ccp_req;
                     54: 
                     55: #define PPP_BUNDLE_MAX_LOGNAME 32
                     56: 
                     57: /*
                     58:  * Bundle configuration structure
                     59:  *
                     60:  * If ip[PPP_SELF] is 0.0.0.0, we will accept whatever IP address the
                     61:  * peer requests for itself.  If the peer requests 0.0.0.0 and
                     62:  * ip[PPP_PEER] is 0.0.0.0, we close the bundle.
                     63:  */
                     64: struct ppp_bundle_config {
                     65:        struct in_addr          ip[2];          /* ip addrs, or 0.0.0.0 */
                     66:        struct in_addr          dns_servers[2]; /* dns servers for peer */
                     67:        struct in_addr          nbns_servers[2];/* nbns servers for peer */
                     68:        u_char                  vjc;            /* enable vj compression */
                     69:        u_char                  mppe_40;        /* enable 40 bit mppe */
                     70:        u_char                  mppe_56;        /* enable 56 bit mppe */
                     71:        u_char                  mppe_128;       /* enable 128 bit mppe */
                     72:        u_char                  mppe_reqd;      /* ms encryption req'd */
                     73:        u_char                  mppe_stateless; /* stateless encryption */
                     74:        char                    logname[PPP_BUNDLE_MAX_LOGNAME];
                     75: };
                     76: 
                     77: /************************************************************************
                     78:                        PUBLIC FUNCTIONS
                     79: ************************************************************************/
                     80: 
                     81: __BEGIN_DECLS
                     82: 
                     83: extern void    ppp_bundle_close(struct ppp_bundle *bundle);
                     84: extern void    ppp_bundle_destroy(struct ppp_bundle **bundlep);
                     85: extern const   char *ppp_bundle_get_authname(struct ppp_bundle *bundle,
                     86:                        int dir);
                     87: extern void    ppp_bundle_get_eid(struct ppp_bundle *bundle,
                     88:                        int dir, struct ppp_eid *eid);
                     89: extern int     ppp_bundle_get_multilink(struct ppp_bundle *bundle);
                     90: extern int     ppp_bundle_get_ipcp(struct ppp_bundle *bundle,
                     91:                        struct ppp_ipcp_req *ipcp, int *is_up);
                     92: extern int     ppp_bundle_get_ccp(struct ppp_bundle *bundle,
                     93:                        struct ppp_ccp_req *ccp, int *is_up);
                     94: extern int     ppp_bundle_get_links(struct ppp_bundle *bundle,
                     95:                        struct ppp_link **list, int max);
                     96: extern void    *ppp_bundle_get_cookie(struct ppp_bundle *bundle);
                     97: 
                     98: #ifdef _PDEL_PPP_PRIVATE_H_
                     99: 
                    100: /************************************************************************
                    101:                        PRIVATE FUNCTIONS
                    102: ************************************************************************/
                    103: 
                    104: extern struct  ppp_bundle *ppp_bundle_create(struct ppp_engine *engine,
                    105:                        struct ppp_link *link, struct ppp_node *node);
                    106: extern int     ppp_bundle_join(struct ppp_bundle *bundle,
                    107:                        struct ppp_link *link, struct ppp_node *node,
                    108:                        u_int16_t *link_num);
                    109: extern void    ppp_bundle_unjoin(struct ppp_bundle **bundlep,
                    110:                         struct ppp_link *link);
                    111: extern void    ppp_bundle_protorej(struct ppp_bundle *bundle, u_int16_t proto);
                    112: extern int     ppp_bundle_write(struct ppp_bundle *bundle, u_int link_num,
                    113:                        u_int16_t proto, const void *data, size_t len);
                    114: 
                    115: #endif /* _PDEL_PPP_PRIVATE_H_ */
                    116: 
                    117: __END_DECLS
                    118: 
                    119: #endif /* _PDEL_PPP_PPP_BUNDLE_H_ */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>