diff options
author | Jamal Hadi Salim <hadi@cyberus.ca> | 2009-02-11 13:02:21 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-02-11 13:02:21 +0100 |
commit | 40a8343d3ad0cdbc3a7e69c8d970ad75807c29ed (patch) | |
tree | 9dcd9d67ed463b32b6a7a3588fce3f068564c410 /include | |
parent | 84c3055bf08d0a8fe5db6e5f3f96dd826a290147 (diff) |
libxtables: Add exit_error cb to xtables_globals
Introduce exit_error() as part of xtables_globals structure.
When an application registers its xtables_globals definition
and does not specify its exit_error() it gets assigned a
basic version
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/xtables.h.in | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/xtables.h.in b/include/xtables.h.in index 1d333942..3a166510 100644 --- a/include/xtables.h.in +++ b/include/xtables.h.in @@ -33,14 +33,6 @@ 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 { @@ -191,6 +183,15 @@ enum xtables_exittype { XTF_ONE_ACTION, }; +struct xtables_globals +{ + unsigned int option_offset; + char *program_version; + char *program_name; + struct option *opts; + void (*exit_error)(enum xtables_exittype status, const char *msg, ...); +}; + extern const char *xtables_program_name; extern const char *xtables_modprobe_program; extern struct xtables_match *xtables_matches; |