summaryrefslogtreecommitdiffstats
path: root/include/libiptc/libiptc.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@linuxcare.com.au>2000-04-23 15:51:51 +0000
committerRusty Russell <rusty@rustcorp.com.au>2000-04-23 15:51:51 +0000
commit849779c4adf8dd65c83fffb65e6b7898df2a55c6 (patch)
treeb0273f2b05216ffe77dc3a4d8a0db4eaf65728bb /include/libiptc/libiptc.h
parent30fd6e5d45e6013f4df10a226787c7a9f49369c1 (diff)
More fixes and testsuite enhancements.
Diffstat (limited to 'include/libiptc/libiptc.h')
-rw-r--r--include/libiptc/libiptc.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/include/libiptc/libiptc.h b/include/libiptc/libiptc.h
index 0a491071..9058cffc 100644
--- a/include/libiptc/libiptc.h
+++ b/include/libiptc/libiptc.h
@@ -26,21 +26,20 @@ int iptc_is_chain(const char *chain, const iptc_handle_t handle);
/* Take a snapshot of the rules. Returns NULL on error. */
iptc_handle_t iptc_init(const char *tablename);
-/* Iterator functions to run through the chains; prev = NULL means
- first chain. Returns NULL at end. */
-const char *iptc_next_chain(const char *prev, iptc_handle_t *handle);
+/* Iterator functions to run through the chains. Returns NULL at end. */
+const char *iptc_first_chain(iptc_handle_t *handle);
+const char *iptc_next_chain(iptc_handle_t *handle);
-/* How many rules in this chain? */
-unsigned int iptc_num_rules(const char *chain, iptc_handle_t *handle);
+/* Get first rule in the given chain: NULL for empty chain. */
+const struct ipt_entry *iptc_first_rule(const char *chain,
+ iptc_handle_t *handle);
-/* Get n'th rule in this chain. */
-const struct ipt_entry *iptc_get_rule(const char *chain,
- unsigned int n,
- iptc_handle_t *handle);
+/* Returns NULL when rules run out. */
+const struct ipt_entry *iptc_next_rule(const struct ipt_entry *prev,
+ iptc_handle_t *handle);
-/* Returns a pointer to the target name of this position. */
-const char *iptc_get_target(const char *chain,
- unsigned int n,
+/* Returns a pointer to the target name of this entry. */
+const char *iptc_get_target(const struct ipt_entry *e,
iptc_handle_t *handle);
/* Is this a built-in chain? */