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.

193 lines
4.3 KiB

  1. /*++
  2. Copyright (c) 1992-1996 Microsoft Corporation
  3. Module Name:
  4. ioctl.h
  5. Abstract:
  6. This file contains the ioctl declarations for the atmarp server.
  7. Author:
  8. Jameel Hyder (jameelh@microsoft.com) July 1996
  9. Environment:
  10. Kernel mode
  11. Revision History:
  12. --*/
  13. #ifndef _IOCTL_
  14. #define _IOCTL_
  15. #define ARP_SERVER_DEVICE_NAME L"\\Device\\AtmArpServer"
  16. #define ARP_SERVER_DOS_DEVICE_NAME L"\\\\.\\AtmArpServer"
  17. #define ARP_SERVER_SYMBOLIC_NAME L"\\DosDevices\\AtmArpServer"
  18. #define ARPS_IOCTL_QUERY_INTERFACES CTL_CODE(FILE_DEVICE_NETWORK, 100, METHOD_BUFFERED, FILE_ANY_ACCESS)
  19. #define ARPS_IOCTL_FLUSH_ARPCACHE CTL_CODE(FILE_DEVICE_NETWORK, 101, METHOD_BUFFERED, FILE_ANY_ACCESS)
  20. #define ARPS_IOCTL_QUERY_ARPCACHE CTL_CODE(FILE_DEVICE_NETWORK, 102, METHOD_BUFFERED, FILE_ANY_ACCESS)
  21. #define ARPS_IOCTL_ADD_ARPENTRY CTL_CODE(FILE_DEVICE_NETWORK, 103, METHOD_BUFFERED, FILE_ANY_ACCESS)
  22. #define ARPS_IOCTL_QUERY_IP_FROM_ATM CTL_CODE(FILE_DEVICE_NETWORK, 104, METHOD_BUFFERED, FILE_ANY_ACCESS)
  23. #define ARPS_IOCTL_QUERY_ATM_FROM_IP CTL_CODE(FILE_DEVICE_NETWORK, 105, METHOD_BUFFERED, FILE_ANY_ACCESS)
  24. #define ARPS_IOCTL_QUERY_ARP_STATISTICS CTL_CODE(FILE_DEVICE_NETWORK, 106, METHOD_BUFFERED, FILE_ANY_ACCESS)
  25. #define ARPS_IOCTL_QUERY_MARSCACHE CTL_CODE(FILE_DEVICE_NETWORK, 110, METHOD_BUFFERED, FILE_ANY_ACCESS)
  26. #define ARPS_IOCTL_QUERY_MARS_STATISTICS CTL_CODE(FILE_DEVICE_NETWORK, 111, METHOD_BUFFERED, FILE_ANY_ACCESS)
  27. #define ARPS_IOCTL_RESET_STATISTICS CTL_CODE(FILE_DEVICE_NETWORK, 112, METHOD_BUFFERED, FILE_ANY_ACCESS)
  28. typedef enum
  29. {
  30. QUERY_IP_FROM_ATM,
  31. QUERY_ATM_FROM_IP,
  32. ADD_ARP_ENTRY
  33. } OPERATION;
  34. //
  35. // All Ptrs are represented by offsets from the beginning of the structures.
  36. //
  37. typedef UNICODE_STRING INTERFACE_NAME, *PINTERFACE_NAME;
  38. typedef struct
  39. {
  40. IPADDR IpAddr;
  41. ATM_ADDRESS AtmAddress;
  42. ATM_ADDRESS SubAddress;
  43. } ARPENTRY, *PARPENTRY;
  44. typedef struct
  45. {
  46. UINT NumberOfInterfaces;
  47. INTERFACE_NAME Interfaces[1];
  48. } INTERFACES, *PINTERFACES;
  49. typedef union
  50. {
  51. INTERFACE_NAME Name;
  52. ARPENTRY ArpEntry;
  53. } IOCTL_QA_ENTRY, *PIOCTL_QA_ENTRY;
  54. typedef union
  55. {
  56. struct QUERY_ARP_CACHE_INPUT_PARAMS
  57. {
  58. UINT StartEntryIndex;
  59. INTERFACE_NAME Name;
  60. };
  61. struct QUERY_ARP_CACHE_OUTPUT_PARAMS
  62. {
  63. UINT TotalNumberOfEntries;
  64. UINT NumberOfEntriesInBuffer;
  65. ARPENTRY Entries[1];
  66. } Entries;
  67. } IOCTL_QUERY_CACHE, *PIOCTL_QUERY_CACHE;
  68. typedef struct
  69. {
  70. UINT ElapsedSeconds;
  71. UINT TotalRecvPkts;
  72. UINT DiscardedRecvPkts;
  73. UINT CurrentArpEntries;
  74. UINT MaxArpEntries;
  75. UINT Acks;
  76. UINT Naks;
  77. UINT CurrentClientVCs;
  78. UINT MaxClientVCs;
  79. UINT TotalActiveVCs;
  80. UINT TotalIncomingCalls; // for both arps and mars
  81. UINT FailedIncomingCalls; // for both arps and mars
  82. } ARP_SERVER_STATISTICS, *PARP_SERVER_STATISTICS;
  83. typedef struct
  84. {
  85. UINT ElapsedSeconds;
  86. UINT TotalRecvPkts;
  87. UINT DiscardedRecvPkts;
  88. UINT TotalMCDataPkts;
  89. UINT DiscardedMCDataPkts;
  90. UINT ReflectedMCDataPkts;
  91. UINT CurrentClusterMembers;
  92. UINT MaxClusterMembers;
  93. UINT TotalCCVCAddParties;
  94. UINT FailedCCVCAddParties;
  95. UINT RegistrationRequests;
  96. UINT FailedRegistrations;
  97. UINT TotalJoins;
  98. UINT FailedJoins;
  99. UINT DuplicateJoins;
  100. UINT SuccessfulVCMeshJoins;
  101. UINT TotalLeaves;
  102. UINT FailedLeaves;
  103. UINT TotalRequests;
  104. UINT Naks;
  105. UINT VCMeshAcks;
  106. UINT MCSAcks;
  107. UINT CurrentGroups; // vc-mesh
  108. UINT MaxGroups; // vc-mesh
  109. UINT CurrentPromiscuous;
  110. UINT MaxPromiscuous;
  111. UINT MaxAddressesPerGroup;
  112. } MARS_SERVER_STATISTICS, *PMARS_SERVER_STATISTICS;
  113. //
  114. // MARS-specific entries.
  115. //
  116. typedef struct
  117. {
  118. IPADDR IpAddr;
  119. ULONG Flags; // One or more MARSENTRY_* flags below
  120. ULONG NumAtmAddresses;
  121. ULONG OffsetAtmAddresses; // From the start of THIS structure.
  122. // NOTE: we do not report subaddresses
  123. // Will be 0 if there are no addresses
  124. // present in the buffer (typically
  125. // because there is not enough space
  126. // to store them all).
  127. } MARSENTRY, *PMARSENTRY;
  128. #define MARSENTRY_MCS_SERVED 0x1 // Group is MCS served
  129. #define SIG_MARSENTRY 0xf69052f5
  130. typedef union
  131. {
  132. struct QUERY_MARS_CACHE_INPUT_PARAMS
  133. {
  134. UINT StartEntryIndex;
  135. INTERFACE_NAME Name;
  136. };
  137. struct QUERY_MARS_CACHE_OUTPUT_PARAMS
  138. {
  139. ULONG Sig; // Set to SIG_MARSENTRY
  140. UINT TotalNumberOfEntries;
  141. UINT NumberOfEntriesInBuffer;
  142. MARSENTRY Entries[1];
  143. } MarsCache;
  144. } IOCTL_QUERY_MARS_CACHE, *PIOCTL_QUERY_MARS_CACHE;
  145. #endif // _IOCTL_