aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-02-21 12:59:22 +0000
committerHarald Welte <laforge@gnumonks.org>2009-02-21 12:59:22 +0000
commit7bc4cbc45c81108beeeefce9f80fc18bc87726a4 (patch)
tree3a52acad970d8885089fb04096b5cbed7276962a /include
parent3281f6e2338de0aea5a164e366483f1bf5573976 (diff)
tlv_parser now operates on 'const' input buffer
Diffstat (limited to 'include')
-rw-r--r--include/openbsc/tlv.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/openbsc/tlv.h b/include/openbsc/tlv.h
index e21511685..453f1d0a0 100644
--- a/include/openbsc/tlv.h
+++ b/include/openbsc/tlv.h
@@ -110,7 +110,7 @@ static inline u_int8_t *msgb_tv16_push(struct msgb *msg, u_int8_t tag, u_int16_t
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_parsed {
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