1 | /*
|
---|
2 | * TINET (TCP/IP Protocol Stack)
|
---|
3 | *
|
---|
4 | * Copyright (C) 2001-2017 by Dep. of Computer Science and Engineering
|
---|
5 | * Tomakomai National College of Technology, JAPAN
|
---|
6 | *
|
---|
7 | * ä¸è¨èä½æ¨©è
|
---|
8 | ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation
|
---|
9 | * ã«ãã£ã¦å
|
---|
10 | ¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
|
---|
11 | * è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
|
---|
12 | * ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ã使ç¨ã»è¤è£½ã»æ¹å¤ã»åé
|
---|
13 | å¸ï¼ä»¥ä¸ï¼
|
---|
14 | * å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
|
---|
15 | * (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
|
---|
16 | * 権表示ï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
|
---|
17 | * ã¹ã³ã¼ãä¸ã«å«ã¾ãã¦ãããã¨ï¼
|
---|
18 | * (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
19 | * ç¨ã§ããå½¢ã§åé
|
---|
20 | å¸ããå ´åã«ã¯ï¼åé
|
---|
21 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨
|
---|
22 | * è
|
---|
23 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
|
---|
24 | * ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
25 | * (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
26 | * ç¨ã§ããªãå½¢ã§åé
|
---|
27 | å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
|
---|
28 | * (a) åé
|
---|
29 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨è
|
---|
30 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
|
---|
31 | * ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
32 | * (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
|
---|
33 | * 害ãããï¼ä¸è¨èä½æ¨©è
|
---|
34 | ããã³TOPPERSããã¸ã§ã¯ããå
|
---|
35 | 責ãããã¨ï¼
|
---|
36 | *
|
---|
37 | * æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
|
---|
38 | ã
|
---|
39 | * ãã³TOPPERSããã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
|
---|
40 | * å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
|
---|
41 | * æ¥çã¾ãã¯éæ¥çã«çãããããªãæ害ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
|
---|
42 | *
|
---|
43 | * @(#) $Id: ppp_lcp.h 317 2017-08-03 13:14:26Z coas-nagasima $
|
---|
44 | */
|
---|
45 |
|
---|
46 | /*
|
---|
47 | * lcp.h - Link Control Protocol definitions.
|
---|
48 | *
|
---|
49 | * Copyright (c) 1989 Carnegie Mellon University.
|
---|
50 | * All rights reserved.
|
---|
51 | *
|
---|
52 | * Redistribution and use in source and binary forms are permitted
|
---|
53 | * provided that the above copyright notice and this paragraph are
|
---|
54 | * duplicated in all such forms and that any documentation,
|
---|
55 | * advertising materials, and other materials related to such
|
---|
56 | * distribution and use acknowledge that the software was developed
|
---|
57 | * by Carnegie Mellon University. The name of the
|
---|
58 | * University may not be used to endorse or promote products derived
|
---|
59 | * from this software without specific prior written permission.
|
---|
60 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
---|
61 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
---|
62 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
---|
63 | *
|
---|
64 | * $FreeBSD: src/usr.sbin/pppd/lcp.h,v 1.6.2.1 1999/08/29 15:47:03 peter Exp $
|
---|
65 | */
|
---|
66 |
|
---|
67 | /*
|
---|
68 | * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
|
---|
69 | *
|
---|
70 | * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
|
---|
71 | *
|
---|
72 | * Redistribution and use in source and binary forms are permitted
|
---|
73 | * provided that the above copyright notice and this paragraph are
|
---|
74 | * duplicated in all such forms and that any documentation,
|
---|
75 | * advertising materials, and other materials related to such
|
---|
76 | * distribution and use acknowledge that the software was developed
|
---|
77 | * by the Internet Initiative Japan. The name of the
|
---|
78 | * IIJ may not be used to endorse or promote products derived
|
---|
79 | * from this software without specific prior written permission.
|
---|
80 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
---|
81 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
---|
82 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
---|
83 | *
|
---|
84 | * $FreeBSD: src/usr.sbin/ppp/lcp.h,v 1.23.2.1 2000/08/19 09:30:04 brian Exp $
|
---|
85 | *
|
---|
86 | * TODO:
|
---|
87 | */
|
---|
88 |
|
---|
89 | #ifndef _PPP_LCP_H_
|
---|
90 | #define _PPP_LCP_H_
|
---|
91 |
|
---|
92 | #ifdef SUPPORT_PPP
|
---|
93 |
|
---|
94 | /*
|
---|
95 | * LCP ç¹æã® PPP ãªã³ã¯å¶å¾¡ (CP) ã®å¶å¾¡ã³ã¼ã
|
---|
96 | */
|
---|
97 |
|
---|
98 | #define PPP_PROTREJ UINT_C(8) /* Protocol Reject */
|
---|
99 | #define PPP_ECHOREQ UINT_C(9) /* Echo Request */
|
---|
100 | #define PPP_ECHOREP UINT_C(10) /* Echo Reply */
|
---|
101 | #define PPP_DISCREQ UINT_C(11) /* Discard Request */
|
---|
102 |
|
---|
103 | /*
|
---|
104 | * LCP ã®æ§ææ
|
---|
105 | å ± (CI)
|
---|
106 | */
|
---|
107 |
|
---|
108 | /*
|
---|
109 | * CI ã®å
|
---|
110 | */
|
---|
111 |
|
---|
112 | #define LCP_CIT_MRU UINT_C(1) /* æ大åä¿¡é (Maximum Receive Unit) */
|
---|
113 | #define LCP_CIT_ACCM UINT_C(2) /* Async Control Character Map */
|
---|
114 | #define LCP_CIT_AUTH UINT_C(3) /* èªè¨¼ãããã³ã« */
|
---|
115 | #define LCP_CIT_QUALITY UINT_C(4) /* å質ãããã³ã«ã¯æªå®è£
|
---|
116 | */
|
---|
117 | #define LCP_CIT_MAGIC UINT_C(5) /* ãã¸ãã¯çªå· */
|
---|
118 | #define LCP_CIT_PCOMP UINT_C(7) /* ãããã³ã«é¨å§ç¸®ã¯å®è£
|
---|
119 | äºå® */
|
---|
120 | #define LCP_CIT_ACCOMP UINT_C(8) /* ã¢ãã¬ã¹ã»å¶å¾¡é¨å§ç¸®ã¯å®è£
|
---|
121 | äºå® */
|
---|
122 | #define LCP_CIT_FCS_ALTER UINT_C(9) /* FCS-Alternatives ã¯æªå®è£
|
---|
123 | */
|
---|
124 | #define LCP_CIT_SELF_PAD UINT_C(10) /* Self-Describing-Padding ã¯æªå®è£
|
---|
125 | */
|
---|
126 | #define LCP_CIT_CALLBACK UINT_C(13) /* Callback ã¯æªå®è£
|
---|
127 | */
|
---|
128 | #define LCP_CIT_CFRAMES UINT_C(15) /* Compound-Frames ã¯æªå®è£
|
---|
129 | */
|
---|
130 |
|
---|
131 | /*
|
---|
132 | * LCP ã®æ§ææ
|
---|
133 | å ±ãªãã·ã§ã³
|
---|
134 | */
|
---|
135 |
|
---|
136 | typedef struct t_lcp_configs {
|
---|
137 | uint32_t ACCM; /* ACCM */
|
---|
138 |
|
---|
139 | #ifdef LCP_CFG_MAGIC
|
---|
140 |
|
---|
141 | uint32_t magic; /* ãã¸ãã¯çªå· */
|
---|
142 |
|
---|
143 | #endif /* of #ifdef LCP_CFG_MAGIC */
|
---|
144 |
|
---|
145 | uint16_t MRU; /* MRU */
|
---|
146 | uint16_t options; /* ãªãã·ã§ã³ãã©ã° */
|
---|
147 | } T_LCP_CONFIGS;
|
---|
148 |
|
---|
149 | /*
|
---|
150 | * å¤æ°
|
---|
151 | */
|
---|
152 |
|
---|
153 | extern T_PPP_FSM lcp_fsm;
|
---|
154 | extern T_PPP_PROTENT lcp_protent;
|
---|
155 | extern T_LCP_CONFIGS lcp_local_ack_cfg; /* ç¸æã«è¨±å¯ãããã®èªæ§ææ
|
---|
156 | å ± */
|
---|
157 | extern T_LCP_CONFIGS lcp_remote_ack_cfg; /* ç¸æã«è¨±å¯ããæ§ææ
|
---|
158 | å ± */
|
---|
159 |
|
---|
160 | /*
|
---|
161 | * é¢æ°
|
---|
162 | */
|
---|
163 |
|
---|
164 | extern void lcp_lowerup (void);
|
---|
165 | extern void lcp_lowerdown (void);
|
---|
166 | extern void lcp_down (T_PPP_FSM *fsm);
|
---|
167 | extern void lcp_finished (T_PPP_FSM *fsm);
|
---|
168 | extern void lcp_open (uint8_t open_mode);
|
---|
169 | extern void lcp_close (void);
|
---|
170 | extern void lcp_sprotrej (T_NET_BUF *data);
|
---|
171 |
|
---|
172 | #endif /* of #ifdef SUPPORT_PPP */
|
---|
173 |
|
---|
174 | #endif /* of #ifndef _PPP_LCP_H_ */
|
---|