source: azure_iot_hub/trunk/asp3_dcre/tinet/net/ppp_hdlc.h@ 389

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

ビルドが通るよう更新

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr;charset=UTF-8
File size: 4.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 * 上記著作権者は,以下の (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 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
36 *
37 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
38 *
39 * Redistribution and use in source and binary forms are permitted
40 * provided that the above copyright notice and this paragraph are
41 * duplicated in all such forms and that any documentation,
42 * advertising materials, and other materials related to such
43 * distribution and use acknowledge that the software was developed
44 * by the Internet Initiative Japan. The name of the
45 * IIJ may not be used to endorse or promote products derived
46 * from this software without specific prior written permission.
47 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
48 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
49 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
50 *
51 * $FreeBSD: src/usr.sbin/ppp/hdlc.h,v 1.21 1999/12/30 13:27:15 brian Exp $
52 *
53 * TODO:
54 */
55
56#ifndef _PPP__HDLC_H_
57#define _PPP__HDLC_H_
58
59#ifdef SUPPORT_PPP
60
61/*
62 * RFC1171 (PPP) の HDLC 部の定義
63 */
64
65/*
66 * 既定値
67 */
68
69#define HDLC_FLAG_SEQ UINT_C(0x7e) /* Flag Sequence */
70#define HDLC_CNTL_ESC UINT_C(0x7d) /* Control Escape octet */
71#define HDLC_ADDR_ALL UINT_C(0xff) /* Address: All-Stations */
72#define HDLC_CNTL_UI UINT_C(0x03) /* Control: UI */
73#define HDLC_ESC_MASK UINT_C(0x20) /* Escape Mask */
74#define HDLC_INIT_FCS UINT_C(0xffff) /* Initial FCS value */
75#define HDLC_INIT_FCS_AC UINT_C(0x3de3) /* Initial FCS value with */
76 /* Address and Control: UI */
77#define HDLC_GOOD_FCS UINT_C(0xf0b8) /* Good final FCS value */
78
79/*
80 * 関数
81 */
82
83extern ER HDLC_write (T_NET_BUF *data);
84extern ER HDLC_read (T_NET_BUF *data, uint16_t size);
85extern void HDLC_dummy_read (void);
86
87#ifdef PPP_CFG_MODEM
88
89extern int_t HDLC_raw_getoctet (void);
90extern void HDLC_raw_putoctet (uint8_t ch);
91
92#endif /* of #ifdef PPP_CFG_MODEM */
93
94#endif /* of #ifdef SUPPORT_PPP */
95
96#endif /* of #ifndef _PPP__HDLC_H_ */
Note: See TracBrowser for help on using the repository browser.