diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-06-03 00:06:15 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-06-07 21:35:26 +0200 |
commit | ba863c4b07df03356e52748032984e5c67fd2675 (patch) | |
tree | ca3551b1588b2a0120e4b19dd18cb2b7369db8ca /include | |
parent | 68ed965b35cdc7b55d4ebc0ba37c1ac078ccbafb (diff) |
libxtables: extend xlate infrastructure
This infrastructure extends the existing xlate infrastructure:
- Extensions can define set dependencies through .xlate. The resulting
set definition can be obtained through xt_xlate_set_get().
- Add xl_xlate_set_family() and xl_xlate_get_family() to store/fetch
the family.
The first client of this new xlate API is the connlimit extension,
which is added in a follow up patch.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/xtables.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/xtables.h b/include/xtables.h index 5b13f348..e51f4bfd 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -633,9 +633,15 @@ extern const char *xtables_lmap_id2name(const struct xtables_lmap *, int); struct xt_xlate *xt_xlate_alloc(int size); void xt_xlate_free(struct xt_xlate *xl); void xt_xlate_add(struct xt_xlate *xl, const char *fmt, ...) __attribute__((format(printf,2,3))); +#define xt_xlate_rule_add xt_xlate_add +void xt_xlate_set_add(struct xt_xlate *xl, const char *fmt, ...) __attribute__((format(printf,2,3))); void xt_xlate_add_comment(struct xt_xlate *xl, const char *comment); const char *xt_xlate_get_comment(struct xt_xlate *xl); +void xl_xlate_set_family(struct xt_xlate *xl, uint8_t family); +uint8_t xt_xlate_get_family(struct xt_xlate *xl); const char *xt_xlate_get(struct xt_xlate *xl); +#define xt_xlate_rule_get xt_xlate_get +const char *xt_xlate_set_get(struct xt_xlate *xl); #ifdef XTABLES_INTERNAL |