summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrusty <rusty>2000-04-23 15:51:51 +0000
committerrusty <rusty>2000-04-23 15:51:51 +0000
commit79cb05eef037eb3a82ee2b03d4b13dc822669517 (patch)
treeb0273f2b05216ffe77dc3a4d8a0db4eaf65728bb /include
parent6ce07c5cc5261aa8de31e05cd3ee81f3e536a745 (diff)
More fixes and testsuite enhancements.
Diffstat (limited to 'include')
-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 0a49107..9058cff 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? */