#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <ber.h>
Go to the source code of this file.
Functions | |
static void | hex_dump (const uint8_t *tmp, size_t len, size_t llen, unsigned int depth) |
static unsigned int | ber_id_octet_constructed (const uint8_t cls) |
static unsigned int | ber_id_octet_tag (const uint8_t cls) |
static unsigned int | ber_len_form_short (const uint8_t cls) |
static unsigned int | ber_len_short (const uint8_t cls) |
void | ber_dump (const uint8_t *buf, size_t len, unsigned int depth) |
static int | tag_cmp (const struct ber_tag *tag, const uint8_t *idb, size_t len) |
static struct ber_tag * | find_tag (const struct ber_tag *tags, unsigned int num_tags, const uint8_t *idb, size_t tag_len) |
static const uint8_t * | decode_tag (const uint8_t **ptr, const uint8_t *end, size_t *tag_len) |
size_t | ber_tag_len (const uint8_t *ptr, const uint8_t *end) |
const uint8_t * | ber_decode_tag (const uint8_t **ptr, const uint8_t *end, size_t *tag_len) |
static size_t | decode_len (const uint8_t **ptr, const uint8_t *end) |
size_t | ber_decode_len (const uint8_t **ptr, const uint8_t *end) |
int | ber_decode (const struct ber_tag *tags, unsigned int num_tags, const uint8_t *ptr, size_t len, void *priv) |
int ber_decode | ( | const struct ber_tag * | tags, | |
unsigned int | num_tags, | |||
const uint8_t * | ptr, | |||
size_t | len, | |||
void * | priv | |||
) |
Definition at line 252 of file ber.c.
References decode_len(), decode_tag(), find_tag(), hex_dump(), ber_tag::op, ber_tag::tag, and ber_tag::tag_len.
Referenced by add_app(), atc(), bop_dtemp(), bop_fci(), bop_fci2(), bop_psd(), get_aip(), ptc(), and set_app().
size_t ber_decode_len | ( | const uint8_t ** | ptr, | |
const uint8_t * | end | |||
) |
Definition at line 247 of file ber.c.
References decode_len().
Referenced by composite(), and decode_record().
const uint8_t* ber_decode_tag | ( | const uint8_t ** | ptr, | |
const uint8_t * | end, | |||
size_t * | tag_len | |||
) |
Definition at line 211 of file ber.c.
References decode_tag().
Referenced by composite().
void ber_dump | ( | const uint8_t * | buf, | |
size_t | len, | |||
unsigned int | depth | |||
) |
Definition at line 70 of file ber.c.
References ber_dump(), ber_id_octet_constructed(), ber_id_octet_tag(), ber_len_form_short(), ber_len_short(), and hex_dump().
Referenced by ber_dump(), and cp_ber_dump().
static unsigned int ber_id_octet_constructed | ( | const uint8_t | cls | ) | [static] |
Definition at line 50 of file ber.c.
Referenced by ber_dump().
static unsigned int ber_id_octet_tag | ( | const uint8_t | cls | ) | [static] |
Definition at line 55 of file ber.c.
Referenced by ber_dump(), and decode_tag().
static unsigned int ber_len_form_short | ( | const uint8_t | cls | ) | [static] |
Definition at line 60 of file ber.c.
Referenced by ber_dump(), and decode_len().
static unsigned int ber_len_short | ( | const uint8_t | cls | ) | [static] |
Definition at line 65 of file ber.c.
Referenced by ber_dump(), and decode_len().
size_t ber_tag_len | ( | const uint8_t * | ptr, | |
const uint8_t * | end | |||
) |
Definition at line 203 of file ber.c.
References decode_tag().
Referenced by construct_dol().
static size_t decode_len | ( | const uint8_t ** | ptr, | |
const uint8_t * | end | |||
) | [static] |
Definition at line 218 of file ber.c.
References ber_len_form_short(), and ber_len_short().
Referenced by ber_decode(), and ber_decode_len().
static const uint8_t* decode_tag | ( | const uint8_t ** | ptr, | |
const uint8_t * | end, | |||
size_t * | tag_len | |||
) | [static] |
Definition at line 175 of file ber.c.
References ber_id_octet_tag().
Referenced by ber_decode(), ber_decode_tag(), and ber_tag_len().
static struct ber_tag* find_tag | ( | const struct ber_tag * | tags, | |
unsigned int | num_tags, | |||
const uint8_t * | idb, | |||
size_t | tag_len | |||
) | [static, read] |
Definition at line 152 of file ber.c.
References cmp(), and tag_cmp().
Referenced by ber_decode(), and construct_dol().
static void hex_dump | ( | const uint8_t * | tmp, | |
size_t | len, | |||
size_t | llen, | |||
unsigned int | depth | |||
) | [static] |
Definition at line 9 of file ber.c.
Referenced by ber_decode(), ber_dump(), check_ssa(), cp_gen_ac(), cp_hex_dump(), make_issuer_pk(), set_df_fci(), set_ef_fci(), and sim_new().
static int tag_cmp | ( | const struct ber_tag * | tag, | |
const uint8_t * | idb, | |||
size_t | len | |||
) | [static] |
Definition at line 143 of file ber.c.
References ber_tag::tag, and ber_tag::tag_len.
Referenced by find_tag().