path: root/include/
diff options
authorJamal Hadi Salim <>2009-02-11 12:58:54 +0100
committerPatrick McHardy <>2009-02-11 12:58:54 +0100
commit8e90ce66a99e5dc9b055a9fd14e8e9216f90233c (patch)
tree11a43cdd816117b323d1897ed55f408810e58f59 /include/
parent300e2909ba4714abc6093cba0ed860708282bd3e (diff)
libxtables: Introduce global params structuring
introduce a new struct,xtables_globals, so as to localize the globals used and help in symbol renames. The applications must invoke xtables_set_params() before starting to use any iptables APIs. xtables_set_params() is intended to free xtables from depending (as it does right now) on existence of such externally definitions (from iptables/iptables6 etc). At the moment, xtables wont even compile without presence of at least one of {iptables/iptables6 etc} Signed-off-by: Jamal Hadi Salim <> Signed-off-by: Patrick McHardy <>
Diffstat (limited to 'include/')
1 files changed, 9 insertions, 0 deletions
diff --git a/include/ b/include/
index 02750fb9..61dbc767 100644
--- a/include/
+++ b/include/
@@ -33,6 +33,14 @@
struct in_addr;
+struct xtables_globals
+ unsigned int option_offset;
+ char *program_version;
+ char *program_name;
+ struct option *opts;
/* Include file for additions: new matches and targets. */
struct xtables_match
@@ -195,6 +203,7 @@ extern void *xtables_malloc(size_t);
extern int xtables_insmod(const char *, const char *, bool);
extern int xtables_load_ko(const char *, bool);
+int xtables_set_params(struct xtables_globals *xtp);
extern struct xtables_match *xtables_find_match(const char *name,
enum xtables_tryload, struct xtables_rule_match **match);