source: rtems/cpukit/pppd/lcp.h @ 4855824

4.104.114.84.95
Last change on this file since 4855824 was 2f1b930, checked in by Joel Sherrill <joel.sherrill@…>, on 08/16/01 at 20:42:09

2001-08-16 Mike Siers <mikes@…>

  • Update of PPPD to 2.3.11 from 2.3.5 and addition of an example application. Mike's notes on the modifications:
    • renamed error() function because of namespace problems
    • removed calls to the exit() funciton
    • removed extra files from the pppd source directory
    • defined pppd task constant values in rtemspppd.h
    • modifyied example code to get actual tick per second value
    • placed the pppd 2.3.11 man page file (pppd.8) into the pppd directory
  • pppd/cbcp.c, pppd/cbcp.h, pppd/main.c, pppd/ppp_tty.c, pppd/pppmain.c, pppd/rtems-ppp.c, pppd/rtems-ppp.c: Deleted.
  • pppd/pppd.8, pppd/rtemsmain.c, pppd/rtemspppd.c, pppd/rtemspppd.h, pppd/sys-rtems.c, pppd/utils.c, pppd/example/Makefile, pppd/example/README, pppd/example/init.c, pppd/example/netconfig.h, pppd/example/ppp.conf, pppd/example/pppdapp.c, pppd/example/system.h: New files.
  • modem/ppp_tty.c, net/if_ppp.h, pppd/Makefile.am, pppd/README, pppd/STATUS, pppd/auth.c, pppd/ccp.c, pppd/ccp.h, pppd/chap.c, pppd/chap.h, pppd/chap_ms.c, pppd/chap_ms.h, pppd/chat.c, pppd/demand.c, pppd/fsm.c, pppd/fsm.h, pppd/ipcp.c, pppd/ipcp.h, pppd/ipxcp.c, pppd/ipxcp.h, pppd/lcp.c, pppd/lcp.h, pppd/magic.c, pppd/magic.h, pppd/options.c, pppd/patchlevel.h, pppd/pathnames.h, pppd/pppd.h, pppd/upap.c, pppd/upap.h: Modified.
  • Property mode set to 100644
File size: 3.3 KB
Line 
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 * $Id$
20 */
21
22/*
23 * Options.
24 */
25#define CI_MRU          1       /* Maximum Receive Unit */
26#define CI_ASYNCMAP     2       /* Async Control Character Map */
27#define CI_AUTHTYPE     3       /* Authentication Type */
28#define CI_QUALITY      4       /* Quality Protocol */
29#define CI_MAGICNUMBER  5       /* Magic Number */
30#define CI_PCOMPRESSION 7       /* Protocol Field Compression */
31#define CI_ACCOMPRESSION 8      /* Address/Control Field Compression */
32#define CI_CALLBACK     13      /* callback */
33
34/*
35 * LCP-specific packet types.
36 */
37#define PROTREJ         8       /* Protocol Reject */
38#define ECHOREQ         9       /* Echo Request */
39#define ECHOREP         10      /* Echo Reply */
40#define DISCREQ         11      /* Discard Request */
41#define CBCP_OPT        6       /* Use callback control protocol */
42
43/*
44 * The state of options is described by an lcp_options structure.
45 */
46typedef struct lcp_options {
47    bool passive;               /* Don't die if we don't get a response */
48    bool silent;                /* Wait for the other end to start first */
49    bool restart;               /* Restart vs. exit after close */
50    bool neg_mru;               /* Negotiate the MRU? */
51    bool neg_asyncmap;          /* Negotiate the async map? */
52    bool neg_upap;              /* Ask for UPAP authentication? */
53    bool neg_chap;              /* Ask for CHAP authentication? */
54    bool neg_magicnumber;       /* Ask for magic number? */
55    bool neg_pcompression;      /* HDLC Protocol Field Compression? */
56    bool neg_accompression;     /* HDLC Address/Control Field Compression? */
57    bool neg_lqr;               /* Negotiate use of Link Quality Reports */
58    bool neg_cbcp;              /* Negotiate use of CBCP */
59    int  mru;                   /* Value of MRU */
60    u_char chap_mdtype;         /* which MD type (hashing algorithm) */
61    u_int32_t asyncmap;         /* Value of async map */
62    u_int32_t magicnumber;
63    int numloops;               /* Number of loops during magic number neg. */
64    u_int32_t lqr_period;       /* Reporting period for LQR 1/100ths second */
65} lcp_options;
66
67extern fsm lcp_fsm[];
68extern lcp_options lcp_wantoptions[];
69extern lcp_options lcp_gotoptions[];
70extern lcp_options lcp_allowoptions[];
71extern lcp_options lcp_hisoptions[];
72extern u_int32_t xmit_accm[][8];
73
74#define DEFMRU  1500            /* Try for this */
75#define MINMRU  128             /* No MRUs below this */
76#define MAXMRU  16384           /* Normally limit MRU to this */
77
78void lcp_open __P((int));
79void lcp_close __P((int, char *));
80void lcp_lowerup __P((int));
81void lcp_lowerdown __P((int));
82void lcp_sprotrej __P((int, u_char *, int));    /* send protocol reject */
83
84extern struct protent lcp_protent;
85
86/* Default number of times we receive our magic number from the peer
87   before deciding the link is looped-back. */
88#define DEFLOOPBACKFAIL 10
Note: See TracBrowser for help on using the repository browser.