From efcdba41ca6bde51c8753cb30c869c370f0a3b93 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Mon, 28 Jan 2013 21:15:27 +0100 Subject: Introduce match/target aliases The match/target alias allows us to support the syntax of matches, targets targets merged into other matches/targets. --- include/xtables.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/xtables.h b/include/xtables.h index 75de958e..c35a6e6d 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -201,6 +201,10 @@ struct xtables_lmap { struct xtables_lmap *next; }; +enum xtables_ext_flags { + XTABLES_EXT_ALIAS = 1 << 0, +}; + /* Include file for additions: new matches and targets. */ struct xtables_match { @@ -218,6 +222,9 @@ struct xtables_match /* Revision of match (0 by default). */ u_int8_t revision; + /* Extension flags */ + u_int8_t ext_flags; + u_int16_t family; /* Size of match data. */ @@ -251,6 +258,9 @@ struct xtables_match /* ip is struct ipt_ip * for example */ void (*save)(const void *ip, const struct xt_entry_match *match); + /* Print match name or alias */ + const char *(*alias)(const struct xt_entry_match *match); + /* Pointer to list of extra command-line options */ const struct option *extra_opts; @@ -289,6 +299,9 @@ struct xtables_target /* Revision of target (0 by default). */ u_int8_t revision; + /* Extension flags */ + u_int8_t ext_flags; + u_int16_t family; @@ -322,6 +335,9 @@ struct xtables_target void (*save)(const void *ip, const struct xt_entry_target *target); + /* Print target name or alias */ + const char *(*alias)(const struct xt_entry_target *target); + /* Pointer to list of extra command-line options */ const struct option *extra_opts; -- cgit v1.2.3