Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

463 lines
16 KiB

  1. /*++
  2. Copyright (c) 1997-1999 Microsoft Corporation
  3. Module Name:
  4. ws2atm.h
  5. Abstract:
  6. Winsock 2 ATM Annex definitions.
  7. Revision History:
  8. Notes:
  9. --*/
  10. #ifndef _WS2ATM_H_
  11. #define _WS2ATM_H_
  12. #if _MSC_VER > 1000
  13. #pragma once
  14. #endif
  15. #include <pshpack4.h>
  16. #define ATMPROTO_AALUSER 0x00 /* User-defined AAL */
  17. #define ATMPROTO_AAL1 0x01 /* AAL 1 */
  18. #define ATMPROTO_AAL2 0x02 /* AAL 2 */
  19. #define ATMPROTO_AAL34 0x03 /* AAL 3/4 */
  20. #define ATMPROTO_AAL5 0x05 /* AAL 5 */
  21. #define SAP_FIELD_ABSENT 0xFFFFFFFE
  22. #define SAP_FIELD_ANY 0xFFFFFFFF
  23. #define SAP_FIELD_ANY_AESA_SEL 0xFFFFFFFA
  24. #define SAP_FIELD_ANY_AESA_REST 0xFFFFFFFB
  25. /*
  26. * values used for AddressType in struct ATM_ADDRESS
  27. */
  28. #define ATM_E164 0x01 /* E.164 addressing scheme */
  29. #define ATM_NSAP 0x02 /* NSAP-style ATM Endsystem Address scheme */
  30. #define ATM_AESA 0x02 /* NSAP-style ATM Endsystem Address scheme */
  31. #define ATM_ADDR_SIZE 20
  32. typedef struct {
  33. DWORD AddressType; /* E.164 or NSAP-style ATM Endsystem Address */
  34. DWORD NumofDigits; /* number of digits; */
  35. UCHAR Addr[ATM_ADDR_SIZE]; /* IA5 digits for E164, BCD encoding for NSAP */
  36. /* format as defined in the ATM Forum UNI 3.1 */
  37. } ATM_ADDRESS;
  38. /*
  39. * values used for Layer2Protocol in B-LLI
  40. */
  41. #define BLLI_L2_ISO_1745 0x01 /* Basic mode ISO 1745 */
  42. #define BLLI_L2_Q921 0x02 /* CCITT Rec. Q.921 */
  43. #define BLLI_L2_X25L 0x06 /* CCITT Rec. X.25, link layer */
  44. #define BLLI_L2_X25M 0x07 /* CCITT Rec. X.25, multilink */
  45. #define BLLI_L2_ELAPB 0x08 /* Extended LAPB; for half duplex operation */
  46. #define BLLI_L2_HDLC_ARM 0x09 /* HDLC ARM (ISO 4335) */
  47. #define BLLI_L2_HDLC_NRM 0x0A /* HDLC NRM (ISO 4335) */
  48. #define BLLI_L2_HDLC_ABM 0x0B /* HDLC ABM (ISO 4335) */
  49. #define BLLI_L2_LLC 0x0C /* LAN logical link control (ISO 8802/2) */
  50. #define BLLI_L2_X75 0x0D /* CCITT Rec. X.75, single link procedure */
  51. #define BLLI_L2_Q922 0x0E /* CCITT Rec. Q.922 */
  52. #define BLLI_L2_USER_SPECIFIED 0x10 /* User Specified */
  53. #define BLLI_L2_ISO_7776 0x11 /* ISO 7776 DTE-DTE operation */
  54. /*
  55. * values used for Layer3Protocol in B-LLI
  56. */
  57. #define BLLI_L3_X25 0x06 /* CCITT Rec. X.25, packet layer */
  58. #define BLLI_L3_ISO_8208 0x07 /* ISO/IEC 8208 (X.25 packet layer for DTE */
  59. #define BLLI_L3_X223 0x08 /* X.223/ISO 8878 */
  60. #define BLLI_L3_SIO_8473 0x09 /* ISO/IEC 8473 (OSI connectionless) */
  61. #define BLLI_L3_T70 0x0A /* CCITT Rec. T.70 min. network layer */
  62. #define BLLI_L3_ISO_TR9577 0x0B /* ISO/IEC TR 9577 Network Layer Protocol ID*/
  63. #define BLLI_L3_USER_SPECIFIED 0x10 /* User Specified */
  64. /*
  65. * values used for Layer3IPI in B-LLI
  66. */
  67. #define BLLI_L3_IPI_SNAP 0x80 /* IEEE 802.1 SNAP identifier */
  68. #define BLLI_L3_IPI_IP 0xCC /* Internet Protocol (IP) identifier */
  69. typedef struct {
  70. DWORD Layer2Protocol; /* User information layer 2 protocol */
  71. DWORD Layer2UserSpecifiedProtocol; /* User specified layer 2 protocol information */
  72. DWORD Layer3Protocol; /* User information layer 3 protocol */
  73. DWORD Layer3UserSpecifiedProtocol; /* User specified layer 3 protocol information */
  74. DWORD Layer3IPI; /* ISO/IEC TR 9577 Initial Protocol Identifier */
  75. UCHAR SnapID[5]; /* SNAP ID consisting of OUI and PID */
  76. } ATM_BLLI;
  77. /*
  78. * values used for the HighLayerInfoType field in ATM_BHLI
  79. */
  80. #define BHLI_ISO 0x00 /* ISO */
  81. #define BHLI_UserSpecific 0x01 /* User Specific */
  82. #define BHLI_HighLayerProfile 0x02 /* High layer profile (only in UNI3.0) */
  83. #define BHLI_VendorSpecificAppId 0x03 /* Vendor-Specific Application ID */
  84. typedef struct {
  85. DWORD HighLayerInfoType; /* High Layer Information Type */
  86. DWORD HighLayerInfoLength; /* number of bytes in HighLayerInfo */
  87. UCHAR HighLayerInfo[8]; /* the value dependent on the */
  88. /* HighLayerInfoType field */
  89. } ATM_BHLI;
  90. typedef struct sockaddr_atm {
  91. u_short satm_family; /* address family should be AF_ATM */
  92. ATM_ADDRESS satm_number; /* ATM address */
  93. ATM_BLLI satm_blli; /* B-LLI */
  94. ATM_BHLI satm_bhli; /* B-HLI */
  95. } sockaddr_atm, SOCKADDR_ATM, *PSOCKADDR_ATM, *LPSOCKADDR_ATM;
  96. typedef enum {
  97. IE_AALParameters,
  98. IE_TrafficDescriptor,
  99. IE_BroadbandBearerCapability,
  100. IE_BHLI,
  101. IE_BLLI,
  102. IE_CalledPartyNumber,
  103. IE_CalledPartySubaddress,
  104. IE_CallingPartyNumber,
  105. IE_CallingPartySubaddress,
  106. IE_Cause,
  107. IE_QOSClass,
  108. IE_TransitNetworkSelection,
  109. } Q2931_IE_TYPE;
  110. typedef struct {
  111. Q2931_IE_TYPE IEType;
  112. ULONG IELength;
  113. UCHAR IE[1];
  114. } Q2931_IE;
  115. /*
  116. * manifest constants for the AALType field in struct AAL_PARAMETERS_IE
  117. */
  118. typedef enum {
  119. AALTYPE_5 = 5, /* AAL 5 */
  120. AALTYPE_USER = 16, /* user-defined AAL */
  121. } AAL_TYPE;
  122. /*
  123. * values used for the Mode field in struct AAL5_PARAMETERS
  124. */
  125. #define AAL5_MODE_MESSAGE 0x01
  126. #define AAL5_MODE_STREAMING 0x02
  127. /*
  128. * values used for the SSCSType field in struct AAL5_PARAMETERS
  129. */
  130. #define AAL5_SSCS_NULL 0x00
  131. #define AAL5_SSCS_SSCOP_ASSURED 0x01
  132. #define AAL5_SSCS_SSCOP_NON_ASSURED 0x02
  133. #define AAL5_SSCS_FRAME_RELAY 0x04
  134. typedef struct {
  135. ULONG ForwardMaxCPCSSDUSize;
  136. ULONG BackwardMaxCPCSSDUSize;
  137. UCHAR Mode; /* only available in UNI 3.0 */
  138. UCHAR SSCSType;
  139. } AAL5_PARAMETERS;
  140. typedef struct {
  141. ULONG UserDefined;
  142. } AALUSER_PARAMETERS;
  143. typedef struct {
  144. AAL_TYPE AALType;
  145. union {
  146. AAL5_PARAMETERS AAL5Parameters;
  147. AALUSER_PARAMETERS AALUserParameters;
  148. } AALSpecificParameters;
  149. } AAL_PARAMETERS_IE;
  150. typedef struct {
  151. ULONG PeakCellRate_CLP0;
  152. ULONG PeakCellRate_CLP01;
  153. ULONG SustainableCellRate_CLP0;
  154. ULONG SustainableCellRate_CLP01;
  155. ULONG MaxBurstSize_CLP0;
  156. ULONG MaxBurstSize_CLP01;
  157. BOOL Tagging;
  158. } ATM_TD;
  159. typedef struct {
  160. ATM_TD Forward;
  161. ATM_TD Backward;
  162. BOOL BestEffort;
  163. } ATM_TRAFFIC_DESCRIPTOR_IE;
  164. /*
  165. * values used for the BearerClass field in struct ATM_BROADBAND_BEARER_CAPABILITY_IE
  166. */
  167. #define BCOB_A 0x01 /* Bearer class A */
  168. #define BCOB_C 0x03 /* Bearer class C */
  169. #define BCOB_X 0x10 /* Bearer class X */
  170. /*
  171. * values used for the TrafficType field in struct ATM_BROADBAND_BEARER_CAPABILITY_IE
  172. */
  173. #define TT_NOIND 0x00 /* No indication of traffic type */
  174. #define TT_CBR 0x04 /* Constant bit rate */
  175. #define TT_VBR 0x08 /* Variable bit rate */
  176. /*
  177. * values used for the TimingRequirements field in struct ATM_BROADBAND_BEARER_CAPABILITY_IE
  178. */
  179. #define TR_NOIND 0x00 /* No timing requirement indication */
  180. #define TR_END_TO_END 0x01 /* End-to-end timing required */
  181. #define TR_NO_END_TO_END 0x02 /* End-to-end timing not required */
  182. /*
  183. * values used for the ClippingSusceptability field in struct ATM_BROADBAND_BEARER_CAPABILITY_IE
  184. */
  185. #define CLIP_NOT 0x00 /* Not susceptible to clipping */
  186. #define CLIP_SUS 0x20 /* Susceptible to clipping */
  187. /*
  188. * values used for the UserPlaneConnectionConfig field in
  189. * struct ATM_BROADBAND_BEARER_CAPABILITY_IE
  190. */
  191. #define UP_P2P 0x00 /* Point-to-point connection */
  192. #define UP_P2MP 0x01 /* Point-to-multipoint connection */
  193. typedef struct {
  194. UCHAR BearerClass;
  195. UCHAR TrafficType;
  196. UCHAR TimingRequirements;
  197. UCHAR ClippingSusceptability;
  198. UCHAR UserPlaneConnectionConfig;
  199. } ATM_BROADBAND_BEARER_CAPABILITY_IE;
  200. typedef ATM_BHLI ATM_BHLI_IE;
  201. /*
  202. * values used for the Layer2Mode field in struct ATM_BLLI_IE
  203. */
  204. #define BLLI_L2_MODE_NORMAL 0x40
  205. #define BLLI_L2_MODE_EXT 0x80
  206. /*
  207. * values used for the Layer3Mode field in struct ATM_BLLI_IE
  208. */
  209. #define BLLI_L3_MODE_NORMAL 0x40
  210. #define BLLI_L3_MODE_EXT 0x80
  211. /*
  212. * values used for the Layer3DefaultPacketSize field in struct ATM_BLLI_IE
  213. */
  214. #define BLLI_L3_PACKET_16 0x04
  215. #define BLLI_L3_PACKET_32 0x05
  216. #define BLLI_L3_PACKET_64 0x06
  217. #define BLLI_L3_PACKET_128 0x07
  218. #define BLLI_L3_PACKET_256 0x08
  219. #define BLLI_L3_PACKET_512 0x09
  220. #define BLLI_L3_PACKET_1024 0x0A
  221. #define BLLI_L3_PACKET_2048 0x0B
  222. #define BLLI_L3_PACKET_4096 0x0C
  223. typedef struct {
  224. DWORD Layer2Protocol; /* User information layer 2 protocol */
  225. UCHAR Layer2Mode;
  226. UCHAR Layer2WindowSize;
  227. DWORD Layer2UserSpecifiedProtocol; /* User specified layer 2 protocol information */
  228. DWORD Layer3Protocol; /* User information layer 3 protocol */
  229. UCHAR Layer3Mode;
  230. UCHAR Layer3DefaultPacketSize;
  231. UCHAR Layer3PacketWindowSize;
  232. DWORD Layer3UserSpecifiedProtocol; /* User specified layer 3 protocol information */
  233. DWORD Layer3IPI; /* ISO/IEC TR 9577 Initial Protocol Identifier */
  234. UCHAR SnapID[5]; /* SNAP ID consisting of OUI and PID */
  235. } ATM_BLLI_IE;
  236. typedef ATM_ADDRESS ATM_CALLED_PARTY_NUMBER_IE;
  237. typedef ATM_ADDRESS ATM_CALLED_PARTY_SUBADDRESS_IE;
  238. /*
  239. * values used for the Presentation_Indication field in
  240. * struct ATM_CALLING_PARTY_NUMBER_IE
  241. */
  242. #define PI_ALLOWED 0x00
  243. #define PI_RESTRICTED 0x40
  244. #define PI_NUMBER_NOT_AVAILABLE 0x80
  245. /*
  246. * values used for the Screening_Indicator field in
  247. * struct ATM_CALLING_PARTY_NUMBER_IE
  248. */
  249. #define SI_USER_NOT_SCREENED 0x00
  250. #define SI_USER_PASSED 0x01
  251. #define SI_USER_FAILED 0x02
  252. #define SI_NETWORK 0x03
  253. typedef struct {
  254. ATM_ADDRESS ATM_Number;
  255. UCHAR Presentation_Indication;
  256. UCHAR Screening_Indicator;
  257. } ATM_CALLING_PARTY_NUMBER_IE;
  258. typedef ATM_ADDRESS ATM_CALLING_PARTY_SUBADDRESS_IE;
  259. /*
  260. * values used for the Location field in struct ATM_CAUSE_IE
  261. */
  262. #define CAUSE_LOC_USER 0x00
  263. #define CAUSE_LOC_PRIVATE_LOCAL 0x01
  264. #define CAUSE_LOC_PUBLIC_LOCAL 0x02
  265. #define CAUSE_LOC_TRANSIT_NETWORK 0x03
  266. #define CAUSE_LOC_PUBLIC_REMOTE 0x04
  267. #define CAUSE_LOC_PRIVATE_REMOTE 0x05
  268. #define CAUSE_LOC_INTERNATIONAL_NETWORK 0x07
  269. #define CAUSE_LOC_BEYOND_INTERWORKING 0x0A
  270. /*
  271. * values used for the Cause field in struct ATM_CAUSE_IE
  272. */
  273. #define CAUSE_UNALLOCATED_NUMBER 0x01
  274. #define CAUSE_NO_ROUTE_TO_TRANSIT_NETWORK 0x02
  275. #define CAUSE_NO_ROUTE_TO_DESTINATION 0x03
  276. #define CAUSE_VPI_VCI_UNACCEPTABLE 0x0A
  277. #define CAUSE_NORMAL_CALL_CLEARING 0x10
  278. #define CAUSE_USER_BUSY 0x11
  279. #define CAUSE_NO_USER_RESPONDING 0x12
  280. #define CAUSE_CALL_REJECTED 0x15
  281. #define CAUSE_NUMBER_CHANGED 0x16
  282. #define CAUSE_USER_REJECTS_CLIR 0x17
  283. #define CAUSE_DESTINATION_OUT_OF_ORDER 0x1B
  284. #define CAUSE_INVALID_NUMBER_FORMAT 0x1C
  285. #define CAUSE_STATUS_ENQUIRY_RESPONSE 0x1E
  286. #define CAUSE_NORMAL_UNSPECIFIED 0x1F
  287. #define CAUSE_VPI_VCI_UNAVAILABLE 0x23
  288. #define CAUSE_NETWORK_OUT_OF_ORDER 0x26
  289. #define CAUSE_TEMPORARY_FAILURE 0x29
  290. #define CAUSE_ACCESS_INFORMAION_DISCARDED 0x2B
  291. #define CAUSE_NO_VPI_VCI_AVAILABLE 0x2D
  292. #define CAUSE_RESOURCE_UNAVAILABLE 0x2F
  293. #define CAUSE_QOS_UNAVAILABLE 0x31
  294. #define CAUSE_USER_CELL_RATE_UNAVAILABLE 0x33
  295. #define CAUSE_BEARER_CAPABILITY_UNAUTHORIZED 0x39
  296. #define CAUSE_BEARER_CAPABILITY_UNAVAILABLE 0x3A
  297. #define CAUSE_OPTION_UNAVAILABLE 0x3F
  298. #define CAUSE_BEARER_CAPABILITY_UNIMPLEMENTED 0x41
  299. #define CAUSE_UNSUPPORTED_TRAFFIC_PARAMETERS 0x49
  300. #define CAUSE_INVALID_CALL_REFERENCE 0x51
  301. #define CAUSE_CHANNEL_NONEXISTENT 0x52
  302. #define CAUSE_INCOMPATIBLE_DESTINATION 0x58
  303. #define CAUSE_INVALID_ENDPOINT_REFERENCE 0x59
  304. #define CAUSE_INVALID_TRANSIT_NETWORK_SELECTION 0x5B
  305. #define CAUSE_TOO_MANY_PENDING_ADD_PARTY 0x5C
  306. #define CAUSE_AAL_PARAMETERS_UNSUPPORTED 0x5D
  307. #define CAUSE_MANDATORY_IE_MISSING 0x60
  308. #define CAUSE_UNIMPLEMENTED_MESSAGE_TYPE 0x61
  309. #define CAUSE_UNIMPLEMENTED_IE 0x63
  310. #define CAUSE_INVALID_IE_CONTENTS 0x64
  311. #define CAUSE_INVALID_STATE_FOR_MESSAGE 0x65
  312. #define CAUSE_RECOVERY_ON_TIMEOUT 0x66
  313. #define CAUSE_INCORRECT_MESSAGE_LENGTH 0x68
  314. #define CAUSE_PROTOCOL_ERROR 0x6F
  315. /*
  316. * values used for the Condition portion of the Diagnostics field
  317. * in struct ATM_CAUSE_IE, for certain Cause values
  318. */
  319. #define CAUSE_COND_UNKNOWN 0x00
  320. #define CAUSE_COND_PERMANENT 0x01
  321. #define CAUSE_COND_TRANSIENT 0x02
  322. /*
  323. * values used for the Rejection Reason portion of the Diagnostics field
  324. * in struct ATM_CAUSE_IE, for certain Cause values
  325. */
  326. #define CAUSE_REASON_USER 0x00
  327. #define CAUSE_REASON_IE_MISSING 0x04
  328. #define CAUSE_REASON_IE_INSUFFICIENT 0x08
  329. /*
  330. * values used for the P-U flag of the Diagnostics field
  331. * in struct ATM_CAUSE_IE, for certain Cause values
  332. */
  333. #define CAUSE_PU_PROVIDER 0x00
  334. #define CAUSE_PU_USER 0x08
  335. /*
  336. * values used for the N-A flag of the Diagnostics field
  337. * in struct ATM_CAUSE_IE, for certain Cause values
  338. */
  339. #define CAUSE_NA_NORMAL 0x00
  340. #define CAUSE_NA_ABNORMAL 0x04
  341. typedef struct {
  342. UCHAR Location;
  343. UCHAR Cause;
  344. UCHAR DiagnosticsLength;
  345. UCHAR Diagnostics[4];
  346. } ATM_CAUSE_IE;
  347. /*
  348. * values used for the QOSClassForward and QOSClassBackward
  349. * field in struct ATM_QOS_CLASS_IE
  350. */
  351. #define QOS_CLASS0 0x00
  352. #define QOS_CLASS1 0x01
  353. #define QOS_CLASS2 0x02
  354. #define QOS_CLASS3 0x03
  355. #define QOS_CLASS4 0x04
  356. typedef struct {
  357. UCHAR QOSClassForward;
  358. UCHAR QOSClassBackward;
  359. } ATM_QOS_CLASS_IE;
  360. /*
  361. * values used for the TypeOfNetworkId field in struct ATM_TRANSIT_NETWORK_SELECTION_IE
  362. */
  363. #define TNS_TYPE_NATIONAL 0x40
  364. /*
  365. * values used for the NetworkIdPlan field in struct ATM_TRANSIT_NETWORK_SELECTION_IE
  366. */
  367. #define TNS_PLAN_CARRIER_ID_CODE 0x01
  368. typedef struct {
  369. UCHAR TypeOfNetworkId;
  370. UCHAR NetworkIdPlan;
  371. UCHAR NetworkIdLength;
  372. UCHAR NetworkId[1];
  373. } ATM_TRANSIT_NETWORK_SELECTION_IE;
  374. /*
  375. * ATM specific Ioctl codes
  376. */
  377. #define SIO_GET_NUMBER_OF_ATM_DEVICES 0x50160001
  378. #define SIO_GET_ATM_ADDRESS 0xd0160002
  379. #define SIO_ASSOCIATE_PVC 0x90160003
  380. #define SIO_GET_ATM_CONNECTION_ID 0x50160004
  381. /* ATM Connection Identifier */
  382. typedef struct {
  383. DWORD DeviceNumber;
  384. DWORD VPI;
  385. DWORD VCI;
  386. } ATM_CONNECTION_ID;
  387. /*
  388. * Input buffer format for SIO_ASSOCIATE_PVC
  389. */
  390. typedef struct {
  391. ATM_CONNECTION_ID PvcConnectionId;
  392. QOS PvcQos;
  393. } ATM_PVC_PARAMS;
  394. #include <poppack.h>
  395. #endif /* _WS2ATM_H_ */