From d3333c14bf32ceba24aca41c9b272f204b475183 Mon Sep 17 00:00:00 2001 From: Ken-ichirou MATSUZAWA Date: Fri, 21 Aug 2015 09:26:08 +0900 Subject: src: introduce new functions independent from libnfnetlink The libnetfilter_log.c file contains the old API, its use is discouraged since it depends on libnfnetlink. The idea is to provide a set of helper functions that we can use in conjunction with libmnl, similar to what we have in libnetfilter_queue/nlmsg.c Signed-off-by: Ken-ichirou MATSUZAWA --- include/libnetfilter_log/libnetfilter_log.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/libnetfilter_log/libnetfilter_log.h') diff --git a/include/libnetfilter_log/libnetfilter_log.h b/include/libnetfilter_log/libnetfilter_log.h index 7812877..5087f6f 100644 --- a/include/libnetfilter_log/libnetfilter_log.h +++ b/include/libnetfilter_log/libnetfilter_log.h @@ -11,6 +11,7 @@ #include #include +#include #include struct nflog_handle; @@ -82,4 +83,10 @@ enum { extern int nflog_snprintf_xml(char *buf, size_t len, struct nflog_data *tb, int flags); +extern struct nlmsghdr * +nflog_nlmsg_put_header(char *buf, uint8_t type, uint8_t family, uint16_t qnum); +extern int nflog_attr_put_cfg_mode(struct nlmsghdr *nlh, uint8_t mode, uint32_t range); +extern int nflog_attr_put_cfg_cmd(struct nlmsghdr *nlh, uint8_t cmd); +extern int nflog_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr **attr); + #endif /* __LIBNETFILTER_LOG_H */ -- cgit v1.2.3