libosmogsm 0.9.6-23.20170220git32ee5af8.fc42
Osmocom GSM library
Loading...
Searching...
No Matches
tlv_parser.c File Reference
#include <stdio.h>
#include <stdint.h>
#include <errno.h>
#include <osmocom/core/utils.h>
#include <osmocom/gsm/tlv.h>

Functions

int tlv_dump (struct tlv_parsed *dec)
 Dump pasred TLV structure to stdout.
 
struct tlv_parsedosmo_tlvp_copy (const struct tlv_parsed *tp_orig, void *ctx)
 Copy tlv_parsed using given talloc context.
 
int osmo_tlvp_merge (struct tlv_parsed *dst, const struct tlv_parsed *src)
 Merge all tlv_parsed attributes of 'src' into 'dst'.
 
int tlv_parse_one (uint8_t *o_tag, uint16_t *o_len, const uint8_t **o_val, const struct tlv_definition *def, const uint8_t *buf, int buf_len)
 Parse a single TLV encoded IE.
 
int tlv_parse (struct tlv_parsed *dec, const struct tlv_definition *def, const uint8_t *buf, int buf_len, uint8_t lv_tag, uint8_t lv_tag2)
 Parse an entire buffer of TLV encoded Information Elements.
 
void tlv_def_patch (struct tlv_definition *dst, const struct tlv_definition *src)
 take a master (src) tlvdev and fill up all empty slots in 'dst'
 
static __attribute__ ((constructor))
 
int osmo_shift_v_fixed (uint8_t **data, size_t *data_len, size_t len, uint8_t **value)
 
int osmo_match_shift_tv_fixed (uint8_t **data, size_t *data_len, uint8_t tag, size_t len, uint8_t **value)
 
int osmo_match_shift_tlv (uint8_t **data, size_t *data_len, uint8_t tag, uint8_t **value, size_t *value_len)
 
int osmo_shift_tlv (uint8_t **data, size_t *data_len, uint8_t *tag, uint8_t **value, size_t *value_len)
 
int osmo_shift_lv (uint8_t **data, size_t *data_len, uint8_t **value, size_t *value_len)
 

Variables

struct tlv_definition tvlv_att_def
 
struct tlv_definition vtvlv_gan_att_def