ITS
asn_internal.h File Reference
#include "asn_application.h"
#include <assert.h>
Include dependency graph for asn_internal.h:

Go to the source code of this file.

Macros

#define ASN1C_ENVIRONMENT_VERSION   923 /* Compile-time version */
 
#define CALLOC(nmemb, size)   calloc(nmemb, size)
 
#define MALLOC(size)   malloc(size)
 
#define REALLOC(oldptr, size)   realloc(oldptr, size)
 
#define FREEMEM(ptr)   free(ptr)
 
#define asn_debug_indent   0
 
#define ASN_DEBUG_INDENT_ADD(i)   do{}while(0)
 
#define __ASN_E_cbc(buf, size)   (cb((buf), (size), app_key) < 0)
 
#define _ASN_E_CALLBACK(foo)
 
#define _ASN_CALLBACK(buf, size)   _ASN_E_CALLBACK(__ASN_E_cbc(buf, size))
 
#define _ASN_CALLBACK2(buf1, size1, buf2, size2)   _ASN_E_CALLBACK(__ASN_E_cbc(buf1, size1) || __ASN_E_cbc(buf2, size2))
 
#define _ASN_CALLBACK3(buf1, size1, buf2, size2, buf3, size3)
 
#define _i_ASN_TEXT_INDENT(nl, level)
 
#define _i_INDENT(nl)
 
#define _ASN_DEFAULT_STACK_MAX   (30000)
 

Functions

int get_asn1c_environment_version (void)
 
static void ASN_DEBUG (const char *fmt,...)
 
static int _ASN_STACK_OVERFLOW_CHECK (asn_codec_ctx_t *ctx)
 

Macro Definition Documentation

◆ __ASN_E_cbc

#define __ASN_E_cbc (   buf,
  size 
)    (cb((buf), (size), app_key) < 0)

Definition at line 69 of file asn_internal.h.

◆ _ASN_CALLBACK

#define _ASN_CALLBACK (   buf,
  size 
)    _ASN_E_CALLBACK(__ASN_E_cbc(buf, size))

◆ _ASN_CALLBACK2

#define _ASN_CALLBACK2 (   buf1,
  size1,
  buf2,
  size2 
)    _ASN_E_CALLBACK(__ASN_E_cbc(buf1, size1) || __ASN_E_cbc(buf2, size2))

Definition at line 75 of file asn_internal.h.

◆ _ASN_CALLBACK3

#define _ASN_CALLBACK3 (   buf1,
  size1,
  buf2,
  size2,
  buf3,
  size3 
)
Value:
|| __ASN_E_cbc(buf2, size2) \
|| __ASN_E_cbc(buf3, size3))
#define __ASN_E_cbc(buf, size)
Definition: asn_internal.h:69
#define _ASN_E_CALLBACK(foo)
Definition: asn_internal.h:70

Definition at line 77 of file asn_internal.h.

Referenced by CHOICE_encode_xer(), SEQUENCE_encode_xer(), SEQUENCE_OF_encode_xer(), SET_OF_encode_xer(), and xer_encode().

◆ _ASN_DEFAULT_STACK_MAX

#define _ASN_DEFAULT_STACK_MAX   (30000)

Definition at line 103 of file asn_internal.h.

Referenced by ber_decode(), uper_decode(), and xer_decode().

◆ _ASN_E_CALLBACK

#define _ASN_E_CALLBACK (   foo)
Value:
do { \
if(foo) goto cb_failed; \
} while(0)

Definition at line 70 of file asn_internal.h.

◆ _i_ASN_TEXT_INDENT

#define _i_ASN_TEXT_INDENT (   nl,
  level 
)
Value:
do { \
int __level = (level); \
int __nl = ((nl) != 0); \
int __i; \
if(__nl) _ASN_CALLBACK("\n", 1); \
if(__level < 0) __level = 0; \
for(__i = 0; __i < __level; __i++) \
_ASN_CALLBACK(" ", 4); \
er.encoded += __nl + 4 * __level; \
} while(0)
#define _ASN_CALLBACK(buf, size)
Definition: asn_internal.h:73

Definition at line 82 of file asn_internal.h.

Referenced by BIT_STRING_encode_xer(), CHOICE_encode_xer(), OCTET_STRING_encode_xer(), SEQUENCE_encode_xer(), SEQUENCE_OF_encode_xer(), and SET_OF_encode_xer().

◆ _i_INDENT

#define _i_INDENT (   nl)
Value:
do { \
int __i; \
if((nl) && cb("\n", 1, app_key) < 0) return -1; \
for(__i = 0; __i < ilevel; __i++) \
if(cb(" ", 4, app_key) < 0) return -1; \
} while(0)

Definition at line 93 of file asn_internal.h.

Referenced by BIT_STRING_print(), OCTET_STRING_print(), SEQUENCE_print(), and SET_OF_print().

◆ ASN1C_ENVIRONMENT_VERSION

#define ASN1C_ENVIRONMENT_VERSION   923 /* Compile-time version */

Definition at line 23 of file asn_internal.h.

Referenced by get_asn1c_environment_version().

◆ asn_debug_indent

#define asn_debug_indent   0

Definition at line 31 of file asn_internal.h.

◆ ASN_DEBUG_INDENT_ADD

#define ASN_DEBUG_INDENT_ADD (   i)    do{}while(0)

Definition at line 32 of file asn_internal.h.

Referenced by uper_open_type_get_complex(), and uper_open_type_get_simple().

◆ CALLOC

◆ FREEMEM

◆ MALLOC

◆ REALLOC

Function Documentation

◆ _ASN_STACK_OVERFLOW_CHECK()

static int _ASN_STACK_OVERFLOW_CHECK ( asn_codec_ctx_t ctx)
inlinestatic

Definition at line 105 of file asn_internal.h.

References ASN_DEBUG(), and asn_codec_ctx_s::max_stack_size.

Referenced by ber_check_tags(), ber_skip_length(), CHOICE_decode_uper(), SEQUENCE_decode_uper(), SET_OF_decode_uper(), uper_open_type_get_complex(), and uper_open_type_get_simple().

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

◆ ASN_DEBUG()

static void ASN_DEBUG ( const char *  fmt,
  ... 
)
inlinestatic

◆ get_asn1c_environment_version()

int get_asn1c_environment_version ( void  )

Definition at line 12 of file constr_TYPE.c.

References ASN1C_ENVIRONMENT_VERSION.