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.

142 lines
5.2 KiB

  1. // Following are private I/O control codes for the rocket port
  2. #define IOCTL_RCKT_GET_STATS \
  3. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x800,METHOD_BUFFERED,FILE_ANY_ACCESS)
  4. #define IOCTL_RCKT_CHECK \
  5. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x801,METHOD_BUFFERED,FILE_ANY_ACCESS)
  6. #define IOCTL_RCKT_CLR_STATS \
  7. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x802,METHOD_BUFFERED,FILE_ANY_ACCESS)
  8. #define IOCTL_RCKT_ISR_CNT \
  9. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x803,METHOD_BUFFERED,FILE_ANY_ACCESS)
  10. #define IOCTL_RCKT_MONALL \
  11. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x804,METHOD_BUFFERED,FILE_ANY_ACCESS)
  12. #define IOCTL_RCKT_SET_LOOPBACK_ON \
  13. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x805,METHOD_BUFFERED,FILE_ANY_ACCESS)
  14. #define IOCTL_RCKT_SET_LOOPBACK_OFF \
  15. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x806,METHOD_BUFFERED,FILE_ANY_ACCESS)
  16. #define IOCTL_RCKT_SET_TOGGLE_LOW \
  17. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x807,METHOD_BUFFERED,FILE_ANY_ACCESS)
  18. #define IOCTL_RCKT_CLEAR_TOGGLE_LOW \
  19. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x808,METHOD_BUFFERED,FILE_ANY_ACCESS)
  20. #define IOCTL_RCKT_SET_MODEM_RESET_OLD \
  21. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x809,METHOD_BUFFERED,FILE_ANY_ACCESS)
  22. #define IOCTL_RCKT_CLEAR_MODEM_RESET_OLD \
  23. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x80a,METHOD_BUFFERED,FILE_ANY_ACCESS)
  24. #define IOCTL_RCKT_GET_RCKTMDM_INFO_OLD \
  25. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x80b,METHOD_BUFFERED,FILE_ANY_ACCESS)
  26. #define IOCTL_RCKT_SEND_MODEM_ROW_OLD \
  27. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x80c,METHOD_BUFFERED,FILE_ANY_ACCESS)
  28. #define IOCTL_RCKT_SET_MODEM_RESET \
  29. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x80d,METHOD_BUFFERED,FILE_ANY_ACCESS)
  30. #define IOCTL_RCKT_CLEAR_MODEM_RESET \
  31. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x80e,METHOD_BUFFERED,FILE_ANY_ACCESS)
  32. #define IOCTL_RCKT_SEND_MODEM_ROW \
  33. CTL_CODE(FILE_DEVICE_SERIAL_PORT, 0x80f,METHOD_BUFFERED,FILE_ANY_ACCESS)
  34. //----- following struct is for passing info back to a manager/debugger.
  35. typedef struct {
  36. USHORT struct_size; // our struct size for version control
  37. USHORT status; // return status
  38. char port_name[12]; // COM#
  39. ULONG handle; // handle, alternate to port_name
  40. char reserved[20]; // room for extra growth
  41. char data[1000]; // general data area
  42. } Tracer;
  43. typedef struct {
  44. LONG receiveFifo;
  45. LONG transmitFifo;
  46. LONG receiveBytes;
  47. LONG transmitBytes;
  48. LONG parityErrors;
  49. LONG framingErrors;
  50. LONG overrunSoftware;
  51. LONG overrunHardware;
  52. } PortStats;
  53. typedef struct {
  54. ULONG trace_info;
  55. ULONG int_counter;
  56. ULONG WriteDpc_counter;
  57. ULONG Timer_counter;
  58. ULONG Poll_counter;
  59. } Global_Track;
  60. // following is a structure for a port which the driver will return
  61. // information on. The driver will return this information for every
  62. // port(assume ptr to an array of up to 128 port_mon_structs) in one
  63. // call to the driver. Will query driver every X seconds for this
  64. // data to generate statistics on port. The structure list is terminated
  65. // by a structure with port_name[0] = 0.
  66. typedef struct
  67. {
  68. char port_name[12]; // port name(0=end of port list),("."=not assigned)
  69. ULONG sent_bytes; // total number of sent bytes
  70. ULONG rec_bytes; // total number of receive bytes
  71. USHORT sent_packets; // number of write() packets
  72. USHORT rec_packets; // number of read() packets
  73. USHORT overrun_errors; // receive over-run errors
  74. USHORT framing_errors; // receive framing errors
  75. USHORT parity_errors; // receive parity errors
  76. USHORT status_flags; // opened/close, flow-ctrl, out/in pin signals, etc
  77. USHORT function_bits; // bits set on to indicate function call
  78. USHORT spare1; // some room for expansion(& stay on 4x boundary)
  79. } PortMon;
  80. typedef struct
  81. {
  82. ULONG struct_type;
  83. ULONG struct_size;
  84. ULONG num_structs;
  85. ULONG var1; // reserve
  86. } PortMonBase;
  87. typedef struct
  88. {
  89. char port_name[12]; // port name(0=end of port list),("."=not assigned)
  90. } PortMonNames;
  91. typedef struct
  92. {
  93. ULONG sent_bytes; // total number of sent bytes
  94. ULONG rec_bytes; // total number of receive bytes
  95. USHORT sent_packets; // number of write() packets
  96. USHORT rec_packets; // number of read() packets
  97. USHORT overrun_errors; // receive over-run errors
  98. USHORT framing_errors; // receive framing errors
  99. USHORT parity_errors; // receive parity errors
  100. USHORT status_flags; // opened/close, flow-ctrl, out/in pin signals, etc
  101. } PortMonStatus;
  102. // following are structures that are used to query the driver for information
  103. // about RocketModem boards installed in the system. this information is
  104. // primarily used by the user program used to manually reset the hardware on
  105. // the newer generation RocketModem boards. [jl] 980308
  106. typedef struct
  107. {
  108. ULONG num_rktmdm_ports; // 0 if != rocketmodem, >0 = # ports (4 or 8)
  109. char port_names[8][16]; // array of port names assigned to this board
  110. } RktBoardInfo;
  111. typedef struct
  112. {
  113. ULONG struct_size;
  114. ULONG rm_country_code; // RocketModem country code
  115. ULONG rm_settle_time; // RocketModem settle time
  116. RktBoardInfo rm_board_cfg[4];
  117. } RocketModemConfig;