Leaked source code of windows server 2003
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.

252 lines
3.9 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. GetSpecialAddrsList(
  57. OUT PSPECIAL_ADDR * ppSpecialAddrsList
  58. );
  59. DWORD
  60. GetInterfaceListFromStack(
  61. OUT PIPSEC_INTERFACE * ppIfList
  62. );
  63. DWORD
  64. GenerateInterfaces(
  65. IN PMIB_IPADDRTABLE pMibIpAddrTable,
  66. IN PMIB_IFTABLE pMibIfTable,
  67. OUT PIPSEC_INTERFACE * ppIfList
  68. );
  69. PMIB_IFROW
  70. GetMibIfRow(
  71. IN PMIB_IFTABLE pMibIfTable,
  72. IN DWORD dwIndex
  73. );
  74. DWORD
  75. CreateNewInterface(
  76. IN DWORD dwInterfaceType,
  77. IN ULONG IpAddress,
  78. IN DWORD dwIndex,
  79. IN PMIB_IFROW pMibIfRow,
  80. OUT PIPSEC_INTERFACE * ppNewInterface
  81. );
  82. BOOL
  83. MatchInterfaceType(
  84. IN DWORD dwIfListEntryIfType,
  85. IN IF_TYPE dwFilterIfType
  86. );
  87. BOOL
  88. IsLAN(
  89. IN DWORD dwInterfaceType
  90. );
  91. BOOL
  92. IsDialUp(
  93. IN DWORD dwInterfaceType
  94. );
  95. DWORD
  96. InitializeInterfaceChangeEvent(
  97. );
  98. DWORD
  99. ResetInterfaceChangeEvent(
  100. );
  101. VOID
  102. DestroyInterfaceChangeEvent(
  103. );
  104. HANDLE
  105. GetInterfaceChangeEvent(
  106. );
  107. BOOL
  108. IsMyAddress(
  109. IN ULONG IpAddrToCheck,
  110. IN ULONG IpAddrMask,
  111. IN PIPSEC_INTERFACE pExistingIfList
  112. );
  113. VOID
  114. PrintInterfaceList(
  115. IN PIPSEC_INTERFACE pInterfaceList
  116. );
  117. DWORD
  118. GetMatchingInterfaces(
  119. IF_TYPE FilterInterfaceType,
  120. PIPSEC_INTERFACE pExistingIfList,
  121. MATCHING_ADDR ** ppMatchingAddresses,
  122. DWORD * pdwAddrCnt
  123. );
  124. BOOL
  125. InterfaceAddrIsLocal(
  126. ULONG uIpAddr,
  127. ULONG uIpAddrMask,
  128. MATCHING_ADDR * pLocalAddresses,
  129. DWORD dwAddrCnt
  130. );
  131. VOID
  132. FreeIpsecInterface(
  133. PIPSEC_INTERFACE pIpsecInterface
  134. );
  135. DWORD
  136. CopyIpsecInterface(
  137. PIPSEC_INTERFACE pIpsecIf,
  138. PIPSEC_INTERFACE_INFO pIpsecInterface
  139. );
  140. VOID
  141. FreeIpsecInterfaceInfos(
  142. DWORD dwNumInterfaces,
  143. PIPSEC_INTERFACE_INFO pIpsecInterfaces
  144. );
  145. DWORD
  146. GetInterfaceName(
  147. GUID gInterfaceID,
  148. LPWSTR * ppszInterfaceName
  149. );
  150. DWORD
  151. FreeSpecialAddrList(
  152. PSPECIAL_ADDR * ppSpecialAddrList
  153. );
  154. DWORD
  155. NoDupAddSpecialAddr(
  156. PSPECIAL_ADDR * ppSpecialAddrList,
  157. ADDR_TYPE AddrType,
  158. IP_ADDRESS_STRING IpAddr,
  159. DWORD dwInterfaceType
  160. );
  161. BOOL
  162. IsInSpecialAddrList(
  163. PSPECIAL_ADDR pSpecialAddrList,
  164. PSPECIAL_ADDR pInSpecialAddr
  165. );
  166. DWORD
  167. OnSpecialAddrsChange(
  168. );
  169. BOOL
  170. IsSpecialListSame(
  171. PSPECIAL_ADDR pSpecialAddrList1,
  172. PSPECIAL_ADDR pSpecialAddrList2
  173. );
  174. #ifdef __cplusplus
  175. }
  176. #endif