aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2015-04-05 08:41:08 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2015-04-08 10:58:27 -0400
commit22fe54d5fefcfa98c58cc2f4607dd26d9648b3f5 (patch)
tree153c791a6efb2c0eb7aca4baecb84cb76199b706 /include/uapi/linux
parent11113e190bf0ad73086884f87efccc994ff28b3d (diff)
netfilter: nf_tables: add support for dynamic set updates
Add a new "dynset" expression for dynamic set updates. A new set op ->update() is added which, for non existant elements, invokes an initialization callback and inserts the new element. For both new or existing elements the extenstion pointer is returned to the caller to optionally perform timer updates or other actions. Element removal is not supported so far, however that seems to be a rather exotic need and can be added later on. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index 83441cc4594b..0b87b2f67fe3 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -515,6 +515,33 @@ enum nft_lookup_attributes {
515}; 515};
516#define NFTA_LOOKUP_MAX (__NFTA_LOOKUP_MAX - 1) 516#define NFTA_LOOKUP_MAX (__NFTA_LOOKUP_MAX - 1)
517 517
518enum nft_dynset_ops {
519 NFT_DYNSET_OP_ADD,
520 NFT_DYNSET_OP_UPDATE,
521};
522
523/**
524 * enum nft_dynset_attributes - dynset expression attributes
525 *
526 * @NFTA_DYNSET_SET_NAME: name of set the to add data to (NLA_STRING)
527 * @NFTA_DYNSET_SET_ID: uniquely identifier of the set in the transaction (NLA_U32)
528 * @NFTA_DYNSET_OP: operation (NLA_U32)
529 * @NFTA_DYNSET_SREG_KEY: source register of the key (NLA_U32)
530 * @NFTA_DYNSET_SREG_DATA: source register of the data (NLA_U32)
531 * @NFTA_DYNSET_TIMEOUT: timeout value for the new element (NLA_U64)
532 */
533enum nft_dynset_attributes {
534 NFTA_DYNSET_UNSPEC,
535 NFTA_DYNSET_SET_NAME,
536 NFTA_DYNSET_SET_ID,
537 NFTA_DYNSET_OP,
538 NFTA_DYNSET_SREG_KEY,
539 NFTA_DYNSET_SREG_DATA,
540 NFTA_DYNSET_TIMEOUT,
541 __NFTA_DYNSET_MAX,
542};
543#define NFTA_DYNSET_MAX (__NFTA_DYNSET_MAX - 1)
544
518/** 545/**
519 * enum nft_payload_bases - nf_tables payload expression offset bases 546 * enum nft_payload_bases - nf_tables payload expression offset bases
520 * 547 *