diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2011-08-27 12:50:32 +0200 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2011-09-11 17:31:35 +0200 |
commit | de4d2d3b716d83a6d3831aaf902c5adb5d1d14c9 (patch) | |
tree | 3d9a38fd4c2b36d3613099f9b77a47c4a3c64cc9 /include/libiptc/xtcshared.h | |
parent | 14da56743c6cdf25da35b7b5ca7a5d201771990d (diff) |
libiptc: use a family-invariant xtc_ops struct for code reduction
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'include/libiptc/xtcshared.h')
-rw-r--r-- | include/libiptc/xtcshared.h | 13 |
1 files changed, 13 insertions, 0 deletions
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 */ |