From f672a6d5ca04b643a9d8583fcb8ade4da9fde6f3 Mon Sep 17 00:00:00 2001 From: slioch Date: Fri, 24 Jul 2009 16:59:27 -0700 Subject: bug fixes on mult targets. added packet rate limit option to rules --- src/lbdata.hh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/lbdata.hh') diff --git a/src/lbdata.hh b/src/lbdata.hh index 39115a6..4444009 100644 --- a/src/lbdata.hh +++ b/src/lbdata.hh @@ -28,12 +28,19 @@ class LBRule { typedef map::iterator InterfaceDistIter; typedef enum {ALL,ICMP,UDP,TCP} Protocol; + typedef enum {K_SECOND,K_MINUTE,K_HOUR} LimitPeriod; LBRule() : _proto("all"), _exclude(false), _failover(false), - _enable_source_based_routing(false) {} + _enable_source_based_routing(false), + _limit(false), + _limit_burst("5"), + _limit_rate("1"), + _limit_mode(false), + _limit_period(K_HOUR) + {} public: string _proto; @@ -50,6 +57,12 @@ class LBRule { bool _enable_source_based_routing; + bool _limit; + string _limit_burst; + string _limit_rate; + bool _limit_mode; //true above, false below + LimitPeriod _limit_period; + string _in_iface; InterfaceDistColl _iface_dist_coll; }; -- cgit v1.2.3