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.

132 lines
4.2 KiB

  1. //////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // glbconst.h
  7. //
  8. // Abstract:
  9. // Common const and defs definitions for tdisample.sys and its
  10. // associated lib
  11. //
  12. ////////////////////////////////////////////////////////////////////
  13. #ifndef _TDISAMPLE_GLOBAL_CONSTS_
  14. #define _TDISAMPLE_GLOBAL_CONSTS_
  15. //
  16. // warning names, used with pragma warning enable/disable
  17. //
  18. #define NO_RETURN_VALUE 4035
  19. #define UNREFERENCED_PARAM 4100
  20. #define CONSTANT_CONDITIONAL 4127
  21. #define ZERO_SIZED_ARRAY 4200
  22. #define NAMELESS_STRUCT_UNION 4201
  23. #define BIT_FIELD_NOT_INT 4214
  24. #define UNREFERENCED_INLINE 4514
  25. #define UNREACHABLE_CODE 4702
  26. #define FUNCTION_NOT_INLINED 4710
  27. //
  28. // disable warnings dealing with inlines
  29. //
  30. #pragma warning(disable: UNREFERENCED_INLINE)
  31. #pragma warning(disable: FUNCTION_NOT_INLINED)
  32. //
  33. // version constants (used in rc file as well as source)
  34. //
  35. #define VER_FILEVERSION 2,05,01,001
  36. #define VER_FILEVERSION_STR "2.05"
  37. //
  38. // version identifier for current dll/driver
  39. // increment for every change that makes dll/driver incompatible
  40. //
  41. #define TDI_SAMPLE_VERSION_ID 0x20010328
  42. //
  43. // DeviceIoControl timed out
  44. //
  45. #define TDI_STATUS_TIMEDOUT 0x4001FFFD
  46. // C++ style const definitions
  47. //
  48. #ifndef ULONG
  49. typedef unsigned long ULONG;
  50. #endif
  51. const ULONG ulMAX_OPEN_NAME_LENGTH = 128; // max strlen for adapter
  52. const ULONG ulMAX_BUFFER_LENGTH = 2048; // max len of buf for tdiquery
  53. const ULONG ulDebugShowCommand = 0x01;
  54. const ULONG ulDebugShowHandlers = 0x02;
  55. /////////////////////////////////////////////////////////////
  56. // TdiSample Command Codes
  57. // NOTE: ulVERSION_CHECK must NEVER change its value....
  58. /////////////////////////////////////////////////////////////
  59. //
  60. // commands that do not require an object handle
  61. //
  62. const ULONG ulNO_COMMAND = 0x00000000; // invalid command
  63. const ULONG ulVERSION_CHECK = 0x00000001; // check version of tester
  64. const ULONG ulABORT_COMMAND = 0x00000002; // abort previous command
  65. const ULONG ulDEBUGLEVEL = 0x00000003; // set debug level
  66. const ULONG ulGETNUMDEVICES = 0x00000004; // get #devices in list
  67. const ULONG ulGETDEVICE = 0x00000005; // get specific device#
  68. const ULONG ulGETADDRESS = 0x00000006; // get specific address
  69. const ULONG ulOPENCONTROL = 0x00000007; // open control channel
  70. const ULONG ulOPENADDRESS = 0x00000008; // open address object
  71. const ULONG ulOPENENDPOINT = 0x00000009; // open an endpoint object
  72. //
  73. // commands that require a control channel object
  74. //
  75. const ULONG ulCLOSECONTROL = 0x0000000A; // close a control channel
  76. //
  77. // commands that require an address object
  78. //
  79. const ULONG ulCLOSEADDRESS = 0x0000000B; // close address object
  80. const ULONG ulSENDDATAGRAM = 0x0000000C; // send a datagram
  81. const ULONG ulRECEIVEDATAGRAM = 0x0000000D; // receive a datagram
  82. //
  83. // commands that require a connection endpoint object
  84. //
  85. const ULONG ulCLOSEENDPOINT = 0x0000000E; // close an endpoint object
  86. const ULONG ulCONNECT = 0x0000000F;
  87. const ULONG ulDISCONNECT = 0x00000010;
  88. const ULONG ulISCONNECTED = 0x00000011;
  89. const ULONG ulSEND = 0x00000012;
  90. const ULONG ulRECEIVE = 0x00000013;
  91. const ULONG ulLISTEN = 0x00000014;
  92. //
  93. // commands that require an object which could be of more than 1 type
  94. //
  95. const ULONG ulQUERYINFO = 0x00000015;
  96. const ULONG ulSETEVENTHANDLER = 0x00000016; // enable/disable event handler
  97. const ULONG ulPOSTRECEIVEBUFFER = 0x00000017;
  98. const ULONG ulFETCHRECEIVEBUFFER = 0x00000018;
  99. //
  100. // number of commands defined
  101. //
  102. const ULONG ulNUM_COMMANDS = 0x00000019;
  103. const ULONG ulTDI_COMMAND_MASK = 0x0000003F; // mask for legal commands
  104. #endif // _TDISAMPLE_GLOBAL_CONSTS_
  105. //////////////////////////////////////////////////////////////////////////
  106. // end of file glbconst.h
  107. //////////////////////////////////////////////////////////////////////////