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.

174 lines
4.1 KiB

  1. /*++ BUILD Version: 0000 // Increment this if a change has global effects
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. intrface.h
  5. Abstract:
  6. Definition for user-mode/kernel-mode tapi/connection wrapper interface.
  7. Author:
  8. Dan Knudson (DanKn) 20-Feb-1994
  9. Revision History:
  10. --*/
  11. #define NDISTAPIERR_UNINITIALIZED 0x00001001
  12. #define NDISTAPIERR_BADDEVICEID 0x00001002
  13. #define NDISTAPIERR_DEVICEOFFLINE 0x00001003
  14. //
  15. // Define the various device type values. Note that values used by Microsoft
  16. // Corporation are in the range 0-32767, and 32768-65535 are reserved for use
  17. // by customers.
  18. //
  19. #define FILE_DEVICE_NDISTAPI 0x00008fff
  20. //
  21. // Macro definition for defining IOCTL and FSCTL function control codes. Note
  22. // that function codes 0-2047 are reserved for Microsoft Corporation, and
  23. // 2048-4095 are reserved for customers.
  24. //
  25. #define NDISTAPI_IOCTL_INDEX 0x8f0
  26. //
  27. // The NDISTAPI device driver IOCTLs
  28. //
  29. #define IOCTL_NDISTAPI_CONNECT CTL_CODE(FILE_DEVICE_NDISTAPI, \
  30. NDISTAPI_IOCTL_INDEX, \
  31. METHOD_BUFFERED, \
  32. FILE_ANY_ACCESS)
  33. #define IOCTL_NDISTAPI_DISCONNECT CTL_CODE(FILE_DEVICE_NDISTAPI, \
  34. NDISTAPI_IOCTL_INDEX + 1, \
  35. METHOD_BUFFERED, \
  36. FILE_ANY_ACCESS)
  37. #define IOCTL_NDISTAPI_QUERY_INFO CTL_CODE(FILE_DEVICE_NDISTAPI, \
  38. NDISTAPI_IOCTL_INDEX + 2, \
  39. METHOD_BUFFERED, \
  40. FILE_ANY_ACCESS)
  41. #define IOCTL_NDISTAPI_SET_INFO CTL_CODE(FILE_DEVICE_NDISTAPI, \
  42. NDISTAPI_IOCTL_INDEX + 3, \
  43. METHOD_BUFFERED, \
  44. FILE_ANY_ACCESS)
  45. #define IOCTL_NDISTAPI_GET_LINE_EVENTS CTL_CODE(FILE_DEVICE_NDISTAPI, \
  46. NDISTAPI_IOCTL_INDEX + 4, \
  47. METHOD_BUFFERED, \
  48. FILE_ANY_ACCESS)
  49. #define IOCTL_NDISTAPI_CREATE CTL_CODE(FILE_DEVICE_NDISTAPI, \
  50. NDISTAPI_IOCTL_INDEX + 5, \
  51. METHOD_BUFFERED, \
  52. FILE_ANY_ACCESS)
  53. //
  54. // Type definitions
  55. //
  56. typedef struct _NDISTAPI_REQUEST
  57. {
  58. //
  59. // Return value
  60. //
  61. OUT ULONG ulReturnValue;
  62. //
  63. // Operation idenfifier
  64. //
  65. IN ULONG Oid;
  66. //
  67. // Target line device ID
  68. //
  69. IN ULONG ulDeviceID;
  70. //
  71. // Total size of request data in buffer
  72. //
  73. IN ULONG ulDataSize;
  74. //
  75. // Buffer for request data
  76. //
  77. IN OUT UCHAR Data[1];
  78. } NDISTAPI_REQUEST, *PNDISTAPI_REQUEST;
  79. //
  80. // Returns info to kmddsp in the LINE_OPEN OID
  81. //
  82. typedef struct _NDISTAPI_OPENDATA {
  83. //
  84. // GUID of the adapter that owns this line
  85. //
  86. OUT GUID Guid;
  87. //
  88. // Media type of the adapter that owns this line
  89. //
  90. OUT NDIS_WAN_MEDIUM_SUBTYPE MediaType;
  91. } NDISTAPI_OPENDATA, *PNDISTAPI_OPENDATA;
  92. typedef struct _NDISTAPI_EVENT_DATA
  93. {
  94. //
  95. // Total size of the event data buffer
  96. //
  97. IN ULONG ulTotalSize;
  98. //
  99. // Size of the returned event data
  100. //
  101. OUT ULONG ulUsedSize;
  102. //
  103. // Event data buffer
  104. //
  105. OUT UCHAR Data[1];
  106. } NDISTAPI_EVENT_DATA, *PNDISTAPI_EVENT_DATA;
  107. //
  108. // Info for a LINE_CREATE
  109. //
  110. typedef struct _NDISTAPI_CREATE_INFO {
  111. //
  112. // Given by NdisTapi in LINE_CREATE indication
  113. //
  114. IN ULONG_PTR TempID;
  115. //
  116. // The ID for this device
  117. //
  118. IN ULONG DeviceID;
  119. } NDISTAPI_CREATE_INFO, *PNDISTAPI_CREATE_INFO;