libosmogsm
0.11.0-dirty
Osmocom GSM library
|
#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 parsed TLV structure to stdout. | |
struct tlv_parsed * | osmo_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. | |
int | tlv_parse2 (struct tlv_parsed *dec, int dec_multiples, const struct tlv_definition *def, const uint8_t *buf, int buf_len, uint8_t lv_tag, uint8_t lv_tag2) |
Like tlv_parse(), but capable of decoding multiple occurences of the same IE. | |
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) |
Advance the data pointer, subtract length and assign value pointer. | |
int | osmo_match_shift_tv_fixed (uint8_t **data, size_t *data_len, uint8_t tag, size_t len, uint8_t **value) |
Match tag, check length and assign value pointer. | |
int | osmo_match_shift_tlv (uint8_t **data, size_t *data_len, uint8_t expected_tag, uint8_t **value, size_t *value_len) |
Verify TLV header and advance data / subtract length. | |
int | osmo_shift_tlv (uint8_t **data, size_t *data_len, uint8_t *tag, uint8_t **value, size_t *value_len) |
Extract TLV and advance data pointer + subtract length. | |
int | osmo_shift_lv (uint8_t **data, size_t *data_len, uint8_t **value, size_t *value_len) |
Extract LV and advance data pointer + subtract length. | |
Variables | |
struct tlv_definition | tvlv_att_def |
struct tlv_definition | vtvlv_gan_att_def |