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.

140 lines
3.9 KiB

  1. /********************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1990-1993 **/
  4. /********************************************************************/
  5. /* :ts=4 */
  6. //** TDIINFO.H - TDI Query/SetInfoEx definitons.
  7. //
  8. // This file contains definitions for the extended TDI query and set info.
  9. // calls.
  10. //
  11. #ifndef TDI_INFO_INCLUDED
  12. #define TDI_INFO_INCLUDED
  13. #ifndef CTE_TYPEDEFS_DEFINED
  14. #define CTE_TYPEDEFS_DEFINED
  15. typedef unsigned long ulong;
  16. typedef unsigned short ushort;
  17. typedef unsigned char uchar;
  18. typedef unsigned int uint;
  19. #endif // CTE_TYPEDEFS_DEFINED
  20. //* Structure of an entity ID.
  21. typedef struct TDIEntityID {
  22. ulong tei_entity;
  23. ulong tei_instance;
  24. } TDIEntityID;
  25. //* Structure of an object ID.
  26. typedef struct TDIObjectID {
  27. TDIEntityID toi_entity;
  28. ulong toi_class;
  29. ulong toi_type;
  30. ulong toi_id;
  31. } TDIObjectID;
  32. #define MAX_TDI_ENTITIES 32
  33. #define INFO_CLASS_GENERIC 0x100
  34. #define INFO_CLASS_PROTOCOL 0x200
  35. #define INFO_CLASS_IMPLEMENTATION 0x300
  36. #define INFO_TYPE_PROVIDER 0x100
  37. #define INFO_TYPE_ADDRESS_OBJECT 0x200
  38. #define INFO_TYPE_CONNECTION 0x300
  39. #define ENTITY_LIST_ID 0
  40. #define GENERIC_ENTITY 0
  41. #define CO_TL_ENTITY 0x400
  42. #define CL_TL_ENTITY 0x401
  43. #define ER_ENTITY 0x380
  44. #define CO_NL_ENTITY 0x300
  45. #define CL_NL_ENTITY 0x301
  46. #define AT_ENTITY 0x280
  47. #define IF_ENTITY 0x200
  48. #define CONTEXT_SIZE 16
  49. //* The following are IDs supported by all entities. They are of class
  50. // GENERIC and type PROVIDER.
  51. #define ENTITY_TYPE_ID 1 // The ID to get the entity
  52. // type. The return from this
  53. // type is an unsigned integer
  54. // (see below).
  55. // Valid values to get back from entity type ID query.
  56. #define CO_TL_NBF 0x400 // Entity implements NBF prot.
  57. #define CO_TL_SPX 0x402 // Entity implements SPX prot.
  58. #define CO_TL_TCP 0x404 // Entity implements TCP prot.
  59. #define CO_TL_SPP 0x406 // Entity implements SPP prot.
  60. #define CL_TL_NBF 0x401 // CL NBF protocol.
  61. #define CL_TL_UDP 0x403 // Entity implements UDP.
  62. #define ER_ICMP 0x380 // The ICMP protocol.
  63. #define CL_NL_IPX 0x301 // Entity implements IPX.
  64. #define CL_NL_IP 0x303 // Entity implements IP.
  65. #define AT_ARP 0x280 // Entity implements ARP.
  66. #define AT_NULL 0x282 // Entity does no address
  67. // translation.
  68. #define IF_GENERIC 0x200 // Generic interface.
  69. #define IF_MIB 0x202 // Supports MIB-2 interface.
  70. /*NOINC*/
  71. //
  72. // NT DeviceIoControl definitions for TdiExtendedInformationEx functions.
  73. //
  74. //
  75. // QueryInformationEx IOCTL. The return buffer is passed as the OutputBuffer
  76. // in the DeviceIoControl request. This structure is passed as the
  77. // InputBuffer.
  78. //
  79. struct tcp_request_query_information_ex {
  80. TDIObjectID ID; // object ID to query.
  81. uchar Context[CONTEXT_SIZE]; // multi-request context. Zeroed
  82. // for the first request.
  83. };
  84. typedef struct tcp_request_query_information_ex
  85. TCP_REQUEST_QUERY_INFORMATION_EX,
  86. *PTCP_REQUEST_QUERY_INFORMATION_EX;
  87. //
  88. // SetInformationEx IOCTL request structure. This structure is passed as the
  89. // InputBuffer. The space allocated for the structure must be large enough
  90. // to contain the structure and the set data buffer, which begins at the
  91. // Buffer field. The OutputBuffer parameter in the DeviceIoControl is not used.
  92. //
  93. struct tcp_request_set_information_ex {
  94. TDIObjectID ID; // object ID to set.
  95. unsigned int BufferSize; // size of the set data buffer in bytes
  96. unsigned char Buffer[1]; // beginning of the set data buffer
  97. };
  98. typedef struct tcp_request_set_information_ex
  99. TCP_REQUEST_SET_INFORMATION_EX,
  100. *PTCP_REQUEST_SET_INFORMATION_EX;
  101. #endif // TDI_INFO_INCLUDED
  102.