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.

133 lines
4.6 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 2000-2002 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: MessageStructures.h
  6. * Content: Message strucutre definitions for messages on the wire
  7. *
  8. *
  9. * History:
  10. * Date By Reason
  11. * ==== == ======
  12. * 06/20/2000 jtk Derived from IOData.h
  13. ***************************************************************************/
  14. #ifndef __MESSAGE_STRUCTURES_H__
  15. #define __MESSAGE_STRUCTURES_H__
  16. //**********************************************************************
  17. // Constant definitions
  18. //**********************************************************************
  19. #define SP_HEADER_LEAD_BYTE 0x00
  20. //#define ESCAPED_USER_DATA_PAD_VALUE 0x0000
  21. //
  22. // Data types used by service provider messages. Note, the high-order bit
  23. // is reserved for future use and should not be set!
  24. //
  25. //#define ESCAPED_USER_DATA_KIND 0x01 // UNUSED: Protocol guarantees that the first byte will never be zero
  26. #define ENUM_DATA_KIND 0x02
  27. #define ENUM_RESPONSE_DATA_KIND 0x03
  28. #ifndef DPNBUILD_SINGLEPROCESS
  29. #define PROXIED_ENUM_DATA_KIND 0x04
  30. #endif // ! DPNBUILD_SINGLEPROCESS
  31. #ifdef DPNBUILD_XNETSECURITY
  32. #define XNETSEC_ENUM_RESPONSE_DATA_KIND 0x05
  33. #endif // DPNBUILD_XNETSECURITY
  34. //
  35. // DPlay port limits (inclusive) scanned to find an available port.
  36. // Exclude 2300 and 2301 because there are network broadcasts on 2301
  37. // that we may receive.
  38. //
  39. #define BASE_DPLAY8_PORT ((WORD) 2302)
  40. #define MAX_DPLAY8_PORT ((WORD) 2400)
  41. //
  42. // mask for RTT sequence number
  43. //
  44. #define ENUM_RTT_MASK 0X0F
  45. //**********************************************************************
  46. // Macro definitions
  47. //**********************************************************************
  48. //**********************************************************************
  49. // Structure definitions
  50. //**********************************************************************
  51. //
  52. // Structure used to prepend data to a send, this structure is byte aligned to
  53. // save bandwidth. The goal is to keep all data DWORD aligned so the structure
  54. // elements should be sized such that any payload passed to a higher layer is
  55. // DWORD aligned. In the case of the proxied enum query, the full
  56. // SOCKADDR(_STORAGE) structure is used to keep alignment. Since this message
  57. // should only ever be sent locally, we can be a little loose with our ifdefs regarding
  58. // the size of the SOCKADDR(_STORAGE).
  59. //
  60. #pragma pack( push, 1 )
  61. typedef union _PREPEND_BUFFER
  62. {
  63. struct _GENERIC_HEADER // generic header to determine data kind
  64. { //
  65. BYTE bSPLeadByte; //
  66. BYTE bSPCommandByte; //
  67. } GenericHeader;
  68. struct _ENUM_DATA_HEADER // header used to indicate enum query data
  69. { //
  70. BYTE bSPLeadByte; //
  71. BYTE bSPCommandByte; //
  72. WORD wEnumPayload; // combination of RTT sequence and enum key
  73. } EnumDataHeader;
  74. struct _ENUM_RESPONSE_DATA_HEADER // header used to indicate enum response data
  75. { //
  76. BYTE bSPLeadByte; //
  77. BYTE bSPCommandByte; //
  78. WORD wEnumResponsePayload; // combination of RTT sequence and enum key
  79. } EnumResponseDataHeader;
  80. struct _PROXIED_ENUM_DATA_HEADER // header used to indicate proxied enum data
  81. { //
  82. BYTE bSPLeadByte; //
  83. BYTE bSPCommandByte; //
  84. WORD wEnumKey; // key from the original enum
  85. union
  86. {
  87. SOCKADDR AddressGeneric;
  88. SOCKADDR_IN AddressIPv4; //
  89. #ifndef DPNBUILD_NOIPV6
  90. SOCKADDR_IPX AddressIPX; //
  91. #endif // ! DPNBUILD_NOIPV6
  92. #ifndef DPNBUILD_NOIPV6
  93. SOCKADDR_IN6 AddressIPv6; //
  94. #endif // ! DPNBUILD_NOIPV6
  95. } ReturnAddress; // real socket address to return the data to
  96. } ProxiedEnumDataHeader;
  97. #ifdef DPNBUILD_XNETSECURITY
  98. struct _XNETSEC_ENUM_RESPONSE_DATA_HEADER // header used to indicate secure enum response data
  99. { //
  100. BYTE bSPLeadByte; //
  101. BYTE bSPCommandByte; //
  102. WORD wEnumResponsePayload; // combination of RTT sequence and enum key (same as EnumResponseDataHeader)
  103. XNADDR xnaddr; // secure transport address of session
  104. } XNetSecEnumResponseDataHeader;
  105. #endif // DPNBUILD_XNETSECURITY
  106. } PREPEND_BUFFER;
  107. #pragma pack( pop )
  108. //**********************************************************************
  109. // Variable definitions
  110. //**********************************************************************
  111. //**********************************************************************
  112. // Function prototypes
  113. //**********************************************************************
  114. #endif // __MESSAGE_STRUCTURES_H__