aboutsummaryrefslogtreecommitdiffstats
path: root/libosmocore/src/tlv_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libosmocore/src/tlv_parser.c')
-rw-r--r--libosmocore/src/tlv_parser.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libosmocore/src/tlv_parser.c b/libosmocore/src/tlv_parser.c
index e9b15120a..407e57aa2 100644
--- a/libosmocore/src/tlv_parser.c
+++ b/libosmocore/src/tlv_parser.c
@@ -1,4 +1,5 @@
#include <stdio.h>
+#include <stdint.h>
#include <osmocore/utils.h>
#include <osmocore/tlv.h>
@@ -25,11 +26,11 @@ int tlv_dump(struct tlv_parsed *dec)
*
* Also, returns the number of bytes consumed by the TLV entry
*/
-int tlv_parse_one(u_int8_t *o_tag, u_int16_t *o_len, const u_int8_t **o_val,
+int tlv_parse_one(uint8_t *o_tag, uint16_t *o_len, const uint8_t **o_val,
const struct tlv_definition *def,
- const u_int8_t *buf, int buf_len)
+ const uint8_t *buf, int buf_len)
{
- u_int8_t tag;
+ uint8_t tag;
int len;
tag = *buf;
@@ -100,11 +101,11 @@ int tlv_parse_one(u_int8_t *o_tag, u_int16_t *o_len, const u_int8_t **o_val,
* lv_tag2: input: a second initial LV tag following lv_tag
*/
int tlv_parse(struct tlv_parsed *dec, const struct tlv_definition *def,
- const u_int8_t *buf, int buf_len, u_int8_t lv_tag,
- u_int8_t lv_tag2)
+ const uint8_t *buf, int buf_len, uint8_t lv_tag,
+ uint8_t lv_tag2)
{
int ofs = 0, num_parsed = 0;
- u_int16_t len;
+ uint16_t len;
memset(dec, 0, sizeof(*dec));
@@ -133,8 +134,8 @@ int tlv_parse(struct tlv_parsed *dec, const struct tlv_definition *def,
while (ofs < buf_len) {
int rv;
- u_int8_t tag;
- const u_int8_t *val;
+ uint8_t tag;
+ const uint8_t *val;
rv = tlv_parse_one(&tag, &len, &val, def,
&buf[ofs], buf_len-ofs);