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.

137 lines
3.2 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 client.
  7. Environment:
  8. Kernel mode
  9. Revision History:
  10. 8/14/1998 JosephJ Created
  11. --*/
  12. #ifndef _IOCTL_
  13. #define _IOCTL_
  14. #define ARP_CLIENT_DOS_DEVICE_NAME L"\\\\.\\ATMARPC"
  15. #define ARPC_IOCTL_QUERY_VERSION CTL_CODE(FILE_DEVICE_NETWORK, 100, METHOD_BUFFERED, FILE_ANY_ACCESS)
  16. #define ARPC_IOCTL_QUERY_INTERFACES CTL_CODE(FILE_DEVICE_NETWORK, 101, METHOD_BUFFERED, FILE_ANY_ACCESS)
  17. #define ARPC_IOCTL_QUERY_INTERFACE CTL_CODE(FILE_DEVICE_NETWORK, 102, METHOD_BUFFERED, FILE_ANY_ACCESS)
  18. #define ARPC_IOCTL_QUERY_IPENTRY CTL_CODE(FILE_DEVICE_NETWORK, 103, METHOD_BUFFERED, FILE_ANY_ACCESS)
  19. #define ARPC_IOCTL_QUERY_ATMENTR CTL_CODE(FILE_DEVICE_NETWORK, 104, METHOD_BUFFERED, FILE_ANY_ACCESS)
  20. #define ARPC_IOCTL_ADD_ARPENTRY CTL_CODE(FILE_DEVICE_NETWORK, 105, METHOD_BUFFERED, FILE_ANY_ACCESS)
  21. #define ARPC_IOCTL_VERSION 0x0
  22. //
  23. // Sames as COUNTED_STRING defined in sdk\inc\ntfsprop.h
  24. //
  25. typedef struct
  26. {
  27. USHORT Length;
  28. WCHAR Text[1];
  29. } ATMARPC_INTERFACE_NAME, *PATMARPC_INTERFACE_NAME;
  30. //
  31. // All Ptrs are represented by offsets from the beginning of the structures.
  32. //
  33. typedef UNICODE_STRING INTERFACE_NAME, *PINTERFACE_NAME;
  34. typedef struct
  35. {
  36. ATM_ADDRESS Addr;
  37. ATM_ADDRESS SubAddr;
  38. } ATM_ADDRESS_PAIR;
  39. typedef struct
  40. {
  41. UINT NumberOfInterfaces;
  42. ATMARPC_INTERFACE_NAME Interfaces; // The interfaces are strung together.
  43. } ATMARPC_INTERFACES, *PATMARPC_INTERFACES;
  44. typedef struct
  45. {
  46. enum
  47. {
  48. SIG_ATMARPC_INTERFACE_INFO,
  49. SIG_ATMARPC_IP_INFO,
  50. SIG_ATMARPC_ATM_INFO
  51. } Sig;
  52. UINT TotalSize;
  53. UINT NeededSize;
  54. UINT InterfaceNameOffset;
  55. } ATMARPC_IOCTL_HEADER;
  56. typedef struct
  57. {
  58. ATMARPC_IOCTL_HEADER Hdr;
  59. ULONG State;
  60. UINT NumLocalIPAddrs;
  61. UINT LocalIPAddrsOffset;
  62. UINT NumDestIPAddrs;
  63. UINT DestIPAddrsOffset;
  64. UINT NumDestAtmAddrs;
  65. UINT DestAtmAddrsOffset;
  66. } ATMARPC_INTERFACE_INFO;
  67. #define ATMARPC_GET_LOCAL_IP_LIST(_pInterfaceInfo) \
  68. ((IPAddr*) ( ((BYTE*)(_pInterfaceInfo)) \
  69. + (_pInterfaceInfo)->LocalIPAddrsOffset))
  70. #define ATMARPC_GET_DEST_IP_LIST(_pInterfaceInfo) \
  71. ((IPAddr*) ( ((BYTE*)(_pInterfaceInfo)) \
  72. + (_pInterfaceInfo)->DestIPAddrsOffset))
  73. #define ATMARPC_GET_DEST_ATM_LIST(_pInterfaceInfo) \
  74. ((ATM_ADDRESS_PAIR*) ( ((BYTE*)(_pInterfaceInfo)) \
  75. + (_pInterfaceInfo)->DestAtmAddrsOffset))
  76. typedef struct
  77. {
  78. ATMARPC_IOCTL_HEADER Hdr;
  79. IPAddr IPAddress;
  80. ULONG State;
  81. UINT NumAtmEntries;
  82. UINT AtmAddrsOffset;
  83. } ATMARPC_DEST_IP_INFO;
  84. #define ATMARPC_GET_DEST_ATM_LIST_FOR_IP(_pIPInfo) \
  85. ((ATM_ADDRESS_PAIR*) ( ((BYTE*)(_pIPInfo)) \
  86. + (_pIPInfo)->AtmAddrsOffset))
  87. typedef struct
  88. {
  89. ATMARPC_IOCTL_HEADER Hdr;
  90. ULONG State;
  91. ATM_ADDRESS_PAIR AtmAddress;
  92. UINT NumIPEntries;
  93. UINT IPAddrsOffset;
  94. } ATMARPC_DEST_ATM_INFO;
  95. #define ATMARPC_GET_DEST_IP_LIST_FOR_ATM(_pAtmInfo) \
  96. ((IPAddr*) ( ((BYTE*)(_pAtmInfo)) \
  97. + (_pAtmInfo)->IPAddrsOffset))
  98. typedef struct
  99. {
  100. ATMARPC_IOCTL_HEADER Hdr;
  101. IPAddr IPAddress;
  102. ATM_ADDRESS_PAIR AtmAddress;
  103. } ATMARPC_ARP_COMMAND;
  104. #endif // _IOCTL_