diff --git a/include/villas/mapping.h b/include/villas/mapping.h index 9bcab60a5..4512c3681 100644 --- a/include/villas/mapping.h +++ b/include/villas/mapping.h @@ -70,6 +70,8 @@ struct mapping_entry { enum header_type { MAPPING_HDR_LENGTH, MAPPING_HDR_SEQUENCE, + MAPPING_HDR_ID, + MAPPING_HDR_FORMAT } id; } hdr; diff --git a/lib/mapping.c b/lib/mapping.c index aa4a10609..c92c1966f 100644 --- a/lib/mapping.c +++ b/lib/mapping.c @@ -105,6 +105,10 @@ int mapping_parse_str(struct mapping_entry *e, const char *str, struct list *nod e->hdr.id = MAPPING_HDR_SEQUENCE; else if (!strcmp(field, "length")) e->hdr.id = MAPPING_HDR_LENGTH; + else if (!strcmp(field, "id")) + e->hdr.id = MAPPING_HDR_ID; + else if (!strcmp(field, "format")) + e->hdr.id = MAPPING_HDR_FORMAT; else goto invalid_format; }