From 4eb7c493dabf47fc559b7a41e583fa656d616e05 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 25 May 2010 10:44:43 +0200 Subject: add nflog_snprintf_xml() to output a log in XML format This patch adds a new function to output the packet in XML format. Signed-off-by: Pablo Neira Ayuso --- include/libnetfilter_log/libnetfilter_log.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/libnetfilter_log') diff --git a/include/libnetfilter_log/libnetfilter_log.h b/include/libnetfilter_log/libnetfilter_log.h index aa0da72..6b0d3b0 100644 --- a/include/libnetfilter_log/libnetfilter_log.h +++ b/include/libnetfilter_log/libnetfilter_log.h @@ -67,4 +67,17 @@ extern int nflog_get_gid(struct nflog_data *nfad, u_int32_t *gid); extern int nflog_get_seq(struct nflog_data *nfad, u_int32_t *seq); extern int nflog_get_seq_global(struct nflog_data *nfad, u_int32_t *seq); +enum { + NFLOG_XML_PREFIX = (1 << 0), + NFLOG_XML_HW = (1 << 1), + NFLOG_XML_MARK = (1 << 2), + NFLOG_XML_DEV = (1 << 3), + NFLOG_XML_PHYSDEV = (1 << 4), + NFLOG_XML_PAYLOAD = (1 << 5), + NFLOG_XML_TIME = (1 << 6), + NFLOG_XML_ALL = ~0U, +}; + +extern int nflog_snprintf_xml(char *buf, size_t len, struct nflog_data *tb, int flags); + #endif /* __LIBNETFILTER_LOG_H */ -- cgit v1.2.3