#include <epan/conversation.h> and/or #include <epan/emem.h> not req'd ...
[obnox/wireshark/wip.git] / epan / dissectors / packet-s4406.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler   */
3 /* packet-s4406.c                                                             */
4 /* ../../tools/asn2wrs.py -b -p s4406 -c s4406.cnf -s packet-s4406-template s4406.asn */
5
6 /* Input file: packet-s4406-template.c */
7
8 #line 1 "packet-s4406-template.c"
9 /* packet-s4406.c
10  * Routines for STANAG 4406 (X.400 Military Message Extensions)  packet dissection
11  * Graeme Lunt 2005
12  *
13  * $Id$
14  *
15  * Wireshark - Network traffic analyzer
16  * By Gerald Combs <gerald@wireshark.org>
17  * Copyright 1998 Gerald Combs
18  *
19  * This program is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU General Public License
21  * as published by the Free Software Foundation; either version 2
22  * of the License, or (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program; if not, write to the Free Software
31  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
32  */
33
34 #ifdef HAVE_CONFIG_H
35 # include "config.h"
36 #endif
37
38 #include <glib.h>
39 #include <epan/packet.h>
40 #include <epan/asn1.h>
41
42 #include <stdio.h>
43 #include <string.h>
44
45 #include "packet-ber.h"
46
47 #include "packet-x509if.h"
48
49 #include "packet-s4406.h"
50 #include "packet-x411.h" 
51 #include "packet-x420.h" 
52
53 #define PNAME  "STANAG 4406 Military Message"
54 #define PSNAME "STANAG 4406"
55 #define PFNAME "s4406"
56
57 /* Initialize the protocol and registered fields */
58 int proto_s4406 = -1;
59
60
61 /*--- Included file: packet-s4406-hf.c ---*/
62 #line 1 "packet-s4406-hf.c"
63 static int hf_s4406_InformationObject_PDU = -1;   /* InformationObject */
64 static int hf_s4406_MMMessageData_PDU = -1;       /* MMMessageData */
65 static int hf_s4406_MMMessageParameters_PDU = -1;  /* MMMessageParameters */
66 static int hf_s4406_ExemptedAddressSeq_PDU = -1;  /* ExemptedAddressSeq */
67 static int hf_s4406_ExtendedAuthorisationInfo_PDU = -1;  /* ExtendedAuthorisationInfo */
68 static int hf_s4406_DistributionCodes_PDU = -1;   /* DistributionCodes */
69 static int hf_s4406_HandlingInstructions_PDU = -1;  /* HandlingInstructions */
70 static int hf_s4406_MessageInstructions_PDU = -1;  /* MessageInstructions */
71 static int hf_s4406_CodressMessage_PDU = -1;      /* CodressMessage */
72 static int hf_s4406_OriginatorReference_PDU = -1;  /* OriginatorReference */
73 static int hf_s4406_PrimaryPrecedence_PDU = -1;   /* PrimaryPrecedence */
74 static int hf_s4406_CopyPrecedence_PDU = -1;      /* CopyPrecedence */
75 static int hf_s4406_MessageType_PDU = -1;         /* MessageType */
76 static int hf_s4406_AddressListDesignatorSeq_PDU = -1;  /* AddressListDesignatorSeq */
77 static int hf_s4406_OtherRecipientDesignatorSeq_PDU = -1;  /* OtherRecipientDesignatorSeq */
78 static int hf_s4406_PilotInformationSeq_PDU = -1;  /* PilotInformationSeq */
79 static int hf_s4406_Acp127MessageIdentifier_PDU = -1;  /* Acp127MessageIdentifier */
80 static int hf_s4406_OriginatorPlad_PDU = -1;      /* OriginatorPlad */
81 static int hf_s4406_Acp127NotificationType_PDU = -1;  /* Acp127NotificationType */
82 static int hf_s4406_SecurityInformationLabels_PDU = -1;  /* SecurityInformationLabels */
83 static int hf_s4406_PriorityLevelQualifier_PDU = -1;  /* PriorityLevelQualifier */
84 static int hf_s4406_mm = -1;                      /* IPM */
85 static int hf_s4406_mn = -1;                      /* IPN */
86 static int hf_s4406_ExemptedAddressSeq_item = -1;  /* ExemptedAddress */
87 static int hf_s4406_sics = -1;                    /* SEQUENCE_OF_Sic */
88 static int hf_s4406_sics_item = -1;               /* Sic */
89 static int hf_s4406_dist_Extensions = -1;         /* SEQUENCE_OF_DistributionExtensionField */
90 static int hf_s4406_dist_Extensions_item = -1;    /* DistributionExtensionField */
91 static int hf_s4406_dist_type = -1;               /* OBJECT_IDENTIFIER */
92 static int hf_s4406_dist_value = -1;              /* T_dist_value */
93 static int hf_s4406_HandlingInstructions_item = -1;  /* MilitaryString */
94 static int hf_s4406_MessageInstructions_item = -1;  /* MilitaryString */
95 static int hf_s4406_message_type_type = -1;       /* TypeMessage */
96 static int hf_s4406_identifier = -1;              /* MessageIdentifier */
97 static int hf_s4406_AddressListDesignatorSeq_item = -1;  /* AddressListDesignator */
98 static int hf_s4406_address_list_type = -1;       /* AddressListType */
99 static int hf_s4406_listName = -1;                /* ORDescriptor */
100 static int hf_s4406_notificationRequest = -1;     /* AddressListRequest */
101 static int hf_s4406_replyRequest = -1;            /* AddressListRequest */
102 static int hf_s4406_OtherRecipientDesignatorSeq_item = -1;  /* OtherRecipientDesignator */
103 static int hf_s4406_other_recipient_type = -1;    /* OtherRecipientType */
104 static int hf_s4406_designator = -1;              /* MilitaryString */
105 static int hf_s4406_PilotInformationSeq_item = -1;  /* PilotInformation */
106 static int hf_s4406_pilotPrecedence = -1;         /* PilotPrecedence */
107 static int hf_s4406_pilotRecipient = -1;          /* SEQUENCE_OF_ORDescriptor */
108 static int hf_s4406_pilotRecipient_item = -1;     /* ORDescriptor */
109 static int hf_s4406_pilotSecurity = -1;           /* SecurityLabel */
110 static int hf_s4406_pilotHandling = -1;           /* SEQUENCE_OF_MilitaryString */
111 static int hf_s4406_pilotHandling_item = -1;      /* MilitaryString */
112 static int hf_s4406_content_security_label = -1;  /* SecurityLabel */
113 static int hf_s4406_heading_security_label = -1;  /* SecurityLabel */
114 static int hf_s4406_body_part_security_labels = -1;  /* SEQUENCE_OF_BodyPartSecurityLabel */
115 static int hf_s4406_body_part_security_labels_item = -1;  /* BodyPartSecurityLabel */
116 static int hf_s4406_body_part_security_label = -1;  /* SecurityLabel */
117 static int hf_s4406_body_part_sequence_number = -1;  /* BodyPartSequenceNumber */
118 /* named bits */
119 static int hf_s4406_Acp127NotificationType_negative = -1;
120 static int hf_s4406_Acp127NotificationType_positive = -1;
121 static int hf_s4406_Acp127NotificationType_transfer = -1;
122
123 /*--- End of included file: packet-s4406-hf.c ---*/
124 #line 53 "packet-s4406-template.c"
125
126 /* Initialize the subtree pointers */
127 static gint ett_s4406 = -1;
128
129 /*--- Included file: packet-s4406-ett.c ---*/
130 #line 1 "packet-s4406-ett.c"
131 static gint ett_s4406_InformationObject = -1;
132 static gint ett_s4406_ExemptedAddressSeq = -1;
133 static gint ett_s4406_DistributionCodes = -1;
134 static gint ett_s4406_SEQUENCE_OF_Sic = -1;
135 static gint ett_s4406_SEQUENCE_OF_DistributionExtensionField = -1;
136 static gint ett_s4406_DistributionExtensionField = -1;
137 static gint ett_s4406_HandlingInstructions = -1;
138 static gint ett_s4406_MessageInstructions = -1;
139 static gint ett_s4406_MessageType = -1;
140 static gint ett_s4406_AddressListDesignatorSeq = -1;
141 static gint ett_s4406_AddressListDesignator = -1;
142 static gint ett_s4406_OtherRecipientDesignatorSeq = -1;
143 static gint ett_s4406_OtherRecipientDesignator = -1;
144 static gint ett_s4406_PilotInformationSeq = -1;
145 static gint ett_s4406_PilotInformation = -1;
146 static gint ett_s4406_SEQUENCE_OF_ORDescriptor = -1;
147 static gint ett_s4406_SEQUENCE_OF_MilitaryString = -1;
148 static gint ett_s4406_Acp127NotificationType = -1;
149 static gint ett_s4406_SecurityInformationLabels = -1;
150 static gint ett_s4406_SEQUENCE_OF_BodyPartSecurityLabel = -1;
151 static gint ett_s4406_BodyPartSecurityLabel = -1;
152
153 /*--- End of included file: packet-s4406-ett.c ---*/
154 #line 57 "packet-s4406-template.c"
155
156
157 /*--- Included file: packet-s4406-fn.c ---*/
158 #line 1 "packet-s4406-fn.c"
159
160 static const value_string s4406_InformationObject_vals[] = {
161   {   0, "mm" },
162   {   1, "mn" },
163   { 0, NULL }
164 };
165
166 static const ber_choice_t InformationObject_choice[] = {
167   {   0, &hf_s4406_mm            , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_x420_IPM },
168   {   1, &hf_s4406_mn            , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_x420_IPN },
169   { 0, NULL, 0, 0, 0, NULL }
170 };
171
172 static int
173 dissect_s4406_InformationObject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
174   offset = dissect_ber_choice(actx, tree, tvb, offset,
175                                  InformationObject_choice, hf_index, ett_s4406_InformationObject,
176                                  NULL);
177
178   return offset;
179 }
180
181
182
183 static int
184 dissect_s4406_MMMessageData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
185   offset = dissect_x420_IPM(implicit_tag, tvb, offset, actx, tree, hf_index);
186
187   return offset;
188 }
189
190
191
192 static int
193 dissect_s4406_MMMessageParameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
194   offset = dissect_x420_MessageParameters(implicit_tag, tvb, offset, actx, tree, hf_index);
195
196   return offset;
197 }
198
199
200
201 static int
202 dissect_s4406_ExemptedAddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
203   offset = dissect_x420_ORDescriptor(implicit_tag, tvb, offset, actx, tree, hf_index);
204
205   return offset;
206 }
207
208
209 static const ber_sequence_t ExemptedAddressSeq_sequence_of[1] = {
210   { &hf_s4406_ExemptedAddressSeq_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_s4406_ExemptedAddress },
211 };
212
213 static int
214 dissect_s4406_ExemptedAddressSeq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
215   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
216                                       ExemptedAddressSeq_sequence_of, hf_index, ett_s4406_ExemptedAddressSeq);
217
218   return offset;
219 }
220
221
222
223 static int
224 dissect_s4406_ExtendedAuthorisationInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
225   offset = dissect_ber_UTCTime(implicit_tag, actx, tree, tvb, offset, hf_index);
226
227   return offset;
228 }
229
230
231
232 static int
233 dissect_s4406_Sic(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
234   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
235                                             actx, tree, tvb, offset, hf_index,
236                                             NULL);
237
238   return offset;
239 }
240
241
242 static const ber_sequence_t SEQUENCE_OF_Sic_sequence_of[1] = {
243   { &hf_s4406_sics_item     , BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_s4406_Sic },
244 };
245
246 static int
247 dissect_s4406_SEQUENCE_OF_Sic(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
248   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
249                                       SEQUENCE_OF_Sic_sequence_of, hf_index, ett_s4406_SEQUENCE_OF_Sic);
250
251   return offset;
252 }
253
254
255
256 static int
257 dissect_s4406_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
258   offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
259
260   return offset;
261 }
262
263
264
265 static int
266 dissect_s4406_T_dist_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
267 #line 67 "s4406.cnf"
268 /* XXX: not implemented */
269
270
271
272   return offset;
273 }
274
275
276 static const ber_sequence_t DistributionExtensionField_sequence[] = {
277   { &hf_s4406_dist_type     , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_s4406_OBJECT_IDENTIFIER },
278   { &hf_s4406_dist_value    , BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_s4406_T_dist_value },
279   { NULL, 0, 0, 0, NULL }
280 };
281
282 static int
283 dissect_s4406_DistributionExtensionField(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
284   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
285                                    DistributionExtensionField_sequence, hf_index, ett_s4406_DistributionExtensionField);
286
287   return offset;
288 }
289
290
291 static const ber_sequence_t SEQUENCE_OF_DistributionExtensionField_sequence_of[1] = {
292   { &hf_s4406_dist_Extensions_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_s4406_DistributionExtensionField },
293 };
294
295 static int
296 dissect_s4406_SEQUENCE_OF_DistributionExtensionField(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
297   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
298                                       SEQUENCE_OF_DistributionExtensionField_sequence_of, hf_index, ett_s4406_SEQUENCE_OF_DistributionExtensionField);
299
300   return offset;
301 }
302
303
304 static const ber_sequence_t DistributionCodes_set[] = {
305   { &hf_s4406_sics          , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_s4406_SEQUENCE_OF_Sic },
306   { &hf_s4406_dist_Extensions, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_s4406_SEQUENCE_OF_DistributionExtensionField },
307   { NULL, 0, 0, 0, NULL }
308 };
309
310 static int
311 dissect_s4406_DistributionCodes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
312   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
313                               DistributionCodes_set, hf_index, ett_s4406_DistributionCodes);
314
315   return offset;
316 }
317
318
319
320 static int
321 dissect_s4406_MilitaryString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
322   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
323                                             actx, tree, tvb, offset, hf_index,
324                                             NULL);
325
326   return offset;
327 }
328
329
330 static const ber_sequence_t HandlingInstructions_sequence_of[1] = {
331   { &hf_s4406_HandlingInstructions_item, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_s4406_MilitaryString },
332 };
333
334 static int
335 dissect_s4406_HandlingInstructions(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
336   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
337                                       HandlingInstructions_sequence_of, hf_index, ett_s4406_HandlingInstructions);
338
339   return offset;
340 }
341
342
343 static const ber_sequence_t MessageInstructions_sequence_of[1] = {
344   { &hf_s4406_MessageInstructions_item, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_s4406_MilitaryString },
345 };
346
347 static int
348 dissect_s4406_MessageInstructions(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
349   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
350                                       MessageInstructions_sequence_of, hf_index, ett_s4406_MessageInstructions);
351
352   return offset;
353 }
354
355
356
357 static int
358 dissect_s4406_CodressMessage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
359   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
360                                                 NULL);
361
362   return offset;
363 }
364
365
366
367 static int
368 dissect_s4406_OriginatorReference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
369   offset = dissect_s4406_MilitaryString(implicit_tag, tvb, offset, actx, tree, hf_index);
370
371   return offset;
372 }
373
374
375 static const value_string s4406_PrimaryPrecedence_vals[] = {
376   {   0, "deferred" },
377   {   1, "routine" },
378   {   2, "priority" },
379   {   3, "immediate" },
380   {   4, "flash" },
381   {   5, "override" },
382   {  16, "ecp" },
383   {  17, "critic" },
384   {  18, "override" },
385   { 0, NULL }
386 };
387
388
389 static int
390 dissect_s4406_PrimaryPrecedence(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
391 #line 72 "s4406.cnf"
392   int precedence = -1;
393     offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
394                                                 &precedence);
395
396   if((precedence != -1) && check_col(actx->pinfo->cinfo, COL_INFO))
397    col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (primary=%s)", val_to_str(precedence, s4406_PrimaryPrecedence_vals, "precedence(%d)"));
398
399
400
401   return offset;
402 }
403
404
405 static const value_string s4406_CopyPrecedence_vals[] = {
406   {   0, "deferred" },
407   {   1, "routine" },
408   {   2, "priority" },
409   {   3, "immediate" },
410   {   4, "flash" },
411   {   5, "override" },
412   {  16, "ecp" },
413   {  17, "critic" },
414   {  18, "override" },
415   { 0, NULL }
416 };
417
418
419 static int
420 dissect_s4406_CopyPrecedence(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
421 #line 80 "s4406.cnf"
422   int precedence = -1;
423     offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
424                                                 &precedence);
425
426   if((precedence != -1) && check_col(actx->pinfo->cinfo, COL_INFO))
427    col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (copy=%s)", val_to_str(precedence, s4406_CopyPrecedence_vals, "precedence(%d)"));
428
429
430   return offset;
431 }
432
433
434 static const value_string s4406_TypeMessage_vals[] = {
435   {   0, "exercise" },
436   {   1, "operation" },
437   {   2, "project" },
438   {   3, "drill" },
439   { 0, NULL }
440 };
441
442
443 static int
444 dissect_s4406_TypeMessage(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
445   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
446                                                 NULL);
447
448   return offset;
449 }
450
451
452
453 static int
454 dissect_s4406_MessageIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
455   offset = dissect_s4406_MilitaryString(implicit_tag, tvb, offset, actx, tree, hf_index);
456
457   return offset;
458 }
459
460
461 static const ber_sequence_t MessageType_set[] = {
462   { &hf_s4406_message_type_type, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_s4406_TypeMessage },
463   { &hf_s4406_identifier    , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_s4406_MessageIdentifier },
464   { NULL, 0, 0, 0, NULL }
465 };
466
467 static int
468 dissect_s4406_MessageType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
469   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
470                               MessageType_set, hf_index, ett_s4406_MessageType);
471
472   return offset;
473 }
474
475
476 static const value_string s4406_AddressListType_vals[] = {
477   {   0, "primaryAddressList" },
478   {   1, "copyAddressList" },
479   { 0, NULL }
480 };
481
482
483 static int
484 dissect_s4406_AddressListType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
485   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
486                                                 NULL);
487
488   return offset;
489 }
490
491
492 static const value_string s4406_AddressListRequest_vals[] = {
493   {   0, "action" },
494   {   1, "info" },
495   {   2, "both" },
496   { 0, NULL }
497 };
498
499
500 static int
501 dissect_s4406_AddressListRequest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
502   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
503                                                 NULL);
504
505   return offset;
506 }
507
508
509 static const ber_sequence_t AddressListDesignator_set[] = {
510   { &hf_s4406_address_list_type, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_s4406_AddressListType },
511   { &hf_s4406_listName      , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_x420_ORDescriptor },
512   { &hf_s4406_notificationRequest, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_s4406_AddressListRequest },
513   { &hf_s4406_replyRequest  , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_s4406_AddressListRequest },
514   { NULL, 0, 0, 0, NULL }
515 };
516
517 static int
518 dissect_s4406_AddressListDesignator(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
519   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
520                               AddressListDesignator_set, hf_index, ett_s4406_AddressListDesignator);
521
522   return offset;
523 }
524
525
526 static const ber_sequence_t AddressListDesignatorSeq_sequence_of[1] = {
527   { &hf_s4406_AddressListDesignatorSeq_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_s4406_AddressListDesignator },
528 };
529
530 static int
531 dissect_s4406_AddressListDesignatorSeq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
532   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
533                                       AddressListDesignatorSeq_sequence_of, hf_index, ett_s4406_AddressListDesignatorSeq);
534
535   return offset;
536 }
537
538
539 static const value_string s4406_OtherRecipientType_vals[] = {
540   {   0, "primary" },
541   {   1, "copy" },
542   { 0, NULL }
543 };
544
545
546 static int
547 dissect_s4406_OtherRecipientType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
548   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
549                                                 NULL);
550
551   return offset;
552 }
553
554
555 static const ber_sequence_t OtherRecipientDesignator_set[] = {
556   { &hf_s4406_other_recipient_type, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_s4406_OtherRecipientType },
557   { &hf_s4406_designator    , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_s4406_MilitaryString },
558   { NULL, 0, 0, 0, NULL }
559 };
560
561 static int
562 dissect_s4406_OtherRecipientDesignator(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
563   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
564                               OtherRecipientDesignator_set, hf_index, ett_s4406_OtherRecipientDesignator);
565
566   return offset;
567 }
568
569
570 static const ber_sequence_t OtherRecipientDesignatorSeq_sequence_of[1] = {
571   { &hf_s4406_OtherRecipientDesignatorSeq_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_s4406_OtherRecipientDesignator },
572 };
573
574 static int
575 dissect_s4406_OtherRecipientDesignatorSeq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
576   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
577                                       OtherRecipientDesignatorSeq_sequence_of, hf_index, ett_s4406_OtherRecipientDesignatorSeq);
578
579   return offset;
580 }
581
582
583 static const value_string s4406_PilotPrecedence_vals[] = {
584   {   0, "deferred" },
585   {   1, "routine" },
586   {   2, "priority" },
587   {   3, "immediate" },
588   {   4, "flash" },
589   {   5, "override" },
590   {  16, "ecp" },
591   {  17, "critic" },
592   {  18, "override" },
593   { 0, NULL }
594 };
595
596
597 static int
598 dissect_s4406_PilotPrecedence(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
599   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
600                                                 NULL);
601
602   return offset;
603 }
604
605
606 static const ber_sequence_t SEQUENCE_OF_ORDescriptor_sequence_of[1] = {
607   { &hf_s4406_pilotRecipient_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_x420_ORDescriptor },
608 };
609
610 static int
611 dissect_s4406_SEQUENCE_OF_ORDescriptor(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
612   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
613                                       SEQUENCE_OF_ORDescriptor_sequence_of, hf_index, ett_s4406_SEQUENCE_OF_ORDescriptor);
614
615   return offset;
616 }
617
618
619 static const ber_sequence_t SEQUENCE_OF_MilitaryString_sequence_of[1] = {
620   { &hf_s4406_pilotHandling_item, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_s4406_MilitaryString },
621 };
622
623 static int
624 dissect_s4406_SEQUENCE_OF_MilitaryString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
625   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
626                                       SEQUENCE_OF_MilitaryString_sequence_of, hf_index, ett_s4406_SEQUENCE_OF_MilitaryString);
627
628   return offset;
629 }
630
631
632 static const ber_sequence_t PilotInformation_sequence[] = {
633   { &hf_s4406_pilotPrecedence, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_s4406_PilotPrecedence },
634   { &hf_s4406_pilotRecipient, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_s4406_SEQUENCE_OF_ORDescriptor },
635   { &hf_s4406_pilotSecurity , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x411_SecurityLabel },
636   { &hf_s4406_pilotHandling , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_s4406_SEQUENCE_OF_MilitaryString },
637   { NULL, 0, 0, 0, NULL }
638 };
639
640 static int
641 dissect_s4406_PilotInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
642   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
643                                    PilotInformation_sequence, hf_index, ett_s4406_PilotInformation);
644
645   return offset;
646 }
647
648
649 static const ber_sequence_t PilotInformationSeq_sequence_of[1] = {
650   { &hf_s4406_PilotInformationSeq_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_s4406_PilotInformation },
651 };
652
653 static int
654 dissect_s4406_PilotInformationSeq(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
655   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
656                                       PilotInformationSeq_sequence_of, hf_index, ett_s4406_PilotInformationSeq);
657
658   return offset;
659 }
660
661
662
663 static int
664 dissect_s4406_Acp127MessageIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
665   offset = dissect_s4406_MilitaryString(implicit_tag, tvb, offset, actx, tree, hf_index);
666
667   return offset;
668 }
669
670
671
672 static int
673 dissect_s4406_OriginatorPlad(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
674   offset = dissect_s4406_MilitaryString(implicit_tag, tvb, offset, actx, tree, hf_index);
675
676   return offset;
677 }
678
679
680 static const asn_namedbit Acp127NotificationType_bits[] = {
681   {  0, &hf_s4406_Acp127NotificationType_negative, -1, -1, "negative", NULL },
682   {  1, &hf_s4406_Acp127NotificationType_positive, -1, -1, "positive", NULL },
683   {  2, &hf_s4406_Acp127NotificationType_transfer, -1, -1, "transfer", NULL },
684   { 0, NULL, 0, 0, NULL, NULL }
685 };
686
687 static int
688 dissect_s4406_Acp127NotificationType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
689   offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
690                                     Acp127NotificationType_bits, hf_index, ett_s4406_Acp127NotificationType,
691                                     NULL);
692
693   return offset;
694 }
695
696
697
698 static int
699 dissect_s4406_BodyPartSequenceNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
700   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
701                                                 NULL);
702
703   return offset;
704 }
705
706
707 static const ber_sequence_t BodyPartSecurityLabel_set[] = {
708   { &hf_s4406_body_part_security_label, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_x411_SecurityLabel },
709   { &hf_s4406_body_part_sequence_number, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_s4406_BodyPartSequenceNumber },
710   { NULL, 0, 0, 0, NULL }
711 };
712
713 static int
714 dissect_s4406_BodyPartSecurityLabel(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
715   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
716                               BodyPartSecurityLabel_set, hf_index, ett_s4406_BodyPartSecurityLabel);
717
718   return offset;
719 }
720
721
722 static const ber_sequence_t SEQUENCE_OF_BodyPartSecurityLabel_sequence_of[1] = {
723   { &hf_s4406_body_part_security_labels_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_s4406_BodyPartSecurityLabel },
724 };
725
726 static int
727 dissect_s4406_SEQUENCE_OF_BodyPartSecurityLabel(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
728   offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
729                                       SEQUENCE_OF_BodyPartSecurityLabel_sequence_of, hf_index, ett_s4406_SEQUENCE_OF_BodyPartSecurityLabel);
730
731   return offset;
732 }
733
734
735 static const ber_sequence_t SecurityInformationLabels_sequence[] = {
736   { &hf_s4406_content_security_label, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_x411_SecurityLabel },
737   { &hf_s4406_heading_security_label, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x411_SecurityLabel },
738   { &hf_s4406_body_part_security_labels, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_s4406_SEQUENCE_OF_BodyPartSecurityLabel },
739   { NULL, 0, 0, 0, NULL }
740 };
741
742 static int
743 dissect_s4406_SecurityInformationLabels(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
744   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
745                                    SecurityInformationLabels_sequence, hf_index, ett_s4406_SecurityInformationLabels);
746
747   return offset;
748 }
749
750
751 static const value_string s4406_PriorityLevelQualifier_vals[] = {
752   {   0, "low" },
753   {   1, "high" },
754   { 0, NULL }
755 };
756
757
758 static int
759 dissect_s4406_PriorityLevelQualifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
760   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
761                                   NULL);
762
763   return offset;
764 }
765
766 /*--- PDUs ---*/
767
768 static void dissect_InformationObject_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
769   asn1_ctx_t asn1_ctx;
770   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
771   dissect_s4406_InformationObject(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_InformationObject_PDU);
772 }
773 static void dissect_MMMessageData_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
774   asn1_ctx_t asn1_ctx;
775   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
776   dissect_s4406_MMMessageData(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_MMMessageData_PDU);
777 }
778 static void dissect_MMMessageParameters_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
779   asn1_ctx_t asn1_ctx;
780   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
781   dissect_s4406_MMMessageParameters(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_MMMessageParameters_PDU);
782 }
783 static void dissect_ExemptedAddressSeq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
784   asn1_ctx_t asn1_ctx;
785   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
786   dissect_s4406_ExemptedAddressSeq(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_ExemptedAddressSeq_PDU);
787 }
788 static void dissect_ExtendedAuthorisationInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
789   asn1_ctx_t asn1_ctx;
790   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
791   dissect_s4406_ExtendedAuthorisationInfo(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_ExtendedAuthorisationInfo_PDU);
792 }
793 static void dissect_DistributionCodes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
794   asn1_ctx_t asn1_ctx;
795   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
796   dissect_s4406_DistributionCodes(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_DistributionCodes_PDU);
797 }
798 static void dissect_HandlingInstructions_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
799   asn1_ctx_t asn1_ctx;
800   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
801   dissect_s4406_HandlingInstructions(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_HandlingInstructions_PDU);
802 }
803 static void dissect_MessageInstructions_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
804   asn1_ctx_t asn1_ctx;
805   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
806   dissect_s4406_MessageInstructions(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_MessageInstructions_PDU);
807 }
808 static void dissect_CodressMessage_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
809   asn1_ctx_t asn1_ctx;
810   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
811   dissect_s4406_CodressMessage(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_CodressMessage_PDU);
812 }
813 static void dissect_OriginatorReference_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
814   asn1_ctx_t asn1_ctx;
815   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
816   dissect_s4406_OriginatorReference(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_OriginatorReference_PDU);
817 }
818 static void dissect_PrimaryPrecedence_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
819   asn1_ctx_t asn1_ctx;
820   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
821   dissect_s4406_PrimaryPrecedence(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_PrimaryPrecedence_PDU);
822 }
823 static void dissect_CopyPrecedence_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
824   asn1_ctx_t asn1_ctx;
825   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
826   dissect_s4406_CopyPrecedence(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_CopyPrecedence_PDU);
827 }
828 static void dissect_MessageType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
829   asn1_ctx_t asn1_ctx;
830   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
831   dissect_s4406_MessageType(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_MessageType_PDU);
832 }
833 static void dissect_AddressListDesignatorSeq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
834   asn1_ctx_t asn1_ctx;
835   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
836   dissect_s4406_AddressListDesignatorSeq(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_AddressListDesignatorSeq_PDU);
837 }
838 static void dissect_OtherRecipientDesignatorSeq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
839   asn1_ctx_t asn1_ctx;
840   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
841   dissect_s4406_OtherRecipientDesignatorSeq(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_OtherRecipientDesignatorSeq_PDU);
842 }
843 static void dissect_PilotInformationSeq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
844   asn1_ctx_t asn1_ctx;
845   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
846   dissect_s4406_PilotInformationSeq(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_PilotInformationSeq_PDU);
847 }
848 static void dissect_Acp127MessageIdentifier_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
849   asn1_ctx_t asn1_ctx;
850   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
851   dissect_s4406_Acp127MessageIdentifier(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_Acp127MessageIdentifier_PDU);
852 }
853 static void dissect_OriginatorPlad_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
854   asn1_ctx_t asn1_ctx;
855   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
856   dissect_s4406_OriginatorPlad(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_OriginatorPlad_PDU);
857 }
858 static void dissect_Acp127NotificationType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
859   asn1_ctx_t asn1_ctx;
860   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
861   dissect_s4406_Acp127NotificationType(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_Acp127NotificationType_PDU);
862 }
863 static void dissect_SecurityInformationLabels_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
864   asn1_ctx_t asn1_ctx;
865   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
866   dissect_s4406_SecurityInformationLabels(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_SecurityInformationLabels_PDU);
867 }
868 static void dissect_PriorityLevelQualifier_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
869   asn1_ctx_t asn1_ctx;
870   asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
871   dissect_s4406_PriorityLevelQualifier(FALSE, tvb, 0, &asn1_ctx, tree, hf_s4406_PriorityLevelQualifier_PDU);
872 }
873
874
875 /*--- End of included file: packet-s4406-fn.c ---*/
876 #line 59 "packet-s4406-template.c"
877
878
879 /*
880 * Dissect STANAG 4406 PDUs inside a PPDU.
881 */
882 static void
883 dissect_s4406(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
884 {
885         int offset = 0;
886         proto_item *item=NULL;
887         proto_tree *tree=NULL;
888         asn1_ctx_t asn1_ctx;
889         asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
890
891         if(parent_tree){
892                 item = proto_tree_add_item(parent_tree, proto_s4406, tvb, 0, -1, FALSE);
893                 tree = proto_item_add_subtree(item, ett_s4406);
894         }
895
896         if (check_col(pinfo->cinfo, COL_PROTOCOL))
897                 col_set_str(pinfo->cinfo, COL_PROTOCOL, "S4406");
898         if (check_col(pinfo->cinfo, COL_INFO))
899           col_set_str(pinfo->cinfo, COL_INFO, "Military");
900
901         dissect_s4406_InformationObject(TRUE, tvb, offset, &asn1_ctx , tree, -1);
902 }
903
904
905
906 /*--- proto_register_s4406 -------------------------------------------*/
907 void proto_register_s4406(void) {
908
909   /* List of fields */
910   static hf_register_info hf[] =
911   {
912
913 /*--- Included file: packet-s4406-hfarr.c ---*/
914 #line 1 "packet-s4406-hfarr.c"
915     { &hf_s4406_InformationObject_PDU,
916       { "InformationObject", "s4406.InformationObject",
917         FT_UINT32, BASE_DEC, VALS(x420_InformationObject_vals), 0,
918         "s4406.InformationObject", HFILL }},
919     { &hf_s4406_MMMessageData_PDU,
920       { "MMMessageData", "s4406.MMMessageData",
921         FT_NONE, BASE_NONE, NULL, 0,
922         "s4406.MMMessageData", HFILL }},
923     { &hf_s4406_MMMessageParameters_PDU,
924       { "MMMessageParameters", "s4406.MMMessageParameters",
925         FT_NONE, BASE_NONE, NULL, 0,
926         "s4406.MMMessageParameters", HFILL }},
927     { &hf_s4406_ExemptedAddressSeq_PDU,
928       { "ExemptedAddressSeq", "s4406.ExemptedAddressSeq",
929         FT_UINT32, BASE_DEC, NULL, 0,
930         "s4406.ExemptedAddressSeq", HFILL }},
931     { &hf_s4406_ExtendedAuthorisationInfo_PDU,
932       { "ExtendedAuthorisationInfo", "s4406.ExtendedAuthorisationInfo",
933         FT_STRING, BASE_NONE, NULL, 0,
934         "s4406.ExtendedAuthorisationInfo", HFILL }},
935     { &hf_s4406_DistributionCodes_PDU,
936       { "DistributionCodes", "s4406.DistributionCodes",
937         FT_NONE, BASE_NONE, NULL, 0,
938         "s4406.DistributionCodes", HFILL }},
939     { &hf_s4406_HandlingInstructions_PDU,
940       { "HandlingInstructions", "s4406.HandlingInstructions",
941         FT_UINT32, BASE_DEC, NULL, 0,
942         "s4406.HandlingInstructions", HFILL }},
943     { &hf_s4406_MessageInstructions_PDU,
944       { "MessageInstructions", "s4406.MessageInstructions",
945         FT_UINT32, BASE_DEC, NULL, 0,
946         "s4406.MessageInstructions", HFILL }},
947     { &hf_s4406_CodressMessage_PDU,
948       { "CodressMessage", "s4406.CodressMessage",
949         FT_INT32, BASE_DEC, NULL, 0,
950         "s4406.CodressMessage", HFILL }},
951     { &hf_s4406_OriginatorReference_PDU,
952       { "OriginatorReference", "s4406.OriginatorReference",
953         FT_STRING, BASE_NONE, NULL, 0,
954         "s4406.OriginatorReference", HFILL }},
955     { &hf_s4406_PrimaryPrecedence_PDU,
956       { "PrimaryPrecedence", "s4406.PrimaryPrecedence",
957         FT_INT32, BASE_DEC, VALS(s4406_PrimaryPrecedence_vals), 0,
958         "s4406.PrimaryPrecedence", HFILL }},
959     { &hf_s4406_CopyPrecedence_PDU,
960       { "CopyPrecedence", "s4406.CopyPrecedence",
961         FT_INT32, BASE_DEC, VALS(s4406_CopyPrecedence_vals), 0,
962         "s4406.CopyPrecedence", HFILL }},
963     { &hf_s4406_MessageType_PDU,
964       { "MessageType", "s4406.MessageType",
965         FT_NONE, BASE_NONE, NULL, 0,
966         "s4406.MessageType", HFILL }},
967     { &hf_s4406_AddressListDesignatorSeq_PDU,
968       { "AddressListDesignatorSeq", "s4406.AddressListDesignatorSeq",
969         FT_UINT32, BASE_DEC, NULL, 0,
970         "s4406.AddressListDesignatorSeq", HFILL }},
971     { &hf_s4406_OtherRecipientDesignatorSeq_PDU,
972       { "OtherRecipientDesignatorSeq", "s4406.OtherRecipientDesignatorSeq",
973         FT_UINT32, BASE_DEC, NULL, 0,
974         "s4406.OtherRecipientDesignatorSeq", HFILL }},
975     { &hf_s4406_PilotInformationSeq_PDU,
976       { "PilotInformationSeq", "s4406.PilotInformationSeq",
977         FT_UINT32, BASE_DEC, NULL, 0,
978         "s4406.PilotInformationSeq", HFILL }},
979     { &hf_s4406_Acp127MessageIdentifier_PDU,
980       { "Acp127MessageIdentifier", "s4406.Acp127MessageIdentifier",
981         FT_STRING, BASE_NONE, NULL, 0,
982         "s4406.Acp127MessageIdentifier", HFILL }},
983     { &hf_s4406_OriginatorPlad_PDU,
984       { "OriginatorPlad", "s4406.OriginatorPlad",
985         FT_STRING, BASE_NONE, NULL, 0,
986         "s4406.OriginatorPlad", HFILL }},
987     { &hf_s4406_Acp127NotificationType_PDU,
988       { "Acp127NotificationType", "s4406.Acp127NotificationType",
989         FT_BYTES, BASE_HEX, NULL, 0,
990         "s4406.Acp127NotificationType", HFILL }},
991     { &hf_s4406_SecurityInformationLabels_PDU,
992       { "SecurityInformationLabels", "s4406.SecurityInformationLabels",
993         FT_NONE, BASE_NONE, NULL, 0,
994         "s4406.SecurityInformationLabels", HFILL }},
995     { &hf_s4406_PriorityLevelQualifier_PDU,
996       { "PriorityLevelQualifier", "s4406.PriorityLevelQualifier",
997         FT_UINT32, BASE_DEC, VALS(s4406_PriorityLevelQualifier_vals), 0,
998         "s4406.PriorityLevelQualifier", HFILL }},
999     { &hf_s4406_mm,
1000       { "mm", "s4406.mm",
1001         FT_NONE, BASE_NONE, NULL, 0,
1002         "x420.IPM", HFILL }},
1003     { &hf_s4406_mn,
1004       { "mn", "s4406.mn",
1005         FT_NONE, BASE_NONE, NULL, 0,
1006         "x420.IPN", HFILL }},
1007     { &hf_s4406_ExemptedAddressSeq_item,
1008       { "ExemptedAddressSeq", "s4406.ExemptedAddressSeq_item",
1009         FT_NONE, BASE_NONE, NULL, 0,
1010         "s4406.ExemptedAddress", HFILL }},
1011     { &hf_s4406_sics,
1012       { "sics", "s4406.sics",
1013         FT_UINT32, BASE_DEC, NULL, 0,
1014         "s4406.SEQUENCE_OF_Sic", HFILL }},
1015     { &hf_s4406_sics_item,
1016       { "sics", "s4406.sics_item",
1017         FT_STRING, BASE_NONE, NULL, 0,
1018         "s4406.Sic", HFILL }},
1019     { &hf_s4406_dist_Extensions,
1020       { "dist-Extensions", "s4406.dist_Extensions",
1021         FT_UINT32, BASE_DEC, NULL, 0,
1022         "s4406.SEQUENCE_OF_DistributionExtensionField", HFILL }},
1023     { &hf_s4406_dist_Extensions_item,
1024       { "dist-Extensions", "s4406.dist_Extensions_item",
1025         FT_NONE, BASE_NONE, NULL, 0,
1026         "s4406.DistributionExtensionField", HFILL }},
1027     { &hf_s4406_dist_type,
1028       { "dist-type", "s4406.dist_type",
1029         FT_OID, BASE_NONE, NULL, 0,
1030         "s4406.OBJECT_IDENTIFIER", HFILL }},
1031     { &hf_s4406_dist_value,
1032       { "dist-value", "s4406.dist_value",
1033         FT_NONE, BASE_NONE, NULL, 0,
1034         "s4406.T_dist_value", HFILL }},
1035     { &hf_s4406_HandlingInstructions_item,
1036       { "HandlingInstructions", "s4406.HandlingInstructions_item",
1037         FT_STRING, BASE_NONE, NULL, 0,
1038         "s4406.MilitaryString", HFILL }},
1039     { &hf_s4406_MessageInstructions_item,
1040       { "MessageInstructions", "s4406.MessageInstructions_item",
1041         FT_STRING, BASE_NONE, NULL, 0,
1042         "s4406.MilitaryString", HFILL }},
1043     { &hf_s4406_message_type_type,
1044       { "type", "s4406.type",
1045         FT_INT32, BASE_DEC, VALS(s4406_TypeMessage_vals), 0,
1046         "s4406.TypeMessage", HFILL }},
1047     { &hf_s4406_identifier,
1048       { "identifier", "s4406.identifier",
1049         FT_STRING, BASE_NONE, NULL, 0,
1050         "s4406.MessageIdentifier", HFILL }},
1051     { &hf_s4406_AddressListDesignatorSeq_item,
1052       { "AddressListDesignatorSeq", "s4406.AddressListDesignatorSeq_item",
1053         FT_NONE, BASE_NONE, NULL, 0,
1054         "s4406.AddressListDesignator", HFILL }},
1055     { &hf_s4406_address_list_type,
1056       { "type", "s4406.type",
1057         FT_INT32, BASE_DEC, VALS(s4406_AddressListType_vals), 0,
1058         "s4406.AddressListType", HFILL }},
1059     { &hf_s4406_listName,
1060       { "listName", "s4406.listName",
1061         FT_NONE, BASE_NONE, NULL, 0,
1062         "x420.ORDescriptor", HFILL }},
1063     { &hf_s4406_notificationRequest,
1064       { "notificationRequest", "s4406.notificationRequest",
1065         FT_INT32, BASE_DEC, VALS(s4406_AddressListRequest_vals), 0,
1066         "s4406.AddressListRequest", HFILL }},
1067     { &hf_s4406_replyRequest,
1068       { "replyRequest", "s4406.replyRequest",
1069         FT_INT32, BASE_DEC, VALS(s4406_AddressListRequest_vals), 0,
1070         "s4406.AddressListRequest", HFILL }},
1071     { &hf_s4406_OtherRecipientDesignatorSeq_item,
1072       { "OtherRecipientDesignatorSeq", "s4406.OtherRecipientDesignatorSeq_item",
1073         FT_NONE, BASE_NONE, NULL, 0,
1074         "s4406.OtherRecipientDesignator", HFILL }},
1075     { &hf_s4406_other_recipient_type,
1076       { "type", "s4406.type",
1077         FT_INT32, BASE_DEC, VALS(s4406_OtherRecipientType_vals), 0,
1078         "s4406.OtherRecipientType", HFILL }},
1079     { &hf_s4406_designator,
1080       { "designator", "s4406.designator",
1081         FT_STRING, BASE_NONE, NULL, 0,
1082         "s4406.MilitaryString", HFILL }},
1083     { &hf_s4406_PilotInformationSeq_item,
1084       { "PilotInformationSeq", "s4406.PilotInformationSeq_item",
1085         FT_NONE, BASE_NONE, NULL, 0,
1086         "s4406.PilotInformation", HFILL }},
1087     { &hf_s4406_pilotPrecedence,
1088       { "pilotPrecedence", "s4406.pilotPrecedence",
1089         FT_INT32, BASE_DEC, VALS(s4406_PilotPrecedence_vals), 0,
1090         "s4406.PilotPrecedence", HFILL }},
1091     { &hf_s4406_pilotRecipient,
1092       { "pilotRecipient", "s4406.pilotRecipient",
1093         FT_UINT32, BASE_DEC, NULL, 0,
1094         "s4406.SEQUENCE_OF_ORDescriptor", HFILL }},
1095     { &hf_s4406_pilotRecipient_item,
1096       { "pilotRecipient", "s4406.pilotRecipient_item",
1097         FT_NONE, BASE_NONE, NULL, 0,
1098         "x420.ORDescriptor", HFILL }},
1099     { &hf_s4406_pilotSecurity,
1100       { "pilotSecurity", "s4406.pilotSecurity",
1101         FT_NONE, BASE_NONE, NULL, 0,
1102         "x411.SecurityLabel", HFILL }},
1103     { &hf_s4406_pilotHandling,
1104       { "pilotHandling", "s4406.pilotHandling",
1105         FT_UINT32, BASE_DEC, NULL, 0,
1106         "s4406.SEQUENCE_OF_MilitaryString", HFILL }},
1107     { &hf_s4406_pilotHandling_item,
1108       { "pilotHandling", "s4406.pilotHandling_item",
1109         FT_STRING, BASE_NONE, NULL, 0,
1110         "s4406.MilitaryString", HFILL }},
1111     { &hf_s4406_content_security_label,
1112       { "content-security-label", "s4406.content_security_label",
1113         FT_NONE, BASE_NONE, NULL, 0,
1114         "x411.SecurityLabel", HFILL }},
1115     { &hf_s4406_heading_security_label,
1116       { "heading-security-label", "s4406.heading_security_label",
1117         FT_NONE, BASE_NONE, NULL, 0,
1118         "x411.SecurityLabel", HFILL }},
1119     { &hf_s4406_body_part_security_labels,
1120       { "body-part-security-labels", "s4406.body_part_security_labels",
1121         FT_UINT32, BASE_DEC, NULL, 0,
1122         "s4406.SEQUENCE_OF_BodyPartSecurityLabel", HFILL }},
1123     { &hf_s4406_body_part_security_labels_item,
1124       { "body-part-security-labels", "s4406.body_part_security_labels_item",
1125         FT_NONE, BASE_NONE, NULL, 0,
1126         "s4406.BodyPartSecurityLabel", HFILL }},
1127     { &hf_s4406_body_part_security_label,
1128       { "body-part-security-label", "s4406.body_part_security_label",
1129         FT_NONE, BASE_NONE, NULL, 0,
1130         "x411.SecurityLabel", HFILL }},
1131     { &hf_s4406_body_part_sequence_number,
1132       { "body-part-sequence-number", "s4406.body_part_sequence_number",
1133         FT_INT32, BASE_DEC, NULL, 0,
1134         "s4406.BodyPartSequenceNumber", HFILL }},
1135     { &hf_s4406_Acp127NotificationType_negative,
1136       { "negative", "s4406.negative",
1137         FT_BOOLEAN, 8, NULL, 0x80,
1138         "", HFILL }},
1139     { &hf_s4406_Acp127NotificationType_positive,
1140       { "positive", "s4406.positive",
1141         FT_BOOLEAN, 8, NULL, 0x40,
1142         "", HFILL }},
1143     { &hf_s4406_Acp127NotificationType_transfer,
1144       { "transfer", "s4406.transfer",
1145         FT_BOOLEAN, 8, NULL, 0x20,
1146         "", HFILL }},
1147
1148 /*--- End of included file: packet-s4406-hfarr.c ---*/
1149 #line 95 "packet-s4406-template.c"
1150   };
1151
1152   /* List of subtrees */
1153   static gint *ett[] = {
1154     &ett_s4406,
1155
1156 /*--- Included file: packet-s4406-ettarr.c ---*/
1157 #line 1 "packet-s4406-ettarr.c"
1158     &ett_s4406_InformationObject,
1159     &ett_s4406_ExemptedAddressSeq,
1160     &ett_s4406_DistributionCodes,
1161     &ett_s4406_SEQUENCE_OF_Sic,
1162     &ett_s4406_SEQUENCE_OF_DistributionExtensionField,
1163     &ett_s4406_DistributionExtensionField,
1164     &ett_s4406_HandlingInstructions,
1165     &ett_s4406_MessageInstructions,
1166     &ett_s4406_MessageType,
1167     &ett_s4406_AddressListDesignatorSeq,
1168     &ett_s4406_AddressListDesignator,
1169     &ett_s4406_OtherRecipientDesignatorSeq,
1170     &ett_s4406_OtherRecipientDesignator,
1171     &ett_s4406_PilotInformationSeq,
1172     &ett_s4406_PilotInformation,
1173     &ett_s4406_SEQUENCE_OF_ORDescriptor,
1174     &ett_s4406_SEQUENCE_OF_MilitaryString,
1175     &ett_s4406_Acp127NotificationType,
1176     &ett_s4406_SecurityInformationLabels,
1177     &ett_s4406_SEQUENCE_OF_BodyPartSecurityLabel,
1178     &ett_s4406_BodyPartSecurityLabel,
1179
1180 /*--- End of included file: packet-s4406-ettarr.c ---*/
1181 #line 101 "packet-s4406-template.c"
1182   };
1183
1184   /* Register protocol */
1185   proto_s4406 = proto_register_protocol(PNAME, PSNAME, PFNAME);
1186
1187   /* Register fields and subtrees */
1188   proto_register_field_array(proto_s4406, hf, array_length(hf));
1189   proto_register_subtree_array(ett, array_length(ett));
1190
1191 }
1192
1193
1194 /*--- proto_reg_handoff_s4406 --- */
1195 void proto_reg_handoff_s4406(void) {
1196
1197 /*--- Included file: packet-s4406-dis-tab.c ---*/
1198 #line 1 "packet-s4406-dis-tab.c"
1199   register_ber_oid_dissector("1.3.26.0.4406.0.2.0", dissect_PrimaryPrecedence_PDU, proto_s4406, "primary-precedence");
1200   register_ber_oid_dissector("1.3.26.0.4406.0.2.1", dissect_CopyPrecedence_PDU, proto_s4406, "copy-precedence");
1201   register_ber_oid_dissector("1.3.26.0.4406.0.2.2", dissect_MessageType_PDU, proto_s4406, "message-type");
1202   register_ber_oid_dissector("1.3.26.0.4406.0.2.3", dissect_AddressListDesignatorSeq_PDU, proto_s4406, "address-list-indicator");
1203   register_ber_oid_dissector("1.3.26.0.4406.0.2.4", dissect_ExemptedAddressSeq_PDU, proto_s4406, "exempted-address");
1204   register_ber_oid_dissector("1.3.26.0.4406.0.2.5", dissect_ExtendedAuthorisationInfo_PDU, proto_s4406, "extended-authorisation-info");
1205   register_ber_oid_dissector("1.3.26.0.4406.0.2.6", dissect_DistributionCodes_PDU, proto_s4406, "distribution-codes");
1206   register_ber_oid_dissector("1.3.26.0.4406.0.2.7", dissect_HandlingInstructions_PDU, proto_s4406, "handling-instructions");
1207   register_ber_oid_dissector("1.3.26.0.4406.0.2.8", dissect_MessageInstructions_PDU, proto_s4406, "message-instructions");
1208   register_ber_oid_dissector("1.3.26.0.4406.0.2.9", dissect_CodressMessage_PDU, proto_s4406, "codress-message");
1209   register_ber_oid_dissector("1.3.26.0.4406.0.2.10", dissect_OriginatorReference_PDU, proto_s4406, "originator-reference");
1210   register_ber_oid_dissector("1.3.26.0.4406.0.2.11", dissect_OtherRecipientDesignatorSeq_PDU, proto_s4406, "other-recipients-indicator");
1211   register_ber_oid_dissector("1.3.26.0.4406.0.2.12", dissect_PilotInformationSeq_PDU, proto_s4406, "pilot-forwarding-info");
1212   register_ber_oid_dissector("1.3.26.0.4406.0.2.13", dissect_Acp127MessageIdentifier_PDU, proto_s4406, "acp127-message-identifier");
1213   register_ber_oid_dissector("1.3.26.0.4406.0.2.14", dissect_OriginatorPlad_PDU, proto_s4406, "originator-plad");
1214   register_ber_oid_dissector("1.3.26.0.4406.0.2.15", dissect_Acp127NotificationType_PDU, proto_s4406, "acp127-notification-request");
1215   register_ber_oid_dissector("1.3.26.0.4406.0.2.17", dissect_SecurityInformationLabels_PDU, proto_s4406, "information-labels");
1216   register_ber_oid_dissector("1.3.26.0.4406.0.8.0", dissect_PriorityLevelQualifier_PDU, proto_s4406, "priority-level-qualifier");
1217   register_ber_oid_dissector("1.3.26.0.4406.0.7.9", dissect_MMMessageData_PDU, proto_s4406, "mm-message");
1218   register_ber_oid_dissector("1.3.26.0.4406.0.7.10", dissect_MMMessageParameters_PDU, proto_s4406, "mm-message-parameters");
1219   register_ber_oid_dissector("2.6.1.4.17.1.3.26.0.4406.0.4.1", dissect_InformationObject_PDU, proto_s4406, "id-et-content-p772");
1220
1221
1222 /*--- End of included file: packet-s4406-dis-tab.c ---*/
1223 #line 116 "packet-s4406-template.c"
1224
1225   register_ber_oid_dissector("1.3.26.0.4406.0.4.1", dissect_s4406, proto_s4406, "Military Message");
1226
1227   register_ber_syntax_dissector("MilitaryMessage", proto_s4406, dissect_s4406); 
1228   register_ber_oid_syntax(".p772", NULL, "MilitaryMessage");
1229
1230 }