diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter/nf_tables.h | 20 | ||||
-rw-r--r-- | include/statement.h | 11 |
2 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h index a236cc31..1d5a9253 100644 --- a/include/linux/netfilter/nf_tables.h +++ b/include/linux/netfilter/nf_tables.h @@ -587,6 +587,26 @@ enum nft_log_attributes { #define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1) /** + * enum nft_queue_attributes - nf_tables queue expression netlink attributes + * + * @NFTA_QUEUE_NUM: netlink group to send messages to (NLA_U32) + * @NFTA_QUEUE_TOTAL: prefix to prepend to log messages (NLA_STRING) + * @NFTA_QUEUE_FLAGS: length of payload to include in netlink message (NLA_U32) + */ +enum nft_queue_attributes { + NFTA_QUEUE_UNSPEC, + NFTA_QUEUE_NUM, + NFTA_QUEUE_TOTAL, + NFTA_QUEUE_FLAGS, + __NFTA_QUEUE_MAX +}; +#define NFTA_QUEUE_MAX (__NFTA_QUEUE_MAX - 1) + +#define NFT_QUEUE_FLAG_BYPASS 0x01 /* for compatibility with v2 */ +#define NFT_QUEUE_FLAG_CPU_FANOUT 0x02 /* use current CPU (no hashing) */ +#define NFT_QUEUE_FLAG_MASK 0x03 + +/** * enum nft_reject_types - nf_tables reject expression reject types * * @NFT_REJECT_ICMP_UNREACH: reject using ICMP unreachable diff --git a/include/statement.h b/include/statement.h index 6ecbb18d..14a66df6 100644 --- a/include/statement.h +++ b/include/statement.h @@ -59,6 +59,14 @@ struct nat_stmt { extern struct stmt *nat_stmt_alloc(const struct location *loc); +struct queue_stmt { + uint16_t queuenum; + uint16_t queues_total; + uint16_t flags; +}; + +extern struct stmt *queue_stmt_alloc(const struct location *loc); + /** * enum stmt_types - statement types * @@ -71,6 +79,7 @@ extern struct stmt *nat_stmt_alloc(const struct location *loc); * @STMT_LOG: log statement * @STMT_REJECT: REJECT statement * @STMT_NAT: NAT statement + * @STMT_QUEUE: QUEUE statement */ enum stmt_types { STMT_INVALID, @@ -82,6 +91,7 @@ enum stmt_types { STMT_LOG, STMT_REJECT, STMT_NAT, + STMT_QUEUE, }; /** @@ -127,6 +137,7 @@ struct stmt { struct limit_stmt limit; struct reject_stmt reject; struct nat_stmt nat; + struct queue_stmt queue; }; }; |