[313] | 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 | * 上記著作権者は,以下の (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: ppp_lcp.h 315 2017-07-23 05:29:40Z coas-nagasima $
|
---|
| 32 | */
|
---|
| 33 |
|
---|
| 34 | /*
|
---|
| 35 | * lcp.h - Link Control Protocol definitions.
|
---|
| 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 | * $FreeBSD: src/usr.sbin/pppd/lcp.h,v 1.6.2.1 1999/08/29 15:47:03 peter Exp $
|
---|
| 53 | */
|
---|
| 54 |
|
---|
| 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. 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/lcp.h,v 1.23.2.1 2000/08/19 09:30:04 brian Exp $
|
---|
| 73 | *
|
---|
| 74 | * TODO:
|
---|
| 75 | */
|
---|
| 76 |
|
---|
| 77 | #ifndef _PPP_LCP_H_
|
---|
| 78 | #define _PPP_LCP_H_
|
---|
| 79 |
|
---|
| 80 | #ifdef SUPPORT_PPP
|
---|
| 81 |
|
---|
| 82 | /*
|
---|
| 83 | * LCP 特有の PPP リンク制御 (CP) の制御コード
|
---|
| 84 | */
|
---|
| 85 |
|
---|
| 86 | #define PPP_PROTREJ UINT_C(8) /* Protocol Reject */
|
---|
| 87 | #define PPP_ECHOREQ UINT_C(9) /* Echo Request */
|
---|
| 88 | #define PPP_ECHOREP UINT_C(10) /* Echo Reply */
|
---|
| 89 | #define PPP_DISCREQ UINT_C(11) /* Discard Request */
|
---|
| 90 |
|
---|
| 91 | /*
|
---|
| 92 | * LCP の構成情報 (CI)
|
---|
| 93 | */
|
---|
| 94 |
|
---|
| 95 | /*
|
---|
| 96 | * CI の型
|
---|
| 97 | */
|
---|
| 98 |
|
---|
| 99 | #define LCP_CIT_MRU UINT_C(1) /* 最大受信量 (Maximum Receive Unit) */
|
---|
| 100 | #define LCP_CIT_ACCM UINT_C(2) /* Async Control Character Map */
|
---|
| 101 | #define LCP_CIT_AUTH UINT_C(3) /* 認証プロトコル */
|
---|
| 102 | #define LCP_CIT_QUALITY UINT_C(4) /* 品質プロトコルは未実装 */
|
---|
| 103 | #define LCP_CIT_MAGIC UINT_C(5) /* マジック番号 */
|
---|
| 104 | #define LCP_CIT_PCOMP UINT_C(7) /* プロトコル部圧縮は実装予定 */
|
---|
| 105 | #define LCP_CIT_ACCOMP UINT_C(8) /* アドレス・制御部圧縮は実装予定 */
|
---|
| 106 | #define LCP_CIT_FCS_ALTER UINT_C(9) /* FCS-Alternatives は未実装 */
|
---|
| 107 | #define LCP_CIT_SELF_PAD UINT_C(10) /* Self-Describing-Padding は未実装 */
|
---|
| 108 | #define LCP_CIT_CALLBACK UINT_C(13) /* Callback は未実装 */
|
---|
| 109 | #define LCP_CIT_CFRAMES UINT_C(15) /* Compound-Frames は未実装 */
|
---|
| 110 |
|
---|
| 111 | /*
|
---|
| 112 | * LCP の構成情報オプション
|
---|
| 113 | */
|
---|
| 114 |
|
---|
| 115 | typedef struct t_lcp_configs {
|
---|
| 116 | uint32_t ACCM; /* ACCM */
|
---|
| 117 |
|
---|
| 118 | #ifdef LCP_CFG_MAGIC
|
---|
| 119 |
|
---|
| 120 | uint32_t magic; /* マジック番号 */
|
---|
| 121 |
|
---|
| 122 | #endif /* of #ifdef LCP_CFG_MAGIC */
|
---|
| 123 |
|
---|
| 124 | uint16_t MRU; /* MRU */
|
---|
| 125 | uint16_t options; /* オプションフラグ */
|
---|
| 126 | } T_LCP_CONFIGS;
|
---|
| 127 |
|
---|
| 128 | /*
|
---|
| 129 | * 変数
|
---|
| 130 | */
|
---|
| 131 |
|
---|
| 132 | extern T_PPP_FSM lcp_fsm;
|
---|
| 133 | extern T_PPP_PROTENT lcp_protent;
|
---|
| 134 | extern T_LCP_CONFIGS lcp_local_ack_cfg; /* 相手に許可されたの自構成情報 */
|
---|
| 135 | extern T_LCP_CONFIGS lcp_remote_ack_cfg; /* 相手に許可した構成情報 */
|
---|
| 136 |
|
---|
| 137 | /*
|
---|
| 138 | * 関数
|
---|
| 139 | */
|
---|
| 140 |
|
---|
| 141 | extern void lcp_lowerup (void);
|
---|
| 142 | extern void lcp_lowerdown (void);
|
---|
| 143 | extern void lcp_down (T_PPP_FSM *fsm);
|
---|
| 144 | extern void lcp_finished (T_PPP_FSM *fsm);
|
---|
| 145 | extern void lcp_open (uint8_t open_mode);
|
---|
| 146 | extern void lcp_close (void);
|
---|
| 147 | extern void lcp_sprotrej (T_NET_BUF *data);
|
---|
| 148 |
|
---|
| 149 | #endif /* of #ifdef SUPPORT_PPP */
|
---|
| 150 |
|
---|
| 151 | #endif /* of #ifndef _PPP_LCP_H_ */
|
---|