source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ws2atm.h

Last change on this file was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 8.2 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _WS2ATM_H_
7#define _WS2ATM_H_
8
9#include <pshpack4.h>
10
11#define ATMPROTO_AALUSER 0x00
12#define ATMPROTO_AAL1 0x01
13#define ATMPROTO_AAL2 0x02
14#define ATMPROTO_AAL34 0x03
15#define ATMPROTO_AAL5 0x05
16
17#define SAP_FIELD_ABSENT 0xFFFFFFFE
18#define SAP_FIELD_ANY 0xFFFFFFFF
19#define SAP_FIELD_ANY_AESA_SEL 0xFFFFFFFA
20#define SAP_FIELD_ANY_AESA_REST 0xFFFFFFFB
21
22#define ATM_E164 0x01
23#define ATM_NSAP 0x02
24#define ATM_AESA 0x02
25
26#define ATM_ADDR_SIZE 20
27typedef struct {
28 DWORD AddressType;
29 DWORD NumofDigits;
30 UCHAR Addr[ATM_ADDR_SIZE];
31} ATM_ADDRESS;
32
33#define BLLI_L2_ISO_1745 0x01
34#define BLLI_L2_Q921 0x02
35#define BLLI_L2_X25L 0x06
36#define BLLI_L2_X25M 0x07
37#define BLLI_L2_ELAPB 0x08
38#define BLLI_L2_HDLC_ARM 0x09
39#define BLLI_L2_HDLC_NRM 0x0A
40#define BLLI_L2_HDLC_ABM 0x0B
41#define BLLI_L2_LLC 0x0C
42#define BLLI_L2_X75 0x0D
43#define BLLI_L2_Q922 0x0E
44#define BLLI_L2_USER_SPECIFIED 0x10
45#define BLLI_L2_ISO_7776 0x11
46
47#define BLLI_L3_X25 0x06
48#define BLLI_L3_ISO_8208 0x07
49#define BLLI_L3_X223 0x08
50#define BLLI_L3_SIO_8473 0x09
51#define BLLI_L3_T70 0x0A
52#define BLLI_L3_ISO_TR9577 0x0B
53#define BLLI_L3_USER_SPECIFIED 0x10
54
55#define BLLI_L3_IPI_SNAP 0x80
56#define BLLI_L3_IPI_IP 0xCC
57
58typedef struct {
59 DWORD Layer2Protocol;
60 DWORD Layer2UserSpecifiedProtocol;
61 DWORD Layer3Protocol;
62 DWORD Layer3UserSpecifiedProtocol;
63 DWORD Layer3IPI;
64 UCHAR SnapID[5];
65} ATM_BLLI;
66
67#define BHLI_ISO 0x00
68#define BHLI_UserSpecific 0x01
69#define BHLI_HighLayerProfile 0x02
70#define BHLI_VendorSpecificAppId 0x03
71
72typedef struct {
73 DWORD HighLayerInfoType;
74 DWORD HighLayerInfoLength;
75 UCHAR HighLayerInfo[8];
76} ATM_BHLI;
77
78typedef struct sockaddr_atm {
79 u_short satm_family;
80 ATM_ADDRESS satm_number;
81 ATM_BLLI satm_blli;
82 ATM_BHLI satm_bhli;
83} sockaddr_atm,SOCKADDR_ATM,*PSOCKADDR_ATM,*LPSOCKADDR_ATM;
84
85typedef enum {
86 IE_AALParameters,IE_TrafficDescriptor,IE_BroadbandBearerCapability,IE_BHLI,IE_BLLI,IE_CalledPartyNumber,IE_CalledPartySubaddress,
87 IE_CallingPartyNumber,IE_CallingPartySubaddress,IE_Cause,IE_QOSClass,IE_TransitNetworkSelection
88} Q2931_IE_TYPE;
89
90typedef struct {
91 Q2931_IE_TYPE IEType;
92 ULONG IELength;
93 UCHAR IE[1];
94} Q2931_IE;
95
96typedef enum {
97 AALTYPE_5 = 5,AALTYPE_USER = 16
98} AAL_TYPE;
99
100#define AAL5_MODE_MESSAGE 0x01
101#define AAL5_MODE_STREAMING 0x02
102
103#define AAL5_SSCS_NULL 0x00
104#define AAL5_SSCS_SSCOP_ASSURED 0x01
105#define AAL5_SSCS_SSCOP_NON_ASSURED 0x02
106#define AAL5_SSCS_FRAME_RELAY 0x04
107
108typedef struct {
109 ULONG ForwardMaxCPCSSDUSize;
110 ULONG BackwardMaxCPCSSDUSize;
111 UCHAR Mode;
112 UCHAR SSCSType;
113} AAL5_PARAMETERS;
114
115typedef struct {
116 ULONG UserDefined;
117} AALUSER_PARAMETERS;
118
119typedef struct {
120 AAL_TYPE AALType;
121 union {
122 AAL5_PARAMETERS AAL5Parameters;
123 AALUSER_PARAMETERS AALUserParameters;
124 } AALSpecificParameters;
125} AAL_PARAMETERS_IE;
126
127typedef struct {
128 ULONG PeakCellRate_CLP0;
129 ULONG PeakCellRate_CLP01;
130 ULONG SustainableCellRate_CLP0;
131 ULONG SustainableCellRate_CLP01;
132 ULONG MaxBurstSize_CLP0;
133 ULONG MaxBurstSize_CLP01;
134 WINBOOL Tagging;
135} ATM_TD;
136
137typedef struct {
138 ATM_TD Forward;
139 ATM_TD Backward;
140 WINBOOL BestEffort;
141} ATM_TRAFFIC_DESCRIPTOR_IE;
142
143#define BCOB_A 0x01
144#define BCOB_C 0x03
145#define BCOB_X 0x10
146
147#define TT_NOIND 0x00
148#define TT_CBR 0x04
149#define TT_VBR 0x08
150
151#define TR_NOIND 0x00
152#define TR_END_TO_END 0x01
153#define TR_NO_END_TO_END 0x02
154
155#define CLIP_NOT 0x00
156#define CLIP_SUS 0x20
157
158#define UP_P2P 0x00
159#define UP_P2MP 0x01
160
161typedef struct {
162 UCHAR BearerClass;
163 UCHAR TrafficType;
164 UCHAR TimingRequirements;
165 UCHAR ClippingSusceptability;
166 UCHAR UserPlaneConnectionConfig;
167} ATM_BROADBAND_BEARER_CAPABILITY_IE;
168
169typedef ATM_BHLI ATM_BHLI_IE;
170
171#define BLLI_L2_MODE_NORMAL 0x40
172#define BLLI_L2_MODE_EXT 0x80
173
174#define BLLI_L3_MODE_NORMAL 0x40
175#define BLLI_L3_MODE_EXT 0x80
176
177#define BLLI_L3_PACKET_16 0x04
178#define BLLI_L3_PACKET_32 0x05
179#define BLLI_L3_PACKET_64 0x06
180#define BLLI_L3_PACKET_128 0x07
181#define BLLI_L3_PACKET_256 0x08
182#define BLLI_L3_PACKET_512 0x09
183#define BLLI_L3_PACKET_1024 0x0A
184#define BLLI_L3_PACKET_2048 0x0B
185#define BLLI_L3_PACKET_4096 0x0C
186
187typedef struct {
188 DWORD Layer2Protocol;
189 UCHAR Layer2Mode;
190 UCHAR Layer2WindowSize;
191 DWORD Layer2UserSpecifiedProtocol;
192 DWORD Layer3Protocol;
193 UCHAR Layer3Mode;
194 UCHAR Layer3DefaultPacketSize;
195 UCHAR Layer3PacketWindowSize;
196 DWORD Layer3UserSpecifiedProtocol;
197 DWORD Layer3IPI;
198 UCHAR SnapID[5];
199} ATM_BLLI_IE;
200
201typedef ATM_ADDRESS ATM_CALLED_PARTY_NUMBER_IE;
202typedef ATM_ADDRESS ATM_CALLED_PARTY_SUBADDRESS_IE;
203
204#define PI_ALLOWED 0x00
205#define PI_RESTRICTED 0x40
206#define PI_NUMBER_NOT_AVAILABLE 0x80
207
208#define SI_USER_NOT_SCREENED 0x00
209#define SI_USER_PASSED 0x01
210#define SI_USER_FAILED 0x02
211#define SI_NETWORK 0x03
212
213typedef struct {
214 ATM_ADDRESS ATM_Number;
215 UCHAR Presentation_Indication;
216 UCHAR Screening_Indicator;
217} ATM_CALLING_PARTY_NUMBER_IE;
218
219typedef ATM_ADDRESS ATM_CALLING_PARTY_SUBADDRESS_IE;
220
221#define CAUSE_LOC_USER 0x00
222#define CAUSE_LOC_PRIVATE_LOCAL 0x01
223#define CAUSE_LOC_PUBLIC_LOCAL 0x02
224#define CAUSE_LOC_TRANSIT_NETWORK 0x03
225#define CAUSE_LOC_PUBLIC_REMOTE 0x04
226#define CAUSE_LOC_PRIVATE_REMOTE 0x05
227#define CAUSE_LOC_INTERNATIONAL_NETWORK 0x07
228#define CAUSE_LOC_BEYOND_INTERWORKING 0x0A
229
230#define CAUSE_UNALLOCATED_NUMBER 0x01
231#define CAUSE_NO_ROUTE_TO_TRANSIT_NETWORK 0x02
232#define CAUSE_NO_ROUTE_TO_DESTINATION 0x03
233#define CAUSE_VPI_VCI_UNACCEPTABLE 0x0A
234#define CAUSE_NORMAL_CALL_CLEARING 0x10
235#define CAUSE_USER_BUSY 0x11
236#define CAUSE_NO_USER_RESPONDING 0x12
237#define CAUSE_CALL_REJECTED 0x15
238#define CAUSE_NUMBER_CHANGED 0x16
239#define CAUSE_USER_REJECTS_CLIR 0x17
240#define CAUSE_DESTINATION_OUT_OF_ORDER 0x1B
241#define CAUSE_INVALID_NUMBER_FORMAT 0x1C
242#define CAUSE_STATUS_ENQUIRY_RESPONSE 0x1E
243#define CAUSE_NORMAL_UNSPECIFIED 0x1F
244#define CAUSE_VPI_VCI_UNAVAILABLE 0x23
245#define CAUSE_NETWORK_OUT_OF_ORDER 0x26
246#define CAUSE_TEMPORARY_FAILURE 0x29
247#define CAUSE_ACCESS_INFORMAION_DISCARDED 0x2B
248#define CAUSE_NO_VPI_VCI_AVAILABLE 0x2D
249#define CAUSE_RESOURCE_UNAVAILABLE 0x2F
250#define CAUSE_QOS_UNAVAILABLE 0x31
251#define CAUSE_USER_CELL_RATE_UNAVAILABLE 0x33
252#define CAUSE_BEARER_CAPABILITY_UNAUTHORIZED 0x39
253#define CAUSE_BEARER_CAPABILITY_UNAVAILABLE 0x3A
254#define CAUSE_OPTION_UNAVAILABLE 0x3F
255#define CAUSE_BEARER_CAPABILITY_UNIMPLEMENTED 0x41
256#define CAUSE_UNSUPPORTED_TRAFFIC_PARAMETERS 0x49
257#define CAUSE_INVALID_CALL_REFERENCE 0x51
258#define CAUSE_CHANNEL_NONEXISTENT 0x52
259#define CAUSE_INCOMPATIBLE_DESTINATION 0x58
260#define CAUSE_INVALID_ENDPOINT_REFERENCE 0x59
261#define CAUSE_INVALID_TRANSIT_NETWORK_SELECTION 0x5B
262#define CAUSE_TOO_MANY_PENDING_ADD_PARTY 0x5C
263#define CAUSE_AAL_PARAMETERS_UNSUPPORTED 0x5D
264#define CAUSE_MANDATORY_IE_MISSING 0x60
265#define CAUSE_UNIMPLEMENTED_MESSAGE_TYPE 0x61
266#define CAUSE_UNIMPLEMENTED_IE 0x63
267#define CAUSE_INVALID_IE_CONTENTS 0x64
268#define CAUSE_INVALID_STATE_FOR_MESSAGE 0x65
269#define CAUSE_RECOVERY_ON_TIMEOUT 0x66
270#define CAUSE_INCORRECT_MESSAGE_LENGTH 0x68
271#define CAUSE_PROTOCOL_ERROR 0x6F
272
273#define CAUSE_COND_UNKNOWN 0x00
274#define CAUSE_COND_PERMANENT 0x01
275#define CAUSE_COND_TRANSIENT 0x02
276
277#define CAUSE_REASON_USER 0x00
278#define CAUSE_REASON_IE_MISSING 0x04
279#define CAUSE_REASON_IE_INSUFFICIENT 0x08
280
281#define CAUSE_PU_PROVIDER 0x00
282#define CAUSE_PU_USER 0x08
283
284#define CAUSE_NA_NORMAL 0x00
285#define CAUSE_NA_ABNORMAL 0x04
286
287typedef struct {
288 UCHAR Location;
289 UCHAR Cause;
290 UCHAR DiagnosticsLength;
291 UCHAR Diagnostics[4];
292} ATM_CAUSE_IE;
293
294#define QOS_CLASS0 0x00
295#define QOS_CLASS1 0x01
296#define QOS_CLASS2 0x02
297#define QOS_CLASS3 0x03
298#define QOS_CLASS4 0x04
299
300typedef struct {
301 UCHAR QOSClassForward;
302 UCHAR QOSClassBackward;
303} ATM_QOS_CLASS_IE;
304
305#define TNS_TYPE_NATIONAL 0x40
306
307#define TNS_PLAN_CARRIER_ID_CODE 0x01
308
309typedef struct {
310 UCHAR TypeOfNetworkId;
311 UCHAR NetworkIdPlan;
312 UCHAR NetworkIdLength;
313 UCHAR NetworkId[1];
314} ATM_TRANSIT_NETWORK_SELECTION_IE;
315
316#define SIO_GET_NUMBER_OF_ATM_DEVICES 0x50160001
317#define SIO_GET_ATM_ADDRESS 0xd0160002
318#define SIO_ASSOCIATE_PVC 0x90160003
319#define SIO_GET_ATM_CONNECTION_ID 0x50160004
320
321typedef struct {
322 DWORD DeviceNumber;
323 DWORD VPI;
324 DWORD VCI;
325} ATM_CONNECTION_ID;
326
327typedef struct {
328 ATM_CONNECTION_ID PvcConnectionId;
329 QOS PvcQos;
330} ATM_PVC_PARAMS;
331
332#include <poppack.h>
333#endif
Note: See TracBrowser for help on using the repository browser.