1 #ifndef _LIBXTC_SHARED_H 2 #define _LIBXTC_SHARED_H 1 3 4 typedef char xt_chainlabel[32]; 5 struct xtc_handle; 6 struct xt_counters; 7 8 struct xtc_ops { 9 int (*commit)(struct xtc_handle *); 10 struct xtc_handle *(*init)(const char *); 11 void (*free)(struct xtc_handle *); 12 int (*builtin)(const char *, struct xtc_handle *const); 13 int (*is_chain)(const char *, struct xtc_handle *const); 14 int (*flush_entries)(const xt_chainlabel, struct xtc_handle *); 15 int (*create_chain)(const xt_chainlabel, struct xtc_handle *); 16 const char *(*first_chain)(struct xtc_handle *); 17 const char *(*next_chain)(struct xtc_handle *); 18 const char *(*get_policy)(const char *, struct xt_counters *, 19 struct xtc_handle *); 20 int (*set_policy)(const xt_chainlabel, const xt_chainlabel, 21 struct xt_counters *, struct xtc_handle *); 22 const char *(*strerror)(int); 23 }; 24 25 #endif /* _LIBXTC_SHARED_H */ 26