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