source: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ipcp.c@ 321

Last change on this file since 321 was 321, checked in by coas-nagasima, 7 years ago

文字コードを設定

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc;charset=UTF-8
File size: 18.2 KB
Line 
1/*
2 * TINET (TCP/IP Protocol Stack)
3 *
4 * Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
5 * Tomakomai National College of Technology, JAPAN
6 *
7 * 上記著作権者は,以下の (1)~(4) の条件か,Free Software Foundation
8 * によって公表されている GNU General Public License の Version 2 に記
9 * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア
10 * を改変したものを含む.以下同じ)を使用・複製・改変・再配布(以下,
11 * 利用と呼ぶ)することを無償で許諾する.
12 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
13 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
14 * スコード中に含まれていること.
15 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
16 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用
17 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記
18 * の無保証規定を掲載すること.
19 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
20 * 用できない形で再配布する場合には,次の条件を満たすこと.
21 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著
22 * 作権表示,この利用条件および下記の無保証規定を掲載すること.
23 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
24 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること.
25 *
26 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お
27 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も
28 * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直
29 * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない.
30 *
31 * @(#) $Id$
32 */
33
34/*
35 * ipcp.c - PPP IP Control Protocol.
36 *
37 * Copyright (c) 1989 Carnegie Mellon University.
38 * All rights reserved.
39 *
40 * Redistribution and use in source and binary forms are permitted
41 * provided that the above copyright notice and this paragraph are
42 * duplicated in all such forms and that any documentation,
43 * advertising materials, and other materials related to such
44 * distribution and use acknowledge that the software was developed
45 * by Carnegie Mellon University. The name of the
46 * University may not be used to endorse or promote products derived
47 * from this software without specific prior written permission.
48 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
49 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
50 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
51 */
52
53/*
54 * PPP IP Control Protocol (IPCP) Module
55 *
56 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
57 *
58 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
59 *
60 * Redistribution and use in source and binary forms are permitted
61 * provided that the above copyright notice and this paragraph are
62 * duplicated in all such forms and that any documentation,
63 * advertising materials, and other materials related to such
64 * distribution and use acknowledge that the software was developed
65 * by the Internet Initiative Japan, Inc. The name of the
66 * IIJ may not be used to endorse or promote products derived
67 * from this software without specific prior written permission.
68 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
69 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
70 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
71 *
72 * $FreeBSD: src/usr.sbin/ppp/ipcp.c,v 1.90.2.4 2000/08/19 09:30:03 brian Exp $
73 *
74 * TODO:
75 * o Support IPADDRS properly
76 * o Validate the length in IpcpDecodeConfig
77 */
78
79#include <string.h>
80
81#include <s_services.h>
82#include <t_services.h>
83#include "kernel_id.h"
84
85#include <tinet_defs.h>
86#include <tinet_config.h>
87
88#include <net/if.h>
89#include <net/if_ppp.h>
90#include <net/net.h>
91#include <net/net_buf.h>
92#include <net/net_count.h>
93#include <net/ppp.h>
94#include <net/ppp_var.h>
95#include <net/ppp_fsm.h>
96#include <net/ppp_lcp.h>
97#include <net/ppp_ipcp.h>
98#include <net/ppp_modem.h>
99
100#include <netinet/in.h>
101#include <netinet/in_var.h>
102#include <netinet/ip.h>
103#include <netinet/tcp.h>
104#include <netinet/tcp_timer.h>
105#include <netinet/tcp_var.h>
106#include <netinet/udp_var.h>
107
108#include <net/if_var.h>
109
110#ifdef SUPPORT_PPP
111
112/*
113 * 関数
114 */
115
116static void ipcp_init (void);
117static void ipcp_input (T_NET_BUF *input);
118static void ipcp_protrej (void);
119static void ipcp_lowerup (void);
120static void ipcp_lowerdown (void);
121static void ipcp_open (void);
122static void ipcp_close (void);
123
124/*
125 * FSM から呼出されるコールバック関
126 */
127
128static void ipcp_resetci(T_PPP_FSM *fsm); /* 自構成情報をリセットする。 */
129static int_t ipcp_cilen (T_PPP_FSM *fsm); /* 構成情報の長さを返す。 */
130static void ipcp_addci (T_PPP_FSM *fsm, T_NET_BUF *output);
131 /* 自構成情報を追加する。 */
132static bool_t ipcp_ackci (T_PPP_FSM *fsm, T_NET_BUF *input);
133 /* ACK を受信したときの処理 */
134static bool_t ipcp_nakci (T_PPP_FSM *fsm, T_NET_BUF *input);
135 /* NAK を受信したときの処理 */
136static bool_t ipcp_rejci (T_PPP_FSM *fsm, T_NET_BUF *input);
137 /* REJ を受信したときの処理 */
138static int_t ipcp_reqci (T_PPP_FSM *fsm, T_NET_BUF *input, T_NET_BUF *output);
139 /* 相手の構成情報を確認する。 */
140static void ipcp_up (T_PPP_FSM *fsm); /* リンク接続を確立する。 */
141static void ipcp_down (T_PPP_FSM *fsm); /* リンク接続を解放する。 */
142static void ipcp_finished(T_PPP_FSM *fsm); /* 下位層を終了する。 */
143
144/*
145 * 変数
146 */
147
148static T_IFNET ipcp_local_def_cfg = { /* 自構成情報の規定値 */
149 NULL,
150 {
151 IPV4_ADDR_LOCAL, /* IP アドレス */
152 UINT_C(0), /* サブネットマスク */
153 },
154 };
155
156static T_IFNET ipcp_remote_def_cfg = { /* 相手の構成情報の規定値 */
157 NULL,
158 {
159 IPV4_ADDR_REMOTE, /* IP アドレス */
160 UINT_C(0), /* サブネットマスク */
161 }
162 };
163
164static T_IFNET ipcp_local_neg_cfg; /* ネゴ中の自構成情報 */
165
166static T_IFNET ipcp_remote_neg_cfg; /* ネゴ中の相手の構成情報 */
167
168/*
169 * 全域変数
170 */
171
172T_PPP_FSM_CALLBACKS ipcp_callbacks = {
173 ipcp_resetci, /* 自構成情報をリセットする。 */
174 ipcp_cilen, /* 構成情報の長さを返す。 */
175 ipcp_addci, /* 自構成情報を追加する。 */
176 ipcp_ackci, /* ACK を受信したときの処理 */
177 ipcp_nakci, /* NAK を受信したときの処理 */
178 ipcp_rejci, /* REJ を受信したときの処理 */
179 ipcp_reqci, /* 相手の構成情報を確認する。 */
180 ipcp_up, /* リンク接続を確立する。 */
181 ipcp_down, /* リンク接続を解放する。 */
182 NULL, /* 下位層を開始する。 */
183 ipcp_finished, /* 下位層を終了する。 */
184 NULL, /* 再送する。 */
185 NULL, /* 不明な CP を受信したときの処理 */
186 };
187
188T_PPP_FSM ipcp_fsm = {
189 &ipcp_callbacks, /* コールバック関数 */
190 PPP_IPCP, /* プロトコル */
191 };
192
193T_PPP_PROTENT ipcp_protent = {
194 PPP_IPCP,
195 ipcp_init, /* 初期化 */
196 ipcp_input, /* 入力 */
197 ipcp_protrej, /* Proto-REJ 受信処理 */
198 ipcp_lowerup, /* 下位層を起動する */
199 ipcp_lowerdown, /* 下位層を停止する */
200 ipcp_open, /* オープンする */
201 ipcp_close, /* クローズする */
202 ip_input, /* データ入力、IP 入力 */
203 };
204
205T_IFNET ipcp_local_ack_cfg; /* 相手に許可されたの自構成情報 */
206T_IFNET ipcp_remote_ack_cfg; /* 相手に許可した構成情報 */
207
208/*
209 * ppp_get_ifnet -- ネットワークインタフェース構造体を返す。
210 */
211
212T_IFNET *
213ppp_get_ifnet (void)
214{
215 return &ipcp_local_ack_cfg;
216 }
217
218/*
219 * wait_ipcp -- IP 接続完了まで待つ。
220 *
221 * 戻り値: 接続に失敗したら E_OBJ を返す。
222 */
223
224ER
225wait_ipcp (void)
226{
227#ifdef PPP_CFG_MODEM
228 ER error;
229#endif /* of #ifdef PPP_CFG_MODEM */
230
231 if (ipcp_fsm.state <= PPP_FSM_STOPPED) {
232
233#ifdef PPP_CFG_MODEM
234
235 /* モデムの接続完了まで待つ。*/
236 if ((error = wait_modem()) != E_OK)
237 return error;
238
239#else /* of #ifdef PPP_CFG_MODEM */
240
241 /*
242 * 受動オープンし、相手からの接続待ちなら LCP を一度クローズし、
243 * 能動オープン状態で、再オープンする。
244 */
245 lcp_close();
246 lcp_open(PPP_OPEN_ACTIVE);
247
248#endif /* of #ifdef PPP_CFG_MODEM */
249
250 }
251
252 if (ipcp_fsm.state != PPP_FSM_OPENED) {
253 /* IP 接続完了まで待つ。*/
254 wai_sem(SEM_IPCP_READY);
255 if (ipcp_fsm.state != PPP_FSM_OPENED)
256 return E_OBJ;
257 }
258
259 return E_OK;
260 }
261
262/*
263 * ipcp_init -- IPCP モジュールの初期化
264 */
265
266static void
267ipcp_init (void)
268{
269 fsm_init(&ipcp_fsm);
270 }
271
272/*
273 * ipcp_input -- IPCP 入力
274 */
275
276static void
277ipcp_input (T_NET_BUF *input)
278{
279 NET_COUNT_PPP_IPCP(net_count_ppp_ipcp_in_octets, input->len);
280 NET_COUNT_PPP_IPCP(net_count_ppp_ipcp_in_packets, 1);
281 fsm_input(&ipcp_fsm, input);
282 }
283
284/*
285 * ipcp_resetci -- IPCPの構成情報をリセットする。
286 */
287
288static void
289ipcp_resetci (T_PPP_FSM *fsm)
290{
291 /* 自構成情報の初期設定 */
292 ipcp_local_neg_cfg = ipcp_local_def_cfg;
293 memset((void*)&ipcp_local_ack_cfg, 0, sizeof(T_IFNET));
294
295 /* 相手の構成情報の初期設定 */
296 ipcp_remote_neg_cfg = ipcp_remote_def_cfg;
297 memset((void*)&ipcp_remote_ack_cfg, 0, sizeof(T_IFNET));
298 }
299
300/*
301 * ipcp_cilen -- 構成情報の長さを返す。
302 */
303
304static int_t
305ipcp_cilen (T_PPP_FSM *fsm)
306{
307 int_t cilen = 0;
308
309 cilen += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t); /* IP アドレス */
310
311 return cilen;
312 }
313
314/*
315 * ipcp_addci -- IPCPの構成情報を追加する。
316 */
317
318static void
319ipcp_addci (T_PPP_FSM *fsm, T_NET_BUF *output)
320{
321 uint8_t *buf;
322
323 buf = output->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
324
325 /* IP アドレスオプションを追加する。 */
326 *buf ++ = IPCP_CIT_ADDR;
327 *buf ++ = sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
328 ahtonl(buf, ipcp_local_neg_cfg.in_ifaddr.addr);
329 buf += sizeof(uint32_t);
330 }
331
332/*
333 * ipcp_ackci -- ACK を受信したときの処理
334 *
335 * 戻り値: true ACK は正常
336 * false ACK は異常
337 */
338
339static bool_t
340ipcp_ackci (T_PPP_FSM *fsm, T_NET_BUF *input)
341{
342 uint8_t *buf;
343 uint16_t len;
344
345 buf = input->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
346 len = input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
347
348 /*
349 * 構成情報は送信した順に完全に一致しなければならない。
350 * 従って、ipcp_addci で作成した順に解析する。
351 */
352
353 /* ADDR オプションを解析する。 */
354 if (len < sizeof(T_PPP_CI_HDR) + sizeof(uint32_t) ||
355 *buf ++ != IPCP_CIT_ADDR ||
356 *buf ++ != sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)||
357 nahcmpl(buf, ipcp_local_neg_cfg.in_ifaddr.addr))
358 return false;
359 buf += sizeof(uint32_t);
360 len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
361
362 return true;
363 }
364
365/*
366 * ipcp_nakci -- NAK を受信したときの処理
367 *
368 * 戻り値: 1 NAK は正常
369 * 0 NAK は異常
370 */
371
372static int_t
373ipcp_nakci (T_PPP_FSM *fsm, T_NET_BUF *input)
374{
375 T_IFNET new_cfg;
376 uint32_t cilong;
377 uint16_t len;
378 uint8_t *buf, cilen;
379
380 buf = input->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
381 len = input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
382
383 new_cfg = ipcp_local_neg_cfg;
384
385 /* ADDR オプションを解析する。 */
386 if (len >= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t) &&
387 * buf == IPCP_CIT_ADDR &&
388 *(buf + 1) == sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)) {
389 ntoahl(cilong, buf + 2);
390 buf += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
391 len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
392 new_cfg.in_ifaddr.addr = cilong;
393 }
394
395 /* 後は無視する。*/
396 while (len > sizeof(T_PPP_CI_HDR)) {
397 cilen = *(buf + 1);
398 if (len < cilen)
399 return 0;
400 buf += cilen;
401 len -= cilen;
402 }
403
404 /* 長さが 0 でなければエラー */
405 if (len != 0)
406 return 0;
407
408 /* 新しいオプションを設定する。*/
409 if (fsm->state != PPP_FSM_OPENED)
410 ipcp_local_neg_cfg = new_cfg;
411
412 return 1;
413 }
414
415/*
416 * ipcp_rejci -- REJ を受信したときの処理
417 *
418 * 戻り値: 1 REJ は正常
419 * 0 REJ は異常
420 */
421
422static int_t
423ipcp_rejci (T_PPP_FSM *fsm, T_NET_BUF *input)
424{
425 T_IFNET new_cfg;
426 uint8_t *buf;
427 uint16_t len;
428
429 buf = input->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
430 len = input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
431
432 new_cfg = ipcp_local_neg_cfg;
433
434 /* ADDR オプションを解析する。 */
435 if (len >= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t) &&
436 * buf == IPCP_CIT_ADDR &&
437 *(buf + 1) == sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)) {
438 buf += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
439 len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
440 new_cfg.in_ifaddr.addr = 0;
441 }
442
443 /* 長さが 0 でなければエラー */
444 if (len != 0)
445 return 0;
446
447 /* 新しいオプションを設定する。*/
448 if (fsm->state != PPP_FSM_OPENED)
449 ipcp_local_neg_cfg = new_cfg;
450
451 return 1;
452 }
453
454/*
455 * ipcp_reqci -- 相手の構成情報を解析する。
456 */
457
458static int_t
459ipcp_reqci (T_PPP_FSM *fsm, T_NET_BUF *input, T_NET_BUF *output)
460{
461 uint32_t addr;
462 uint16_t code, final, len, cilen;
463 uint8_t *np, *rp, *ap, *cp, type = 0;
464
465 rp = ap = input->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
466 /* rp: REJ、ap: ACK する CI のポインタ */
467 /* 拒否する場合は、引数 buf に上書きする。 */
468 len = input->len - (sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
469 np = output->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
470 final = PPP_CONFACK; /* 最終的に送信するコード */
471 while (len > 0) {
472 code = PPP_CONFACK;
473 cp = ap; /* cp: 現在処理中の CI */
474
475 if (len < sizeof(T_PPP_CI_HDR)) {
476
477 /* 残りが CI ヘッダより短い */
478 syslog(LOG_NOTICE, "[PPP/IPCP] bad CI len: %d.", len);
479 cilen = len; /* データ長が異常の場合の処置 */
480 len = 0; /* ループから抜ける。 */
481 code = PPP_CONFREJ;
482 goto endswitch;
483 }
484
485 type = *ap ++; /* CI の型 */
486 cilen = *ap ++; /* CI の長さ */
487 if (len < cilen) {
488
489 /* 残りが CI 長より短い */
490 syslog(LOG_NOTICE, "[PPP/IPCP] bad CI len: %d.", cilen);
491 cilen = len; /* データ長が異常の場合の処置 */
492 len = 0; /* ループから抜ける。 */
493 code = PPP_CONFREJ;
494 goto endswitch;
495 }
496 len -= sizeof(T_PPP_CI_HDR);
497
498 /* CI の型により分岐する。*/
499 switch (type) {
500
501 case IPCP_CIT_ADDR: /* IP アドレス */
502
503 /* CI 長が、ヘッダ + 4 オクテットでなければエラー */
504 if (cilen != sizeof(T_PPP_CI_HDR) + sizeof(uint32_t))
505 code = PPP_CONFREJ;
506 else {
507 ntoahl(addr, ap);
508 if (addr != ipcp_remote_neg_cfg.in_ifaddr.addr &&
509 (addr == 0 || ipcp_remote_neg_cfg.in_ifaddr.addr != 0)) {
510 *np ++ = IPCP_CIT_ADDR;
511 *np ++ = sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
512 ahtonl(np, ipcp_remote_neg_cfg.in_ifaddr.addr);
513 np += sizeof(uint32_t);
514 code = PPP_CONFNAK;
515 }
516#if 1 /* 要確認 */
517 else if (addr == 0 && ipcp_remote_neg_cfg.in_ifaddr.addr == 0)
518#else
519 else if (addr == 0 || ipcp_remote_neg_cfg.in_ifaddr.addr == 0)
520#endif
521 code = PPP_CONFREJ;
522 else
523 ipcp_remote_neg_cfg.in_ifaddr.addr = addr;
524 }
525 break;
526
527 default:
528 syslog(LOG_INFO, "[PPP/IPCP] unexp opt: %d.", type);
529 code = PPP_CONFREJ;
530 break;
531 }
532endswitch:
533
534 if (code == PPP_CONFNAK) {
535 /* CI の型が Magic Number の場合を除いて、NAK の回数が */
536 /* 最大値 MAX_PPP_FAILURES を超えたら拒否する。 */
537 if (fsm->failures >= MAX_PPP_FAILURES)
538 code = PPP_CONFREJ;
539 else if (final != PPP_CONFREJ)
540 final = PPP_CONFNAK;
541 }
542
543 /* この CI を拒否する */
544 if (code == PPP_CONFREJ) {
545 if (rp < cp) /* 前に詰める。*/
546 memcpy(rp, cp, cilen);
547 rp += cilen;
548 final = PPP_CONFREJ;
549 }
550
551 ap += cilen - sizeof(T_PPP_CI_HDR);
552 len -= cilen - sizeof(T_PPP_CI_HDR);
553 }
554
555 /* 最終的な長さを調整する。*/
556 switch (final) {
557 case PPP_CONFNAK:
558 output->len = np - output->buf;
559 memcpy(output->buf, input->buf, sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR));
560 break;
561 case PPP_CONFREJ:
562 memcpy(output->buf, input->buf, output->len = rp - input->buf);
563 break;
564 case PPP_CONFACK:
565 memcpy(output->buf, input->buf, input->len);
566 break;
567 }
568
569 return final;
570 }
571
572/*
573 * ipcp_up -- リンク接続を確立する。
574 */
575
576static void
577ipcp_up (T_PPP_FSM *fsm)
578{
579 /* 自構成情報の初期設定 */
580 ipcp_local_ack_cfg = ipcp_local_neg_cfg;
581
582 /*
583 * サブネットマスクと
584 * ローカル・ブロードキャスト IP アドレスを設定する。
585 */
586 ipcp_local_ack_cfg.in_ifaddr.mask = MAKE_IPV4_LOCAL_MASK(ipcp_local_neg_cfg.in_ifaddr.addr);
587
588 /* 相手の構成情報の初期設定 */
589 ipcp_remote_ack_cfg = ipcp_remote_neg_cfg;
590
591 /*
592 * サブネットマスクと
593 * ローカル・ブロードキャスト IP アドレスを設定する。
594 */
595 ipcp_remote_ack_cfg.in_ifaddr.mask = MAKE_IPV4_LOCAL_MASK(ipcp_remote_neg_cfg.in_ifaddr.addr);
596
597 sig_sem(SEM_IPCP_READY);
598
599 syslog(LOG_NOTICE, "[PPP/IPCP] up, Local IP Addr: %s, Remote IP Addr: %s.",
600 ip2str(NULL, &ipcp_local_neg_cfg.in_ifaddr.addr),
601 ip2str(NULL, &ipcp_remote_neg_cfg.in_ifaddr.addr));
602 }
603
604/*
605 * ipcp_down -- リンク接続を解放する。
606 */
607
608static void
609ipcp_down (T_PPP_FSM *fsm)
610{
611 sig_sem(SEM_IPCP_READY);
612 syslog(LOG_NOTICE, "[PPP/IPCP] down.");
613 }
614
615/*
616 * ipcp_finished -- 下位層を終了する。
617 */
618
619static void
620ipcp_finished (T_PPP_FSM *fsm)
621{
622 }
623
624/*
625 * ipcp_protrej -- Proto-REJ を受信したときの処理
626 */
627
628static void
629ipcp_protrej (void)
630{
631 fsm_lowerdown(&ipcp_fsm);
632 }
633
634/*
635 * ipcp_lowerup -- IPCP 下位層を起動する。
636 */
637
638static void
639ipcp_lowerup (void)
640{
641 fsm_lowerup(&ipcp_fsm);
642 }
643
644/*
645 * ipcp_lowerdown -- IPCP 下位層を停止する。
646 */
647
648static void
649ipcp_lowerdown (void)
650{
651 fsm_lowerdown(&ipcp_fsm);
652 }
653
654/*
655 * ipcp_open -- IPCP のオープン
656 */
657
658static void
659ipcp_open (void)
660{
661 fsm_open(&ipcp_fsm);
662 }
663
664/*
665 * ipcp_close -- IPCP のクローズ
666 */
667
668static void
669ipcp_close (void)
670{
671 fsm_close(&ipcp_fsm);
672 }
673
674#endif /* fo #ifdef SUPPORT_PPP */
Note: See TracBrowser for help on using the repository browser.