summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/internal/object.h9
-rw-r--r--include/libnetfilter_conntrack/libnetfilter_conntrack.h12
2 files changed, 21 insertions, 0 deletions
diff --git a/include/internal/object.h b/include/internal/object.h
index fe1506c..378ba74 100644
--- a/include/internal/object.h
+++ b/include/internal/object.h
@@ -22,6 +22,15 @@ struct nfct_handle {
struct nf_conntrack *ct,
void *data);
+ /* This is the second version of the callback that includes
+ * the Netlink header. This is the result of an early design
+ * error, hiding Netlink details is evil. You end needing some
+ * internal information at some point like the Netlink PortID. */
+ int (*cb2)(const struct nlmsghdr *nlh,
+ enum nf_conntrack_msg_type type,
+ struct nf_conntrack *ct,
+ void *data);
+
int (*expect_cb)(enum nf_conntrack_msg_type type,
struct nf_expect *exp,
void *data);
diff --git a/include/libnetfilter_conntrack/libnetfilter_conntrack.h b/include/libnetfilter_conntrack/libnetfilter_conntrack.h
index 1e23b0b..ec85066 100644
--- a/include/libnetfilter_conntrack/libnetfilter_conntrack.h
+++ b/include/libnetfilter_conntrack/libnetfilter_conntrack.h
@@ -233,6 +233,18 @@ extern int nfct_callback_register(struct nfct_handle *h,
extern void nfct_callback_unregister(struct nfct_handle *h);
+/* register / unregister callback: extended version including netlink header */
+
+extern int nfct_callback_register2(struct nfct_handle *h,
+ enum nf_conntrack_msg_type type,
+ int (*cb)(const struct nlmsghdr *nlh,
+ enum nf_conntrack_msg_type type,
+ struct nf_conntrack *ct,
+ void *data),
+ void *data);
+
+extern void nfct_callback_unregister2(struct nfct_handle *h);
+
/* callback verdict */
enum {
NFCT_CB_FAILURE = -1, /* failure */