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.

146 lines
3.8 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. tdiinfo.h
  5. Abstract:
  6. This file contains definitions for the extended TDI query and set info.
  7. calls.
  8. Revision History:
  9. --*/
  10. #ifndef TDI_INFO_INCLUDED
  11. #define TDI_INFO_INCLUDED
  12. #ifndef CTE_TYPEDEFS_DEFINED
  13. #define CTE_TYPEDEFS_DEFINED
  14. typedef unsigned long ulong;
  15. typedef unsigned short ushort;
  16. typedef unsigned char uchar;
  17. typedef unsigned int uint;
  18. #endif // CTE_TYPEDEFS_DEFINED
  19. //* Structure of an entity ID.
  20. typedef struct TDIEntityID {
  21. ulong tei_entity;
  22. ulong tei_instance;
  23. } TDIEntityID;
  24. //* Structure of an object ID.
  25. typedef struct TDIObjectID {
  26. TDIEntityID toi_entity;
  27. ulong toi_class;
  28. ulong toi_type;
  29. ulong toi_id;
  30. } TDIObjectID;
  31. #define MAX_TDI_ENTITIES 4096
  32. #define INFO_CLASS_GENERIC 0x100
  33. #define INFO_CLASS_PROTOCOL 0x200
  34. #define INFO_CLASS_IMPLEMENTATION 0x300
  35. #define INFO_TYPE_PROVIDER 0x100
  36. #define INFO_TYPE_ADDRESS_OBJECT 0x200
  37. #define INFO_TYPE_CONNECTION 0x300
  38. #define ENTITY_LIST_ID 0
  39. #define GENERIC_ENTITY 0
  40. #define CO_TL_ENTITY 0x400
  41. #define CL_TL_ENTITY 0x401
  42. #define ER_ENTITY 0x380
  43. #define CO_NL_ENTITY 0x300
  44. #define CL_NL_ENTITY 0x301
  45. #define AT_ENTITY 0x280
  46. #define IF_ENTITY 0x200
  47. #define INVALID_ENTITY_INSTANCE -1
  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. typedef struct tcp_request_query_information_ex {
  80. TDIObjectID ID; // object ID to query.
  81. ULONG_PTR Context[CONTEXT_SIZE/sizeof(ULONG_PTR)]; // multi-request
  82. // context. Zeroed for the first request.
  83. } TCP_REQUEST_QUERY_INFORMATION_EX, *PTCP_REQUEST_QUERY_INFORMATION_EX;
  84. #if defined(_WIN64)
  85. typedef struct tcp_request_query_information_ex32 {
  86. TDIObjectID ID;
  87. ULONG32 Context[CONTEXT_SIZE/sizeof(ULONG32)];
  88. } TCP_REQUEST_QUERY_INFORMATION_EX32, *PTCP_REQUEST_QUERY_INFORMATION_EX32;
  89. #endif // _WIN64
  90. //
  91. // SetInformationEx IOCTL request structure. This structure is passed as the
  92. // InputBuffer. The space allocated for the structure must be large enough
  93. // to contain the structure and the set data buffer, which begins at the
  94. // Buffer field. The OutputBuffer parameter in the DeviceIoControl is not used.
  95. //
  96. typedef struct tcp_request_set_information_ex {
  97. TDIObjectID ID; // object ID to set.
  98. unsigned int BufferSize; // size of the set data buffer in bytes
  99. unsigned char Buffer[1]; // beginning of the set data buffer
  100. } TCP_REQUEST_SET_INFORMATION_EX, *PTCP_REQUEST_SET_INFORMATION_EX;
  101. #endif // TDI_INFO_INCLUDED