Vanetza
 
Loading...
Searching...
No Matches
HashedData.c
1/*
2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "IEEE1609dot2"
4 * found in "asn1/IEEE1609dot2.asn"
5 * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -R`
6 */
7
8#include "HashedData.h"
9
10static int
11memb_sha256HashedData_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
14 size_t size;
15
16 if(!sptr) {
17 ASN__CTFAIL(app_key, td, sptr,
18 "%s: value not given (%s:%d)",
19 td->name, __FILE__, __LINE__);
20 return -1;
21 }
22
23 size = st->size;
24
25 if((size == 32UL)) {
26 /* Constraint check succeeded */
27 return 0;
28 } else {
29 ASN__CTFAIL(app_key, td, sptr,
30 "%s: constraint failed (%s:%d)",
31 td->name, __FILE__, __LINE__);
32 return -1;
33 }
34}
35
36#if !defined(ASN_DISABLE_OER_SUPPORT)
37static asn_oer_constraints_t asn_OER_memb_sha256HashedData_constr_2 CC_NOTUSED = {
38 { 0, 0 },
39 32 /* (SIZE(32..32)) */};
40#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
41#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
42static asn_per_constraints_t asn_PER_memb_sha256HashedData_constr_2 CC_NOTUSED = {
43 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
44 { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */,
45 0, 0 /* No PER value map */
46};
47#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
48#if !defined(ASN_DISABLE_OER_SUPPORT)
49static asn_oer_constraints_t asn_OER_type_HashedData_constr_1 CC_NOTUSED = {
50 { 0, 0 },
51 -1};
52#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
53#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
54asn_per_constraints_t asn_PER_type_HashedData_constr_1 CC_NOTUSED = {
55 { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */,
56 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
57 0, 0 /* No PER value map */
58};
59#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
60asn_TYPE_member_t asn_MBR_HashedData_1[] = {
61 { ATF_NOFLAGS, 0, offsetof(struct HashedData, choice.sha256HashedData),
62 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
63 -1, /* IMPLICIT tag at current level */
64 &asn_DEF_OCTET_STRING,
65 0,
66 {
67#if !defined(ASN_DISABLE_OER_SUPPORT)
68 &asn_OER_memb_sha256HashedData_constr_2,
69#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
70#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
71 &asn_PER_memb_sha256HashedData_constr_2,
72#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
73 memb_sha256HashedData_constraint_1
74 },
75 0, 0, /* No default value */
76 "sha256HashedData"
77 },
78};
79static const asn_TYPE_tag2member_t asn_MAP_HashedData_tag2el_1[] = {
80 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* sha256HashedData */
81};
82asn_CHOICE_specifics_t asn_SPC_HashedData_specs_1 = {
83 sizeof(struct HashedData),
84 offsetof(struct HashedData, _asn_ctx),
85 offsetof(struct HashedData, present),
86 sizeof(((struct HashedData *)0)->present),
87 asn_MAP_HashedData_tag2el_1,
88 1, /* Count of tags in the map */
89 0, 0,
90 1 /* Extensions start */
91};
92asn_TYPE_descriptor_t asn_DEF_HashedData = {
93 "HashedData",
94 "HashedData",
95 &asn_OP_CHOICE,
96 0, /* No effective tags (pointer) */
97 0, /* No effective tags (count) */
98 0, /* No tags (pointer) */
99 0, /* No tags (count) */
100 {
101#if !defined(ASN_DISABLE_OER_SUPPORT)
102 &asn_OER_type_HashedData_constr_1,
103#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
104#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
105 &asn_PER_type_HashedData_constr_1,
106#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
107 CHOICE_constraint
108 },
109 asn_MBR_HashedData_1,
110 1, /* Elements count */
111 &asn_SPC_HashedData_specs_1 /* Additional specs */
112};
113