diff options
author | Philip Blundell <Philip.Blundell@pobox.com> | 2000-05-15 02:17:52 +0000 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2000-05-15 02:17:52 +0000 |
commit | 8c700900e2a0cf87d7917cb62578583a60ad1210 (patch) | |
tree | b9b903689b4459516d298c943cc88f84df573f22 /include | |
parent | 27ff3475d2c737a67fc745818a380ffa932e5fba (diff) |
Philip Blundell's IPv6 fixes.
Diffstat (limited to 'include')
-rw-r--r-- | include/ip6tables.h | 16 | ||||
-rw-r--r-- | include/libiptc/libip6tc.h | 14 |
2 files changed, 21 insertions, 9 deletions
diff --git a/include/ip6tables.h b/include/ip6tables.h index 7acf800b..9860e62f 100644 --- a/include/ip6tables.h +++ b/include/ip6tables.h @@ -16,6 +16,9 @@ struct ip6tables_match /* Size of match data. */ size_t size; + /* Size of match data relevent for userspace comparison purposes */ + size_t userspacesize; + /* Function which prints out usage message. */ void (*help)(void); @@ -60,6 +63,9 @@ struct ip6tables_target /* Size of target data. */ size_t size; + /* Size of target data relevent for userspace comparison purposes */ + size_t userspacesize; + /* Function which prints out usage message. */ void (*help)(void); @@ -102,6 +108,12 @@ extern int do_command6(int argc, char *argv[], char **table, extern struct ip6tables_match *ip6tables_matches; extern struct ip6tables_target *ip6tables_targets; -extern struct ip6tables_target *find_target6(const char *name, int tryload); -extern struct ip6tables_match *find_match6(const char *name, int tryload); +enum ip6t_tryload { + DONT_LOAD, + TRY_LOAD, + LOAD_MUST_SUCCEED +}; + +extern struct ip6tables_target *find_target6(const char *name, enum ip6t_tryload); +extern struct ip6tables_match *find_match6(const char *name, enum ip6t_tryload); #endif /*_IP6TABLES_USER_H*/ diff --git a/include/libiptc/libip6tc.h b/include/libiptc/libip6tc.h index ad507c8d..599e0db6 100644 --- a/include/libiptc/libip6tc.h +++ b/include/libiptc/libip6tc.h @@ -27,16 +27,16 @@ int ip6tc_is_chain(const char *chain, const ip6tc_handle_t handle); ip6tc_handle_t ip6tc_init(const char *tablename); /* Iterator functions to run through the chains. Returns NULL at end. */ -const char *iptc_first_chain(ip6tc_handle_t *handle); +const char *ip6tc_first_chain(ip6tc_handle_t *handle); const char *ip6tc_next_chain(ip6tc_handle_t *handle); -/* How many rules in this chain? */ -unsigned int ip6tc_num_rules(const char *chain, ip6tc_handle_t *handle); +/* Get first rule in the given chain: NULL for empty chain. */ +const struct ip6t_entry *ip6tc_first_rule(const char *chain, + ip6tc_handle_t *handle); -/* Get n'th rule in this chain. */ -const struct ip6t_entry *ip6tc_get_rule(const char *chain, - unsigned int n, - ip6tc_handle_t *handle); +/* Returns NULL when rules run out. */ +const struct ip6t_entry *ip6tc_next_rule(const struct ip6t_entry *prev, + ip6tc_handle_t *handle); /* Returns a pointer to the target name of this position. */ const char *ip6tc_get_target(const struct ip6t_entry *e, |