summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-05-25 10:44:43 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2010-05-25 11:02:49 +0200
commit4eb7c493dabf47fc559b7a41e583fa656d616e05 (patch)
tree9bf2c7ba3043040c0e5c955c4fac8e1be2526439 /include
parent3b95a2af27bfe87706205f9c4ea7f0f07257a9aa (diff)
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 <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/libnetfilter_log/libnetfilter_log.h13
1 files changed, 13 insertions, 0 deletions
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 */