diff options
author | Phil Sutter <phil@nwl.cc> | 2024-03-07 13:46:26 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-04-11 01:27:07 +0200 |
commit | f8348db87791bb8061b7f9ecf856e835ab74d006 (patch) | |
tree | 8989e13704203972383da57fa3507ba865702b7b /include | |
parent | 410c245e4811d7888daa456547af58d93d1c63b4 (diff) |
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 <phil@nwl.cc>
Diffstat (limited to 'include')
-rw-r--r-- | include/obj.h | 1 |
1 files changed, 1 insertions, 0 deletions
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); |