source: azure_iot_hub/trunk/asp3_dcre/tinet/net/ppp_lcp.h@ 388

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

Azure IoT Hub Device C SDK を使ったサンプルの追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-chdr
File size: 6.2 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_lcp.h 388 2019-05-22 11:25:18Z 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
136typedef 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 } __attribute__((packed, aligned(2)))T_LCP_CONFIGS;
148
149/*
150 * 変数
151 */
152
153extern T_PPP_FSM lcp_fsm;
154extern T_PPP_PROTENT lcp_protent;
155extern T_LCP_CONFIGS lcp_local_ack_cfg; /* 相手に許可されたの自構成情
156å ± */
157extern T_LCP_CONFIGS lcp_remote_ack_cfg; /* 相手に許可した構成情
158å ± */
159
160/*
161 * 関数
162 */
163
164extern void lcp_lowerup (void);
165extern void lcp_lowerdown (void);
166extern void lcp_down (T_PPP_FSM *fsm);
167extern void lcp_finished (T_PPP_FSM *fsm);
168extern void lcp_open (uint8_t open_mode);
169extern void lcp_close (void);
170extern void lcp_sprotrej (T_NET_BUF *data);
171
172#endif /* of #ifdef SUPPORT_PPP */
173
174#endif /* of #ifndef _PPP_LCP_H_ */
Note: See TracBrowser for help on using the repository browser.