Deleted Added
full compact
lcp.c (32658) lcp.c (32663)
1/*
2 * PPP Link Control Protocol (LCP) Module
3 *
4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5 *
6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
7 *
8 * Redistribution and use in source and binary forms are permitted
9 * provided that the above copyright notice and this paragraph are
10 * duplicated in all such forms and that any documentation,
11 * advertising materials, and other materials related to such
12 * distribution and use acknowledge that the software was developed
13 * by the Internet Initiative Japan, Inc. The name of the
14 * IIJ may not be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 *
1/*
2 * PPP Link Control Protocol (LCP) Module
3 *
4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5 *
6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
7 *
8 * Redistribution and use in source and binary forms are permitted
9 * provided that the above copyright notice and this paragraph are
10 * duplicated in all such forms and that any documentation,
11 * advertising materials, and other materials related to such
12 * distribution and use acknowledge that the software was developed
13 * by the Internet Initiative Japan, Inc. The name of the
14 * IIJ may not be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 *
20 * $Id: lcp.c,v 1.53 1998/01/11 17:53:19 brian Exp $
20 * $Id: lcp.c,v 1.54 1998/01/20 22:47:40 brian Exp $
21 *
22 * TODO:
23 * o Validate magic number received from peer.
24 * o Limit data field length by MRU
25 */
26#include <sys/param.h>
27#include <sys/time.h>
21 *
22 * TODO:
23 * o Validate magic number received from peer.
24 * o Limit data field length by MRU
25 */
26#include <sys/param.h>
27#include <sys/time.h>
28#include <sys/select.h>
29#include <sys/socket.h>
28#include <sys/socket.h>
30#include <netinet/in.h>
31#include <arpa/inet.h>
32#include <net/if.h>
33#include <net/if_tun.h>
29#include <net/if.h>
30#include <net/if_tun.h>
31#include <netinet/in.h>
32#include <arpa/inet.h>
34
35#include <signal.h>
36#include <stdarg.h>
37#include <stdio.h>
38#include <stdlib.h>
39#include <string.h>
40#include <sys/time.h>
41#include <termios.h>

--- 76 unchanged lines hidden (view full) ---

118
119struct fsm LcpFsm = {
120 "LCP", /* Name of protocol */
121 PROTO_LCP, /* Protocol Number */
122 LCP_MAXCODE,
123 1, /* Open mode delay */
124 ST_INITIAL, /* State of machine */
125 0, 0, 0,
33
34#include <signal.h>
35#include <stdarg.h>
36#include <stdio.h>
37#include <stdlib.h>
38#include <string.h>
39#include <sys/time.h>
40#include <termios.h>

--- 76 unchanged lines hidden (view full) ---

117
118struct fsm LcpFsm = {
119 "LCP", /* Name of protocol */
120 PROTO_LCP, /* Protocol Number */
121 LCP_MAXCODE,
122 1, /* Open mode delay */
123 ST_INITIAL, /* State of machine */
124 0, 0, 0,
126 0,
127 {0, 0, 0, NULL, NULL, NULL}, /* FSM timer */
128 {0, 0, 0, NULL, NULL, NULL}, /* Open timer */
129 {0, 0, 0, NULL, NULL, NULL}, /* Stopped timer */
130 LogLCP,
131
132 LcpLayerUp,
133 LcpLayerDown,
134 LcpLayerStart,

--- 703 unchanged lines hidden ---
125 {0, 0, 0, NULL, NULL, NULL}, /* FSM timer */
126 {0, 0, 0, NULL, NULL, NULL}, /* Open timer */
127 {0, 0, 0, NULL, NULL, NULL}, /* Stopped timer */
128 LogLCP,
129
130 LcpLayerUp,
131 LcpLayerDown,
132 LcpLayerStart,

--- 703 unchanged lines hidden ---