]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libiptc counter functions
authorHarald Welte <laforge@gnumonks.org>
Fri, 5 Jan 2001 15:22:37 +0000 (15:22 +0000)
committerHarald Welte <laforge@gnumonks.org>
Fri, 5 Jan 2001 15:22:37 +0000 (15:22 +0000)
include/libiptc/libip6tc.h
include/libiptc/libiptc.h

index 599e0db69b9471304eb8e5a18694c307089057fc..aebd647752334903bae6415f421ed8856d6a1b92 100644 (file)
@@ -113,12 +113,29 @@ int ip6tc_rename_chain(const ip6t_chainlabel oldname,
 /* Sets the policy on a built-in chain. */
 int ip6tc_set_policy(const ip6t_chainlabel chain,
                     const ip6t_chainlabel policy,
+                    struct ip6t_counters *counters,
                     ip6tc_handle_t *handle);
 
 /* Get the number of references to this chain */
 int ip6tc_get_references(unsigned int *ref, const ip6t_chainlabel chain,
                         ip6tc_handle_t *handle);
 
+/* read packet and byte counters for a specific rule */
+struct ip6t_counters *ip6tc_read_counter(const ip6t_chainlabel chain,
+                                       unsigned int rulenum,
+                                       ip6tc_handle_t *handle);
+
+/* zero packet and byte counters for a specific rule */
+int ip6tc_zero_counter(const ip6t_chainlabel chain,
+                      unsigned int rulenum,
+                      ip6tc_handle_t *handle);
+
+/* set packet and byte counters for a specific rule */
+int ip6tc_set_counter(const ip6t_chainlabel chain,
+                     unsigned int rulenum,
+                     struct ip6t_counters *counters,
+                     ip6tc_handle_t *handle);
+
 /* Makes the actual changes. */
 int ip6tc_commit(ip6tc_handle_t *handle);
 
index fa0a4eaf2d5b22a7d170ebd05b59166f784ace22..6bb37323ddbec861e359c2bc0b3823510a35250e 100644 (file)
@@ -118,6 +118,7 @@ int iptc_rename_chain(const ipt_chainlabel oldname,
 /* Sets the policy on a built-in chain. */
 int iptc_set_policy(const ipt_chainlabel chain,
                    const ipt_chainlabel policy,
+                   struct ipt_counters *counters,
                    iptc_handle_t *handle);
 
 /* Get the number of references to this chain */
@@ -125,6 +126,22 @@ int iptc_get_references(unsigned int *ref,
                        const ipt_chainlabel chain,
                        iptc_handle_t *handle);
 
+/* read packet and byte counters for a specific rule */
+struct ipt_counters *iptc_read_counter(const ipt_chainlabel chain,
+                                      unsigned int rulenum,
+                                      iptc_handle_t *handle);
+
+/* zero packet and byte counters for a specific rule */
+int iptc_zero_counter(const ipt_chainlabel chain,
+                     unsigned int rulenum,
+                     iptc_handle_t *handle);
+
+/* set packet and byte counters for a specific rule */
+int iptc_set_counter(const ipt_chainlabel chain,
+                    unsigned int rulenum,
+                    struct ipt_counters *counters,
+                    iptc_handle_t *handle);
+
 /* Makes the actual changes. */
 int iptc_commit(iptc_handle_t *handle);