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

Go to the source code of this file.

Macros

#define U8E_TRUNC   -1 /* UTF-8 sequence truncated */
 
#define U8E_ILLSTART   -2 /* Illegal UTF-8 sequence start */
 
#define U8E_NOTCONT   -3 /* Continuation expectation failed */
 
#define U8E_NOTMIN   -4 /* Not minimal length encoding */
 
#define U8E_EINVAL   -5 /* Invalid arguments */
 

Functions

int UTF8String_constraint (asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
 
static ssize_t UTF8String__process (const UTF8String_t *st, uint32_t *dst, size_t dstlen)
 
ssize_t UTF8String_length (const UTF8String_t *st)
 
size_t UTF8String_to_wcs (const UTF8String_t *st, uint32_t *dst, size_t dstlen)
 
int UTF8String_print (asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key)
 

Variables

static ber_tlv_tag_t asn_DEF_UTF8String_tags []
 
asn_TYPE_descriptor_t asn_DEF_UTF8String
 
static int UTF8String_ht [2][16]
 
static int32_t UTF8String_mv [7]
 

Macro Definition Documentation

◆ U8E_EINVAL

#define U8E_EINVAL   -5 /* Invalid arguments */

Definition at line 68 of file UTF8String.c.

Referenced by UTF8String_constraint(), and UTF8String_length().

◆ U8E_ILLSTART

#define U8E_ILLSTART   -2 /* Illegal UTF-8 sequence start */

Definition at line 65 of file UTF8String.c.

Referenced by UTF8String__process(), and UTF8String_constraint().

◆ U8E_NOTCONT

#define U8E_NOTCONT   -3 /* Continuation expectation failed */

Definition at line 66 of file UTF8String.c.

Referenced by UTF8String__process(), and UTF8String_constraint().

◆ U8E_NOTMIN

#define U8E_NOTMIN   -4 /* Not minimal length encoding */

Definition at line 67 of file UTF8String.c.

Referenced by UTF8String__process(), and UTF8String_constraint().

◆ U8E_TRUNC

#define U8E_TRUNC   -1 /* UTF-8 sequence truncated */

Definition at line 64 of file UTF8String.c.

Referenced by UTF8String__process(), and UTF8String_constraint().

Function Documentation

◆ UTF8String__process()

static ssize_t UTF8String__process ( const UTF8String_t st,
uint32_t *  dst,
size_t  dstlen 
)
static

Definition at line 104 of file UTF8String.c.

References OCTET_STRING::buf, OCTET_STRING::size, U8E_ILLSTART, U8E_NOTCONT, U8E_NOTMIN, U8E_TRUNC, UTF8String_ht, and UTF8String_mv.

Referenced by UTF8String_length(), and UTF8String_to_wcs().

Here is the caller graph for this function:

◆ UTF8String_constraint()

int UTF8String_constraint ( asn_TYPE_descriptor_t td,
const void *  sptr,
asn_app_constraint_failed_f ctfailcb,
void *  app_key 
)

Definition at line 71 of file UTF8String.c.

References _ASN_CTFAIL, asn_TYPE_descriptor_s::name, U8E_EINVAL, U8E_ILLSTART, U8E_NOTCONT, U8E_NOTMIN, U8E_TRUNC, and UTF8String_length().

Here is the call graph for this function:

◆ UTF8String_length()

ssize_t UTF8String_length ( const UTF8String_t st)

Definition at line 153 of file UTF8String.c.

References OCTET_STRING::buf, U8E_EINVAL, and UTF8String__process().

Referenced by memb_companyName_constraint_1(), and UTF8String_constraint().

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

◆ UTF8String_print()

int UTF8String_print ( asn_TYPE_descriptor_t td,
const void *  sptr,
int  ilevel,
asn_app_consume_bytes_f cb,
void *  app_key 
)

Definition at line 172 of file UTF8String.c.

References OCTET_STRING::buf, and OCTET_STRING::size.

◆ UTF8String_to_wcs()

size_t UTF8String_to_wcs ( const UTF8String_t st,
uint32_t *  dst,
size_t  dstlen 
)

Definition at line 162 of file UTF8String.c.

References OCTET_STRING::buf, and UTF8String__process().

Here is the call graph for this function:

Variable Documentation

◆ asn_DEF_UTF8String

asn_TYPE_descriptor_t asn_DEF_UTF8String
Initial value:
= {
"UTF8String",
"UTF8String",
0,
/ sizeof(asn_DEF_UTF8String_tags[0]) - 1,
0,
0, 0,
0
}
per_type_decoder_f OCTET_STRING_decode_uper
Definition: OCTET_STRING.h:33
per_type_encoder_f OCTET_STRING_encode_uper
Definition: OCTET_STRING.h:34
xer_type_decoder_f OCTET_STRING_decode_xer_utf8
Definition: OCTET_STRING.h:30
asn_struct_free_f OCTET_STRING_free
Definition: OCTET_STRING.h:23
static ber_tlv_tag_t asn_DEF_UTF8String_tags[]
Definition: UTF8String.c:12
int UTF8String_constraint(asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: UTF8String.c:71
int UTF8String_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key)
Definition: UTF8String.c:172
ber_type_decoder_f OCTET_STRING_decode_ber
Definition: OCTET_STRING.h:26
xer_type_encoder_f OCTET_STRING_encode_xer_utf8
Definition: OCTET_STRING.h:32
der_type_encoder_f OCTET_STRING_encode_der
Definition: OCTET_STRING.h:27

Definition at line 16 of file UTF8String.c.

◆ asn_DEF_UTF8String_tags

ber_tlv_tag_t asn_DEF_UTF8String_tags[]
static
Initial value:

Definition at line 12 of file UTF8String.c.

◆ UTF8String_ht

int UTF8String_ht[2][16]
static
Initial value:
= {
{
1, 1, 1, 1, 1, 1, 1, 1,
0, 0, 0, 0, 2, 2, 3, -1 },
{
4, 4, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 6, 6, -1, -1 }
}

Definition at line 44 of file UTF8String.c.

Referenced by UTF8String__process().

◆ UTF8String_mv

int32_t UTF8String_mv[7]
static
Initial value:
= { 0, 0,
0x00000080,
0x00000800,
0x00010000,
0x00200000,
0x04000000
}

Definition at line 55 of file UTF8String.c.

Referenced by UTF8String__process().