From 6b2f3c08adc2c84c0b5f969af6cfb4d44940e560 Mon Sep 17 00:00:00 2001 From: Ken-ichirou MATSUZAWA Date: Fri, 21 Aug 2015 09:30:33 +0900 Subject: nlmsg: add printf function in conjunction with libmnl To printf nflog netlink message in XML, nflog_snprintf_xml can be used after converting nflog nlattrs to nflog_data, but we should not have any code that mixes both new and old, which handles nflog_data, APIs. The idea is to deprecate libnfnetlink and any client of that library at some point, that will take quite time though since we'll have to mark those old interfaces as deprecated. Signed-off-by: Ken-ichirou MATSUZAWA --- include/libnetfilter_log/libnetfilter_log.h | 8 ++++++++ 1 file changed, 8 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 5087f6f..46767eb 100644 --- a/include/libnetfilter_log/libnetfilter_log.h +++ b/include/libnetfilter_log/libnetfilter_log.h @@ -89,4 +89,12 @@ extern int nflog_attr_put_cfg_mode(struct nlmsghdr *nlh, uint8_t mode, uint32_t 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); +enum nflog_output_type { + NFLOG_OUTPUT_XML = 0, +}; + +int nflog_nlmsg_snprintf(char *buf, size_t bufsiz, const struct nlmsghdr *nlh, + struct nlattr **attr, enum nflog_output_type type, + uint32_t flags); + #endif /* __LIBNETFILTER_LOG_H */ -- cgit v1.2.3