Windows NT 4.0 source code leak
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
4.0 KiB

4 years ago
  1. /*
  2. * IO_PUB.H - include file for all IO modules
  3. */
  4. #ifndef _IO_PUB_
  5. #define _IO_PUB_
  6. /* error codes */
  7. #define IO_E_SUCC 0 /* success */
  8. #define IO_E_NOROOM 1 /* no room in local tables */
  9. #define IO_E_NOSUCH 2 /* no such object */
  10. #define IO_E_BADSIG 3 /* bad signature */
  11. #define IO_E_BADVER 4 /* bad version */
  12. #define IO_E_BADCMD 5 /* bad command opcode */
  13. #define IO_E_BADIDD 6
  14. #define IO_E_BADCM 7
  15. #define IO_E_PENDING 0xFF /* command is pending */
  16. /* IO commands available listed here */
  17. #define IO_CMD_ENUM_ADAPTERS 0x100 /* enumerate network interfaces */
  18. #define IO_CMD_ENUM_IDD 0x101 /* enumerate isdn device drivers */
  19. #define IO_CMD_ENUM_CM 0x102 /* enumerate connection managers */
  20. #define IO_CMD_TRC_RESET 0x300 /* reset trace */
  21. #define IO_CMD_TRC_STOP 0x301 /* stop trace */
  22. #define IO_CMD_TRC_START 0x302 /* start trace */
  23. #define IO_CMD_TRC_SET_FILT 0x305 /* set filter for trace context */
  24. #define IO_CMD_TRC_GET_STAT 0x306 /* get status of trace context */
  25. #define IO_CMD_TRC_GET_ENT 0x307 /* get a trace entry */
  26. #define IO_CMD_TRC_CREATE 0x30A /* create trc object */
  27. #define IO_CMD_TRC_DESTROY 0x30B /* destroy trc object */
  28. #define IO_CMD_DO_ADP_CMD 0x400
  29. #define MAX_ADP_OPERATIONS 8
  30. #define GET_ADP_UCHAR 1
  31. #define GET_ADP_USHORT 2
  32. #define GET_ADP_ULONG 3
  33. #define GET_ADP_BUFFER 4
  34. #define SET_ADP_UCHAR 5
  35. #define SET_ADP_USHORT 6
  36. #define SET_ADP_ULONG 7
  37. #define SET_ADP_BUFFER 8
  38. #define IO_CMD_DO_IDP_CMD 0x401
  39. #define MAX_IDP_OPERATIONS 4
  40. #define GET_IDP_IO_VALUE 1
  41. #define GET_IDP_BUFFER 2
  42. #define SET_IDP_IO_VALUE 3
  43. #define SET_IDP_BUFFER 4
  44. #define IO_CMD_IDD_GET_AREA 0x900 /* get idd area */
  45. #define IO_CMD_IDD_RESET_AREA 0x901 /* reset idd area state */
  46. #define IO_CMD_IDD_GET_STAT 0x902 /* get area state */
  47. #define IO_CMD_DBG_LEVEL 0xF00 /* set debug level */
  48. /* master descriptor structure for ioctl commands to IO module */
  49. typedef struct
  50. {
  51. ULONG sig; /* identifing signature */
  52. #define IO_CMD_SIG 0x321B71B7
  53. USHORT ver_major, ver_minor; /* interface version (curr: 0.1) */
  54. #define IO_VER_MAJOR 0
  55. #define IO_VER_MINOR 1
  56. ULONG opcode; /* command opcode, IO_CMD_* */
  57. ULONG status; /* completion status, ok: 0 */
  58. VOID *cm; /* related connection object */
  59. VOID *idd; /* related idd */
  60. ULONG arg[4]; /* 4 general purpose args */
  61. union /* opcode specific data */
  62. {
  63. struct /* IO_CMD_ENUM_ADAPTERS */
  64. {
  65. USHORT num;
  66. ULONG BaseIO[MAX_ADAPTERS_IN_SYSTEM];
  67. ULONG BaseMem[MAX_ADAPTERS_IN_SYSTEM];
  68. ULONG BoardType[MAX_ADAPTERS_IN_SYSTEM];
  69. CHAR Name[MAX_ADAPTERS_IN_SYSTEM][64];
  70. VOID *tbl[MAX_ADAPTERS_IN_SYSTEM];
  71. } enum_adapters;
  72. struct /* IO_CMD_ENUM_MTL */
  73. {
  74. USHORT num;
  75. CHAR name[MAX_CM_IN_SYSTEM][64];
  76. VOID *tbl[MAX_CM_IN_SYSTEM];
  77. } enum_cm;
  78. struct /* IO_CMD_ENUM_IDD */
  79. {
  80. USHORT num;
  81. VOID *tbl[MAX_IDD_IN_SYSTEM];
  82. CHAR name[MAX_IDD_IN_SYSTEM][64];
  83. } enum_idd;
  84. struct
  85. {
  86. INT cmplen;
  87. CHAR filestr[9];
  88. } dbg_level;
  89. CM_STATUS cm_stat; /* IO_CMD_CM_GET_STAT */
  90. TRC_STATUS trc_stat; /* IO_CMD_TRC_GET_STAT */
  91. TRC_ENTRY trc_ent; /* IO_CMD_TRC_GET_ENT */
  92. IDD_AREA IddStat; // IO_CMD_GET_IDD_STAT
  93. struct
  94. {
  95. UCHAR uc;
  96. USHORT us;
  97. ULONG ul;
  98. ULONG Address;
  99. USHORT Length;
  100. UCHAR Buffer[ADP_RAM_SIZE];
  101. } AdpRaw;
  102. struct
  103. {
  104. UCHAR uc;
  105. USHORT us;
  106. ULONG ul;
  107. USHORT Bank;
  108. USHORT Page;
  109. ULONG Address;
  110. USHORT Length;
  111. UCHAR Buffer[IDP_RAM_PAGE_SIZE];
  112. } IdpRaw;
  113. } val;
  114. } IO_CMD;
  115. #endif /* _IO_PUB_ */