Add tethering client data limitation
[platform/core/connectivity/stc-manager.git] / src / helper / helper-nfacct-rule.h
old mode 100755 (executable)
new mode 100644 (file)
index c305246..7520709
@@ -56,6 +56,9 @@ typedef enum {
        NFACCT_BLOCK,
        NFACCT_ALLOW,
        NFACCT_TETH_COUNTER,
+       NFACCT_TETH_WARN,
+       NFACCT_TETH_BLOCK,
+       NFACCT_TETH_ALLOW,
        NFACCT_RULE_LAST_ELEM,
 } nfacct_rule_intend;
 
@@ -67,6 +70,13 @@ typedef enum {
        NFACCT_TYPE_LAST_ELEM
 } nfacct_rule_iptype;
 
+typedef enum {
+       NFACCT_IPRANGE_TYPE_NONE,
+       NFACCT_IPRANGE_TYPE_SINGLE,
+       NFACCT_IPRANGE_TYPE_MASK,
+       NFACCT_IPRANGE_TYPE_RANGE,
+} nfacct_rule_iprange_type;
+
 enum nfnl_acct_flags {
        NFACCT_F_QUOTA_PKTS     = (1 << 0),
        NFACCT_F_QUOTA_BYTES    = (1 << 1),
@@ -80,7 +90,7 @@ enum nfnl_acct_flags {
  *
  *  and inherited nfacct_rule_counter and nfacct_rule_restriction
  *  with additional field:
- *     quota, quota_id, roaming, rst_state
+ *     quota, quota_id, roaming, rstn_state
  *
  * But ANSI C doesn't support inheritance.
  */
@@ -95,8 +105,14 @@ struct nfacct_rule {
        nfacct_rule_direction iotype;
        nfacct_rule_intend intend;
        nfacct_rule_jump jump; /* in most cases jump is evalutation based on intend, but not always */
-       stc_restriction_state_e rst_state;
+       stc_rstn_state_e rstn_state;
        nfacct_rule_iptype iptype;
+       nfacct_rule_iprange_type src_iprange_type;
+       nfacct_rule_iprange_type dst_iprange_type;
+       char *src_ip1;
+       char *src_ip2;
+       char *dst_ip1;
+       char *dst_ip2;
 
        struct counter_arg *carg;
        stc_error_e(*iptables_rule)(struct nfacct_rule *counter);