2 * Routines for STANAG 4406 (X.400 Military Message Extensions) packet dissection
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 #include <epan/packet.h>
32 #include <epan/conversation.h>
37 #include "packet-ber.h"
39 #include "packet-x509if.h"
41 #include "packet-s4406.h"
42 #include "packet-x411.h"
43 #include "packet-x420.h"
45 #define PNAME "STANAG 4406 Military Message"
46 #define PSNAME "STANAG 4406"
47 #define PFNAME "s4406"
49 /* Initialize the protocol and registered fields */
52 #include "packet-s4406-hf.c"
54 /* Initialize the subtree pointers */
55 static gint ett_s4406 = -1;
56 #include "packet-s4406-ett.c"
58 #include "packet-s4406-fn.c"
62 * Dissect STANAG 4406 PDUs inside a PPDU.
65 dissect_s4406(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
68 proto_item *item=NULL;
69 proto_tree *tree=NULL;
72 item = proto_tree_add_item(parent_tree, proto_s4406, tvb, 0, -1, FALSE);
73 tree = proto_item_add_subtree(item, ett_s4406);
76 if (check_col(pinfo->cinfo, COL_PROTOCOL))
77 col_set_str(pinfo->cinfo, COL_PROTOCOL, "S4406");
78 if (check_col(pinfo->cinfo, COL_INFO))
79 col_add_str(pinfo->cinfo, COL_INFO, "Military");
81 dissect_s4406_InformationObject(TRUE, tvb, offset, pinfo , tree, -1);
86 /*--- proto_register_s4406 -------------------------------------------*/
87 void proto_register_s4406(void) {
90 static hf_register_info hf[] =
92 #include "packet-s4406-hfarr.c"
95 /* List of subtrees */
96 static gint *ett[] = {
98 #include "packet-s4406-ettarr.c"
101 /* Register protocol */
102 proto_s4406 = proto_register_protocol(PNAME, PSNAME, PFNAME);
104 /* Register fields and subtrees */
105 proto_register_field_array(proto_s4406, hf, array_length(hf));
106 proto_register_subtree_array(ett, array_length(ett));
111 /*--- proto_reg_handoff_s4406 --- */
112 void proto_reg_handoff_s4406(void) {
113 #include "packet-s4406-dis-tab.c"
115 register_ber_oid_dissector("1.3.26.0.4406.0.4.1", dissect_s4406, proto_s4406, "Military Message");