On 23-04-19, Florian Westphal wrote: > Brett Mastbergen <bmastbergen@xxxxxxxxxxxx> wrote: > > +const struct datatype ct_id_type = { > > + .type = TYPE_CT_ID, > > + .name = "ct_id", > > + .desc = "conntrack id", > > + .byteorder = BYTEORDER_BIG_ENDIAN, > > + .size = 4 * BITS_PER_BYTE, > > + .basetype = &integer_type, > > +}; > > Pablo, I know we've discussed this in the past but I think > the ct id would be a good candidate to add a generic uint32_t > integer type. > > AFAICS the ct_id_type is unneeded per this patch, > but IIRC to make use of this for set definitions we can't use generic > integer type as it has no fixed size. Indeed, the only reason I added the ct_id type was so there would be a fixed length integer type to use in sets and as a key to maps. If you'd like me to throw together a patch that creates a generic 32 bit integer type, and then use that for the ct id key, just say the word. > > This is the first data type that doesn't need any specific > parsing/printing, AFAICS its just needed to get a fixed 32bit size.