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
3.3 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. CHAR *pszInterfaceDesc; // Friendly name of interface
  23. CHAR *pszInterfaceGUID; // 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. ElMediaSenseRegister (
  52. IN BOOL Register
  53. );
  54. VOID
  55. ElMediaSenseCallback (
  56. IN PWNODE_HEADER pWnodeHeader,
  57. IN UINT_PTR uiNotificationContext
  58. );
  59. VOID
  60. ElMediaSenseCallbackWorker (
  61. IN PVOID pvContext
  62. );
  63. DWORD
  64. ElDeviceNotificationRegister (
  65. IN BOOL fRegister
  66. );
  67. DWORD
  68. ElDeviceNotificationHandler (
  69. IN PVOID lpEventData,
  70. IN DWORD dwEventType
  71. );
  72. VOID
  73. ElDeviceNotificationHandlerWorker (
  74. IN PVOID pvContext
  75. );
  76. DWORD
  77. ElEnumAndOpenInterfaces (
  78. IN CHAR *pszDesiredDescription,
  79. IN CHAR *pszDesiredGUID
  80. );
  81. DWORD
  82. ElOpenInterfaceHandle (
  83. IN CHAR *pszDeviceName,
  84. OUT HANDLE hDevice
  85. );
  86. DWORD
  87. ElCloseInterfaceHandle (
  88. IN HANDLE hDevice
  89. );
  90. DWORD
  91. ElReadFromInterface (
  92. IN HANDLE hDevice,
  93. IN PEAPOL_BUFFER pBuffer,
  94. IN DWORD dwBufferLength
  95. );
  96. DWORD
  97. ElWriteToInterface (
  98. IN HANDLE hDevice,
  99. IN PEAPOL_BUFFER pBuffer,
  100. IN DWORD dwBufferLength
  101. );
  102. DWORD
  103. ElGetCardStatus (
  104. UNICODE_STRING *pInterface,
  105. DWORD *pdwNetCardStatus,
  106. DWORD *pdwMediaType
  107. );
  108. DWORD
  109. ElHashInterfaceDescToBucket (
  110. IN CHAR *pszInterfaceDesc
  111. );
  112. PEAPOL_ITF
  113. ElGetITFPointerFromInterfaceDesc (
  114. IN CHAR *pszInterfaceDesc
  115. );
  116. VOID
  117. ElRemoveITFFromTable (
  118. IN EAPOL_ITF *pITF
  119. );
  120. DWORD
  121. ElNdisuioEnumerateInterfaces (
  122. IN OUT PNDIS_ENUM_INTF pItfBuffer,
  123. IN DWORD dwTotalInterfaces,
  124. IN DWORD dwBufferSize
  125. );
  126. DWORD
  127. ElShutdownInterface (
  128. IN CHAR *pszGUID
  129. );
  130. #endif //_EAPOL_DEVICEIO_H_