ipcp.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:3k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* ipcp.h - IP Control Protocol header */
  2. /* Copyright 1995 Wind River Systems, Inc. */
  3. /*
  4.  * Copyright (c) 1989 Carnegie Mellon University.
  5.  * All rights reserved.
  6.  *
  7.  * Redistribution and use in source and binary forms are permitted
  8.  * provided that the above copyright notice and this paragraph are
  9.  * duplicated in all such forms and that any documentation,
  10.  * advertising materials, and other materials related to such
  11.  * distribution and use acknowledge that the software was developed
  12.  * by Carnegie Mellon University.  The name of the
  13.  * University may not be used to endorse or promote products derived
  14.  * from this software without specific prior written permission.
  15.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  16.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  17.  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  18.  */
  19. /*
  20. modification history
  21. --------------------
  22. 01a,16jan95,dzb  WRS-ize.
  23. */
  24. #ifndef __INCipcph
  25. #define __INCipcph
  26. #ifdef  __cplusplus
  27. extern "C" {
  28. #endif
  29. /*
  30.  * Options.
  31.  */
  32. #define CI_ADDRS 1 /* IP Addresses */
  33. #define CI_COMPRESSTYPE 2 /* Compression Type */
  34. #define CI_ADDR 3
  35. #define MAX_STATES 16 /* from ppp_slcompress.h */
  36. #define IPCP_VJMODE_OLD 1 /* "old" mode (option # = 0x0037) */
  37. #define IPCP_VJMODE_RFC1172 2 /* "old-rfc"mode (option # = 0x002d) */
  38. #define IPCP_VJMODE_RFC1332 3 /* "new-rfc"mode (option # = 0x002d, */
  39.                                 /*  maxslot and slot number compression) */
  40. #define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/
  41. #define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */
  42. /* compression option*/ 
  43. typedef struct ipcp_options {
  44.     int neg_addr : 1; /* Negotiate IP Address? */
  45.     int old_addrs : 1; /* Use old (IP-Addresses) option? */
  46.     int req_addr : 1; /* Ask peer to send IP address? */
  47.     int default_route : 1; /* Assign default route through interface? */
  48.     int proxy_arp : 1; /* Make proxy ARP entry for peer? */
  49.     int neg_vj : 1; /* Van Jacobson Compression? */
  50.     int old_vj : 1; /* use old (short) form of VJ option? */
  51.     int accept_local : 1;       /* accept peer's value for ouraddr */
  52.     int accept_remote : 1;      /* accept peer's value for hisaddr */
  53.     u_short vj_protocol; /* protocol value to use in VJ option */
  54.     u_char maxslotindex, cflag; /* values for RFC1332 VJ compression neg. */
  55.     u_long ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */
  56. } ipcp_options;
  57. extern void ipcp_init __ARGS((int));
  58. extern void ipcp_open __ARGS((int));
  59. extern void ipcp_close __ARGS((int));
  60. extern void ipcp_lowerup __ARGS((int));
  61. extern void ipcp_lowerdown __ARGS((int));
  62. extern void ipcp_input __ARGS((int, u_char *, int));
  63. extern void ipcp_protrej __ARGS((int));
  64. extern int ipcp_printpkt __ARGS((u_char *, int, void (*)(), void *));
  65. extern char *ip_ntoa __ARGS((u_long));
  66. #ifdef  __cplusplus
  67. }
  68. #endif
  69. #endif /* __INCipcph */