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.

720 lines
26 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File: wlbsconfig.h
  4. //
  5. // Module: Network Load Balancing
  6. //
  7. // Description: Internal APIs for cluster configuration. Thes APIs are internal
  8. // to WLBS team only, and no plan backward compatability.
  9. //
  10. // Copyright (C) Microsoft Corporation. All rights reserved.
  11. //
  12. // Author: fengsun Created 3/2/00
  13. //
  14. //+----------------------------------------------------------------------------
  15. #ifndef _WLBSCONFIG_H
  16. #define _WLBSCONFIG_H
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #include "wlbsctrl.h"
  21. /* Maximum lengths of parameter strings. */
  22. #define WLBS_MAX_VIRTUAL_NIC 256
  23. #define WLBS_MAX_CLUSTER_NIC 256
  24. #define WLBS_MAX_NETWORK_ADDR 17
  25. #define WLBS_MAX_CL_IP_ADDR 17
  26. #define WLBS_MAX_CL_NET_MASK 17
  27. #define WLBS_MAX_DED_IP_ADDR 17
  28. #define WLBS_MAX_DED_NET_MASK 17
  29. #define WLBS_MAX_NETWORK_ADDR 17
  30. #define WLBS_MAX_LICENSE_KEY 20
  31. #define WLBS_MAX_DOMAIN_NAME 100
  32. #define WLBS_MAX_BDA_TEAM_ID 40
  33. /* Latest version number for WLBS_REG_PARAMS. Increment this when the structure is modified. */
  34. #define WLBS_REG_PARAMS_VERSION 4093
  35. /* Port group rule - used in registry parameters.
  36. NOTE! do not access value marked with I. These are for internal use only. */
  37. #pragma pack(1)
  38. typedef struct
  39. {
  40. DWORD start_port, /* Starting port number. */
  41. end_port; /* Ending port number. */
  42. #ifdef WLBSAPI_INTERNAL_ONLY
  43. DWORD code; /* I: Unique rule code. */
  44. #else
  45. DWORD Private1; // Do not change these field directly
  46. #endif
  47. DWORD mode; /* Filtering mode. */
  48. DWORD protocol; /* WLBS_TCP, WLBS_UDP or WLBS_TCP_UDP */
  49. #ifdef WLBSAPI_INTERNAL_ONLY
  50. DWORD valid; /* I: For rule management in user mode. */
  51. #else
  52. DWORD Private2; // Do not change these field directly
  53. #endif
  54. union
  55. {
  56. struct
  57. {
  58. DWORD priority; /* Mastership priority: 1..32 or 0 for
  59. not-specified. */
  60. } single; /* Data for single server mode. */
  61. struct
  62. {
  63. WORD equal_load; /* TRUE - Even load distribution. */
  64. WORD affinity; /* WLBS_AFFINITY_... */
  65. DWORD load; /* Percentage of load to handle
  66. locally 0..100. */
  67. } multi; /* Data for multi-server mode. */
  68. } mode_data; /* Data for appropriate port group mode. */
  69. }
  70. WLBS_OLD_PORT_RULE, * PWLBS_OLD_PORT_RULE;
  71. /* Structure to hold the bi-directional affinity registry settings. */
  72. typedef struct _CVY_BDA {
  73. WCHAR team_id[WLBS_MAX_BDA_TEAM_ID + 1]; /* The team ID - MUST be a GUID. */
  74. ULONG active; /* On write, this flag determines whether to create BDATeaming key - BDA on/off switch. */
  75. ULONG master; /* Boolean indication of master status. */
  76. ULONG reverse_hash; /* Sets direction of hashing - forward (normal) or reverse. */
  77. } WLBS_BDA, * PWLBS_BDA;
  78. typedef struct
  79. {
  80. TCHAR virtual_ip_addr [WLBS_MAX_CL_IP_ADDR + 1]; /* Virtual IP Address */
  81. DWORD start_port, /* Starting port number. */
  82. end_port; /* Ending port number. */
  83. #ifdef WLBSAPI_INTERNAL_ONLY
  84. DWORD code; /* I: Unique rule code. */
  85. #else
  86. DWORD Private1; // Do not change these field directly
  87. #endif
  88. DWORD mode; /* Filtering mode. */
  89. DWORD protocol; /* WLBS_TCP, WLBS_UDP or WLBS_TCP_UDP */
  90. #ifdef WLBSAPI_INTERNAL_ONLY
  91. DWORD valid; /* I: For rule management in user mode. */
  92. #else
  93. DWORD Private2; // Do not change these field directly
  94. #endif
  95. union
  96. {
  97. struct
  98. {
  99. DWORD priority; /* Mastership priority: 1..32 or 0 for
  100. not-specified. */
  101. } single; /* Data for single server mode. */
  102. struct
  103. {
  104. WORD equal_load; /* TRUE - Even load distribution. */
  105. WORD affinity; /* WLBS_AFFINITY_... */
  106. DWORD load; /* Percentage of load to handle
  107. locally 0..100. */
  108. } multi; /* Data for multi-server mode. */
  109. } mode_data; /* Data for appropriate port group mode. */
  110. }
  111. WLBS_PORT_RULE, * PWLBS_PORT_RULE;
  112. #pragma pack()
  113. #ifdef __cplusplus
  114. typedef struct __declspec(dllexport)
  115. #else
  116. typedef struct
  117. #endif
  118. {
  119. /* public - can be modified by clients of this API */
  120. DWORD struct_version; /* Version of this structure. Update WLBS_REG_PARAMS_VERSION constant when this structure is modified. */
  121. DWORD host_priority; /* Host priority ID. */
  122. DWORD alive_period; /* Period for sending "I am alive" messages
  123. in milliseconds. */
  124. DWORD alive_tolerance; /* How many "I am alive" messages can be
  125. missed from other servers before assuming
  126. that the host is dead. */
  127. DWORD num_actions; /* Number of actions per allocation. */
  128. DWORD num_packets; /* number of packets per allocation. */
  129. DWORD num_send_msgs; /* Number of heartbeats per allocation. */
  130. DWORD install_date; /* Install time stamp, used to create a unique code for the host. */
  131. DWORD rct_port; /* Remote control UDP port. */
  132. DWORD rct_enabled; /* TRUE - remote control enabled. */
  133. DWORD cluster_mode; /* TRUE - join cluster on boot. */
  134. DWORD persisted_states; /* Bitmap of states that should be persisted across reboots. */
  135. DWORD dscr_per_alloc; /* Number of connection tracking
  136. descriptor per allocation. */
  137. DWORD max_dscr_allocs; /* Maximum number of connection tracking
  138. descriptor allocations. */
  139. DWORD mcast_support; /* TRUE - multicast mode,
  140. FALSE - unicast mode */
  141. DWORD mask_src_mac; /* TRUE - Mangle source MAC address to
  142. prevent switch learning. FALSE -
  143. cluster is on a hub, optimizes switch
  144. performance by re-enabling learning. */
  145. DWORD tcp_dscr_timeout; /* The TCP connection descriptor timeout, in seconds. */
  146. DWORD ipsec_dscr_timeout; /* The IPSec connection descriptor timeout, in seconds. */
  147. DWORD filter_icmp; /* Whether or not to filter ICMP traffic. */
  148. DWORD identity_period; /* Period for identity heartbeats in ms */
  149. DWORD identity_enabled; /* TRUE - identity heartbeats are transmitted */
  150. TCHAR cl_mac_addr [WLBS_MAX_NETWORK_ADDR + 1];
  151. /* Cluster MAC address. */
  152. TCHAR cl_ip_addr [WLBS_MAX_CL_IP_ADDR + 1];
  153. /* Cluster IP address. */
  154. TCHAR cl_net_mask [WLBS_MAX_CL_NET_MASK + 1];
  155. /* Netmask for cluster IP. */
  156. TCHAR ded_ip_addr [WLBS_MAX_DED_IP_ADDR + 1];
  157. /* Dedicated IP address or "" for none. */
  158. TCHAR ded_net_mask [WLBS_MAX_DED_NET_MASK + 1];
  159. /* Netmask for dedicated IP address
  160. or "" for none */
  161. TCHAR domain_name [WLBS_MAX_DOMAIN_NAME + 1];
  162. /* FQDN of the cluster. */
  163. //
  164. // IGMP support
  165. //
  166. BOOL fIGMPSupport; // whether to send IGMP join periodically
  167. WCHAR szMCastIpAddress[WLBS_MAX_CL_IP_ADDR + 1]; // multicast IP
  168. BOOL fIpToMCastIp; // whether to generate multicast IP from cluster IP
  169. WLBS_BDA bda_teaming;
  170. #ifdef __cplusplus
  171. #ifndef WLBSAPI_INTERNAL_ONLY
  172. //
  173. // private - should be treated as opaque
  174. //
  175. // Do not change these field directly
  176. //
  177. private:
  178. #endif
  179. #endif
  180. /* obtained from the registry */
  181. DWORD i_parms_ver; /* I: Parameter structure version. */
  182. DWORD i_verify_date; /* I: Encoded install time stamp. */
  183. DWORD i_rmt_password; /* I: Remote maintenance password. */
  184. DWORD i_rct_password; /* I: Remote control password (use
  185. WlbsSetRemotePassword to set this
  186. value). */
  187. DWORD i_num_rules; /* I: # active port group rules (changed
  188. through WlbsAddPortRule and
  189. WlbsDelPortRule routines). */
  190. DWORD i_cleanup_delay; /* I: Dirty connection cleanup delay in
  191. milliseconds, 0 - delay. */
  192. DWORD i_scale_client; /* I: Legacy parameter. */
  193. DWORD i_mcast_spoof; /* I: TRUE - Provide ARP resolution in
  194. multicast mode. FALSE - clients
  195. will rely on static ARP entries. */
  196. DWORD i_convert_mac; /* I: TRUE - automatically generate MAC
  197. address based on cluster IP
  198. address in UI. */
  199. DWORD i_ip_chg_delay; /* I: Delay in milliseconds to block
  200. outgoing ARPs while IP address
  201. change is in process. */
  202. DWORD i_nbt_support; /* I: TRUE - NBT cluster name support
  203. enabled. */
  204. DWORD i_netmon_alive; /* I: TRUE - pass heartbeat messages
  205. to the protocols (netmon). */
  206. DWORD i_effective_version; /* I: Effective version of NLB */
  207. /* strings */
  208. TCHAR i_virtual_nic_name [WLBS_MAX_VIRTUAL_NIC + 1];
  209. /* I: Virtual NIC name or GUID. */
  210. // TCHAR cluster_nic_name [WLBS_MAX_CLUSTER_NIC + 1];
  211. /* I: Cluster NIC name or GUID. */
  212. TCHAR i_license_key [WLBS_MAX_LICENSE_KEY + 1];
  213. /* I: Legacy parameter. */
  214. WLBS_PORT_RULE i_port_rules [WLBS_MAX_RULES];
  215. /* I: Port rules (changed
  216. through WlbsAddPortRule and
  217. WlbsDelPortRule routines). */
  218. /* computed */
  219. DWORD i_max_hosts; /* Legacy parameter. */
  220. DWORD i_max_rules; /* Legacy parameter. */
  221. // DWORD i_expiration; /* Legacy parameter. */
  222. // DWORD i_ft_rules_enabled; /* Legacy parameter. */
  223. // DWORD version; /* Legacy parameter. */
  224. DWORD i_dwReserved;
  225. }
  226. WLBS_REG_PARAMS, * PWLBS_REG_PARAMS;
  227. /* API commands for WlbsFormatMessage */
  228. typedef enum
  229. {
  230. CmdWlbsAddPortRule,
  231. CmdWlbsAddressToName,
  232. CmdWlbsAddressToString,
  233. CmdWlbsAdjust,
  234. CmdWlbsCommitChanges,
  235. CmdWlbsDeletePortRule,
  236. CmdWlbsDestinationSet,
  237. CmdWlbsDisable,
  238. CmdWlbsDrain,
  239. CmdWlbsDrainStop,
  240. CmdWlbsEnable,
  241. CmdWlbsFormatMessage,
  242. CmdWlbsGetEffectiveVersion,
  243. CmdWlbsGetNumPortRules,
  244. CmdWlbsEnumPortRules,
  245. CmdWlbsGetPortRule,
  246. CmdWlbsInit,
  247. CmdWlbsPasswordSet,
  248. CmdWlbsPortSet,
  249. CmdWlbsQuery,
  250. CmdWlbsReadReg,
  251. CmdWlbsResolve,
  252. CmdWlbsResume,
  253. CmdWlbsSetDefaults,
  254. CmdWlbsSetRemotePassword,
  255. CmdWlbsStart,
  256. CmdWlbsStop,
  257. CmdWlbsSuspend,
  258. CmdWlbsTimeoutSet,
  259. CmdWlbsWriteReg,
  260. CmdWlbsQueryPortState
  261. }
  262. WLBS_COMMAND;
  263. extern BOOL WINAPI WlbsFormatMessage
  264. (
  265. DWORD error, /* IN - WLBS_... or WSA... return value. */
  266. WLBS_COMMAND command, /* IN - Which routine returned the value. */
  267. BOOL cluster, /* IN - TRUE - command was issued on entire
  268. cluster, FALSE - single host. */
  269. WCHAR* messagep, /* IN - Pointer to user-allocated buffer. */
  270. PDWORD lenp /* IN - Buffer size.
  271. OUT - The required buffer size if the current
  272. size is insufficient */
  273. );
  274. /*
  275. Return character string describing specified WLBS API return code. Note that
  276. message will depend on the command which returned the code and if it was
  277. issued in cluster-wide or single-host mode.
  278. returns:
  279. TRUE => Message formatted successfully.
  280. FALSE => Bad error code (lenp will contain 0 on exit) or buffer is not
  281. big enough to contain entire string (lenp will contain required
  282. buffer size on exit).
  283. */
  284. /* Support routines: */
  285. extern DWORD WINAPI WlbsResolve
  286. (
  287. const WCHAR* address /* IN - Internet host name or IP address in
  288. dotted notation. */
  289. );
  290. /*
  291. Resolve Internet host name to its IP address. This routine can also be
  292. used to convert a string containing an IP address in dotted notation to a
  293. value that can be passed to cluster control routines.
  294. returns:
  295. 0 => failed to resolve host name.
  296. <address> => IP address corresponding to the specified address.
  297. This value can be used in subsequent calls to
  298. cluster control routines.
  299. */
  300. extern BOOL WINAPI WlbsAddressToString
  301. (
  302. DWORD address, /* IN - IP address. */
  303. WCHAR* buf, /* OUT - Character buffer for resulting
  304. string. */
  305. PDWORD lenp /* IN - Buffer size in characters.
  306. OUT - Characters written or required buffer
  307. size. */
  308. );
  309. /*
  310. Convert IP address to a string in dotted notation.
  311. returns:
  312. TRUE => Successfully converted. lenp contains number of
  313. character written.
  314. FALSE => Buffer too small. lenp contains required buffer size
  315. including terminating NULL character.
  316. */
  317. extern BOOL WINAPI WlbsAddressToName
  318. (
  319. DWORD address, /* IN - IP address. */
  320. WCHAR* buf, /* OUT - Character buffer for resulting
  321. string. */
  322. PDWORD lenp /* IN - Buffer size in characters.
  323. OUT - Characters written or required buffer
  324. size. */
  325. );
  326. /*
  327. Resolve IP address to Internet host name.
  328. returns:
  329. TRUE => Successfully converted. lenp contains number of
  330. character written.
  331. FALSE => Buffer too small. lenp contains required buffer size
  332. including terminating NULL character.
  333. */
  334. /******************************************************************************
  335. Cluster host configuration routines. Note that in current implementation,
  336. cluster and host parameters need to be set to WLBS_LOCAL_CLUSTER and
  337. WLBS_LOCAL_HOST.
  338. ******************************************************************************/
  339. extern DWORD WINAPI WlbsReadReg
  340. (
  341. DWORD cluster, /* IN - WLBS_LOCAL_CLUSTER */
  342. PWLBS_REG_PARAMS reg_data /* OUT - Registry parameters */
  343. );
  344. /*
  345. Read WLBS registry data.
  346. returns:
  347. WLBS_INIT_ERROR => Error initializing control module. Cannot perform
  348. control operations.
  349. WLBS_BAD_PARAMS => reg_data is NULL
  350. WLBS_REG_ERROR => Error reading from the registry
  351. Local:
  352. WLBS_OK => Registry parameters successfully read.
  353. Remote:
  354. WLBS_LOCAL_ONLY => This call is implemented for local only operation.
  355. */
  356. extern DWORD WINAPI WlbsWriteReg
  357. (
  358. DWORD cluster, /* IN - WLBS_LOCAL_CLUSTER */
  359. const PWLBS_REG_PARAMS reg_data /* IN - Registry parameters. */
  360. );
  361. /*
  362. Write WLBS registry data.
  363. returns:
  364. WLBS_INIT_ERROR => Error initializing control module. Cannot perform
  365. control operations.
  366. WLBS_BAD_PARAMS => Registry parameter structure is invalid.
  367. WLBS_REG_ERROR => Error accessing the registry.
  368. Local:
  369. WLBS_OK => Registry parameters successfully written.
  370. Remote:
  371. WLBS_LOCAL_ONLY => This call is implemented for local only operation.
  372. */
  373. extern DWORD WINAPI WlbsCommitChanges
  374. (
  375. DWORD cluster /* IN - WLBS_LOCAL_CLUSTER */
  376. );
  377. /*
  378. Write WLBS registry data.
  379. returns:
  380. WLBS_INIT_ERROR => Error initializing control module. Cannot perform
  381. control operations.
  382. Local:
  383. WLBS_OK => Changes have been successfully applied.
  384. WLBS_BAD_PARAMS => Registry parameters were not accepted by the driver.
  385. Reload was not performed
  386. WLBS_REBOOT => Reboot required in order for config changes to
  387. take effect.
  388. WLBS_IO_ERROR => Error while writing to the driver.
  389. WLBS_REG_ERROR => Error while trying to write MAC address changes to the
  390. registry
  391. Remote:
  392. WLBS_LOCAL_ONLY => This call is implemented for local only operation.
  393. */
  394. typedef DWORD (WINAPI *WlbsSetDefaults_FUNC)
  395. (
  396. PWLBS_REG_PARAMS reg_data
  397. );
  398. extern DWORD WINAPI WlbsSetDefaults
  399. (
  400. PWLBS_REG_PARAMS reg_data /* OUT - Default values */
  401. );
  402. /*
  403. Fills in the reg_data structure with default values
  404. returns:
  405. WLBS_INIT_ERROR => Error initializing control module. Cannot perform
  406. control operations.
  407. WLBS_BAD_PARAMS => Invalid structure
  408. Local:
  409. WLBS_OK => Structure was filled in with the default values.
  410. Remote:
  411. WLBS_LOCAL_ONLY => This call is implemented for local only operation.
  412. */
  413. /******************************************************************************
  414. Registry parameter manipulation routines. Note that these routines operate
  415. WLBS_REG_PARAMS structure filled out by calling WlbsReadReg. Some parameters
  416. can be manipulated directly. Please make sure to use manipulation routines
  417. for the ones that they are provided for.
  418. ******************************************************************************/
  419. extern DWORD WINAPI WlbsGetEffectiveVersion
  420. (
  421. const PWLBS_REG_PARAMS reg_data /* IN - Registry parameters. */
  422. );
  423. /*
  424. Returns the effective version of cluster
  425. returns:
  426. CVY_VERSION_FULL => There is atleast one port rule that has a specific
  427. vip associated with it
  428. CVY_VERSION_LOWEST_CLIENT_FULL => All port rules have the "All vip" associated with them
  429. */
  430. extern DWORD WINAPI WlbsGetNumPortRules
  431. (
  432. const PWLBS_REG_PARAMS reg_data /* IN - Registry parameters. */
  433. );
  434. /*
  435. Returns number of port rules currently in the parameter structure.
  436. returns:
  437. WLBS_INIT_ERROR => Error initializing control module. Cannot perform
  438. control operations.
  439. WLBS_BAD_PARAMS => Registry parameter structure is invalid.
  440. 1...WLBS_MAX_RULES
  441. */
  442. typedef DWORD (WINAPI *WlbsEnumPortRules_FUNC)
  443. (
  444. const PWLBS_REG_PARAMS reg_data,
  445. PWLBS_PORT_RULE rules,
  446. PDWORD num_rules
  447. );
  448. extern DWORD WINAPI WlbsEnumPortRules
  449. (
  450. const PWLBS_REG_PARAMS reg_data, /* IN - Registry parameters. */
  451. PWLBS_PORT_RULE rules, /* OUT - Array of port rules. */
  452. PDWORD num_rules /* IN - Size of rules array.
  453. OUT - Number of rules retrieved. Note that
  454. this value can be larger than the size
  455. of the response array. In this case
  456. only the first few rules that fit
  457. in the array are returned. */
  458. );
  459. /*
  460. Enumerate all port rules in the list of port rules in parameter structure.
  461. returns:
  462. WLBS_INIT_ERROR => Error initializing control module. Cannot perform
  463. control operations.
  464. WLBS_BAD_PARAMS => Registry parameter structure is invalid.
  465. WLBS_TRUNCATED => All port rules did not fit into specified array.
  466. WLBS_OK => Rule has been successfully retrieved.
  467. */
  468. extern DWORD WINAPI WlbsGetPortRule
  469. (
  470. const PWLBS_REG_PARAMS reg_data, /* IN - Registry parameters. */
  471. DWORD vip, /* IN - Virtual IP Address of the port rule to retreive */
  472. DWORD port, /* IN - Port, which rule to retrieve. */
  473. PWLBS_PORT_RULE rule /* OUT - Port rule. */
  474. );
  475. /*
  476. Retrieve port rule containing specified port from the list of port rules
  477. in parameter structure.
  478. returns:
  479. WLBS_INIT_ERROR => Error initializing control module. Cannot perform
  480. control operations.
  481. WLBS_BAD_PARAMS => Registry parameter structure is invalid.
  482. WLBS_OK => Rule has been successfully retrieved.
  483. WLBS_NOT_FOUND => Port not found among port rules.
  484. */
  485. typedef DWORD (WINAPI *WlbsAddPortRule_FUNC)
  486. (
  487. PWLBS_REG_PARAMS reg_data,
  488. const PWLBS_PORT_RULE rule
  489. );
  490. extern DWORD WINAPI WlbsAddPortRule
  491. (
  492. PWLBS_REG_PARAMS reg_data, /* IN - Registry parameters. */
  493. const PWLBS_PORT_RULE rule /* IN - Port rule to add. */
  494. );
  495. /*
  496. Add port to list of port rules in parameter structure.
  497. returns:
  498. WLBS_INIT_ERROR => Error initializing control module. Cannot perform
  499. control operations.
  500. WLBS_BAD_PARAMS => Registry parameter structure is invalid.
  501. WLBS_OK => Rule has been successfully added.
  502. WLBS_PORT_OVERLAP => Port rule overlaps with existing port rule.
  503. WLBS_BAD_PORT_PARAMS=> Invalid port rule parameters.
  504. WLBS_MAX_PORT_RULES => Maximum number of port rules already reached.
  505. */
  506. extern DWORD WINAPI WlbsDeletePortRule
  507. (
  508. PWLBS_REG_PARAMS reg_data, /* IN - Registry parameters. */
  509. DWORD vip, /* IN - Virtual IP Address of the port rule to retreive */
  510. DWORD port /* IN - Port, which rule to delete. */
  511. );
  512. /*
  513. Remove port rule containing specified port from the list of port rules
  514. in parameter structure.
  515. returns:
  516. WLBS_INIT_ERROR => Error initializing control module. Cannot perform
  517. control operations.
  518. WLBS_BAD_PARAMS => Registry parameter structure is invalid.
  519. WLBS_NOT_FOUND => Port not found among port rules.
  520. WLBS_OK => Rule has been successfully deleted.
  521. */
  522. typedef VOID (WINAPI *WlbsDeleteAllPortRules_FUNC)
  523. (
  524. PWLBS_REG_PARAMS reg_data
  525. );
  526. extern VOID WINAPI WlbsDeleteAllPortRules
  527. (
  528. PWLBS_REG_PARAMS reg_data
  529. );
  530. /*
  531. Remove all port rules from the list of port rules.
  532. */
  533. typedef DWORD (WINAPI *WlbsSetRemotePassword_FUNC)
  534. (
  535. PWLBS_REG_PARAMS paramp,
  536. const WCHAR *password
  537. );
  538. extern DWORD WINAPI WlbsSetRemotePassword
  539. (
  540. PWLBS_REG_PARAMS reg_data, /* IN - Registry parameters. */
  541. const WCHAR* password /* IN - Password or NULL for no password. */
  542. );
  543. /*
  544. Set remote password code to encrypted value of the specified password.
  545. returns:
  546. WLBS_INIT_ERROR => Error initializing control module. Cannot perform
  547. control operations.
  548. WLBS_BAD_PARAMS => Registry parameter structure is invalid.
  549. WLBS_OK => Password has been successfully set.
  550. */
  551. DWORD WINAPI WlbsNotifyConfigChange(DWORD cluster);
  552. typedef BOOL (WINAPI *WlbsValidateParams_FUNC) (PWLBS_REG_PARAMS paramp);
  553. extern BOOL WINAPI WlbsValidateParams(PWLBS_REG_PARAMS paramp);
  554. typedef BOOL (WINAPI *WlbsParamReadReg_FUNC)
  555. (
  556. const GUID* pAdapterGuid,
  557. PWLBS_REG_PARAMS reg_data
  558. );
  559. extern BOOL WINAPI WlbsParamReadReg
  560. (
  561. const GUID* pAdapterGuid,
  562. PWLBS_REG_PARAMS reg_data
  563. );
  564. typedef DWORD (WINAPI *WlbsWriteAndCommitChanges_FUNC)
  565. (
  566. HANDLE NlbHdl,
  567. const GUID* pAdapterGuid,
  568. WLBS_REG_PARAMS* p_new_reg_params
  569. );
  570. extern DWORD WINAPI WlbsWriteAndCommitChanges
  571. (
  572. HANDLE NlbHdl,
  573. const GUID* pAdapterGuid,
  574. WLBS_REG_PARAMS* p_new_reg_params
  575. );
  576. #ifdef __cplusplus
  577. } /* extern "C" */
  578. #endif
  579. #endif _WLBSCONFIG_H