From 0b915d6dc50e9e5aeb3e41db9d20dc96d9edee3f Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Sat, 13 Dec 2014 07:50:34 +0000 Subject: datatype: add new subtypes field to account number of concat data types Using the size is confusing since it usually holds the size of the data. Add a new "subtypes" member, which holds the number of datatypes the concat type is made of. Signed-off-by: Patrick McHardy --- include/datatype.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/datatype.h') diff --git a/include/datatype.h b/include/datatype.h index 3f13dcde..50b85c31 100644 --- a/include/datatype.h +++ b/include/datatype.h @@ -115,6 +115,7 @@ enum datatype_flags { * @byteorder: byteorder of type (non-basetypes only) * @flags: flags * @size: type size (fixed sized non-basetypes only) + * @subtypes: number of subtypes (concat type) * @name: type name * @desc: type description * @basetype: basetype for subtypes, determines type compatibilty @@ -128,6 +129,7 @@ struct datatype { enum byteorder byteorder; unsigned int flags; unsigned int size; + unsigned int subtypes; const char *name; const char *desc; const struct datatype *basetype; -- cgit v1.2.3