From de4d2d3b716d83a6d3831aaf902c5adb5d1d14c9 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 27 Aug 2011 12:50:32 +0200 Subject: libiptc: use a family-invariant xtc_ops struct for code reduction Signed-off-by: Jan Engelhardt --- include/libiptc/xtcshared.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/libiptc/xtcshared.h') diff --git a/include/libiptc/xtcshared.h b/include/libiptc/xtcshared.h index 89a51511..773ebc4c 100644 --- a/include/libiptc/xtcshared.h +++ b/include/libiptc/xtcshared.h @@ -3,5 +3,18 @@ typedef char xt_chainlabel[32]; struct xtc_handle; +struct xt_counters; + +struct xtc_ops { + int (*commit)(struct xtc_handle *); + void (*free)(struct xtc_handle *); + int (*builtin)(const char *, struct xtc_handle *const); + int (*is_chain)(const char *, struct xtc_handle *const); + int (*flush_entries)(const xt_chainlabel, struct xtc_handle *); + int (*create_chain)(const xt_chainlabel, struct xtc_handle *); + int (*set_policy)(const xt_chainlabel, const xt_chainlabel, + struct xt_counters *, struct xtc_handle *); + const char *(*strerror)(int); +}; #endif /* _LIBXTC_SHARED_H */ -- cgit v1.2.3