YAZ
5.34.0
|
Implements BER tags encoding and decoding. More...
Go to the source code of this file.
Functions | |
int | ber_tag (ODR o, void *p, int zclass, int tag, int *constructed, int opt, const char *name) |
Encode/decode BER tags. More... | |
int | ber_enctag (ODR o, int zclass, int tag, int constructed) |
BER-encode a zclass/tag/constructed package (identifier octets). More... | |
int | ber_dectag (const char *cp, int *zclass, int *tag, int *constructed, int max) |
Decodes BER identifier octets. More... | |
Implements BER tags encoding and decoding.
This source file implements BER encoding and decoding of the tags.
Definition in file ber_tag.c.
int ber_dectag | ( | const char * | cp, |
int * | zclass, | ||
int * | tag, | ||
int * | constructed, | ||
int | max | ||
) |
Decodes BER identifier octets.
Returns number of bytes read or -1 for error.
Definition at line 165 of file ber_tag.c.
Referenced by ber_tag(), completeBER_n(), do_dumpBER(), odr_choice(), and odr_peektag().
int ber_enctag | ( | ODR | o, |
int | zclass, | ||
int | tag, | ||
int | constructed | ||
) |
int ber_tag | ( | ODR | o, |
void * | p, | ||
int | zclass, | ||
int | tag, | ||
int * | constructed, | ||
int | opt, | ||
const char * | name | ||
) |
Encode/decode BER tags.
On encoding:
* if p: write tag. return 1 (success) or -1 (error). * if !p: return 0. *
On decoding:
* if tag && zclass match up, advance pointer and return 1. set cons. * else leave pointer unchanged. Return 0. *
Definition at line 34 of file ber_tag.c.
References ber_dectag(), ber_enctag(), Odr_private::bp, Odr_ber_tag::br, Odr_private::buf, odr::direction, Odr_ber_tag::lclass, Odr_ber_tag::lcons, Odr_ber_tag::ltag, name, Odr_private::odr_ber_tag, odr_constructed_more(), ODR_DECODE, ODR_ENCODE, odr_max, ODR_PRINT, ODR_S_SET, odr_seek(), odr_setelement(), odr_seterror(), ODR_STACK_EMPTY, ODR_STACK_NOT_EMPTY, OOTHER, odr::op, OPROTO, opt, OREQUIRED, Odr_private::t_class, and Odr_private::top.
Referenced by odr_bitstring(), odr_bool(), odr_constructed_begin(), odr_cstring(), odr_enum(), odr_iconv_string(), odr_integer(), odr_null(), odr_octetstring(), and odr_oid().