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.

206 lines
4.0 KiB

  1. /*++
  2. Copyright (c) 2000, Microsoft Corporation
  3. Module Name:
  4. eldeviceio.h
  5. Abstract:
  6. This module contains declarations for media-management and device I/O.
  7. The module interfaces with WMI, NDIS for device managment, and NDIS UIO
  8. for read/write of data.
  9. The routines declared here operate asynchronously on the handles
  10. associated with an I/O completion port opened on the ndis uio driver.
  11. Revision History:
  12. sachins, Apr 23 2000, Created
  13. --*/
  14. #ifndef _EAPOL_DEVICEIO_H_
  15. #define _EAPOL_DEVICEIO_H_
  16. //
  17. // Hash table definition for interfaces
  18. //
  19. typedef struct _EAPOL_ITF
  20. {
  21. struct _EAPOL_ITF *pNext;
  22. WCHAR *pwszInterfaceDesc; // Friendly name of interface
  23. WCHAR *pwszInterfaceGUID; // GUID
  24. } EAPOL_ITF, *PEAPOL_ITF;
  25. typedef struct _ITF_BUCKET
  26. {
  27. EAPOL_ITF *pItf;
  28. } ITF_BUCKET, *PITF_BUCKET;
  29. typedef struct _ITF_TABLE
  30. {
  31. ITF_BUCKET *pITFBuckets;
  32. DWORD dwNumITFBuckets;
  33. } ITF_TABLE, *PITF_TABLE;
  34. //
  35. // Variables global to eldeviceio.h
  36. //
  37. // Interface table containing interface friendly-name GUID pair
  38. ITF_TABLE g_ITFTable;
  39. // Read-write lock for interface table synchronization
  40. READ_WRITE_LOCK g_ITFLock;
  41. //
  42. // FUNCTION DECLARATIONS
  43. //
  44. DWORD
  45. ElMediaInit (
  46. );
  47. DWORD
  48. ElMediaDeInit (
  49. );
  50. DWORD
  51. ElMediaEventsHandler (
  52. IN PWZC_DEVICE_NOTIF pwzcDeviceNotif
  53. );
  54. DWORD
  55. ElMediaSenseRegister (
  56. IN BOOL Register
  57. );
  58. VOID
  59. ElMediaSenseCallback (
  60. IN PWNODE_HEADER pWnodeHeader,
  61. IN UINT_PTR uiNotificationContext
  62. );
  63. DWORD
  64. WINAPI
  65. ElMediaSenseCallbackWorker (
  66. IN PVOID pvContext
  67. );
  68. DWORD
  69. ElBindingsNotificationRegister (
  70. IN BOOL fRegister
  71. );
  72. VOID
  73. ElBindingsNotificationCallback (
  74. IN PWNODE_HEADER pWnodeHeader,
  75. IN UINT_PTR uiNotificationContext
  76. );
  77. DWORD
  78. WINAPI
  79. ElBindingsNotificationCallbackWorker (
  80. IN PVOID pvContext
  81. );
  82. DWORD
  83. ElDeviceNotificationRegister (
  84. IN BOOL fRegister
  85. );
  86. DWORD
  87. ElDeviceNotificationHandler (
  88. IN PVOID lpEventData,
  89. IN DWORD dwEventType
  90. );
  91. DWORD
  92. WINAPI
  93. ElDeviceNotificationHandlerWorker (
  94. IN PVOID pvContext
  95. );
  96. DWORD
  97. ElEnumAndOpenInterfaces (
  98. IN WCHAR *pwszDesiredDescription,
  99. IN WCHAR *pwszDesiredGUID,
  100. IN DWORD dwHandle,
  101. IN PRAW_DATA prdUserData
  102. );
  103. DWORD
  104. ElOpenInterfaceHandle (
  105. IN WCHAR *pwszDeviceName,
  106. OUT HANDLE hDevice
  107. );
  108. DWORD
  109. ElCloseInterfaceHandle (
  110. IN HANDLE hDevice,
  111. IN LPWSTR pwszDeviceGUID
  112. );
  113. DWORD
  114. ElReadFromInterface (
  115. IN HANDLE hDevice,
  116. IN PEAPOL_BUFFER pBuffer,
  117. IN DWORD dwBufferLength
  118. );
  119. DWORD
  120. ElWriteToInterface (
  121. IN HANDLE hDevice,
  122. IN PEAPOL_BUFFER pBuffer,
  123. IN DWORD dwBufferLength
  124. );
  125. DWORD
  126. ElGetCardStatus (
  127. UNICODE_STRING *pInterface,
  128. DWORD *pdwNetCardStatus,
  129. DWORD *pdwMediaType
  130. );
  131. DWORD
  132. ElHashInterfaceDescToBucket (
  133. IN WCHAR *pwszInterfaceDesc
  134. );
  135. PEAPOL_ITF
  136. ElGetITFPointerFromInterfaceDesc (
  137. IN WCHAR *pwszInterfaceDesc
  138. );
  139. VOID
  140. ElRemoveITFFromTable (
  141. IN EAPOL_ITF *pITF
  142. );
  143. DWORD
  144. ElNdisuioEnumerateInterfaces (
  145. IN OUT PNDIS_ENUM_INTF pItfBuffer,
  146. IN DWORD dwAvailableInterfaces,
  147. IN DWORD dwBufferSize
  148. );
  149. DWORD
  150. ElShutdownInterface (
  151. IN WCHAR *pwszGUID
  152. );
  153. DWORD
  154. ElCreateInterfaceEntry (
  155. IN WCHAR *pwszInterfaceGUID,
  156. IN WCHAR *pwszInterfaceDescription
  157. );
  158. #endif //_EAPOL_DEVICEIO_H_