aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-02-14 19:07:10 +0000
committerHarald Welte <laforge@gnumonks.org>2009-02-14 19:07:10 +0000
commit2fa79349aa5bc5d41cf80f59284ecb993409d8b9 (patch)
treebd490d501c06e4fae3976c8cdde21c30715bc195 /include
parente36e15eb0a28d3d8d5b5ef5bb60e758f207fd8d7 (diff)
implement type1TV or type 2 detection
Diffstat (limited to 'include')
-rw-r--r--include/openbsc/tlv.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/openbsc/tlv.h b/include/openbsc/tlv.h
index 668644be7..3bb586225 100644
--- a/include/openbsc/tlv.h
+++ b/include/openbsc/tlv.h
@@ -113,12 +113,14 @@ struct tlv_p_entry {
u_int8_t *val;
};
-struct tlv_parser {
+struct tlv_parsed {
struct tlv_p_entry lv[0xff];
};
-#define TLVP_PRESENT(x, y) (x->lv[y].val)
-#define TLVP_LEN(x, y) x->lv[y].len
-#define TLVP_VAL(x, y) x->lv[y].val
+int tlv_parse(struct tlv_parsed *dec, 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
+#define TLVP_VAL(x, y) (x)->lv[y].val
#endif /* _TLV_H */