Added single octet TV (type + value) to libosmocore.
[osmocom-bb.git] / src / tlv_parser.c
index 407e57a..bbef7a9 100644 (file)
@@ -36,6 +36,14 @@ int tlv_parse_one(uint8_t *o_tag, uint16_t *o_len, const uint8_t **o_val,
        tag = *buf;
        *o_tag = tag;
 
+       /* single octet TV IE */
+       if (def->def[tag & 0xf0].type == TLV_TYPE_SINGLE_TV) {
+               *o_tag = tag & 0xf0;
+               *o_val = buf;
+               *o_len = 1;
+               return 1;
+       }
+
        /* FIXME: use tables for knwon IEI */
        switch (def->def[tag].type) {
        case TLV_TYPE_T: