Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote: > > @@ -447,6 +457,9 @@ extern struct expr *relational_expr_alloc(const struct location *loc, enum ops o > > extern void relational_expr_pctx_update(struct proto_ctx *ctx, > > const struct expr *expr); > > > > +extern struct expr *typeof_expr_alloc(const struct location *loc, > > + enum expr_typeof_key key); > > I think it should be possible to follow an alternative path to achieve > this, that is, use integer_expr and attach a new internal datatype, > ie. queue_type, for this queue number. > > No need for new TYPE_* in enum, that is only required by > concatenations and this datatype will not ever be used in that case. > > For reference, there is also use of this alias datatypes such as > xinteger_type which is used to print integers in hexadecimal. > > From userdata path it should be possible to check for this special > internal queue_datatype then encode the queue number type in the TLV. I have no idea how to do any of this. I don't even know what a "queue number type" is. How on earth do i flip the data type on postprocessing without any idea what "2 octets worth of data" is?