2
* Generated by asn1c-0.9.22.1409 (http://lionet.info/asn1c)
3
* From ASN.1 module "SPNEGO"
4
* found in "spnego.asn1"
5
* `asn1c -fnative-types -fskeletons-copy -fcompound-names`
8
#include <asn_internal.h>
10
#include "NegTokenResp.h"
13
negState_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
14
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
15
/* Replace with underlying type checker */
16
td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
17
return td->check_constraints(td, sptr, ctfailcb, app_key);
21
* This type is implemented using NativeEnumerated,
22
* so here we adjust the DEF accordingly.
25
negState_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
26
td->free_struct = asn_DEF_NativeEnumerated.free_struct;
27
td->print_struct = asn_DEF_NativeEnumerated.print_struct;
28
td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
29
td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
30
td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
31
td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
32
td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
33
td->uper_encoder = asn_DEF_NativeEnumerated.uper_encoder;
34
if(!td->per_constraints)
35
td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
36
td->elements = asn_DEF_NativeEnumerated.elements;
37
td->elements_count = asn_DEF_NativeEnumerated.elements_count;
38
/* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
42
negState_2_free(asn_TYPE_descriptor_t *td,
43
void *struct_ptr, int contents_only) {
44
negState_2_inherit_TYPE_descriptor(td);
45
td->free_struct(td, struct_ptr, contents_only);
49
negState_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
50
int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
51
negState_2_inherit_TYPE_descriptor(td);
52
return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
56
negState_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
57
void **structure, const void *bufptr, size_t size, int tag_mode) {
58
negState_2_inherit_TYPE_descriptor(td);
59
return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
63
negState_2_encode_der(asn_TYPE_descriptor_t *td,
64
void *structure, int tag_mode, ber_tlv_tag_t tag,
65
asn_app_consume_bytes_f *cb, void *app_key) {
66
negState_2_inherit_TYPE_descriptor(td);
67
return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
71
negState_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
72
void **structure, const char *opt_mname, const void *bufptr, size_t size) {
73
negState_2_inherit_TYPE_descriptor(td);
74
return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
78
negState_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
79
int ilevel, enum xer_encoder_flags_e flags,
80
asn_app_consume_bytes_f *cb, void *app_key) {
81
negState_2_inherit_TYPE_descriptor(td);
82
return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
85
static asn_INTEGER_enum_map_t asn_MAP_negState_value2enum_2[] = {
86
{ 0, 16, "accept-completed" },
87
{ 1, 17, "accept-incomplete" },
89
{ 3, 11, "request-mic" }
91
static unsigned int asn_MAP_negState_enum2value_2[] = {
92
0, /* accept-completed(0) */
93
1, /* accept-incomplete(1) */
95
3 /* request-mic(3) */
97
static asn_INTEGER_specifics_t asn_SPC_negState_specs_2 = {
98
asn_MAP_negState_value2enum_2, /* "tag" => N; sorted by tag */
99
asn_MAP_negState_enum2value_2, /* N => "tag"; sorted by N */
100
4, /* Number of elements in the maps */
101
0, /* Enumeration is not extensible */
102
1, /* Strict enumeration */
103
0, /* Native long size */
106
static ber_tlv_tag_t asn_DEF_negState_tags_2[] = {
107
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
108
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
110
static /* Use -fall-defs-global to expose */
111
asn_TYPE_descriptor_t asn_DEF_negState_2 = {
116
negState_2_constraint,
117
negState_2_decode_ber,
118
negState_2_encode_der,
119
negState_2_decode_xer,
120
negState_2_encode_xer,
121
0, 0, /* No PER support, use "-gen-PER" to enable */
122
0, /* Use generic outmost tag fetcher */
123
asn_DEF_negState_tags_2,
124
sizeof(asn_DEF_negState_tags_2)
125
/sizeof(asn_DEF_negState_tags_2[0]), /* 2 */
126
asn_DEF_negState_tags_2, /* Same as above */
127
sizeof(asn_DEF_negState_tags_2)
128
/sizeof(asn_DEF_negState_tags_2[0]), /* 2 */
129
0, /* No PER visible constraints */
130
0, 0, /* Defined elsewhere */
131
&asn_SPC_negState_specs_2 /* Additional specs */
134
static asn_TYPE_member_t asn_MBR_NegTokenResp_1[] = {
135
{ ATF_POINTER, 4, offsetof(struct NegTokenResp, negState),
136
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
137
+1, /* EXPLICIT tag at current level */
139
0, /* Defer constraints checking to the member type */
140
0, /* PER is not compiled, use -gen-PER */
144
{ ATF_POINTER, 3, offsetof(struct NegTokenResp, supportedMech),
145
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
146
+1, /* EXPLICIT tag at current level */
148
0, /* Defer constraints checking to the member type */
149
0, /* PER is not compiled, use -gen-PER */
153
{ ATF_POINTER, 2, offsetof(struct NegTokenResp, responseToken),
154
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
155
+1, /* EXPLICIT tag at current level */
156
&asn_DEF_OCTET_STRING,
157
0, /* Defer constraints checking to the member type */
158
0, /* PER is not compiled, use -gen-PER */
162
{ ATF_POINTER, 1, offsetof(struct NegTokenResp, mechListMIC),
163
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
164
+1, /* EXPLICIT tag at current level */
165
&asn_DEF_OCTET_STRING,
166
0, /* Defer constraints checking to the member type */
167
0, /* PER is not compiled, use -gen-PER */
172
static ber_tlv_tag_t asn_DEF_NegTokenResp_tags_1[] = {
173
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
175
static asn_TYPE_tag2member_t asn_MAP_NegTokenResp_tag2el_1[] = {
176
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* negState at 46 */
177
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* supportedMech at 51 */
178
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* responseToken at 52 */
179
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* mechListMIC at 53 */
181
static asn_SEQUENCE_specifics_t asn_SPC_NegTokenResp_specs_1 = {
182
sizeof(struct NegTokenResp),
183
offsetof(struct NegTokenResp, _asn_ctx),
184
asn_MAP_NegTokenResp_tag2el_1,
185
4, /* Count of tags in the map */
186
0, 0, 0, /* Optional elements (not needed) */
187
-1, /* Start extensions */
188
-1 /* Stop extensions */
190
asn_TYPE_descriptor_t asn_DEF_NegTokenResp = {
200
0, 0, /* No PER support, use "-gen-PER" to enable */
201
0, /* Use generic outmost tag fetcher */
202
asn_DEF_NegTokenResp_tags_1,
203
sizeof(asn_DEF_NegTokenResp_tags_1)
204
/sizeof(asn_DEF_NegTokenResp_tags_1[0]), /* 1 */
205
asn_DEF_NegTokenResp_tags_1, /* Same as above */
206
sizeof(asn_DEF_NegTokenResp_tags_1)
207
/sizeof(asn_DEF_NegTokenResp_tags_1[0]), /* 1 */
208
0, /* No PER visible constraints */
209
asn_MBR_NegTokenResp_1,
210
4, /* Elements count */
211
&asn_SPC_NegTokenResp_specs_1 /* Additional specs */