/* * Filename: NLB_PortRule.h * Description: * Author: shouse, 04.10.01 */ #ifndef __NLB_PORTRULE_H__ #define __NLB_PORTRULE_H__ #include "NLB_Common.h" #include #include #include using namespace std; class NLB_PortRule { public: NLB_PortRule(); ~NLB_PortRule(); bool IsValid (); void Clear (); bool SetName (PWCHAR pName); bool GetName (PWCHAR pName, ULONG length); bool SetLabel (PWCHAR pLabel); bool GetLabel (PWCHAR pLabel, ULONG length); bool SetPortRange (ULONG start, ULONG end); bool GetPortRange (ULONG & start, ULONG & end); bool SetVirtualIPAddress (NLB_IPAddress address); bool GetVirtualIPAddress (NLB_IPAddress & address); bool SetState (NLB_PortRuleState::NLB_PortRuleStateType eState); bool GetState (NLB_PortRuleState::NLB_PortRuleStateType & eState); bool SetProtocol (NLB_PortRuleProtocol::NLB_PortRuleProtocolType eProtocol); bool GetProtocol (NLB_PortRuleProtocol::NLB_PortRuleProtocolType & eProtocol); bool SetFilteringMode (NLB_PortRuleFilteringMode::NLB_PortRuleFilteringModeType eMode); bool GetFilteringMode (NLB_PortRuleFilteringMode::NLB_PortRuleFilteringModeType & eMode); bool SetAffinity (NLB_PortRuleAffinity::NLB_PortRuleAffinityType eAffinity); bool GetAffinity (NLB_PortRuleAffinity::NLB_PortRuleAffinityType & eAffinity); bool AddSingleHostFilteringPriority (PWCHAR pHost, ULONG priority); bool ChangeSingleHostFilteringPriority (PWCHAR pHost, ULONG priority); bool GetSingleHostFilteringPriority (PWCHAR pHost, ULONG & priority); bool RemoveSingleHostFilteringPriority (PWCHAR pHost); ULONG SetSingleHostFilteringPriorityList (vector pList); ULONG GetSingleHostFilteringPriorityList (vector * pList); bool AddMultipleHostFilteringLoadWeight (PWCHAR pHost, ULONG weight); bool ChangeMultipleHostFilteringLoadWeight (PWCHAR pHost, ULONG weight); bool GetMultipleHostFilteringLoadWeight (PWCHAR pHost, ULONG & weight); bool RemoveMultipleHostFilteringLoadWeight (PWCHAR pHost); ULONG SetMultipleHostFilteringLoadWeightList (vector pList); ULONG GetMultipleHostFilteringLoadWeightList (vector * pList); private: NLB_Name Name; NLB_Label Label; NLB_PortRuleState State; NLB_IPAddress VirtualIPAddress; NLB_PortRulePortRange Range; NLB_PortRuleProtocol Protocol; NLB_PortRuleFilteringMode FilteringMode; NLB_PortRuleAffinity Affinity; NLB_SingleHostFilteringPriorityList PriorityList; NLB_MultipleHostFilteringLoadWeightList LoadWeightList; }; typedef map > NLB_PortRuleList; #endif