ITS
asn_codecs_prim.c File Reference
#include <asn_internal.h>
#include <asn_codecs_prim.h>
#include <errno.h>
Include dependency graph for asn_codecs_prim.c:

Go to the source code of this file.

Classes

struct  xdp_arg_s
 

Functions

asn_dec_rval_t ber_decode_primitive (asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, void **sptr, const void *buf_ptr, size_t size, int tag_mode)
 
asn_enc_rval_t der_encode_primitive (asn_TYPE_descriptor_t *td, void *sptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key)
 
void ASN__PRIMITIVE_TYPE_free (asn_TYPE_descriptor_t *td, void *sptr, int contents_only)
 
static int xer_decode__unexpected_tag (void *key, const void *chunk_buf, size_t chunk_size)
 
static ssize_t xer_decode__primitive_body (void *key, const void *chunk_buf, size_t chunk_size, int have_more)
 
asn_dec_rval_t xer_decode_primitive (asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, void **sptr, size_t struct_size, const char *opt_mname, const void *buf_ptr, size_t size, xer_primitive_body_decoder_f *prim_body_decoder)
 

Function Documentation

◆ ASN__PRIMITIVE_TYPE_free()

void ASN__PRIMITIVE_TYPE_free ( asn_TYPE_descriptor_t td,
void *  sptr,
int  contents_only 
)

Definition at line 118 of file asn_codecs_prim.c.

References ASN_DEBUG(), ASN__PRIMITIVE_TYPE_s::buf, FREEMEM, and asn_TYPE_descriptor_s::name.

Here is the call graph for this function:

◆ ber_decode_primitive()

asn_dec_rval_t ber_decode_primitive ( asn_codec_ctx_t opt_codec_ctx,
asn_TYPE_descriptor_t td,
void **  sptr,
const void *  buf_ptr,
size_t  size,
int  tag_mode 
)

Definition at line 13 of file asn_codecs_prim.c.

References _ASN_DECODE_FAILED, ASN_DEBUG(), ber_check_tags(), ASN__PRIMITIVE_TYPE_s::buf, CALLOC, asn_dec_rval_s::code, asn_dec_rval_s::consumed, MALLOC, asn_TYPE_descriptor_s::name, RC_OK, RC_WMORE, and ASN__PRIMITIVE_TYPE_s::size.

Here is the call graph for this function:

◆ der_encode_primitive()

asn_enc_rval_t der_encode_primitive ( asn_TYPE_descriptor_t td,
void *  sptr,
int  tag_mode,
ber_tlv_tag_t  tag,
asn_app_consume_bytes_f cb,
void *  app_key 
)

Definition at line 84 of file asn_codecs_prim.c.

References _ASN_ENCODED_OK, ASN_DEBUG(), ASN__PRIMITIVE_TYPE_s::buf, der_write_tags(), asn_enc_rval_s::encoded, asn_enc_rval_s::failed_type, asn_TYPE_descriptor_s::name, ASN__PRIMITIVE_TYPE_s::size, and asn_enc_rval_s::structure_ptr.

Here is the call graph for this function:

◆ xer_decode__primitive_body()

static ssize_t xer_decode__primitive_body ( void *  key,
const void *  chunk_buf,
size_t  chunk_size,
int  have_more 
)
static

Definition at line 186 of file asn_codecs_prim.c.

References xdp_arg_s::decoded_something, xdp_arg_s::prim_body_decoder, xdp_arg_s::struct_key, xdp_arg_s::type_descriptor, xdp_arg_s::want_more, xer_whitespace_span(), XPBD_BODY_CONSUMED, XPBD_BROKEN_ENCODING, XPBD_DECODER_LIMIT, XPBD_NOT_BODY_IGNORE, and XPBD_SYSTEM_FAILURE.

Referenced by xer_decode_primitive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xer_decode__unexpected_tag()

static int xer_decode__unexpected_tag ( void *  key,
const void *  chunk_buf,
size_t  chunk_size 
)
static

Definition at line 152 of file asn_codecs_prim.c.

References xdp_arg_s::decoded_something, xdp_arg_s::prim_body_decoder, xdp_arg_s::struct_key, xdp_arg_s::type_descriptor, XPBD_BODY_CONSUMED, XPBD_BROKEN_ENCODING, XPBD_DECODER_LIMIT, XPBD_NOT_BODY_IGNORE, and XPBD_SYSTEM_FAILURE.

Referenced by xer_decode_primitive().

Here is the caller graph for this function:

◆ xer_decode_primitive()

asn_dec_rval_t xer_decode_primitive ( asn_codec_ctx_t opt_codec_ctx,
asn_TYPE_descriptor_t td,
void **  sptr,
size_t  struct_size,
const char *  opt_mname,
const void *  buf_ptr,
size_t  size,
xer_primitive_body_decoder_f prim_body_decoder 
)

Definition at line 243 of file asn_codecs_prim.c.

References _ASN_DECODE_FAILED, ASN_DEBUG(), CALLOC, xdp_arg_s::decoded_something, xdp_arg_s::prim_body_decoder, RC_FAIL, RC_OK, RC_WMORE, xdp_arg_s::struct_key, xdp_arg_s::type_descriptor, xdp_arg_s::want_more, xer_decode__primitive_body(), xer_decode__unexpected_tag(), xer_decode_general(), asn_TYPE_descriptor_s::xml_tag, and XPBD_BODY_CONSUMED.

Referenced by BOOLEAN_decode_xer(), and INTEGER_decode_xer().

Here is the call graph for this function:
Here is the caller graph for this function: