flow_control: implement pass / drop filtering policies
This change introduces a set of three modes for flow control
filters, one of which is default behavor and two extra modes
else described below:
- FILTER_POLICY_PASS_ALL
- FILTER_POLICY_DROP_ALL
Both modes are opposite, and make a filter either unconditionally
pass or drop all the data one gets to the input. They would be
usable for some external usage.
diff --git a/lib/flow_control/burst_timeslot_filter_impl.h b/lib/flow_control/burst_timeslot_filter_impl.h
index 130047e..fa54ef4 100644
--- a/lib/flow_control/burst_timeslot_filter_impl.h
+++ b/lib/flow_control/burst_timeslot_filter_impl.h
@@ -31,6 +31,7 @@
class burst_timeslot_filter_impl : public burst_timeslot_filter
{
private:
+ filter_policy d_filter_policy;
unsigned int d_timeslot;
public:
burst_timeslot_filter_impl(unsigned int timeslot);
@@ -40,6 +41,10 @@
/* External API */
unsigned int get_tn(void);
unsigned int set_tn(unsigned int tn);
+
+ /* Filtering policy */
+ filter_policy get_policy(void);
+ filter_policy set_policy(filter_policy policy);
};
} // namespace gsm