-
Notifications
You must be signed in to change notification settings - Fork 6
/
LDAPMessage.c
346 lines (342 loc) · 12.7 KB
/
LDAPMessage.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
/*
* Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
* From ASN.1 module "Lightweight-Directory-Access-Protocol-V3"
* found in "Lightweight-Directory-Access-Protocol-V3.asn1"
* `asn1c -fcompound-names`
*/
#include "LDAPMessage.h"
static asn_TYPE_member_t asn_MBR_protocolOp_3[] = {
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.bindRequest),
(ASN_TAG_CLASS_APPLICATION | (0 << 2)),
0,
&asn_DEF_BindRequest,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"bindRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.bindResponse),
(ASN_TAG_CLASS_APPLICATION | (1 << 2)),
0,
&asn_DEF_BindResponse,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"bindResponse"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.unbindRequest),
(ASN_TAG_CLASS_APPLICATION | (2 << 2)),
0,
&asn_DEF_UnbindRequest,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"unbindRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.searchRequest),
(ASN_TAG_CLASS_APPLICATION | (3 << 2)),
0,
&asn_DEF_SearchRequest,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"searchRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.searchResEntry),
(ASN_TAG_CLASS_APPLICATION | (4 << 2)),
0,
&asn_DEF_SearchResultEntry,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"searchResEntry"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.searchResDone),
(ASN_TAG_CLASS_APPLICATION | (5 << 2)),
0,
&asn_DEF_SearchResultDone,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"searchResDone"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.searchResRef),
(ASN_TAG_CLASS_APPLICATION | (19 << 2)),
0,
&asn_DEF_SearchResultReference,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"searchResRef"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.modifyRequest),
(ASN_TAG_CLASS_APPLICATION | (6 << 2)),
0,
&asn_DEF_ModifyRequest,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"modifyRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.modifyResponse),
(ASN_TAG_CLASS_APPLICATION | (7 << 2)),
0,
&asn_DEF_ModifyResponse,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"modifyResponse"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.addRequest),
(ASN_TAG_CLASS_APPLICATION | (8 << 2)),
0,
&asn_DEF_AddRequest,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"addRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.addResponse),
(ASN_TAG_CLASS_APPLICATION | (9 << 2)),
0,
&asn_DEF_AddResponse,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"addResponse"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.delRequest),
(ASN_TAG_CLASS_APPLICATION | (10 << 2)),
0,
&asn_DEF_DelRequest,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"delRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.delResponse),
(ASN_TAG_CLASS_APPLICATION | (11 << 2)),
0,
&asn_DEF_DelResponse,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"delResponse"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.modDNRequest),
(ASN_TAG_CLASS_APPLICATION | (12 << 2)),
0,
&asn_DEF_ModifyDNRequest,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"modDNRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.modDNResponse),
(ASN_TAG_CLASS_APPLICATION | (13 << 2)),
0,
&asn_DEF_ModifyDNResponse,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"modDNResponse"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.compareRequest),
(ASN_TAG_CLASS_APPLICATION | (14 << 2)),
0,
&asn_DEF_CompareRequest,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"compareRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.compareResponse),
(ASN_TAG_CLASS_APPLICATION | (15 << 2)),
0,
&asn_DEF_CompareResponse,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"compareResponse"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.abandonRequest),
(ASN_TAG_CLASS_APPLICATION | (16 << 2)),
0,
&asn_DEF_AbandonRequest,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"abandonRequest"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.extendedReq),
(ASN_TAG_CLASS_APPLICATION | (23 << 2)),
0,
&asn_DEF_ExtendedRequest,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"extendedReq"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.extendedResp),
(ASN_TAG_CLASS_APPLICATION | (24 << 2)),
0,
&asn_DEF_ExtendedResponse,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"extendedResp"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage__protocolOp, choice.intermediateResponse),
(ASN_TAG_CLASS_APPLICATION | (25 << 2)),
0,
&asn_DEF_IntermediateResponse,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"intermediateResponse"
},
};
static asn_TYPE_tag2member_t asn_MAP_protocolOp_tag2el_3[] = {
{ (ASN_TAG_CLASS_APPLICATION | (0 << 2)), 0, 0, 0 }, /* bindRequest at 19 */
{ (ASN_TAG_CLASS_APPLICATION | (1 << 2)), 1, 0, 0 }, /* bindResponse at 20 */
{ (ASN_TAG_CLASS_APPLICATION | (2 << 2)), 2, 0, 0 }, /* unbindRequest at 21 */
{ (ASN_TAG_CLASS_APPLICATION | (3 << 2)), 3, 0, 0 }, /* searchRequest at 22 */
{ (ASN_TAG_CLASS_APPLICATION | (4 << 2)), 4, 0, 0 }, /* searchResEntry at 23 */
{ (ASN_TAG_CLASS_APPLICATION | (5 << 2)), 5, 0, 0 }, /* searchResDone at 24 */
{ (ASN_TAG_CLASS_APPLICATION | (6 << 2)), 7, 0, 0 }, /* modifyRequest at 26 */
{ (ASN_TAG_CLASS_APPLICATION | (7 << 2)), 8, 0, 0 }, /* modifyResponse at 27 */
{ (ASN_TAG_CLASS_APPLICATION | (8 << 2)), 9, 0, 0 }, /* addRequest at 28 */
{ (ASN_TAG_CLASS_APPLICATION | (9 << 2)), 10, 0, 0 }, /* addResponse at 29 */
{ (ASN_TAG_CLASS_APPLICATION | (10 << 2)), 11, 0, 0 }, /* delRequest at 30 */
{ (ASN_TAG_CLASS_APPLICATION | (11 << 2)), 12, 0, 0 }, /* delResponse at 31 */
{ (ASN_TAG_CLASS_APPLICATION | (12 << 2)), 13, 0, 0 }, /* modDNRequest at 32 */
{ (ASN_TAG_CLASS_APPLICATION | (13 << 2)), 14, 0, 0 }, /* modDNResponse at 33 */
{ (ASN_TAG_CLASS_APPLICATION | (14 << 2)), 15, 0, 0 }, /* compareRequest at 34 */
{ (ASN_TAG_CLASS_APPLICATION | (15 << 2)), 16, 0, 0 }, /* compareResponse at 35 */
{ (ASN_TAG_CLASS_APPLICATION | (16 << 2)), 17, 0, 0 }, /* abandonRequest at 36 */
{ (ASN_TAG_CLASS_APPLICATION | (19 << 2)), 6, 0, 0 }, /* searchResRef at 25 */
{ (ASN_TAG_CLASS_APPLICATION | (23 << 2)), 18, 0, 0 }, /* extendedReq at 37 */
{ (ASN_TAG_CLASS_APPLICATION | (24 << 2)), 19, 0, 0 }, /* extendedResp at 38 */
{ (ASN_TAG_CLASS_APPLICATION | (25 << 2)), 20, 0, 0 } /* intermediateResponse at 40 */
};
static asn_CHOICE_specifics_t asn_SPC_protocolOp_specs_3 = {
sizeof(struct LDAPMessage__protocolOp),
offsetof(struct LDAPMessage__protocolOp, _asn_ctx),
offsetof(struct LDAPMessage__protocolOp, present),
sizeof(((struct LDAPMessage__protocolOp *)0)->present),
asn_MAP_protocolOp_tag2el_3,
21, /* Count of tags in the map */
0,
20 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_protocolOp_3 = {
"protocolOp",
"protocolOp",
CHOICE_free,
CHOICE_print,
CHOICE_constraint,
CHOICE_decode_ber,
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
0, 0, /* No PER support, use "-gen-PER" to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
0, /* No PER visible constraints */
asn_MBR_protocolOp_3,
21, /* Elements count */
&asn_SPC_protocolOp_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_LDAPMessage_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage, messageID),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_MessageID,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"messageID"
},
{ ATF_NOFLAGS, 0, offsetof(struct LDAPMessage, protocolOp),
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_protocolOp_3,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"protocolOp"
},
{ ATF_POINTER, 1, offsetof(struct LDAPMessage, controls),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Controls,
0, /* Defer constraints checking to the member type */
0, /* PER is not compiled, use -gen-PER */
0,
"controls"
},
};
static ber_tlv_tag_t asn_DEF_LDAPMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_TYPE_tag2member_t asn_MAP_LDAPMessage_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* messageID at 17 */
{ (ASN_TAG_CLASS_APPLICATION | (0 << 2)), 1, 0, 0 }, /* bindRequest at 19 */
{ (ASN_TAG_CLASS_APPLICATION | (1 << 2)), 1, 0, 0 }, /* bindResponse at 20 */
{ (ASN_TAG_CLASS_APPLICATION | (2 << 2)), 1, 0, 0 }, /* unbindRequest at 21 */
{ (ASN_TAG_CLASS_APPLICATION | (3 << 2)), 1, 0, 0 }, /* searchRequest at 22 */
{ (ASN_TAG_CLASS_APPLICATION | (4 << 2)), 1, 0, 0 }, /* searchResEntry at 23 */
{ (ASN_TAG_CLASS_APPLICATION | (5 << 2)), 1, 0, 0 }, /* searchResDone at 24 */
{ (ASN_TAG_CLASS_APPLICATION | (6 << 2)), 1, 0, 0 }, /* modifyRequest at 26 */
{ (ASN_TAG_CLASS_APPLICATION | (7 << 2)), 1, 0, 0 }, /* modifyResponse at 27 */
{ (ASN_TAG_CLASS_APPLICATION | (8 << 2)), 1, 0, 0 }, /* addRequest at 28 */
{ (ASN_TAG_CLASS_APPLICATION | (9 << 2)), 1, 0, 0 }, /* addResponse at 29 */
{ (ASN_TAG_CLASS_APPLICATION | (10 << 2)), 1, 0, 0 }, /* delRequest at 30 */
{ (ASN_TAG_CLASS_APPLICATION | (11 << 2)), 1, 0, 0 }, /* delResponse at 31 */
{ (ASN_TAG_CLASS_APPLICATION | (12 << 2)), 1, 0, 0 }, /* modDNRequest at 32 */
{ (ASN_TAG_CLASS_APPLICATION | (13 << 2)), 1, 0, 0 }, /* modDNResponse at 33 */
{ (ASN_TAG_CLASS_APPLICATION | (14 << 2)), 1, 0, 0 }, /* compareRequest at 34 */
{ (ASN_TAG_CLASS_APPLICATION | (15 << 2)), 1, 0, 0 }, /* compareResponse at 35 */
{ (ASN_TAG_CLASS_APPLICATION | (16 << 2)), 1, 0, 0 }, /* abandonRequest at 36 */
{ (ASN_TAG_CLASS_APPLICATION | (19 << 2)), 1, 0, 0 }, /* searchResRef at 25 */
{ (ASN_TAG_CLASS_APPLICATION | (23 << 2)), 1, 0, 0 }, /* extendedReq at 37 */
{ (ASN_TAG_CLASS_APPLICATION | (24 << 2)), 1, 0, 0 }, /* extendedResp at 38 */
{ (ASN_TAG_CLASS_APPLICATION | (25 << 2)), 1, 0, 0 }, /* intermediateResponse at 40 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 } /* controls at 41 */
};
static asn_SEQUENCE_specifics_t asn_SPC_LDAPMessage_specs_1 = {
sizeof(struct LDAPMessage),
offsetof(struct LDAPMessage, _asn_ctx),
asn_MAP_LDAPMessage_tag2el_1,
23, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
2, /* Start extensions */
4 /* Stop extensions */
};
asn_TYPE_descriptor_t asn_DEF_LDAPMessage = {
"LDAPMessage",
"LDAPMessage",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
SEQUENCE_decode_ber,
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
0, 0, /* No PER support, use "-gen-PER" to enable */
0, /* Use generic outmost tag fetcher */
asn_DEF_LDAPMessage_tags_1,
sizeof(asn_DEF_LDAPMessage_tags_1)
/sizeof(asn_DEF_LDAPMessage_tags_1[0]), /* 1 */
asn_DEF_LDAPMessage_tags_1, /* Same as above */
sizeof(asn_DEF_LDAPMessage_tags_1)
/sizeof(asn_DEF_LDAPMessage_tags_1[0]), /* 1 */
0, /* No PER visible constraints */
asn_MBR_LDAPMessage_1,
3, /* Elements count */
&asn_SPC_LDAPMessage_specs_1 /* Additional specs */
};