2 * Routines for X.420 (X.400 Message Transfer) packet dissection
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@ethereal.com>
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"
38 #include "packet-acse.h"
39 #include "packet-ros.h"
41 #include "packet-x509af.h"
42 #include "packet-x411.h"
44 #include "packet-x420.h"
46 #define PNAME "X.420 Information Object"
50 /* Initialize the protocol and registered fields */
53 static char object_identifier_id[BER_MAX_OID_STR_LEN]; /* content type identifier */
55 #include "packet-x420-hf.c"
57 /* Initialize the subtree pointers */
58 static gint ett_x420 = -1;
59 #include "packet-x420-ett.c"
61 #include "packet-x420-fn.c"
64 * Dissect X420 PDUs inside a PPDU.
67 dissect_x420(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
70 proto_item *item=NULL;
71 proto_tree *tree=NULL;
74 item = proto_tree_add_item(parent_tree, proto_x420, tvb, 0, -1, FALSE);
75 tree = proto_item_add_subtree(item, ett_x420);
78 if (check_col(pinfo->cinfo, COL_PROTOCOL))
79 col_set_str(pinfo->cinfo, COL_PROTOCOL, "P22");
80 if (check_col(pinfo->cinfo, COL_INFO))
81 col_add_str(pinfo->cinfo, COL_INFO, "InterPersonal");
83 dissect_x420_InformationObject(TRUE, tvb, offset, pinfo , tree, -1);
87 /*--- proto_register_x420 -------------------------------------------*/
88 void proto_register_x420(void) {
91 static hf_register_info hf[] =
93 #include "packet-x420-hfarr.c"
96 /* List of subtrees */
97 static gint *ett[] = {
99 #include "packet-x420-ettarr.c"
102 /* Register protocol */
103 proto_x420 = proto_register_protocol(PNAME, PSNAME, PFNAME);
104 register_dissector("x420", dissect_x420, proto_x420);
105 /* Register fields and subtrees */
106 proto_register_field_array(proto_x420, hf, array_length(hf));
107 proto_register_subtree_array(ett, array_length(ett));
112 /*--- proto_reg_handoff_x420 --- */
113 void proto_reg_handoff_x420(void) {
115 #include "packet-x420-dis-tab.c"
117 register_ber_oid_dissector("2.6.1.10.0", dissect_x420, proto_x420, "InterPersonal Message (1984)");
118 register_ber_oid_dissector("2.6.1.10.1", dissect_x420, proto_x420, "InterPersonal Message (1988)");