[nft PATCH 12/15] include: Use struct nftnl_set_desc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since libnftnl now exports the data structure, use it in struct set.

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 include/rule.h | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/include/rule.h b/include/rule.h
index be31695636df4..5e6647f9d6cca 100644
--- a/include/rule.h
+++ b/include/rule.h
@@ -6,6 +6,7 @@
 #include <list.h>
 #include <netinet/in.h>
 #include <libnftnl/object.h>	/* For NFTNL_CTTIMEOUT_ARRAY_MAX. */
+#include <libnftnl/set.h>
 #include <linux/netfilter/nf_tables.h>
 #include <string.h>
 #include <cache.h>
@@ -330,9 +331,7 @@ void rule_stmt_insert_at(struct rule *rule, struct stmt *nstmt,
  * @policy:	set mechanism policy
  * @automerge:	merge adjacents and overlapping elements, if possible
  * @comment:	comment
- * @desc.size:		count of set elements
- * @desc.field_len:	length of single concatenated fields, bytes
- * @desc.field_count:	count of concatenated fields
+ * @desc:	set element meta data
  */
 struct set {
 	struct list_head	list;
@@ -354,11 +353,7 @@ struct set {
 	bool			automerge;
 	bool			key_typeof_valid;
 	const char		*comment;
-	struct {
-		uint32_t	size;
-		uint8_t		field_len[NFT_REG32_COUNT];
-		uint8_t		field_count;
-	} desc;
+	struct nftnl_set_desc	desc;
 };
 
 extern struct set *set_alloc(const struct location *loc);
-- 
2.33.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux