Annotation of embedaddon/mpd/src/ipcp.h, revision 1.1
1.1 ! misho 1:
! 2: /*
! 3: * ipcp.h
! 4: *
! 5: * Written by Toshiharu OHNO <tony-o@iij.ad.jp>
! 6: * Copyright (c) 1993, Internet Initiative Japan, Inc. All rights reserved.
! 7: * See ``COPYRIGHT.iij''
! 8: *
! 9: * Rewritten by Archie Cobbs <archie@freebsd.org>
! 10: * Copyright (c) 1995-1999 Whistle Communications, Inc. All rights reserved.
! 11: * See ``COPYRIGHT.whistle''
! 12: */
! 13:
! 14: #ifndef _IPCP_H_
! 15: #define _IPCP_H_
! 16:
! 17: #include <sys/types.h>
! 18: #include <netinet/in_systm.h>
! 19: #include <netinet/ip.h>
! 20: #include "command.h"
! 21: #include "phys.h"
! 22: #include "fsm.h"
! 23: #include "timer.h"
! 24: #include "vars.h"
! 25:
! 26: /*
! 27: * DEFINITONS
! 28: */
! 29:
! 30: /* Configuration options */
! 31: enum {
! 32: IPCP_CONF_VJCOMP,
! 33: IPCP_CONF_REQPRIDNS,
! 34: IPCP_CONF_REQSECDNS,
! 35: IPCP_CONF_REQPRINBNS,
! 36: IPCP_CONF_REQSECNBNS,
! 37: IPCP_CONF_PRETENDIP
! 38: };
! 39:
! 40:
! 41: struct ipcpvjcomp {
! 42: u_short proto; /* Protocol (only VJCOMP supported) */
! 43: u_char maxchan; /* Number of compression slots - 1 */
! 44: u_char compcid; /* Whether conn-id is compressible */
! 45: };
! 46:
! 47: struct ipcpconf {
! 48: struct optinfo options; /* Configuraion options */
! 49: struct u_range self_allow; /* My allowed IP addresses */
! 50: struct u_range peer_allow; /* His allowed IP addresses */
! 51: char self_ippool[LINK_MAX_NAME];
! 52: char ippool[LINK_MAX_NAME];
! 53: struct in_addr peer_dns[2]; /* DNS servers for peer to use */
! 54: struct in_addr peer_nbns[2]; /* NBNS servers for peer to use */
! 55: };
! 56: typedef struct ipcpconf *IpcpConf;
! 57:
! 58: struct ipcpstate {
! 59: struct ipcpconf conf; /* Configuration */
! 60:
! 61: struct in_addr want_addr; /* IP address I'm willing to use */
! 62: struct in_addr peer_addr; /* IP address he is willing to use */
! 63:
! 64: struct u_range self_allow; /* My allowed IP addresses */
! 65: struct u_range peer_allow; /* His allowed IP addresses */
! 66:
! 67: u_char self_ippool_used;
! 68: u_char ippool_used;
! 69: #ifdef USE_NG_VJC
! 70: struct ipcpvjcomp peer_comp; /* Peer's IP compression config */
! 71: struct ipcpvjcomp want_comp; /* My IP compression config */
! 72: #endif
! 73: struct in_addr want_dns[2]; /* DNS servers we got from peer */
! 74: struct in_addr want_nbns[2]; /* NBNS servers we got from peer */
! 75:
! 76: uint32_t peer_reject; /* Request codes rejected by peer */
! 77:
! 78: struct fsm fsm;
! 79: };
! 80: typedef struct ipcpstate *IpcpState;
! 81:
! 82: /*
! 83: * VARIABLES
! 84: */
! 85:
! 86: extern const struct cmdtab IpcpSetCmds[];
! 87:
! 88: /*
! 89: * FUNCTIONS
! 90: */
! 91:
! 92: extern void IpcpInit(Bund b);
! 93: extern void IpcpInst(Bund b, Bund bt);
! 94: extern void IpcpUp(Bund b);
! 95: extern void IpcpDown(Bund b);
! 96: extern void IpcpOpen(Bund b);
! 97: extern void IpcpClose(Bund b);
! 98: extern int IpcpOpenCmd(Context ctx);
! 99: extern int IpcpCloseCmd(Context ctx);
! 100: extern void IpcpInput(Bund b, Mbuf bp);
! 101: extern void IpcpDefAddress(void);
! 102: extern int IpcpStat(Context ctx, int ac, char *av[], void *arg);
! 103:
! 104: #endif
! 105:
! 106:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>