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.

150 lines
4.3 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. driver.h
  5. Abstract:
  6. Environment:
  7. kernel & User mode
  8. Notes:
  9. Revision History:
  10. --*/
  11. //
  12. // Define the various device type values. Note that values used by Microsoft
  13. // Corporation are in the range 0-32767, and 32768-65535 are reserved for use
  14. // by customers.
  15. //
  16. #define FILE_DEVICE_IPXROUTER 0x00008000
  17. //
  18. // Macro definition for defining IOCTL and FSCTL function control codes. Note
  19. // that function codes 0-2047 are reserved for Microsoft Corporation, and
  20. // 2048-4095 are reserved for customers.
  21. //
  22. #define IPXROUTER_IOCTL_INDEX (ULONG)0x00000800
  23. //
  24. // Define our own private IOCTLs
  25. //
  26. #define IOCTL_IPXROUTER_SNAPROUTES CTL_CODE(FILE_DEVICE_IPXROUTER, \
  27. IPXROUTER_IOCTL_INDEX+1,\
  28. METHOD_BUFFERED, \
  29. FILE_ANY_ACCESS)
  30. #define IOCTL_IPXROUTER_GETNEXTROUTE CTL_CODE(FILE_DEVICE_IPXROUTER, \
  31. IPXROUTER_IOCTL_INDEX+2,\
  32. METHOD_BUFFERED, \
  33. FILE_ANY_ACCESS)
  34. #define IOCTL_IPXROUTER_CHECKNETNUMBER CTL_CODE(FILE_DEVICE_IPXROUTER, \
  35. IPXROUTER_IOCTL_INDEX+3,\
  36. METHOD_BUFFERED, \
  37. FILE_ANY_ACCESS)
  38. #define IOCTL_IPXROUTER_SHOWNICINFO CTL_CODE(FILE_DEVICE_IPXROUTER, \
  39. IPXROUTER_IOCTL_INDEX+4,\
  40. METHOD_BUFFERED, \
  41. FILE_ANY_ACCESS)
  42. #define IOCTL_IPXROUTER_ZERONICSTATISTICS CTL_CODE(FILE_DEVICE_IPXROUTER, \
  43. IPXROUTER_IOCTL_INDEX+5,\
  44. METHOD_BUFFERED, \
  45. FILE_ANY_ACCESS)
  46. #define IOCTL_IPXROUTER_SHOWMEMSTATISTICS CTL_CODE(FILE_DEVICE_IPXROUTER, \
  47. IPXROUTER_IOCTL_INDEX+6,\
  48. METHOD_BUFFERED, \
  49. FILE_ANY_ACCESS)
  50. #define IOCTL_IPXROUTER_GETWANINNACTIVITY CTL_CODE(FILE_DEVICE_IPXROUTER, \
  51. IPXROUTER_IOCTL_INDEX+7,\
  52. METHOD_BUFFERED, \
  53. FILE_ANY_ACCESS)
  54. #define IOCTL_IPXROUTER_SETWANGLOBALADDRESS CTL_CODE(FILE_DEVICE_IPXROUTER, \
  55. IPXROUTER_IOCTL_INDEX+8,\
  56. METHOD_BUFFERED, \
  57. FILE_ANY_ACCESS)
  58. #define IOCTL_IPXROUTER_DELETEWANGLOBALADDRESS CTL_CODE(FILE_DEVICE_IPXROUTER, \
  59. IPXROUTER_IOCTL_INDEX+9,\
  60. METHOD_BUFFERED, \
  61. FILE_ANY_ACCESS)
  62. //*** Nic Info Ioctl Data ***
  63. #define SHOW_NIC_LAN 0
  64. #define SHOW_NIC_WAN 1
  65. #define SHOW_NIC_CLOSED 0
  66. #define SHOW_NIC_CLOSING 1
  67. #define SHOW_NIC_ACTIVE 2
  68. #define SHOW_NIC_PENDING_OPEN 3
  69. typedef struct _SHOW_NIC_INFO {
  70. USHORT NicId;
  71. USHORT DeviceType;
  72. USHORT NicState;
  73. UCHAR Network[4];
  74. UCHAR Node[6];
  75. USHORT TickCount;
  76. ULONG StatBadReceived;
  77. ULONG StatRipReceived;
  78. ULONG StatRipSent;
  79. ULONG StatRoutedReceived;
  80. ULONG StatRoutedSent;
  81. ULONG StatType20Received;
  82. ULONG StatType20Sent;
  83. } SHOW_NIC_INFO, *PSHOW_NIC_INFO;
  84. //*** Memory Statistics Data ***
  85. typedef struct _SHOW_MEM_STAT {
  86. ULONG PeakPktAllocCount;
  87. ULONG CurrentPktAllocCount;
  88. ULONG CurrentPktPoolCount;
  89. ULONG PacketSize;
  90. } SHOW_MEM_STAT, *PSHOW_MEM_STAT;
  91. //*** Wan Innactivity Data ***
  92. // For the first call the NicId is set to 0xffff. The router will associate
  93. // the remote node with a valid nic id, which will be used in subsequent calls.
  94. typedef struct _GET_WAN_INNACTIVITY {
  95. USHORT NicId;
  96. UCHAR RemoteNode[6];
  97. ULONG WanInnactivityCount;
  98. } GET_WAN_INNACTIVITY, *PGET_WAN_INNACTIVITY;
  99. //*** Wan Global Address Data ***
  100. #define ERROR_IPXCP_NETWORK_NUMBER_IN_USE 1
  101. #define ERROR_IPXCP_MEMORY_ALLOCATION_FAILURE 2
  102. typedef struct _SET_WAN_GLOBAL_ADDRESS {
  103. UCHAR WanGlobalNetwork[4];
  104. ULONG ErrorCode;
  105. } SET_WAN_GLOBAL_ADDRESS, *PSET_WAN_GLOBAL_ADDRESS;