tdiinfo.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * tdiinfo.h
  3. *
  4. * TDI set and query information interface
  5. *
  6. * This file is part of the w32api package.
  7. *
  8. * Contributors:
  9. * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
  10. *
  11. * THIS SOFTWARE IS NOT COPYRIGHTED
  12. *
  13. * This source code is offered for use in the public domain. You may
  14. * use, modify or distribute it freely.
  15. *
  16. * This code is distributed in the hope that it will be useful but
  17. * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
  18. * DISCLAIMED. This includes but is not limited to warranties of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  20. *
  21. */
  22. #ifndef __TDIINFO_H
  23. #define __TDIINFO_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. typedef struct _TDIEntityID {
  28. ULONG tei_entity;
  29. ULONG tei_instance;
  30. } TDIEntityID;
  31. #define MAX_TDI_ENTITIES 4096
  32. #define INVALID_ENTITY_INSTANCE -1
  33. #define GENERIC_ENTITY 0
  34. #define ENTITY_LIST_ID 0
  35. #define ENTITY_TYPE_ID 1
  36. #define AT_ENTITY 0x280
  37. #define CL_NL_ENTITY 0x301
  38. #define CL_TL_ENTITY 0x401
  39. #define CO_NL_ENTITY 0x300
  40. #define CO_TL_ENTITY 0x400
  41. #define ER_ENTITY 0x380
  42. #define IF_ENTITY 0x200
  43. #define AT_ARP 0x280
  44. #define AT_NULL 0x282
  45. #define CL_TL_NBF 0x401
  46. #define CL_TL_UDP 0x403
  47. #define CL_NL_IPX 0x301
  48. #define CL_NL_IP 0x303
  49. #define CO_TL_NBF 0x400
  50. #define CO_TL_SPX 0x402
  51. #define CO_TL_TCP 0x404
  52. #define CO_TL_SPP 0x406
  53. #define ER_ICMP 0x380
  54. #define IF_GENERIC 0x200
  55. #define IF_MIB 0x202
  56. /* TDIObjectID.toi_class constants */
  57. #define INFO_CLASS_GENERIC 0x100
  58. #define INFO_CLASS_PROTOCOL 0x200
  59. #define INFO_CLASS_IMPLEMENTATION 0x300
  60. /* TDIObjectID.toi_type constants */
  61. #define INFO_TYPE_PROVIDER 0x100
  62. #define INFO_TYPE_ADDRESS_OBJECT 0x200
  63. #define INFO_TYPE_CONNECTION 0x300
  64. typedef struct _TDIObjectID {
  65. TDIEntityID toi_entity;
  66. ULONG toi_class;
  67. ULONG toi_type;
  68. ULONG toi_id;
  69. } TDIObjectID;
  70. #define CONTEXT_SIZE 16
  71. typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX {
  72. TDIObjectID ID;
  73. ULONG_PTR Context[CONTEXT_SIZE / sizeof(ULONG_PTR)];
  74. } TCP_REQUEST_QUERY_INFORMATION_EX, *PTCP_REQUEST_QUERY_INFORMATION_EX;
  75. #if defined(_WIN64)
  76. typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX32 {
  77. TDIObjectID ID;
  78. ULONG32 Context[CONTEXT_SIZE / sizeof(ULONG32)];
  79. } TCP_REQUEST_QUERY_INFORMATION_EX32, *PTCP_REQUEST_QUERY_INFORMATION_EX32;
  80. #endif /* _WIN64 */
  81. typedef struct _TCP_REQUEST_SET_INFORMATION_EX {
  82. TDIObjectID ID;
  83. unsigned int BufferSize;
  84. unsigned char Buffer[1];
  85. } TCP_REQUEST_SET_INFORMATION_EX, *PTCP_REQUEST_SET_INFORMATION_EX;
  86. #ifdef __cplusplus
  87. }
  88. #endif
  89. #endif /* __TDIINFO_H */