aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-06-02 15:52:06 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-06-02 15:52:06 +0200
commitf558ed4bb9c0f00997b8f97c2b251a574c1a64c4 (patch)
tree16524d63b63a4c5496a9bc6412c3a9862367cc36 /include
parent91ff17c9ef7dd4a29bb13d6b9995100ffc65b72a (diff)
ipa: Properly parse LV stream of a ID_GET request
For some reason the structure is closer to be a LV (length and value). The value is actually a tag but it is counted inside the length. Introduce an overload of the parse function to provide an offset for the length. This will be taken from the returned length.
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/gsm/ipa.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/osmocom/gsm/ipa.h b/include/osmocom/gsm/ipa.h
index 1227ee17..0bb01c59 100644
--- a/include/osmocom/gsm/ipa.h
+++ b/include/osmocom/gsm/ipa.h
@@ -27,6 +27,9 @@ const char *ipa_ccm_idtag_name(uint8_t tag);
/* parse a buffer of ID tags into a osmocom TLV style representation */
int ipa_ccm_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len);
+/* Is the TAG included in the length field? */
+int ipa_ccm_idtag_parse_off(struct tlv_parsed *dec, unsigned char *buf, int len, const int len_offset);
+
/* parse an Unit ID in string format into the 'ipaccess_unit' data structure */
int ipa_parse_unitid(const char *str, struct ipaccess_unit *unit_data);