source: EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp.h@ 270

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

mruby版ECNLプロトタイピング・ツールを追加

  • 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-2009 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 270 2017-02-09 04:03:47Z 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) /* IP */
89
90#define PPP_IPCP UINT_C(0x8021) /* IPCP */
91#define PPP_CCP UINT_C(0x80fd) /* CCP */
92
93#define PPP_LCP UINT_C(0xc021) /* LCP */
94#define PPP_PAP UINT_C(0xc023) /* PAP */
95#define PPP_LQR UINT_C(0xc025) /* LQR */
96#define PPP_CHAP UINT_C(0xc223) /* CHAP */
97
98#define GET_PPP_HDR(nbuf) ((T_PPP_HDR*)((nbuf)->buf))
99
100/*
101 * リンクの状æ…
102‹
103 */
104
105#define PPP_PHASE_DEAD 0
106#define PPP_PHASE_INITIALIZE 1
107#define PPP_PHASE_DORMANT 2
108#define PPP_PHASE_ESTABLISH 3
109#define PPP_PHASE_AUTHENTICATE 4
110#define PPP_PHASE_CALLBACK 5
111#define PPP_PHASE_NETWORK 6
112#define PPP_PHASE_TERMINATE 7
113#define PPP_PHASE_HOLDOFF 8
114
115/*
116 * PPP リンク制御 (CP) ヘッダ構造体
117 */
118
119typedef struct t_ppp_cp_hdr {
120 uint8_t code; /* 制御コード */
121 uint8_t id; /* 識別子 */
122 uint16_t len; /* 長さ */
123 } __attribute__((packed, aligned(2)))T_PPP_CP_HDR;
124
125#define GET_PPP_CP_HDR(nbuf) ((T_PPP_CP_HDR*)((nbuf)->buf + sizeof(T_PPP_HDR)))
126
127/*
128 * PPP リンク制御 (CP) の制御コード
129 */
130
131#define PPP_VENDER UINT_C(0) /* Vender Specific */
132#define PPP_CONFREQ UINT_C(1) /* Configuration Request */
133#define PPP_CONFACK UINT_C(2) /* Configuration ACK */
134#define PPP_CONFNAK UINT_C(3) /* Configuration NAK */
135#define PPP_CONFREJ UINT_C(4) /* Configuration Reject */
136#define PPP_TERMREQ UINT_C(5) /* Termination Request */
137#define PPP_TERMACK UINT_C(6) /* Termination ACK */
138#define PPP_CODEREJ UINT_C(7) /* Code Reject */
139
140/*
141 * 構成情
142報 (CI) ヘッダ
143 */
144
145typedef struct t_ppp_ci_hdr {
146 uint8_t type; /* CI の型 */
147 uint8_t len; /* 長さ */
148 } __attribute__((packed, aligned(2)))T_PPP_CI_HDR;
149
150#endif /* of #ifndef _PPP_H_ */
Note: See TracBrowser for help on using the repository browser.