aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2014-06-25 07:37:13 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2014-06-27 07:21:37 -0400
commit09d27b88f15f08fcfbaf57d9b0b4489816264815 (patch)
treed96b5e0c64a72ced3abcf8ede763eda8da0f11ba /include/uapi/linux
parent85d30e24166e86686aa2d805e2ef1fa8d770852c (diff)
netfilter: nft_log: complete logging support
Use the unified nf_log_packet() interface that allows us explicit logger selection through the nf_loginfo structure. If you specify the group attribute, this means you want to receive logging messages through nfnetlink_log. In that case, the snaplen and qthreshold attributes allows you to tune internal aspects of the netlink logging infrastructure. On the other hand, if the level is specified, then the plain text format through the kernel logging ring is used instead, which is also used by default if neither group nor level are indicated. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index 2a88f645a5d8..801bdd1e56e3 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -697,6 +697,8 @@ enum nft_counter_attributes {
697 * @NFTA_LOG_PREFIX: prefix to prepend to log messages (NLA_STRING) 697 * @NFTA_LOG_PREFIX: prefix to prepend to log messages (NLA_STRING)
698 * @NFTA_LOG_SNAPLEN: length of payload to include in netlink message (NLA_U32) 698 * @NFTA_LOG_SNAPLEN: length of payload to include in netlink message (NLA_U32)
699 * @NFTA_LOG_QTHRESHOLD: queue threshold (NLA_U32) 699 * @NFTA_LOG_QTHRESHOLD: queue threshold (NLA_U32)
700 * @NFTA_LOG_LEVEL: log level (NLA_U32)
701 * @NFTA_LOG_FLAGS: logging flags (NLA_U32)
700 */ 702 */
701enum nft_log_attributes { 703enum nft_log_attributes {
702 NFTA_LOG_UNSPEC, 704 NFTA_LOG_UNSPEC,
@@ -704,6 +706,8 @@ enum nft_log_attributes {
704 NFTA_LOG_PREFIX, 706 NFTA_LOG_PREFIX,
705 NFTA_LOG_SNAPLEN, 707 NFTA_LOG_SNAPLEN,
706 NFTA_LOG_QTHRESHOLD, 708 NFTA_LOG_QTHRESHOLD,
709 NFTA_LOG_LEVEL,
710 NFTA_LOG_FLAGS,
707 __NFTA_LOG_MAX 711 __NFTA_LOG_MAX
708}; 712};
709#define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1) 713#define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1)