summaryrefslogtreecommitdiffstats
path: root/include/internal/object.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-05-23 11:52:20 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2009-05-23 11:52:20 +0200
commit20ed81b10714dfe78e31e9721e2d4f42b4beabb2 (patch)
treecc2482605cfff21244cb090f9d2e76bfb95514aa /include/internal/object.h
parent975ae9979ec73e8acb2c215ee9a84fded2f4357a (diff)
api: add new callback interface while keeping backward compatibility
This patch adds nfct_callback_register2() and nfct_callback_unregister2() that allows to register a callback function with a new callback interface that includes the Netlink message. This fixes an early design error. This is not nice but it is the only way to resolve this problem without breaking backward (I don't like function versioning, it is messy). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/internal/object.h')
-rw-r--r--include/internal/object.h9
1 files changed, 9 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);