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.

241 lines
4.5 KiB

  1. /*++
  2. Copyright (c) 1995-1997 Microsoft Corporation
  3. Module Name:
  4. clnetcfg.h
  5. Abstract:
  6. Network Configuration Engine definitions
  7. Author:
  8. Mike Massa (mikemas) 28-Feb-1998
  9. Revision History:
  10. --*/
  11. #ifndef _CLNETCFG_INCLUDED_
  12. #define _CLNETCFG_INCLUDED_
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. //
  17. // Structures
  18. //
  19. //
  20. // Network Configuration Entry Structure
  21. // Identifies a network and a local interface.
  22. //
  23. typedef struct _CLNET_CONFIG_ENTRY {
  24. LIST_ENTRY Linkage;
  25. NM_NETWORK_INFO NetworkInfo;
  26. BOOLEAN IsInterfaceInfoValid;
  27. BOOLEAN UpdateNetworkName;
  28. NM_INTERFACE_INFO2 InterfaceInfo;
  29. // Fields used by setup
  30. BOOL New;
  31. BOOL IsPrimed;
  32. LPWSTR PreviousNetworkName;
  33. LIST_ENTRY PriorityLinkage;
  34. } CLNET_CONFIG_ENTRY, *PCLNET_CONFIG_ENTRY;
  35. //
  36. // Configuration Lists Structure
  37. // Contains the set of network configuration lists emitted by the
  38. // configuration engine.
  39. //
  40. typedef struct _CLNET_CONFIG_LISTS {
  41. LIST_ENTRY InputConfigList;
  42. LIST_ENTRY DeletedInterfaceList;
  43. LIST_ENTRY UpdatedInterfaceList;
  44. LIST_ENTRY CreatedInterfaceList;
  45. LIST_ENTRY CreatedNetworkList;
  46. } CLNET_CONFIG_LISTS, *PCLNET_CONFIG_LISTS;
  47. //
  48. // Definitions for functions supplied by the consumer of the network
  49. // configuration engine.
  50. //
  51. typedef
  52. VOID
  53. (*LPFN_CLNETPRINT)(
  54. IN ULONG LogLevel,
  55. IN PCHAR FormatString,
  56. ...
  57. );
  58. typedef
  59. VOID
  60. (*LPFN_CLNETLOGEVENT)(
  61. IN DWORD LogLevel,
  62. IN DWORD MessageId
  63. );
  64. typedef
  65. VOID
  66. (*LPFN_CLNETLOGEVENT1)(
  67. IN DWORD LogLevel,
  68. IN DWORD MessageId,
  69. IN LPCWSTR Arg1
  70. );
  71. typedef
  72. VOID
  73. (*LPFN_CLNETLOGEVENT2)(
  74. IN DWORD LogLevel,
  75. IN DWORD MessageId,
  76. IN LPCWSTR Arg1,
  77. IN LPCWSTR Arg2
  78. );
  79. typedef
  80. VOID
  81. (*LPFN_CLNETLOGEVENT3)(
  82. IN DWORD LogLevel,
  83. IN DWORD MessageId,
  84. IN LPCWSTR Arg1,
  85. IN LPCWSTR Arg2,
  86. IN LPCWSTR Arg3
  87. );
  88. //
  89. // Exported Routines
  90. //
  91. VOID
  92. ClNetInitialize(
  93. IN LPFN_CLNETPRINT Print,
  94. IN LPFN_CLNETLOGEVENT LogEvent,
  95. IN LPFN_CLNETLOGEVENT1 LogEvent1,
  96. IN LPFN_CLNETLOGEVENT2 LogEvent2,
  97. IN LPFN_CLNETLOGEVENT3 LogEvent3
  98. );
  99. LPWSTR
  100. ClNetCopyString(
  101. IN LPWSTR SourceString,
  102. IN BOOL RaiseExceptionOnError
  103. );
  104. VOID
  105. ClNetInitializeConfigLists(
  106. PCLNET_CONFIG_LISTS Lists
  107. );
  108. DWORD
  109. ClNetConvertEnumsToConfigList(
  110. IN PNM_NETWORK_ENUM * NetworkEnum,
  111. IN PNM_INTERFACE_ENUM2 * InterfaceEnum,
  112. IN LPWSTR LocalNodeId,
  113. IN OUT PLIST_ENTRY ConfigList,
  114. IN BOOLEAN DeleteEnums
  115. );
  116. VOID
  117. ClNetFreeNetworkEnum(
  118. IN PNM_NETWORK_ENUM NetworkEnum
  119. );
  120. VOID
  121. ClNetFreeNetworkInfo(
  122. IN PNM_NETWORK_INFO NetworkInfo
  123. );
  124. VOID
  125. ClNetFreeInterfaceEnum1(
  126. IN PNM_INTERFACE_ENUM InterfaceEnum1
  127. );
  128. VOID
  129. ClNetFreeInterfaceEnum(
  130. IN PNM_INTERFACE_ENUM2 InterfaceEnum
  131. );
  132. VOID
  133. ClNetFreeInterfaceInfo(
  134. IN PNM_INTERFACE_INFO2 InterfaceInfo
  135. );
  136. VOID
  137. ClNetFreeNodeEnum1(
  138. IN PNM_NODE_ENUM NodeEnum
  139. );
  140. VOID
  141. ClNetFreeNodeEnum(
  142. IN PNM_NODE_ENUM2 NodeEnum
  143. );
  144. VOID
  145. ClNetFreeNodeInfo(
  146. IN PNM_NODE_INFO2 NodeInfo
  147. );
  148. VOID
  149. ClNetFreeConfigEntry(
  150. PCLNET_CONFIG_ENTRY ConfigEntry
  151. );
  152. VOID
  153. ClNetFreeConfigList(
  154. IN PLIST_ENTRY ConfigList
  155. );
  156. VOID
  157. ClNetFreeConfigLists(
  158. PCLNET_CONFIG_LISTS Lists
  159. );
  160. LPWSTR
  161. ClNetMakeInterfaceName(
  162. LPWSTR Prefix, OPTIONAL
  163. LPWSTR NodeName,
  164. LPWSTR AdapterName
  165. );
  166. DWORD
  167. ClNetConfigureNetworks(
  168. IN LPWSTR LocalNodeId,
  169. IN LPWSTR LocalNodeName,
  170. IN LPWSTR DefaultClusnetEndpoint,
  171. IN CLUSTER_NETWORK_ROLE DefaultNetworkRole,
  172. IN BOOL NetNameHasPrecedence,
  173. IN OUT PCLNET_CONFIG_LISTS ConfigLists,
  174. IN OUT LPDWORD MatchedNetworkCount,
  175. IN OUT LPDWORD NewNetworkCount
  176. );
  177. /*++
  178. Notes:
  179. Output interface lists must be processed in the following order to
  180. guarantee correctness:
  181. 1 - RenamedInterfaceList
  182. 2 - DeletedInterfaceList
  183. 3 - UpdatedInterfaceList
  184. 4 - CreatedInterfaceList
  185. 5 - CreatedNetworkList
  186. --*/
  187. #ifdef __cplusplus
  188. }
  189. #endif
  190. #endif // ifndef _CLNETCFG_INCLUDED_
  191.