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-x509ce.h"
43 #include "packet-x411.h"
45 #include "packet-x420.h"
47 #define PNAME "X.420 Information Object"
51 /* Initialize the protocol and registered fields */
54 static const char *object_identifier_id; /* content type identifier */
56 static const value_string charsetreg_vals [] = {
57 { 1, "C0: (ISO/IEC 6429)"},
58 { 6, "G0: ASCII (ISO/IEC 646)"},
59 { 77, "C1: (ISO/IEC 6429)"},
60 { 100, "Gn: Latin Alphabet No.1, Western European Supplementary Set (GR area of ISO-8859-1)"},
61 { 101, "Gn: Latin Alphabet No.2, Central EuropeanSupplementary Set (GR area of ISO-8859-2)"},
62 { 104, "C0: (ISO/IEC 4873)"},
63 { 105, "C1: (ISO/IEC 4873)"},
64 { 106, "C0: Teletex (CCITT T.61)"},
65 { 107, "C1: Teletex (CCITT T.61)"},
66 { 109, "Gn: Latin Alphabet No.3, Southern European Supplementary Set (GR area of ISO-8859-3)"},
67 { 110, "Gn: Latin Alphabet No.4, Baltic Supplementary Set (GR area of ISO-8859-4)"},
68 { 126, "Gn: Greek Supplementary Set (GR area of ISO-8859-7)"},
69 { 127, "Gn: Arabic Supplementary Set (GR area of ISO-8859-6)"},
70 { 138, "Gn: Hebrew Supplementary Set (GR area of ISO-8859-8)"},
71 { 144, "Gn: Cyrillic Supplementary Set (GR area of ISO-8859-5)"},
72 { 148, "Gn: Latin Alphabet No.5, Cyrillic Supplementary Set (GR area of ISO-8859-9)"},
73 { 154, "Gn: Supplementary Set for Latin Alphabets No.1 or No.5, and No.2"},
74 { 157, "Gn: Latin Alphabet No.6, Arabic Supplementary Set (GR area of ISO-8859-10)"},
75 { 158, "Gn: Supplementary Set for Sami (Lappish) to complement Latin Alphabet No.6 (from Annex A of ISO-8859-10)"},
76 { 166, "Gn: Thai Supplementary Set (GR area of ISO-8859-11)"},
77 { 179, "Gn: Latin Alphabet No.7, Baltic Rim Supplementary Set (GR area of ISO-8859-13)"},
78 { 182, "Gn: Welsh Variant of Latin Alphabet No.1, Supplementary Set (GR area of ISO-8859-1)"},
79 { 197, "Gn: Supplementary Set for Sami to complement Latin Alphabet No.6 (from Annex A of ISO-8859-10)"},
80 { 199, "Gn: Latin Alphabet No.8, Celtic Supplementary Set (GR area of ISO-8859-14)"},
81 { 203, "Gn: Latin Alphabet No.9, European Rim Supplementary Set (GR area of ISO-8859-15)"},
85 #include "packet-x420-hf.c"
87 /* Initialize the subtree pointers */
88 static gint ett_x420 = -1;
89 #include "packet-x420-ett.c"
91 #include "packet-x420-fn.c"
94 * Dissect X420 PDUs inside a PPDU.
97 dissect_x420(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
100 proto_item *item=NULL;
101 proto_tree *tree=NULL;
104 item = proto_tree_add_item(parent_tree, proto_x420, tvb, 0, -1, FALSE);
105 tree = proto_item_add_subtree(item, ett_x420);
108 if (check_col(pinfo->cinfo, COL_PROTOCOL))
109 col_set_str(pinfo->cinfo, COL_PROTOCOL, "P22");
110 if (check_col(pinfo->cinfo, COL_INFO))
111 col_add_str(pinfo->cinfo, COL_INFO, "InterPersonal");
113 dissect_x420_InformationObject(TRUE, tvb, offset, pinfo , tree, -1);
117 /*--- proto_register_x420 -------------------------------------------*/
118 void proto_register_x420(void) {
121 static hf_register_info hf[] =
123 #include "packet-x420-hfarr.c"
126 /* List of subtrees */
127 static gint *ett[] = {
129 #include "packet-x420-ettarr.c"
132 /* Register protocol */
133 proto_x420 = proto_register_protocol(PNAME, PSNAME, PFNAME);
134 register_dissector("x420", dissect_x420, proto_x420);
135 /* Register fields and subtrees */
136 proto_register_field_array(proto_x420, hf, array_length(hf));
137 proto_register_subtree_array(ett, array_length(ett));
142 /*--- proto_reg_handoff_x420 --- */
143 void proto_reg_handoff_x420(void) {
145 #include "packet-x420-dis-tab.c"
147 register_ber_oid_dissector("2.6.1.10.0", dissect_x420, proto_x420, "InterPersonal Message (1984)");
148 register_ber_oid_dissector("2.6.1.10.1", dissect_x420, proto_x420, "InterPersonal Message (1988)");