tlv_parser now operates on 'const' input buffer
diff --git a/include/openbsc/tlv.h b/include/openbsc/tlv.h
index e215116..453f1d0 100644
--- a/include/openbsc/tlv.h
+++ b/include/openbsc/tlv.h
@@ -110,7 +110,7 @@
struct tlv_p_entry {
u_int16_t len;
- u_int8_t *val;
+ const u_int8_t *val;
};
enum tlv_type {
@@ -134,7 +134,8 @@
struct tlv_p_entry lv[0xff];
};
-int tlv_parse(struct tlv_parsed *dec, const struct tlv_definition *def, u_int8_t *buf, int buf_len);
+int tlv_parse(struct tlv_parsed *dec, const struct tlv_definition *def,
+ const u_int8_t *buf, int buf_len);
#define TLVP_PRESENT(x, y) ((x)->lv[y].val)
#define TLVP_LEN(x, y) (x)->lv[y].len