]>
Commit | Line | Data |
---|---|---|
6f52b16c | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
1da177e4 LT |
2 | /* atmsap.h - ATM Service Access Point addressing definitions */ |
3 | ||
4 | /* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */ | |
5 | ||
6 | ||
7 | #ifndef _LINUX_ATMSAP_H | |
8 | #define _LINUX_ATMSAP_H | |
9 | ||
10 | #include <linux/atmapi.h> | |
11 | ||
12 | /* | |
13 | * BEGIN_xx and END_xx markers are used for automatic generation of | |
14 | * documentation. Do not change them. | |
15 | */ | |
16 | ||
17 | ||
18 | /* | |
19 | * Layer 2 protocol identifiers | |
20 | */ | |
21 | ||
22 | /* BEGIN_L2 */ | |
23 | #define ATM_L2_NONE 0 /* L2 not specified */ | |
24 | #define ATM_L2_ISO1745 0x01 /* Basic mode ISO 1745 */ | |
25 | #define ATM_L2_Q291 0x02 /* ITU-T Q.291 (Rec. I.441) */ | |
26 | #define ATM_L2_X25_LL 0x06 /* ITU-T X.25, link layer */ | |
27 | #define ATM_L2_X25_ML 0x07 /* ITU-T X.25, multilink */ | |
28 | #define ATM_L2_LAPB 0x08 /* Extended LAPB, half-duplex (Rec. T.71) */ | |
29 | #define ATM_L2_HDLC_ARM 0x09 /* HDLC ARM (ISO/IEC 4335) */ | |
30 | #define ATM_L2_HDLC_NRM 0x0a /* HDLC NRM (ISO/IEC 4335) */ | |
31 | #define ATM_L2_HDLC_ABM 0x0b /* HDLC ABM (ISO/IEC 4335) */ | |
32 | #define ATM_L2_ISO8802 0x0c /* LAN LLC (ISO/IEC 8802/2) */ | |
33 | #define ATM_L2_X75 0x0d /* ITU-T X.75, SLP */ | |
34 | #define ATM_L2_Q922 0x0e /* ITU-T Q.922 */ | |
35 | #define ATM_L2_USER 0x10 /* user-specified */ | |
36 | #define ATM_L2_ISO7776 0x11 /* ISO 7776 DTE-DTE */ | |
37 | /* END_L2 */ | |
38 | ||
39 | ||
40 | /* | |
41 | * Layer 3 protocol identifiers | |
42 | */ | |
43 | ||
44 | /* BEGIN_L3 */ | |
45 | #define ATM_L3_NONE 0 /* L3 not specified */ | |
46 | #define ATM_L3_X25 0x06 /* ITU-T X.25, packet layer */ | |
47 | #define ATM_L3_ISO8208 0x07 /* ISO/IEC 8208 */ | |
48 | #define ATM_L3_X223 0x08 /* ITU-T X.223 | ISO/IEC 8878 */ | |
49 | #define ATM_L3_ISO8473 0x09 /* ITU-T X.233 | ISO/IEC 8473 */ | |
50 | #define ATM_L3_T70 0x0a /* ITU-T T.70 minimum network layer */ | |
51 | #define ATM_L3_TR9577 0x0b /* ISO/IEC TR 9577 */ | |
52 | #define ATM_L3_H310 0x0c /* ITU-T Recommendation H.310 */ | |
53 | #define ATM_L3_H321 0x0d /* ITU-T Recommendation H.321 */ | |
54 | #define ATM_L3_USER 0x10 /* user-specified */ | |
55 | /* END_L3 */ | |
56 | ||
57 | ||
58 | /* | |
59 | * High layer identifiers | |
60 | */ | |
61 | ||
62 | /* BEGIN_HL */ | |
63 | #define ATM_HL_NONE 0 /* HL not specified */ | |
64 | #define ATM_HL_ISO 0x01 /* ISO */ | |
65 | #define ATM_HL_USER 0x02 /* user-specific */ | |
66 | #define ATM_HL_HLP 0x03 /* high layer profile - UNI 3.0 only */ | |
67 | #define ATM_HL_VENDOR 0x04 /* vendor-specific application identifier */ | |
68 | /* END_HL */ | |
69 | ||
70 | ||
71 | /* | |
72 | * ITU-T coded mode of operation | |
73 | */ | |
74 | ||
75 | /* BEGIN_IMD */ | |
76 | #define ATM_IMD_NONE 0 /* mode not specified */ | |
77 | #define ATM_IMD_NORMAL 1 /* normal mode of operation */ | |
78 | #define ATM_IMD_EXTENDED 2 /* extended mode of operation */ | |
79 | /* END_IMD */ | |
80 | ||
81 | /* | |
82 | * H.310 code points | |
83 | */ | |
84 | ||
85 | #define ATM_TT_NONE 0 /* terminal type not specified */ | |
86 | #define ATM_TT_RX 1 /* receive only */ | |
87 | #define ATM_TT_TX 2 /* send only */ | |
88 | #define ATM_TT_RXTX 3 /* receive and send */ | |
89 | ||
90 | #define ATM_MC_NONE 0 /* no multiplexing */ | |
91 | #define ATM_MC_TS 1 /* transport stream (TS) */ | |
92 | #define ATM_MC_TS_FEC 2 /* transport stream with forward error corr. */ | |
93 | #define ATM_MC_PS 3 /* program stream (PS) */ | |
94 | #define ATM_MC_PS_FEC 4 /* program stream with forward error corr. */ | |
95 | #define ATM_MC_H221 5 /* ITU-T Rec. H.221 */ | |
96 | ||
97 | /* | |
98 | * SAP structures | |
99 | */ | |
100 | ||
101 | #define ATM_MAX_HLI 8 /* maximum high-layer information length */ | |
102 | ||
103 | ||
104 | struct atm_blli { | |
105 | unsigned char l2_proto; /* layer 2 protocol */ | |
106 | union { | |
107 | struct { | |
108 | unsigned char mode; /* mode of operation (ATM_IMD_xxx), 0 if */ | |
109 | /* absent */ | |
110 | unsigned char window; /* window size (k), 1-127 (0 to omit) */ | |
111 | } itu; /* ITU-T encoding */ | |
112 | unsigned char user; /* user-specified l2 information */ | |
113 | } l2; | |
114 | unsigned char l3_proto; /* layer 3 protocol */ | |
115 | union { | |
116 | struct { | |
117 | unsigned char mode; /* mode of operation (ATM_IMD_xxx), 0 if */ | |
118 | /* absent */ | |
119 | unsigned char def_size; /* default packet size (log2), 4-12 (0 to */ | |
120 | /* omit) */ | |
121 | unsigned char window;/* packet window size, 1-127 (0 to omit) */ | |
122 | } itu; /* ITU-T encoding */ | |
123 | unsigned char user; /* user specified l3 information */ | |
124 | struct { /* if l3_proto = ATM_L3_H310 */ | |
125 | unsigned char term_type; /* terminal type */ | |
126 | unsigned char fw_mpx_cap; /* forward multiplexing capability */ | |
127 | /* only if term_type != ATM_TT_NONE */ | |
128 | unsigned char bw_mpx_cap; /* backward multiplexing capability */ | |
129 | /* only if term_type != ATM_TT_NONE */ | |
130 | } h310; | |
131 | struct { /* if l3_proto = ATM_L3_TR9577 */ | |
132 | unsigned char ipi; /* initial protocol id */ | |
133 | unsigned char snap[5];/* IEEE 802.1 SNAP identifier */ | |
134 | /* (only if ipi == NLPID_IEEE802_1_SNAP) */ | |
135 | } tr9577; | |
136 | } l3; | |
137 | } __ATM_API_ALIGN; | |
138 | ||
139 | ||
140 | struct atm_bhli { | |
141 | unsigned char hl_type; /* high layer information type */ | |
142 | unsigned char hl_length; /* length (only if hl_type == ATM_HL_USER || */ | |
143 | /* hl_type == ATM_HL_ISO) */ | |
144 | unsigned char hl_info[ATM_MAX_HLI];/* high layer information */ | |
145 | }; | |
146 | ||
147 | ||
148 | #define ATM_MAX_BLLI 3 /* maximum number of BLLI elements */ | |
149 | ||
150 | ||
151 | struct atm_sap { | |
152 | struct atm_bhli bhli; /* local SAP, high-layer information */ | |
153 | struct atm_blli blli[ATM_MAX_BLLI] __ATM_API_ALIGN; | |
154 | /* local SAP, low-layer info */ | |
155 | }; | |
156 | ||
157 | ||
158 | static __inline__ int blli_in_use(struct atm_blli blli) | |
159 | { | |
160 | return blli.l2_proto || blli.l3_proto; | |
161 | } | |
162 | ||
163 | #endif |