diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-04-13 13:13:34 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-05-26 16:10:34 +0200 |
commit | 95b3bf6576165e1bbe23d55d5f15b7ebf9c98dc4 (patch) | |
tree | c1df552ea77057aaf83ca7b0f00504d0cdaf7d0d /include/libnetfilter_conntrack | |
parent | a84175b8c3b167bf0e18a9ce1f6bb48a62c64127 (diff) |
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 <pablo@gnumonks.org>
Diffstat (limited to 'include/libnetfilter_conntrack')
-rw-r--r-- | include/libnetfilter_conntrack/libnetfilter_conntrack.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ |