source: rubycfg_asp/trunk/asp_dcre/tinet/net/ppp.h@ 313

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

ソースを追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-chdr
File size: 5.6 KB
Line 
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.h 313 2017-07-23 04:50:32Z coas-nagasima $
44 */
45
46/*
47 * Copyright (c) 1989 Carnegie Mellon University.
48 * All rights reserved.
49 *
50 * Redistribution and use in source and binary forms are permitted
51 * provided that the above copyright notice and this paragraph are
52 * duplicated in all such forms and that any documentation,
53 * advertising materials, and other materials related to such
54 * distribution and use acknowledge that the software was developed
55 * by Carnegie Mellon University. The name of the
56 * University may not be used to endorse or promote products derived
57 * from this software without specific prior written permission.
58 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
59 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
60 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
61 */
62
63/*
64 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
65 *
66 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
67 *
68 * Redistribution and use in source and binary forms are permitted
69 * provided that the above copyright notice and this paragraph are
70 * duplicated in all such forms and that any documentation,
71 * advertising materials, and other materials related to such
72 * distribution and use acknowledge that the software was developed
73 * by the Internet Initiative Japan. The name of the
74 * IIJ may not be used to endorse or promote products derived
75 * from this software without specific prior written permission.
76 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
77 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
78 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
79 */
80
81#ifndef _PPP_H_
82#define _PPP_H_
83
84/*
85 * PPP ヘッダのプロトコルフィールドの値
86 */
87
88#define PPP_IP UINT_C(0x0021) /* IPv4 */
89#define PPP_IPV6 UINT_C(0x0057) /* IPv6 */
90
91#define PPP_IPCP UINT_C(0x8021) /* IPCP */
92#define PPP_IPV6CP UINT_C(0x8057) /* IPV6CP */
93#define PPP_CCP UINT_C(0x80fd) /* CCP */
94
95#define PPP_LCP UINT_C(0xc021) /* LCP */
96#define PPP_PAP UINT_C(0xc023) /* PAP */
97#define PPP_LQR UINT_C(0xc025) /* LQR */
98#define PPP_CHAP UINT_C(0xc223) /* CHAP */
99
100#define GET_PPP_HDR(nbuf) ((T_PPP_HDR*)((nbuf)->buf))
101
102/*
103 * リンクの状æ…
104‹
105 */
106
107#define PPP_PHASE_DEAD 0
108#define PPP_PHASE_INITIALIZE 1
109#define PPP_PHASE_DORMANT 2
110#define PPP_PHASE_ESTABLISH 3
111#define PPP_PHASE_AUTHENTICATE 4
112#define PPP_PHASE_CALLBACK 5
113#define PPP_PHASE_NETWORK 6
114#define PPP_PHASE_TERMINATE 7
115#define PPP_PHASE_HOLDOFF 8
116
117/*
118 * PPP リンク制御 (CP) ヘッダ構造体
119 */
120
121typedef struct t_ppp_cp_hdr {
122 uint8_t code; /* 制御コード */
123 uint8_t id; /* 識別子 */
124 uint16_t len; /* 長さ */
125 } T_PPP_CP_HDR;
126
127#define GET_PPP_CP_HDR(nbuf) ((T_PPP_CP_HDR*)((nbuf)->buf + sizeof(T_PPP_HDR)))
128
129/*
130 * PPP リンク制御 (CP) の制御コード
131 */
132
133#define PPP_VENDER UINT_C(0) /* Vender Specific */
134#define PPP_CONFREQ UINT_C(1) /* Configuration Request */
135#define PPP_CONFACK UINT_C(2) /* Configuration ACK */
136#define PPP_CONFNAK UINT_C(3) /* Configuration NAK */
137#define PPP_CONFREJ UINT_C(4) /* Configuration Reject */
138#define PPP_TERMREQ UINT_C(5) /* Termination Request */
139#define PPP_TERMACK UINT_C(6) /* Termination ACK */
140#define PPP_CODEREJ UINT_C(7) /* Code Reject */
141
142/*
143 * 構成情
144報 (CI) ヘッダ
145 */
146
147typedef struct t_ppp_ci_hdr {
148 uint8_t type; /* CI の型 */
149 uint8_t len; /* 長さ */
150 } T_PPP_CI_HDR;
151
152#endif /* of #ifndef _PPP_H_ */
Note: See TracBrowser for help on using the repository browser.