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.

592 lines
23 KiB

  1. /*++
  2. Copyright(c) 1998,99 Microsoft Corporation
  3. Module Name:
  4. load.h
  5. Abstract:
  6. Windows Load Balancing Service (WLBS)
  7. Driver - load balancing mechanism
  8. Author:
  9. bbain
  10. --*/
  11. #ifndef _Load_h_
  12. #define _Load_h_
  13. #ifndef KERNEL_MODE
  14. #define SPINLOCK THREADLOCK
  15. #define IRQLEVEL ULONG
  16. #define LOCK_INIT(lp) Lock_init(lp)
  17. #define LOCK_ENTER(lp, pirql) {if (Lock_enter((lp), INFINITE) != 1) \
  18. UNIV_PRINT(("Lock enter error")); }
  19. #define LOCK_EXIT(lp, irql) {if (Lock_exit(lp) != 1) \
  20. UNIV_PRINT(("Lock exit error")); }
  21. #else
  22. #include <ntddk.h>
  23. #define LINK LIST_ENTRY
  24. #define QUEUE LIST_ENTRY
  25. #define Link_init(lp) InitializeListHead (lp)
  26. #define Link_unlink(lp) {RemoveEntryList (lp) ; InitializeListHead (lp);}
  27. #define Queue_init(qp) InitializeListHead (qp)
  28. // tmp #define Queue_enq(qp, lp) InsertTailList (qp, lp)
  29. #define Queue_enq(qp, lp) if (IsListEmpty(lp)) {InsertTailList(qp, lp);} else DbgBreakPoint()
  30. #define Queue_front(qp) (IsListEmpty(qp) ? NULL : (qp) -> Flink)
  31. #define Queue_deq(qp) Queue_front(qp);\
  32. if (! IsListEmpty (qp)) { \
  33. PLIST_ENTRY _lp = RemoveHeadList (qp); \
  34. InitializeListHead(_lp); }
  35. #define Queue_next(qp, lp) ((IsListEmpty (qp) || (lp) -> Flink == (qp)) ? \
  36. NULL : (lp) -> Flink)
  37. #define SPINLOCK KSPIN_LOCK
  38. #define IRQLEVEL KIRQL
  39. #if 0 /* 1.03: Removed kernel mode locking in this module */
  40. #define LOCK_INIT(lp) KeInitializeSpinLock (lp)
  41. #define LOCK_ENTER(lp, pirql) KeAcquireSpinLock (lp, pirql)
  42. #define LOCK_EXIT(lp, irql) KeReleaseSpinLock (lp, irql)
  43. #endif
  44. #define LOCK_INIT(lp)
  45. #define LOCK_ENTER(lp, pirql)
  46. #define LOCK_EXIT(lp, irql)
  47. #endif
  48. #include "wlbsparm.h"
  49. #include "params.h"
  50. #include "wlbsiocl.h"
  51. /* CONSTANTS */
  52. /* This is the hardcoded second paramter to Map() when map function limiting is needed. */
  53. #define MAP_FN_PARAMETER 0x00000000
  54. #define CVY_LOADCODE 0xc0deba1c /* type checking code for load structure (bbain 8/19/99) */
  55. #define CVY_ENTRCODE 0xc0debaa5 /* type checking code for conn. entry (bbain 8/19/99) */
  56. #define CVY_DESCCODE 0xc0deba5a /* type checking code for conn. descr. (bbain 8/19/99) */
  57. #define CVY_BINCODE 0xc0debabc /* type checking code for bin structure (bbain 8/19/99) */
  58. #define CVY_MAXBINS 60 /* # load balancing bins; must conform to MAP_T def. V2.06 */
  59. #define CVY_MAX_CHASH 4096 /* max. hash entries for connection hashing V1.1.4 */
  60. #define CVY_INIT_QCONN 1024 /* initial # free connection descriptors V1.1.4 */
  61. #define CVY_EQUAL_LOAD 50 /* load percentage used for equal load balance */
  62. /* TCP connection status */
  63. #define CVY_CONN_UP 1 /* connection may be coming up */
  64. #define CVY_CONN_DOWN 2 /* connection may be going down */
  65. #define CVY_CONN_RESET 3 /* connection is getting reset */ /* ###### added for keynote - ramkrish */
  66. /* broadcast host states */
  67. #define HST_NORMAL 1 /* normal operations */
  68. #define HST_STABLE 2 /* stable convergence detected */
  69. #define HST_CVG 3 /* converging to new load balance */
  70. /* Bitmap for teaming, which is of the form:
  71. -------------------------------------
  72. |XXXXXXXX|PPPPPPPP|PPPPPPPP|NNNNNHMA|
  73. -------------------------------------
  74. X: Reserved
  75. P: XOR of the least significant 16 bits of each participant
  76. N: Number of participants
  77. H: Hashing (Reverse=1, Normal=0)
  78. M: Master (Yes=1, No=0)
  79. A: Teaming active (Yes=1, No=0)
  80. */
  81. #define CVY_BDA_TEAMING_CODE_ACTIVE_OFFSET 0
  82. #define CVY_BDA_TEAMING_CODE_MASTER_OFFSET 1
  83. #define CVY_BDA_TEAMING_CODE_HASHING_OFFSET 2
  84. #define CVY_BDA_TEAMING_CODE_NUM_MEMBERS_OFFSET 3
  85. #define CVY_BDA_TEAMING_CODE_MEMBERS_OFFSET 8
  86. #define CVY_BDA_TEAMING_CODE_ACTIVE_MASK 0x00000001
  87. #define CVY_BDA_TEAMING_CODE_MASTER_MASK 0x00000002
  88. #define CVY_BDA_TEAMING_CODE_HASHING_MASK 0x00000004
  89. #define CVY_BDA_TEAMING_CODE_NUM_MEMBERS_MASK 0x000000f8
  90. #define CVY_BDA_TEAMING_CODE_MEMBERS_MASK 0x00ffff00
  91. #define CVY_BDA_TEAMING_CODE_CREATE(code,active,master,hashing,num,members) \
  92. (code) |= ((active) << CVY_BDA_TEAMING_CODE_ACTIVE_OFFSET) & CVY_BDA_TEAMING_CODE_ACTIVE_MASK; \
  93. (code) |= ((master) << CVY_BDA_TEAMING_CODE_MASTER_OFFSET) & CVY_BDA_TEAMING_CODE_MASTER_MASK; \
  94. (code) |= ((hashing) << CVY_BDA_TEAMING_CODE_HASHING_OFFSET) & CVY_BDA_TEAMING_CODE_HASHING_MASK; \
  95. (code) |= ((num) << CVY_BDA_TEAMING_CODE_NUM_MEMBERS_OFFSET) & CVY_BDA_TEAMING_CODE_NUM_MEMBERS_MASK; \
  96. (code) |= ((members) << CVY_BDA_TEAMING_CODE_MEMBERS_OFFSET) & CVY_BDA_TEAMING_CODE_MEMBERS_MASK;
  97. #define CVY_BDA_TEAMING_CODE_RETRIEVE(code,active,master,hashing,num,members) \
  98. active = (code & CVY_BDA_TEAMING_CODE_ACTIVE_MASK) >> CVY_BDA_TEAMING_CODE_ACTIVE_OFFSET; \
  99. master = (code & CVY_BDA_TEAMING_CODE_MASTER_MASK) >> CVY_BDA_TEAMING_CODE_MASTER_OFFSET; \
  100. hashing = (code & CVY_BDA_TEAMING_CODE_HASHING_MASK) >> CVY_BDA_TEAMING_CODE_HASHING_OFFSET; \
  101. num = (code & CVY_BDA_TEAMING_CODE_NUM_MEMBERS_MASK) >> CVY_BDA_TEAMING_CODE_NUM_MEMBERS_OFFSET; \
  102. members = (code & CVY_BDA_TEAMING_CODE_MEMBERS_MASK) >> CVY_BDA_TEAMING_CODE_MEMBERS_OFFSET;
  103. /* DATA STRUCTURES */
  104. /* type for a bin map (V2.04) */
  105. typedef ULONGLONG MAP_T, * PMAP_T;
  106. /* state for all bins within a port group */
  107. /* 64-bit -- ramkrish added pad */
  108. typedef struct {
  109. ULONG index; /* index in array of bin states */
  110. ULONG code; /* type checking code (bbain 8/17/99) */
  111. MAP_T targ_map; /* new target load map for local host */
  112. MAP_T all_idle_map; /* map of bins idle in all other hosts */
  113. MAP_T cmap; /* cache of cur_map for this host (v2.1) */
  114. MAP_T new_map[CVY_MAX_HOSTS]; /* new map for hosts while converging */
  115. MAP_T cur_map[CVY_MAX_HOSTS]; /* current ownership mask per host */
  116. MAP_T chk_map[CVY_MAX_HOSTS]; /* map of cur & rdy bins for all hosts */
  117. /* used as a check for coverage */
  118. MAP_T idle_map[CVY_MAX_HOSTS]; /* map of idle bins per host */
  119. BOOLEAN initialized; /* TRUE => port group has been initialized (v2.06) */
  120. BOOLEAN compatible; /* TRUE => detected that rule codes do not match */
  121. BOOLEAN equal_bal; /* TRUE => all hosts balance evenly */
  122. USHORT affinity; /* TRUE => client affinity for this port */
  123. USHORT pad64; /* 64-bit -- ramkrish */
  124. ULONG mode; /* processing mode */
  125. ULONG prot; /* protocol */
  126. ULONG tot_load; /* total load percentages for all hosts */
  127. ULONG orig_load_amt; /* original load amt. for this host */
  128. ULONG load_amt[CVY_MAX_HOSTS]; /* multi: load percentages per host
  129. single: host priorities (1..CVY_MAXHOSTS)
  130. equal: 100
  131. dead: 0 */
  132. MAP_T snd_bins; /* local bins to send when ready */
  133. MAP_T rcv_bins; /* remote bins to receive when ready */
  134. MAP_T rdy_bins; /* snd bins that are ready to send
  135. or have been sent but not acknowledged */
  136. MAP_T idle_bins; /* bins with no connections active */
  137. LONG tconn; /* total # active local connections (v2.06) */
  138. LONG nconn[CVY_MAXBINS]; /* # active local connections per bin */
  139. QUEUE connq; /* queue of active connections on all bins */
  140. } BIN_STATE, * PBIN_STATE;
  141. //#pragma pack(4)
  142. /* ping message */
  143. /* 64-bit -- ramkrish change pragma pack to 1 */
  144. #pragma pack(1)
  145. typedef struct {
  146. USHORT host_id; /* my host id */
  147. USHORT master_id; /* current master host id */
  148. USHORT state; /* my host's state */
  149. USHORT nrules; /* # active rules */
  150. ULONG hcode; /* unique host code */
  151. ULONG pkt_count; /* count of packets handled since cvg'd (1.32B) */
  152. ULONG teaming; /* BDA teaming configuraiton information. */
  153. ULONG reserved2;
  154. ULONG rcode[CVY_MAX_RULES]; /* rule code */
  155. MAP_T cur_map[CVY_MAX_RULES]; /* my current load map for each port group */
  156. MAP_T new_map[CVY_MAX_RULES]; /* my new load map for each port group */
  157. /* if converging */
  158. MAP_T idle_map[CVY_MAX_RULES]; /* map of idle bins for each port group */
  159. MAP_T rdy_bins[CVY_MAX_RULES]; /* my rdy to send bins for each port group */
  160. ULONG load_amt[CVY_MAX_RULES]; /* my load amount for each port group */
  161. ULONG pg_rsvd1[CVY_MAX_RULES]; /* reserved */
  162. } PING_MSG, * PPING_MSG;
  163. #pragma pack()
  164. /* unique connection entry */
  165. /* 64-bit -- ramkrish structure is aligned for 64-bit */
  166. typedef struct {
  167. LINK blink; /* link into bin queue and dirty queue */
  168. LINK rlink; /* link into the recovery queue V2.1.5 */
  169. ULONG code; /* type checking code (bbain 8/17/99) */
  170. BOOLEAN alloc; /* TRUE => this entry was allocated
  171. (vs. in hash table) */
  172. BOOLEAN dirty; /* TRUE => this entry is associated with an obsolete
  173. connection and will be cleaned up after a timeout
  174. period to allow TCP/IP to purge its state (v1.32B) */
  175. UCHAR bin; /* entry's bin number */
  176. BOOLEAN used; /* TRUE => used for tracking connection */
  177. ULONG fin_count; /* ###### for keynote - ramkrish to keep track of the fins */
  178. ULONG client_ipaddr,
  179. svr_ipaddr;
  180. USHORT svr_port,
  181. client_port;
  182. #if defined (NLB_SESSION_SUPPORT)
  183. USHORT protocol; /* The protocol type for this descriptor - we no
  184. long use descriptors only for TCP connections. */
  185. #endif
  186. } CONN_ENTRY, * PCONN_ENTRY;
  187. /* connection descriptor */
  188. /* 64-bit -- ramkrish */
  189. typedef struct {
  190. LINK link; /* link into free queue or hash table queue */
  191. ULONG code; /* type checking code (bbain 8/17/99) */
  192. ULONG pad64; /* 64-bit -- ramkrish */
  193. CONN_ENTRY entry;
  194. } CONN_DESCR, * PCONN_DESCR;
  195. /* load module's context */
  196. /* 64-bit -- ramkrish */
  197. typedef struct {
  198. ULONG ref_count; /* The reference count on this load module. */
  199. ULONG my_host_id; /* local host id and priority MINUS one */
  200. ULONG code; /* type checking code (bbain 8/17/99) */
  201. /* 64-bit -- ramkrish */
  202. PING_MSG send_msg; /* current message to send */
  203. ULONG pad64_1; /* 64-bit */
  204. #ifndef KERNEL_MODE /* 1.03: Removed kernel mode locking in this module */
  205. SPINLOCK lock; /* lock for mutual exclusion */
  206. #endif
  207. ULONG def_timeout, /* default timeout in msec. */
  208. cur_timeout, /* current timeout in msec. (v1.32B) */
  209. cln_timeout, /* cleanup timeout in msec. (v1.32B) */
  210. cur_time; /* current time waiting for cleanup (v1.32B) */
  211. ULONG host_map, /* map of currently active hosts */
  212. ping_map, /* map of currently pinged hosts */
  213. min_missed_pings, /* # missed pings to trigger host dead */
  214. pkt_count; /* count of packets handled since cvg'd (1.32B) */
  215. ULONG last_hmap; /* host map after last convergence (bbain RTM RC1 6/23/99) */
  216. ULONG nmissed_pings[CVY_MAX_HOSTS];
  217. /* missed ping count for each host */
  218. BOOLEAN initialized; /* TRUE => this module has been initialized */
  219. BOOLEAN active; /* TRUE => this module is active */
  220. BOOLEAN consistent; /* TRUE => this host has seen consistent
  221. information from other hosts */
  222. BOOLEAN bad_team_config; /* TRUE => inconsistent BDA teaming configuration detected. */
  223. BOOLEAN dup_hosts; /* TRUE => duplicate host id's seen */
  224. BOOLEAN dup_sspri; /* TRUE => duplicate single server
  225. priorities seen */
  226. BOOLEAN bad_map; /* TRUE => bad new map detected */
  227. BOOLEAN overlap_maps; /* TRUE => overlapping maps detected */
  228. BOOLEAN err_rcving_bins; /* TRUE => error receiving bins detected */
  229. BOOLEAN err_orphans; /* TRUE => orphan bins detected */
  230. BOOLEAN bad_num_rules; /* TRUE => different number of rules seen */
  231. BOOLEAN alloc_inhibited; /* TRUE => inhibited malloc of conn's. */
  232. BOOLEAN alloc_failed; /* TRUE => malloc failed */
  233. BOOLEAN bad_defrule; /* TRUE => invalid default rule detected */
  234. BOOLEAN scale_client; /* TRUE => scale client requests;
  235. FALSE => hash all client requests to one
  236. server host */
  237. BOOLEAN cln_waiting; /* TRUE => waiting for cleanup (v1.32B) */
  238. BOOLEAN pad64_2; /* 64-bit -- ramkrish */
  239. BOOLEAN dirty_bin[CVY_MAXBINS]; /* TRUE => bin has dirty connections (v1.32B) */
  240. ULONG pad64_3; /* 64-bit -- ramkrish */
  241. ULONG stable_map; /* map of stable hosts */
  242. ULONG min_stable_ct; /* min needed # of timeouts with stable
  243. condition */
  244. ULONG my_stable_ct; /* count of timeouts locally stable */
  245. ULONG all_stable_ct; /* count of timeouts with all stable
  246. condition */
  247. ULONG dscr_per_alloc; /* # conn. descriptors per allocation */
  248. ULONG max_dscr_allocs; /* max # descriptor allocations */
  249. ULONG nqalloc; /* # conn. descriptor allocations */
  250. LONG nconn; /* # active conns across all port rules (v2.1) */
  251. PCONN_DESCR qalloc_list[CVY_MAX_MAX_DSCR_ALLOCS];
  252. /* list of descriptor free queue allocations (bbain 2/25/99) */
  253. // LONG nconn; /* # active conns across all port rules (v2.1) */ // 64-bit -- ramkrish
  254. // PING_MSG send_msg; /* current message to send */
  255. BIN_STATE pg_state[CVY_MAX_RULES]; /* bin state for all active rules */
  256. CONN_ENTRY hashed_conn[CVY_MAX_CHASH]; /* hashed connection entries */
  257. QUEUE connq[CVY_MAX_CHASH]; /* queues for overloaded hashed conn's. */
  258. QUEUE conn_freeq; /* queue of free descriptors */
  259. QUEUE conn_dirtyq; /* queue of dirty connection entries (v1.32B) */
  260. CONN_DESCR conn_descr[CVY_INIT_QCONN]; /* initial set of free descriptors */
  261. QUEUE conn_rcvryq; /* connection recover queue V2.1.5 */
  262. PCVY_PARAMS params; /* pointer to the global parameters */
  263. } LOAD_CTXT, * PLOAD_CTXT;
  264. /* FUNCTIONS */
  265. /* Load Module Functions */
  266. #if defined (NLB_SESSION_SUPPORT)
  267. #define CVY_CONN_MATCH(ep, sa, sp, ca, cp, prot) ((ep)->used && \
  268. (ep)->client_ipaddr == (ca) && \
  269. (ep)->client_port == ((USHORT)(cp)) && \
  270. (ep)->svr_ipaddr == (sa) && \
  271. (ep)->svr_port == ((USHORT)(sp)) && \
  272. (ep)->protocol == ((USHORT)(prot)))
  273. #else
  274. #define CVY_CONN_MATCH(ep, sa, sp, ca, cp, prot) ((ep)->used && \
  275. (ep)->client_ipaddr == (ca) && \
  276. (ep)->client_port == ((USHORT)(cp)) && \
  277. (ep)->svr_ipaddr == (sa) && \
  278. (ep)->svr_port == ((USHORT)(sp)))
  279. #endif
  280. /*
  281. Determine if a connection entry matches supplied parameters
  282. */
  283. #if defined (NLB_SESSION_SUPPORT)
  284. #define CVY_CONN_SET(ep, sa, sp, ca, cp, prot) { \
  285. (ep)->svr_ipaddr = (sa); \
  286. (ep)->svr_port = (USHORT)(sp); \
  287. (ep)->client_ipaddr = (ca); \
  288. (ep)->client_port = (USHORT)(cp); \
  289. (ep)->protocol = (USHORT)(prot); \
  290. (ep)->used = TRUE; \
  291. }
  292. #else
  293. #define CVY_CONN_SET(ep, sa, sp, ca, cp, prot) { \
  294. (ep)->svr_ipaddr = (sa); \
  295. (ep)->svr_port = (USHORT)(sp); \
  296. (ep)->client_ipaddr = (ca); \
  297. (ep)->client_port = (USHORT)(cp); \
  298. (ep)->used = TRUE; \
  299. }
  300. #endif
  301. /*
  302. Sets up a connection entry for the supplied parameters
  303. */
  304. #define CVY_CONN_IN_USE(ep) ((ep)->used)
  305. /*
  306. Checks if connection entry is in use
  307. */
  308. #define CVY_CONN_CLEAR(ep) { (ep)->used = FALSE; }
  309. /*
  310. Clears a connection entry
  311. */
  312. extern void Load_start(
  313. PLOAD_CTXT lp);
  314. /*
  315. Start load module
  316. function:
  317. Starts load module after previously initialized or stopped.
  318. */
  319. extern void Load_stop(
  320. PLOAD_CTXT lp);
  321. /*
  322. Stop load module
  323. function:
  324. Stops load module after previously initialized or started.
  325. */
  326. extern void Load_init(
  327. PLOAD_CTXT lp,
  328. PCVY_PARAMS params);
  329. /*
  330. Initialize load module
  331. function:
  332. Initializes the load module for the first time.
  333. */
  334. extern void Load_cleanup( /* (bbain 2/25/99) */
  335. PLOAD_CTXT lp);
  336. /*
  337. Cleanup load module
  338. function:
  339. Cleans up the load module by releasing dynamically allocated memory.
  340. */
  341. extern void Load_msg_rcv(
  342. PLOAD_CTXT lp,
  343. PPING_MSG pmsg); /* ptr. to ping message */
  344. /*
  345. Receive a ping message
  346. */
  347. extern PPING_MSG Load_snd_msg_get(
  348. PLOAD_CTXT lp);
  349. /*
  350. Get local ping message to send
  351. returns PPING_MSG:
  352. <ptr. to ping message to send>
  353. */
  354. extern BOOLEAN Load_timeout(
  355. PLOAD_CTXT lp,
  356. PULONG new_timeout,
  357. PBOOLEAN pconverging, /* ptr. to boolean with TRUE => cluster converging (v2.1) */
  358. PULONG pnconn); /* ptr. to # active conns across all port rules (v2.1) */
  359. /*
  360. Handle timeout
  361. returns BOOLEAN:
  362. TRUE => host is attached to the network
  363. FALSE => host lost network connection
  364. */
  365. extern BOOLEAN Load_packet_check(
  366. PLOAD_CTXT lp,
  367. ULONG svr_ipaddr,
  368. ULONG svr_port,
  369. ULONG client_ipaddr,
  370. ULONG client_port,
  371. USHORT protocol,
  372. BOOLEAN limit_map_fn);
  373. /*
  374. Check whether to accept incoming TCP/UDP packet
  375. returns BOOLEAN:
  376. TRUE => accept packet and pass on to TCP/IP
  377. FALSE => filter packet
  378. */
  379. extern BOOLEAN Load_conn_advise(
  380. PLOAD_CTXT lp,
  381. ULONG svr_ipaddr,
  382. ULONG svr_port,
  383. ULONG client_ipaddr,
  384. ULONG client_port,
  385. USHORT protocol,
  386. ULONG conn_status,
  387. BOOLEAN limit_map_fn);
  388. /*
  389. Advise load module on possible change in TCP connection status
  390. returns BOOLEAN:
  391. TRUE => accept packet and pass on to TCP/IP if an input packet
  392. FALSE => filter packet
  393. */
  394. extern ULONG Load_port_change(
  395. PLOAD_CTXT lp,
  396. ULONG ipaddr,
  397. ULONG port,
  398. ULONG cmd, /* enable, disable, set value */
  399. ULONG value);
  400. /*
  401. Enable or disable traffic handling for a rule containing specified port
  402. returns ULONG:
  403. IOCTL_CVY_OK => port handling changed
  404. IOCTL_CVY_NOT_FOUND => rule for this port was found
  405. IOCTL_CVY_ALREADY => port handling was previously completed
  406. */
  407. extern ULONG Load_hosts_query(
  408. PLOAD_CTXT lp,
  409. BOOLEAN internal,
  410. PULONG host_map);
  411. /*
  412. Log and return current host map
  413. returns ULONG:
  414. <one of IOCTL_CVY_...state defined in params.h>
  415. */
  416. /*
  417. * Function:
  418. * Description:
  419. * Parameters:
  420. * Returns:
  421. * Author: shouse, 3.29.01
  422. * Notes:
  423. */
  424. extern BOOLEAN Load_create_dscr(PLOAD_CTXT lp, ULONG svr_ipaddr, ULONG svr_port, ULONG client_ipaddr, ULONG client_port, USHORT protocol, BOOLEAN limit_map_fn);
  425. /*
  426. * Function:
  427. * Description:
  428. * Parameters:
  429. * Returns:
  430. * Author: shouse, 3.29.01
  431. * Notes:
  432. */
  433. extern ULONG Load_add_reference (IN PLOAD_CTXT pLoad);
  434. /*
  435. * Function:
  436. * Description:
  437. * Parameters:
  438. * Returns:
  439. * Author: shouse, 3.29.01
  440. * Notes:
  441. */
  442. extern ULONG Load_release_reference (IN PLOAD_CTXT pLoad);
  443. /*
  444. * Function:
  445. * Description:
  446. * Parameters:
  447. * Returns:
  448. * Author: shouse, 3.29.01
  449. * Notes:
  450. */
  451. extern ULONG Load_get_reference_count (IN PLOAD_CTXT pLoad);
  452. /*
  453. * Function:
  454. * Description:
  455. * Parameters:
  456. * Returns:
  457. * Author: shouse, 5.18.01
  458. * Notes:
  459. */
  460. extern VOID Load_query_packet_filter (
  461. PIOCTL_QUERY_STATE_PACKET_FILTER pQuery,
  462. PLOAD_CTXT lp,
  463. ULONG svr_ipaddr,
  464. ULONG svr_port,
  465. ULONG client_ipaddr,
  466. ULONG client_port,
  467. USHORT protocol,
  468. BOOLEAN limit_map_fn);
  469. #if defined (NLB_SESSION_SUPPORT)
  470. #define NLB_IPSEC_SESSION_SUPPORT_ENABLED() 1
  471. #define NLB_PPTP_SESSION_SUPPORT_ENABLED() 1
  472. #else
  473. #define NLB_IPSEC_SESSION_SUPPORT_ENABLED() 0
  474. #define NLB_PPTP_SESSION_SUPPORT_ENABLED() 0
  475. #endif // NLB_SESSION_SUPPORT
  476. #define NLB_SESSION_SUPPORT_ENABLED() \
  477. (NLB_PPTP_SESSION_SUPPORT_ENABLED() \
  478. || NLB_IPSEC_SESSION_SUPPORT_ENABLED())
  479. #endif /* _Load_h_ */