Coverage Report

Created: 2026-08-17 06:12

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/open5gs/lib/asn1c/ngap/NGAP_AMFNameUTF8String.c
Line
Count
Source
1
/*
2
 * Generated by asn1c-v1.4-43-gb7926896-2026-05-03 (https://github.com/mouse07410/asn1c)
3
 * From ASN.1 module "NGAP-IEs"
4
 *  found in "../support/ngap-r19.2.0/38413-j20.asn"
5
 *  `asn1c -pdu=all -fprefix=NGAP_ -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-JER -no-gen-CBOR -no-gen-OER -no-gen-UPER`
6
 */
7
8
#include "NGAP_AMFNameUTF8String.h"
9
10
int
11
NGAP_AMFNameUTF8String_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
12
0
      asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13
0
  const UTF8String_t *st = (const UTF8String_t *)sptr;
14
0
  size_t size;
15
  
16
0
  if(!sptr) {
17
0
    ASN__CTFAIL(app_key, td, sptr,
18
0
      "%s: value not given (%s:%d)",
19
0
      td->name, __FILE__, __LINE__);
20
0
    return -1;
21
0
  }
22
  
23
0
  size = UTF8String_length(st);
24
0
  if((ssize_t)size < 0) {
25
0
    ASN__CTFAIL(app_key, td, sptr,
26
0
      "%s: UTF-8: broken encoding (%s:%d)",
27
0
      td->name, __FILE__, __LINE__);
28
0
    return -1;
29
0
  }
30
  
31
0
  if((size >= 1UL && size <= 150UL)) {
32
    /* Constraint check succeeded */
33
0
    return 0;
34
0
  } else {
35
0
    ASN__CTFAIL(app_key, td, sptr,
36
0
      "%s: constraint failed (%s:%d)",
37
0
      td->name, __FILE__, __LINE__);
38
0
    return -1;
39
0
  }
40
0
}
41
42
/*
43
 * This type is implemented using UTF8String,
44
 * so here we adjust the DEF accordingly.
45
 */
46
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
47
asn_per_constraints_t asn_PER_type_NGAP_AMFNameUTF8String_constr_1 CC_NOTUSED = {
48
  { APC_UNCONSTRAINED,  -1, -1,  0,  0 },
49
  { APC_CONSTRAINED | APC_EXTENSIBLE,  8,  8,  1,  150 }  /* (SIZE(1..150,...)) */,
50
  0, 0  /* No PER value map */
51
};
52
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
53
static const ber_tlv_tag_t asn_DEF_NGAP_AMFNameUTF8String_tags_1[] = {
54
  (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
55
};
56
asn_TYPE_descriptor_t asn_DEF_NGAP_AMFNameUTF8String = {
57
  "AMFNameUTF8String",
58
  "AMFNameUTF8String",
59
  &asn_OP_UTF8String,
60
  asn_DEF_NGAP_AMFNameUTF8String_tags_1,
61
  sizeof(asn_DEF_NGAP_AMFNameUTF8String_tags_1)
62
    /sizeof(asn_DEF_NGAP_AMFNameUTF8String_tags_1[0]), /* 1 */
63
  asn_DEF_NGAP_AMFNameUTF8String_tags_1,  /* Same as above */
64
  sizeof(asn_DEF_NGAP_AMFNameUTF8String_tags_1)
65
    /sizeof(asn_DEF_NGAP_AMFNameUTF8String_tags_1[0]), /* 1 */
66
  {
67
#if !defined(ASN_DISABLE_OER_SUPPORT)
68
    0,
69
#endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
70
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
71
    &asn_PER_type_NGAP_AMFNameUTF8String_constr_1,
72
#endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
73
#if !defined(ASN_DISABLE_JER_SUPPORT)
74
    0,
75
#endif  /* !defined(ASN_DISABLE_JER_SUPPORT) */
76
    NGAP_AMFNameUTF8String_constraint
77
  },
78
  0, 0, /* No members */
79
  0 /* No specifics */
80
};
81