source: EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_ppp.h@ 321

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

文字コードを設定

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr;charset=UTF-8
File size: 5.0 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 * 上記著作権者は,以下の (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 * if_ppp.h - Point-to-Point Protocol definitions.
36 *
37 * Copyright (c) 1989 Carnegie Mellon University.
38 * All rights reserved.
39 *
40 * Redistribution and use in source and binary forms are permitted
41 * provided that the above copyright notice and this paragraph are
42 * duplicated in all such forms and that any documentation,
43 * advertising materials, and other materials related to such
44 * distribution and use acknowledge that the software was developed
45 * by Carnegie Mellon University. The name of the
46 * University may not be used to endorse or promote products derived
47 * from this software without specific prior written permission.
48 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
49 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
50 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
51 *
52 * $FreeBSD: src/sys/net/if_ppp.h,v 1.13.2.1 1999/08/29 16:28:21 peter Exp $
53 */
54
55#ifndef _IF_PPP_H_
56#define _IF_PPP_H_
57
58#ifdef SUPPORT_PPP
59
60/*
61 * インタフェースの選択マクロ
62 */
63
64#define T_IF_HDR T_PPP_HDR /* インタフェースのヘッダ */
65#define IF_HDR_ALIGN 2 /* ヘッダのアライン単位 */
66#define IF_MTU DEF_PPP_MTU /* インタフェースの MTU */
67 /* インタフェースの IPv4 アドレス */
68#define IF_PROTO_IP PPP_IP /* インタフェースの IP プロトコル指定 */
69
70#define IF_OUTPUT(o,d,g,t) ppp_output(o,t) /* インタフェースの出力関数 */
71#define IF_RAW_OUTPUT(o,t) ppp_output(o,t) /* インタフェースの出力関数、アドレス解決無し*/
72 /* インタフェースのプロトコル設定関数 */
73#define IF_SET_PROTO(b,p) (*GET_PPP_HDR(b) = htons(p))
74#define IF_GET_IFNET() ppp_get_ifnet() /* ネットワークインタフェース構造体を返す。 */
75
76/*
77 * MTU (MRU) に関する定義
78 */
79
80#define DEF_PPP_MTU 1500 /* PPP の 標準 MTU */
81#define MAX_PPP_MTU 16384 /* PPP の 最大 MTU */
82#define MIN_PPP_MTU 128 /* PPP の 最小 MTU */
83
84/*
85 * PPP ヘッダ
86 */
87
88typedef uint16_t T_PPP_HDR; /* 上位プロトコル */
89
90/*
91 * 前方参照
92 */
93
94#ifndef T_IFNET_DEFINED
95
96typedef struct t_ifnet T_IFNET;
97
98#define T_IFNET_DEFINED
99
100#endif /* of #ifndef T_IFNET_DEFINED */
101
102#ifndef T_IF_SOFTC_DEFINED
103
104typedef struct t_if_softc T_IF_SOFTC;
105
106#define T_IF_SOFTC_DEFINED
107
108#endif /* of #ifndef T_IF_SOFTC_DEFINED */
109
110#ifndef T_NET_BUF_DEFINED
111
112typedef struct t_net_buf T_NET_BUF;
113
114#define T_NET_BUF_DEFINED
115
116#endif /* of #ifndef T_NET_BUF_DEFINED */
117
118/*
119 * ネットワークインタフェースに依存しないソフトウェア情報
120 */
121
122struct t_if_softc { };
123
124/*
125 * 関数
126 */
127
128extern T_IFNET *ppp_get_ifnet (void);
129ER ppp_output (T_NET_BUF *data, TMO tmout);
130
131#endif /* of #ifdef SUPPORT_PPP */
132
133#endif /* of #ifndef _IF_PPP_H_ */
Note: See TracBrowser for help on using the repository browser.