home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / SUN / PPP / SUNOS_OL / DDP_PPP.TAR / lcp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-01-03  |  2.5 KB  |  73 lines

  1. /*
  2.  * lcp.h - Link Control Protocol definitions.
  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. /*
  21.  * Options.
  22.  */
  23. #define CI_MRU        1    /* Maximum Receive Unit */
  24. #define CI_ASYNCMAP    2    /* Async Control Character Map */
  25. #define CI_AUTHTYPE    3    /* Authentication Type */
  26. #define CI_ENCRYPTTYPE    4    /* Encryption Type */
  27. #define CI_MAGICNUMBER    5    /* Magic Number */
  28. #define CI_KEEPALIVE    6    /* Keep Alive Parameters */
  29. #define CI_PCOMPRESSION    7    /* Protocol Field Compression */
  30. #define CI_ACCOMPRESSION 8    /* Address/Control Field Compression */
  31.  
  32.  
  33. /*
  34.  * The state of options is described by an lcp_options structure.
  35.  */
  36. typedef struct lcp_options {
  37.     int passive : 1;        /* Passives vs. active open */
  38.     int restart : 1;        /* Restart vs. exit after close */
  39.     int neg_mru : 1;        /* Negotiate the MRU? */
  40.     u_short mru;        /* Value of MRU */
  41.     int neg_asyncmap : 1;    /* Async map? */
  42.     u_long asyncmap;
  43.     int neg_upap : 1;        /* UPAP authentication? */
  44.     int neg_encrypttype : 1;    /* Encryption type? */
  45.     u_short encrypttype;
  46.     int neg_magicnumber : 1;    /* Magic number? */
  47.     u_long magicnumber;
  48.     int numloops;        /* Number loops during magic number negot. */
  49. #if 0
  50.     int neg_keepalive : 1;    /* Keep Alive Parameters? */
  51. #endif
  52.     int neg_pcompression : 1;    /* HDLC Protocol Field Compression? */
  53.     int neg_accompression : 1;    /* HDLC Address/Control Field Compression? */
  54. } lcp_options;
  55.  
  56. extern fsm lcp_fsm[];
  57. extern lcp_options lcp_wantoptions[];
  58. extern lcp_options lcp_gotoptions[];
  59. extern lcp_options lcp_allowoptions[];
  60. extern lcp_options lcp_hisoptions[];
  61.  
  62. #define DEFMRU    256        /* Try for this */
  63. #define MINMRU    128        /* No MRUs below this */
  64.  
  65. void lcp_init();
  66. void lcp_activeopen();
  67. void lcp_passiveopen();
  68. void lcp_close();
  69. void lcp_lowerup();
  70. void lcp_lowerdown();
  71. void lcp_input();
  72. void lcp_protrej();
  73.