From 849779c4adf8dd65c83fffb65e6b7898df2a55c6 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 23 Apr 2000 15:51:51 +0000 Subject: More fixes and testsuite enhancements. --- include/libiptc/libiptc.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'include') 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? */ -- cgit v1.2.3