From f8348db87791bb8061b7f9ecf856e835ab74d006 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 7 Mar 2024 13:46:26 +0100 Subject: obj: Introduce struct obj_ops::attr_policy Just like with struct expr_ops::attr_policy, enable object types to inform about restrictions on attribute use. This way generic object code may perform sanity checks before dispatching to object ops. Signed-off-by: Phil Sutter --- include/obj.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/obj.h') diff --git a/include/obj.h b/include/obj.h index 6d2af8d..d217737 100644 --- a/include/obj.h +++ b/include/obj.h @@ -105,6 +105,7 @@ struct obj_ops { uint32_t type; size_t alloc_len; int nftnl_max_attr; + struct attr_policy *attr_policy; int (*set)(struct nftnl_obj *e, uint16_t type, const void *data, uint32_t data_len); const void *(*get)(const struct nftnl_obj *e, uint16_t type, uint32_t *data_len); int (*parse)(struct nftnl_obj *e, struct nlattr *attr); -- cgit v1.2.3