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.

220 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. interface.h
  5. Abstract:
  6. This module contains all of the code prototypes to
  7. drive the interface list management of IPSecSPD Service.
  8. Author:
  9. abhisheV 30-September-1999
  10. Environment
  11. User Level: Win32
  12. Revision History:
  13. --*/
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. DWORD
  18. CreateInterfaceList(
  19. OUT PIPSEC_INTERFACE * ppIfListToCreate
  20. );
  21. VOID
  22. DestroyInterfaceList(
  23. IN PIPSEC_INTERFACE pIfListToDelete
  24. );
  25. DWORD
  26. OnInterfaceChangeEvent(
  27. );
  28. VOID
  29. FormObseleteAndNewIfLists(
  30. IN PIPSEC_INTERFACE pIfList,
  31. IN OUT PIPSEC_INTERFACE * ppExistingIfList,
  32. OUT PIPSEC_INTERFACE * ppObseleteIfList,
  33. OUT PIPSEC_INTERFACE * ppNewIfList
  34. );
  35. VOID
  36. AddToInterfaceList(
  37. IN PIPSEC_INTERFACE pIfListToAppend,
  38. OUT PIPSEC_INTERFACE * ppOriginalIfList
  39. );
  40. VOID
  41. MarkInterfaceListSuspect(
  42. IN PIPSEC_INTERFACE pExistingIfList
  43. );
  44. VOID
  45. DeleteObseleteInterfaces(
  46. IN OUT PIPSEC_INTERFACE * ppExistingIfList,
  47. OUT PIPSEC_INTERFACE * ppObseleteIfList
  48. );
  49. BOOL
  50. InterfaceExistsInList(
  51. IN PIPSEC_INTERFACE pTestIf,
  52. IN PIPSEC_INTERFACE pExistingIfList,
  53. OUT PIPSEC_INTERFACE * ppExistingIf
  54. );
  55. DWORD
  56. GetInterfaceListFromStack(
  57. OUT PIPSEC_INTERFACE * ppIfList
  58. );
  59. DWORD
  60. GenerateInterfaces(
  61. IN PMIB_IPADDRTABLE pMibIpAddrTable,
  62. IN PMIB_IFTABLE pMibIfTable,
  63. OUT PIPSEC_INTERFACE * ppIfList
  64. );
  65. PMIB_IFROW
  66. GetMibIfRow(
  67. IN PMIB_IFTABLE pMibIfTable,
  68. IN DWORD dwIndex
  69. );
  70. DWORD
  71. CreateNewInterface(
  72. IN DWORD dwInterfaceType,
  73. IN ULONG IpAddress,
  74. IN DWORD dwIndex,
  75. IN PMIB_IFROW pMibIfRow,
  76. OUT PIPSEC_INTERFACE * ppNewInterface
  77. );
  78. BOOL
  79. MatchInterfaceType(
  80. IN DWORD dwIfListEntryIfType,
  81. IN IF_TYPE dwFilterIfType
  82. );
  83. BOOL
  84. IsLAN(
  85. IN DWORD dwInterfaceType
  86. );
  87. BOOL
  88. IsDialUp(
  89. IN DWORD dwInterfaceType
  90. );
  91. DWORD
  92. InitializeInterfaceChangeEvent(
  93. );
  94. DWORD
  95. ResetInterfaceChangeEvent(
  96. );
  97. VOID
  98. DestroyInterfaceChangeEvent(
  99. );
  100. HANDLE
  101. GetInterfaceChangeEvent(
  102. );
  103. BOOL
  104. IsMyAddress(
  105. IN ULONG IpAddrToCheck,
  106. IN ULONG IpAddrMask,
  107. IN PIPSEC_INTERFACE pExistingIfList
  108. );
  109. VOID
  110. PrintInterfaceList(
  111. IN PIPSEC_INTERFACE pInterfaceList
  112. );
  113. DWORD
  114. GetMatchingInterfaces(
  115. IF_TYPE FilterInterfaceType,
  116. PIPSEC_INTERFACE pExistingIfList,
  117. MATCHING_ADDR ** ppMatchingAddresses,
  118. DWORD * pdwAddrCnt
  119. );
  120. BOOL
  121. InterfaceAddrIsLocal(
  122. ULONG uIpAddr,
  123. ULONG uIpAddrMask,
  124. MATCHING_ADDR * pLocalAddresses,
  125. DWORD dwAddrCnt
  126. );
  127. VOID
  128. FreeIpsecInterface(
  129. PIPSEC_INTERFACE pIpsecInterface
  130. );
  131. DWORD
  132. CopyIpsecInterface(
  133. PIPSEC_INTERFACE pIpsecIf,
  134. PIPSEC_INTERFACE_INFO pIpsecInterface
  135. );
  136. VOID
  137. FreeIpsecInterfaceInfos(
  138. DWORD dwNumInterfaces,
  139. PIPSEC_INTERFACE_INFO pIpsecInterfaces
  140. );
  141. DWORD
  142. GetInterfaceName(
  143. GUID gInterfaceID,
  144. LPWSTR * ppszInterfaceName
  145. );
  146. #ifdef __cplusplus
  147. }
  148. #endif