From 95b3bf6576165e1bbe23d55d5f15b7ebf9c98dc4 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 13 Apr 2012 13:13:34 +0200 Subject: conntrack: add new API to build/parse ctnetlink messages using libmnl This patch adds support to build and to parse netlink messages from/to one user-space nf_conntrack object. It uses libmnl, thus libnetfilter_conntrack now depends on this library. This is the first patch in the direction of removing the dependency on the veteran libnfnetlink. I have decided to update LIBVERSION in this patch. I know it's recommended to do this before releasing the software. I prefer to do this so snapshot packages get the correct LIBVERSION. Signed-off-by: Pablo Neira Ayuso --- include/libnetfilter_conntrack/libnetfilter_conntrack.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/libnetfilter_conntrack/libnetfilter_conntrack.h b/include/libnetfilter_conntrack/libnetfilter_conntrack.h index 5518418..87c73a3 100644 --- a/include/libnetfilter_conntrack/libnetfilter_conntrack.h +++ b/include/libnetfilter_conntrack/libnetfilter_conntrack.h @@ -533,6 +533,12 @@ int nfct_build_query(struct nfnl_subsys_handle *ssh, void *req, unsigned int size); +/* New low level API: netlink functions */ + +extern int nfct_nlmsg_build(struct nlmsghdr *nlh, const struct nf_conntrack *ct); +extern int nfct_nlmsg_parse(const struct nlmsghdr *nlh, struct nf_conntrack *ct); +extern int nfct_payload_parse(const void *payload, size_t payload_len, uint16_t l3num, struct nf_conntrack *ct); + /* * NEW expectation API */ -- cgit v1.2.3