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

Go to the source code of this file.

Classes

struct  enc_to_buf_arg
 

Typedefs

typedef struct enc_to_buf_arg enc_to_buf_arg
 

Functions

static ssize_t der_write_TL (ber_tlv_tag_t tag, ber_tlv_len_t len, asn_app_consume_bytes_f *cb, void *app_key, int constructed)
 
asn_enc_rval_t der_encode (asn_TYPE_descriptor_t *type_descriptor, void *struct_ptr, asn_app_consume_bytes_f *consume_bytes, void *app_key)
 
static int encode_to_buffer_cb (const void *buffer, size_t size, void *key)
 
asn_enc_rval_t der_encode_to_buffer (asn_TYPE_descriptor_t *type_descriptor, void *struct_ptr, void *buffer, size_t buffer_size)
 
ssize_t der_write_tags (asn_TYPE_descriptor_t *sd, size_t struct_length, int tag_mode, int last_tag_form, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key)
 

Typedef Documentation

◆ enc_to_buf_arg

Function Documentation

◆ der_encode()

asn_enc_rval_t der_encode ( asn_TYPE_descriptor_t type_descriptor,
void *  struct_ptr,
asn_app_consume_bytes_f consume_bytes,
void *  app_key 
)

Definition at line 15 of file der_encoder.c.

References ASN_DEBUG(), asn_TYPE_descriptor_s::der_encoder, and asn_TYPE_descriptor_s::name.

Here is the call graph for this function:

◆ der_encode_to_buffer()

asn_enc_rval_t der_encode_to_buffer ( asn_TYPE_descriptor_t type_descriptor,
void *  struct_ptr,
void *  buffer,
size_t  buffer_size 
)

Definition at line 54 of file der_encoder.c.

References enc_to_buf_arg::buffer, asn_TYPE_descriptor_s::der_encoder, encode_to_buffer_cb(), asn_enc_rval_s::encoded, and enc_to_buf_arg::left.

Here is the call graph for this function:

◆ der_write_tags()

ssize_t der_write_tags ( asn_TYPE_descriptor_t sd,
size_t  struct_length,
int  tag_mode,
int  last_tag_form,
ber_tlv_tag_t  tag,
asn_app_consume_bytes_f cb,
void *  app_key 
)

Definition at line 77 of file der_encoder.c.

References ASN_DEBUG(), ber_tlv_tag_string(), der_write_TL(), asn_TYPE_descriptor_s::name, asn_TYPE_descriptor_s::tags, and asn_TYPE_descriptor_s::tags_count.

Referenced by BOOLEAN_encode_der(), CHOICE_encode_der(), der_encode_primitive(), OCTET_STRING_encode_der(), SEQUENCE_encode_der(), SEQUENCE_OF_encode_der(), and SET_OF_encode_der().

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

◆ der_write_TL()

static ssize_t der_write_TL ( ber_tlv_tag_t  tag,
ber_tlv_len_t  len,
asn_app_consume_bytes_f cb,
void *  app_key,
int  constructed 
)
static

Definition at line 168 of file der_encoder.c.

References ber_tlv_tag_serialize(), and der_tlv_length_serialize().

Referenced by der_write_tags().

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

◆ encode_to_buffer_cb()

static int encode_to_buffer_cb ( const void *  buffer,
size_t  size,
void *  key 
)
static

Definition at line 37 of file der_encoder.c.

References enc_to_buf_arg::buffer, and enc_to_buf_arg::left.

Referenced by der_encode_to_buffer().

Here is the caller graph for this function: