Leaked source code of windows server 2003
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.

273 lines
6.9 KiB

  1. /*++
  2. Copyright (c) 1997 FORE Systems, Inc.
  3. Copyright (c) 1997 Microsoft Corporation
  4. Module Name:
  5. lane10.h
  6. Abstract:
  7. Definitions from ATM Forum LANE 1.0 Specification.
  8. Author:
  9. Larry Cleeton, FORE Systems (v-lcleet@microsoft.com, lrc@fore.com)
  10. Environment:
  11. Kernel mode
  12. Revision History:
  13. --*/
  14. #ifndef __ATMLANE_LANE10_H
  15. #define __ATMLANE_LANE10_H
  16. //
  17. // Minimum packet sizes including 2 byte LANE header
  18. //
  19. #define LANE_MIN_ETHPACKET 62
  20. #define LANE_MIN_TRPACKET 16
  21. //
  22. // Maximum bytes for ethernet/802.3 header and token ring header
  23. // including the 2 byte LANE header. See section 4.1 of the LE spec
  24. // for the derivation.
  25. //
  26. #define LANE_ETH_HEADERSIZE 16
  27. #define LANE_TR_HEADERSIZE 46
  28. #define LANE_MAX_HEADERSIZE 46
  29. #define LANE_HEADERSIZE 2
  30. //
  31. // Type of LAN
  32. //
  33. #define LANE_LANTYPE_UNSPEC 0x00
  34. #define LANE_LANTYPE_ETH 0x01
  35. #define LANE_LANTYPE_TR 0x02
  36. //
  37. // Maximum Frame Size Codes
  38. //
  39. #define LANE_MAXFRAMESIZE_CODE_UNSPEC 0x00
  40. #define LANE_MAXFRAMESIZE_CODE_1516 0x01
  41. #define LANE_MAXFRAMESIZE_CODE_4544 0x02
  42. #define LANE_MAXFRAMESIZE_CODE_9234 0x03
  43. #define LANE_MAXFRAMESIZE_CODE_18190 0x04
  44. //
  45. // Maximum Size of an ELAN Name
  46. //
  47. #define LANE_ELANNAME_SIZE_MAX 32
  48. #include <pshpack1.h>
  49. //
  50. // Mac Address as LANE defines them in
  51. // control packets.
  52. //
  53. typedef struct _LANE_MAC_ADDRESS
  54. {
  55. USHORT Type;
  56. UCHAR Byte[6];
  57. }
  58. LANE_MAC_ADDRESS;
  59. typedef LANE_MAC_ADDRESS UNALIGNED *PLANE_MAC_ADDRESS;
  60. //
  61. // LANE Mac Address types.
  62. // With USHORTS nicely preswapped for little-endian.
  63. //
  64. #define LANE_MACADDRTYPE_NOTPRESENT 0x0000 // no address here
  65. #define LANE_MACADDRTYPE_MACADDR 0x0100 // this is a mac addr
  66. #define LANE_MACADDRTYPE_ROUTEDESCR 0x0200 // this is a route descriptor
  67. //
  68. // LAN Emulation Control Frame
  69. //
  70. typedef struct _LANE_CONTROL_FRAME
  71. {
  72. USHORT Marker;
  73. UCHAR Protocol;
  74. UCHAR Version;
  75. USHORT OpCode;
  76. USHORT Status;
  77. ULONG Tid;
  78. USHORT LecId;
  79. USHORT Flags;
  80. LANE_MAC_ADDRESS SourceMacAddress;
  81. LANE_MAC_ADDRESS TargetMacAddress;
  82. UCHAR SourceAtmAddr[20];
  83. UCHAR LanType;
  84. UCHAR MaxFrameSize;
  85. UCHAR NumTlvs;
  86. UCHAR ElanNameSize;
  87. UCHAR TargetAtmAddr[20];
  88. UCHAR ElanName[LANE_ELANNAME_SIZE_MAX];
  89. }
  90. LANE_CONTROL_FRAME;
  91. typedef LANE_CONTROL_FRAME UNALIGNED *PLANE_CONTROL_FRAME;
  92. //
  93. // LAN Emulation Ready Frame (really just a short control frame)
  94. //
  95. typedef struct _LANE_READY_FRAME
  96. {
  97. USHORT Marker;
  98. UCHAR Protocol;
  99. UCHAR Version;
  100. USHORT OpCode;
  101. }
  102. LANE_READY_FRAME;
  103. typedef LANE_READY_FRAME UNALIGNED *PLANE_READY_FRAME;
  104. //
  105. // TLV (type/length/value)
  106. //
  107. typedef struct _LANE_TLV
  108. {
  109. ULONG Type;
  110. UCHAR Length;
  111. UCHAR Value[1];
  112. }
  113. LANE_TLV;
  114. typedef LANE_TLV UNALIGNED *PLANE_TLV;
  115. #include <poppack.h>
  116. //
  117. // LANE Status codes
  118. // With USHORTS nicely preswapped for little-endian.
  119. //
  120. #define LANE_STATUS_SUCCESS 0x0000 // Success
  121. #define LANE_STATUS_VERSNOSUPP 0x0100 // Version not supported
  122. #define LANE_STATUS_REQPARMINVAL 0x0200 // Invalid request parameters
  123. #define LANE_STATUS_DUPLANDEST 0x0400 // Duplicate LAN destination
  124. #define LANE_STATUS_DUPATMADDR 0x0500 // Duplicate ATM address
  125. #define LANE_STATUS_INSUFFRES 0x0600 // Insufficient resources
  126. #define LANE_STATUS_NOACCESS 0x0700 // Access denied
  127. #define LANE_STATUS_REQIDINVAL 0x0800 // Invalid requester ID
  128. #define LANE_STATUS_LANDESTINVAL 0x0900 // Invalid LAN destination
  129. #define LANE_STATUS_ATMADDRINVAL 0x0A00 // Invalid ATM address
  130. #define LANE_STATUS_NOCONF 0x1400 // No configuration
  131. #define LANE_STATUS_CONFERROR 0x1500 // Configuration error
  132. #define LANE_STATUS_INSUFFINFO 0x1600 // Insufficient information
  133. //
  134. // LANE Operation Codes.
  135. // With USHORTS nicely preswapped for little-endian.
  136. //
  137. #define LANE_CONFIGURE_REQUEST 0x0100
  138. #define LANE_CONFIGURE_RESPONSE 0x0101
  139. #define LANE_JOIN_REQUEST 0x0200
  140. #define LANE_JOIN_RESPONSE 0x0201
  141. #define LANE_READY_QUERY 0x0300
  142. #define LANE_READY_IND 0x0301
  143. #define LANE_REGISTER_REQUEST 0x0400
  144. #define LANE_REGISTER_RESPONSE 0x0401
  145. #define LANE_UNREGISTER_REQUEST 0x0500
  146. #define LANE_UNREGISTER_RESPONSE 0x0501
  147. #define LANE_ARP_REQUEST 0x0600
  148. #define LANE_ARP_RESPONSE 0x0601
  149. #define LANE_FLUSH_REQUEST 0x0700
  150. #define LANE_FLUSH_RESPONSE 0x0701
  151. #define LANE_NARP_REQUEST 0x0800
  152. #define LANE_TOPOLOGY_REQUEST 0x0900
  153. //
  154. // Control Frame Marker, Protocol, and Version.
  155. // With USHORTS nicely preswapped for little-endian.
  156. //
  157. #define LANE_CONTROL_MARKER 0x00FF
  158. #define LANE_PROTOCOL 0x01
  159. #define LANE_VERSION 0x01
  160. //
  161. // Type codes for TLVs in Configure Response
  162. // With USHORTS nicely preswapped for little-endian.
  163. //
  164. #define LANE_CFG_CONTROL_TIMEOUT 0x013EA000
  165. #define LANE_CFG_UNK_FRAME_COUNT 0x023EA000
  166. #define LANE_CFG_UNK_FRAME_TIME 0x033EA000
  167. #define LANE_CFG_VCC_TIMEOUT 0x043EA000
  168. #define LANE_CFG_MAX_RETRY_COUNT 0x053EA000
  169. #define LANE_CFG_AGING_TIME 0x063EA000
  170. #define LANE_CFG_FWD_DELAY_TIME 0x073EA000
  171. #define LANE_CFG_ARP_RESP_TIME 0x083EA000
  172. #define LANE_CFG_FLUSH_TIMEOUT 0x093EA000
  173. #define LANE_CFG_PATH_SWITCH_DELAY 0x0A3EA000
  174. #define LANE_CFG_LOCAL_SEGMENT_ID 0x0B3EA000
  175. #define LANE_CFG_MCAST_VCC_TYPE 0x0C3EA000
  176. #define LANE_CFG_MCAST_VCC_AVG 0x0D3EA000
  177. #define LANE_CFG_MCAST_VCC_PEAK 0x0E3EA000
  178. #define LANE_CFG_CONN_COMPL_TIMER 0x0F3EA000
  179. //
  180. // Definitions for Control Frame Flags field
  181. //
  182. #define LANE_CONTROL_FLAGS_REMOTE_ADDRESS 0x0001
  183. #define LANE_CONTROL_FLAGS_TOPOLOGY_CHANGE 0x0100
  184. #define LANE_CONTROL_FLAGS_PROXY 0x0800
  185. //
  186. // Default/min/max for ELAN run-time configuration parameters
  187. // Units are seconds if time related parameter.
  188. //
  189. #define LANE_C7_MIN 10 // Control Time-out
  190. #define LANE_C7_DEF 10
  191. #define LANE_C7_MAX 300
  192. #define LANE_C10_MIN 1 // Maximum Unknown Framount Count
  193. #define LANE_C10_DEF 1
  194. #define LANE_C10_MAX 100 // non-standard but reasonable!
  195. #define LANE_C11_MIN 1 // Maximum Unknown Frame Time
  196. #define LANE_C11_DEF 1
  197. #define LANE_C11_MAX 60
  198. #define LANE_C12_MIN 1
  199. #define LANE_C12_DEF (20*60) // VCC Time-out Period
  200. // no max defined
  201. #define LANE_C13_MIN 0 // Maximum Retry Count
  202. #define LANE_C13_DEF 1
  203. #define LANE_C13_MAX 2
  204. #define LANE_C17_MIN 10 // ARP Aging Time
  205. #define LANE_C17_DEF 300
  206. #define LANE_C17_MAX 300
  207. #define LANE_C18_MIN 4 // Forward Delay Time
  208. #define LANE_C18_DEF 15
  209. #define LANE_C18_MAX 30
  210. #define LANE_C20_MIN 1 // Expected LE_ARP Response Time
  211. #define LANE_C20_DEF 1
  212. #define LANE_C20_MAX 30
  213. #define LANE_C21_MIN 1 // Flush Time-out
  214. #define LANE_C21_DEF 4
  215. #define LANE_C21_MAX 4
  216. #define LANE_C22_MIN 1 // Path Switching Delay
  217. #define LANE_C22_DEF 6
  218. #define LANE_C22_MAX 8
  219. #define LANE_C28_MIN 1 // Expected LE_ARP Response Time
  220. #define LANE_C28_DEF 4
  221. #define LANE_C28_MAX 10
  222. #endif // __ATMLANE_LANE10_H