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.

155 lines
3.8 KiB

  1. /*******************************************************************/
  2. /* Copyright(c) 1993 Microsoft Corporation */
  3. /*******************************************************************/
  4. //***
  5. //
  6. // Filename: packet.h
  7. //
  8. // Description: Contains general definitions for the ipx and ipxwan packets
  9. //
  10. // Author: Stefan Solomon (stefans) February 6, 1996.
  11. //
  12. // Revision History:
  13. //
  14. //***
  15. #ifndef _PACKET_
  16. #define _PACKET_
  17. // IPXWAN Packets Format:
  18. //
  19. // IPX header - fixed length
  20. // IPXWAN header - fixed length
  21. // IPXWAN option 1 - fixed length header + variable length data
  22. // ....
  23. // IPXWAN option n
  24. //*** Socket Numbers
  25. #undef IPXWAN_SOCKET
  26. #define IPXWAN_SOCKET (USHORT)0x9004
  27. //*** IPXWAN Confidence Identifier
  28. #define IPXWAN_CONFIDENCE_ID "WASM" // 0x5741534D
  29. //*** IPX Packet Exchange Type (encapsulating the IPXWAN packet)
  30. #define IPX_PACKET_EXCHANGE_TYPE 4
  31. //*** Offsets into the IPX header
  32. #define IPXH_HDRSIZE 30 // Size of the IPX header
  33. #define IPXH_CHECKSUM 0 // Checksum
  34. #define IPXH_LENGTH 2 // Length
  35. #define IPXH_XPORTCTL 4 // Transport Control
  36. #define IPXH_PKTTYPE 5 // Packet Type
  37. #define IPXH_DESTADDR 6 // Dest. Address (Total)
  38. #define IPXH_DESTNET 6 // Dest. Network Address
  39. #define IPXH_DESTNODE 10 // Dest. Node Address
  40. #define IPXH_DESTSOCK 16 // Dest. Socket Number
  41. #define IPXH_SRCADDR 18 // Source Address (Total)
  42. #define IPXH_SRCNET 18 // Source Network Address
  43. #define IPXH_SRCNODE 22 // Source Node Address
  44. #define IPXH_SRCSOCK 28 // Source Socket Number
  45. #define IPX_NET_LEN 4
  46. #define IPX_NODE_LEN 6
  47. //*** Offsets of the IPXWAN header
  48. #define IPXWAN_HDRSIZE 11
  49. #define WIDENTIFIER 0
  50. #define WPACKET_TYPE 4
  51. #define WNODE_ID 5
  52. #define WSEQUENCE_NUMBER 9
  53. #define WNUM_OPTIONS 10
  54. // packet types
  55. #define TIMER_REQUEST 0
  56. #define TIMER_RESPONSE 1
  57. #define INFORMATION_REQUEST 2
  58. #define INFORMATION_RESPONSE 3
  59. #define NAK 0xFF
  60. // IPXWAN option format
  61. //
  62. // IPXWAN option header - fixed length
  63. // IPXWAN option data - variable length
  64. //*** Offsets of the IPXWAN Option header
  65. #define OPTION_HDRSIZE 4
  66. #define WOPTION_NUMBER 0 // identifies a particular option, see list below
  67. #define WACCEPT_OPTION 1 // see below
  68. #define WOPTION_DATA_LEN 2 // length of the option data part
  69. #define WOPTION_DATA 4
  70. // accept option definitions
  71. #define NO 0
  72. #define YES 1
  73. #define NOT_APPLICABLE 3
  74. // option definitions
  75. //*** Routing Type Option ***
  76. #define ROUTING_TYPE_OPTION 0 // option number
  77. #define ROUTING_TYPE_DATA_LEN 1
  78. // values of the data part
  79. #define NUMBERED_RIP_ROUTING_TYPE 0
  80. #define NLSP_ROUTING_TYPE 1
  81. #define UNNUMBERED_RIP_ROUTING_TYPE 2
  82. #define ON_DEMAND_ROUTING_TYPE 3
  83. #define WORKSTATION_ROUTING_TYPE 4 // client-router connection
  84. //*** Extended Node Id Option ***
  85. #define EXTENDED_NODE_ID_OPTION 4
  86. #define EXTENDED_NODE_ID_DATA_LEN 4
  87. //*** RIP/SAP Info Exchange Option ***
  88. #define RIP_SAP_INFO_EXCHANGE_OPTION 1
  89. #define RIP_SAP_INFO_EXCHANGE_DATA_LEN 54
  90. // values
  91. // offsets in the data part (from the beginning of the option header)
  92. #define WAN_LINK_DELAY 4
  93. #define COMMON_NETWORK_NUMBER 6
  94. #define ROUTER_NAME 10
  95. //*** Node Number Option ***
  96. #define NODE_NUMBER_OPTION 5
  97. #define NODE_NUMBER_DATA_LEN 6
  98. // values
  99. // IPX node number to be used by the client on a client-router connection.
  100. //*** Pad Option ***
  101. #define PAD_OPTION 0xFF
  102. // Unsupported Options
  103. #define NLSP_INFORMATION_OPTION 2
  104. #define NLSP_RAW_THROUGHPUT_DATA_OPTION 3
  105. #define COMPRESSION_OPTION 0x80
  106. //*** Packet Lengths ***
  107. #define TIMER_REQUEST_PACKET_LENGTH 576
  108. #define MAX_IPXWAN_PACKET_LEN TIMER_REQUEST_PACKET_LENGTH
  109. #endif