+ if (counter == NULL)
+ return STC_ERROR_INVALID_PARAMETER;
+
+ counter->action = NFACCT_ACTION_DELETE;
+ counter->iotype = NFACCT_COUNTER_OUT;
+ counter->jump = __get_jump_by_intend(counter);
+ counter->iptype = NFACCT_TYPE_IPV4;
+ counter->send_limit = 0;
+ counter->rcv_limit = 0;
+
+ return produce_net_rule(counter);
+}
+
+static stc_error_e __add_ip6tables_in(struct nfacct_rule *counter)
+{
+ if (counter == NULL)
+ return STC_ERROR_INVALID_PARAMETER;
+
+ counter->action = NFACCT_ACTION_INSERT;
+ counter->iotype = NFACCT_COUNTER_IN;
+ counter->jump = __get_jump_by_intend(counter);
+ counter->iptype = NFACCT_TYPE_IPV6;
+ counter->send_limit = 0;
+ counter->rcv_limit = 0;
+
+ return produce_net_rule(counter);
+}
+
+static stc_error_e __add_ip6tables_out(struct nfacct_rule *counter)
+{
+ if (counter == NULL)
+ return STC_ERROR_INVALID_PARAMETER;
+
+ counter->action = NFACCT_ACTION_INSERT;
+ counter->iotype = NFACCT_COUNTER_OUT;
+ counter->jump = __get_jump_by_intend(counter);
+ counter->iptype = NFACCT_TYPE_IPV6;
+ counter->send_limit = 0;
+ counter->rcv_limit = 0;
+
+ return produce_net_rule(counter);
+}
+
+static stc_error_e __del_ip6tables_in(struct nfacct_rule *counter)
+{
+ if (counter == NULL)
+ return STC_ERROR_INVALID_PARAMETER;
+
+ counter->action = NFACCT_ACTION_DELETE;
+ counter->iotype = NFACCT_COUNTER_IN;
+ counter->jump = __get_jump_by_intend(counter);
+ counter->iptype = NFACCT_TYPE_IPV6;
+ counter->send_limit = 0;
+ counter->rcv_limit = 0;
+
+ return produce_net_rule(counter);
+}
+
+static stc_error_e __del_ip6tables_out(struct nfacct_rule *counter)
+{
+ if (counter == NULL)
+ return STC_ERROR_INVALID_PARAMETER;
+
+ counter->action = NFACCT_ACTION_DELETE;
+ counter->iotype = NFACCT_COUNTER_OUT;
+ counter->jump = __get_jump_by_intend(counter);
+ counter->iptype = NFACCT_TYPE_IPV6;
+ counter->send_limit = 0;
+ counter->rcv_limit = 0;
+
+ return produce_net_rule(counter);