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_hdlc.h 317 2017-08-03 13:14:26Z coas-nagasima $
|
---|
44 | */
|
---|
45 |
|
---|
46 | /*
|
---|
47 | * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
|
---|
48 | *
|
---|
49 | * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
|
---|
50 | *
|
---|
51 | * Redistribution and use in source and binary forms are permitted
|
---|
52 | * provided that the above copyright notice and this paragraph are
|
---|
53 | * duplicated in all such forms and that any documentation,
|
---|
54 | * advertising materials, and other materials related to such
|
---|
55 | * distribution and use acknowledge that the software was developed
|
---|
56 | * by the Internet Initiative Japan. The name of the
|
---|
57 | * IIJ may not be used to endorse or promote products derived
|
---|
58 | * from this software without specific prior written permission.
|
---|
59 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
---|
60 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
---|
61 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
---|
62 | *
|
---|
63 | * $FreeBSD: src/usr.sbin/ppp/hdlc.h,v 1.21 1999/12/30 13:27:15 brian Exp $
|
---|
64 | *
|
---|
65 | * TODO:
|
---|
66 | */
|
---|
67 |
|
---|
68 | #ifndef _PPP__HDLC_H_
|
---|
69 | #define _PPP__HDLC_H_
|
---|
70 |
|
---|
71 | #ifdef SUPPORT_PPP
|
---|
72 |
|
---|
73 | /*
|
---|
74 | * RFC1171 (PPP) ã® HDLC é¨ã®å®ç¾©
|
---|
75 | */
|
---|
76 |
|
---|
77 | /*
|
---|
78 | * æ¢å®å¤
|
---|
79 | */
|
---|
80 |
|
---|
81 | #define HDLC_FLAG_SEQ UINT_C(0x7e) /* Flag Sequence */
|
---|
82 | #define HDLC_CNTL_ESC UINT_C(0x7d) /* Control Escape octet */
|
---|
83 | #define HDLC_ADDR_ALL UINT_C(0xff) /* Address: All-Stations */
|
---|
84 | #define HDLC_CNTL_UI UINT_C(0x03) /* Control: UI */
|
---|
85 | #define HDLC_ESC_MASK UINT_C(0x20) /* Escape Mask */
|
---|
86 | #define HDLC_INIT_FCS UINT_C(0xffff) /* Initial FCS value */
|
---|
87 | #define HDLC_INIT_FCS_AC UINT_C(0x3de3) /* Initial FCS value with */
|
---|
88 | /* Address and Control: UI */
|
---|
89 | #define HDLC_GOOD_FCS UINT_C(0xf0b8) /* Good final FCS value */
|
---|
90 |
|
---|
91 | /*
|
---|
92 | * é¢æ°
|
---|
93 | */
|
---|
94 |
|
---|
95 | extern ER HDLC_write (T_NET_BUF *data);
|
---|
96 | extern ER HDLC_read (T_NET_BUF *data, uint16_t size);
|
---|
97 | extern void HDLC_dummy_read (void);
|
---|
98 |
|
---|
99 | #ifdef PPP_CFG_MODEM
|
---|
100 |
|
---|
101 | extern int_t HDLC_raw_getoctet (void);
|
---|
102 | extern void HDLC_raw_putoctet (uint8_t ch);
|
---|
103 |
|
---|
104 | #endif /* of #ifdef PPP_CFG_MODEM */
|
---|
105 |
|
---|
106 | #endif /* of #ifdef SUPPORT_PPP */
|
---|
107 |
|
---|
108 | #endif /* of #ifndef _PPP__HDLC_H_ */
|
---|