Hi Phil, On Wed, Nov 24, 2021 at 06:22:38PM +0100, Phil Sutter wrote: > Analogous to NFTNL_SET_DESC_CONCAT, introduce a data structure > describing individual data lengths of elements' concatenated data > fields. > > Signed-off-by: Phil Sutter <phil@xxxxxx> > --- > include/libnftnl/set.h | 1 + > include/set.h | 2 ++ > src/set.c | 8 ++++++++ > 3 files changed, 11 insertions(+) > > diff --git a/include/libnftnl/set.h b/include/libnftnl/set.h > index 1ffb6c415260d..958bbc9065f67 100644 > --- a/include/libnftnl/set.h > +++ b/include/libnftnl/set.h > @@ -33,6 +33,7 @@ enum nftnl_set_attr { > NFTNL_SET_EXPR, > NFTNL_SET_EXPRESSIONS, > NFTNL_SET_DESC_BYTEORDER, > + NFTNL_SET_DESC_CONCAT_DATA, This information is already encoded in NFTNL_SET_DATA_TYPE, the datatypes that are defined in libnftables have an explicit byteorder and length. For concatenation, this information is stored in 6 bits (see TYPE_BITS). By parsing the NFTNL_SET_DATA_TYPE field you can extract both types (and byteorders) of the set definition. For the typeof case, where a generic datatype such as integer is used, this information is stored in the SET_USERDATA area. This update for libnftnl is adding a third way to describe the datatypes in the set, right? > __NFTNL_SET_MAX > }; > #define NFTNL_SET_MAX (__NFTNL_SET_MAX - 1)