2 * Routines for X.413 (P7) packet dissection
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
14 #include <epan/packet.h>
15 #include <epan/prefs.h>
16 #include <epan/oids.h>
17 #include <epan/asn1.h>
18 #include <epan/proto_data.h>
19 #include <wsutil/array.h>
21 #include "packet-ber.h"
22 #include "packet-acse.h"
23 #include "packet-ros.h"
24 #include "packet-rtse.h"
25 #include "packet-p7.h"
27 #include "packet-p1.h"
28 #include <epan/strutil.h>
30 #define PNAME "X.413 Message Store Service"
34 void proto_register_p7(void);
35 void proto_reg_handoff_p7(void);
39 /* Initialize the protocol and registered fields */
42 #include "packet-p7-val.h"
44 #include "packet-p7-hf.c"
46 /* Initialize the subtree pointers */
48 #include "packet-p7-ett.c"
50 #include "packet-p7-table.c" /* operation and error codes */
52 #include "packet-p7-fn.c"
54 #include "packet-p7-table11.c" /* operation argument/result dissectors */
55 #include "packet-p7-table21.c" /* error dissector */
57 static const ros_info_t p7_ros_info
= {
61 p7_opr_code_string_vals
,
63 p7_err_code_string_vals
,
68 /*--- proto_register_p7 -------------------------------------------*/
69 void proto_register_p7(void) {
72 static hf_register_info hf
[] =
74 #include "packet-p7-hfarr.c"
77 /* List of subtrees */
80 #include "packet-p7-ettarr.c"
84 /* Register protocol */
85 proto_p7
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
87 /* Register fields and subtrees */
88 proto_register_field_array(proto_p7
, hf
, array_length(hf
));
89 proto_register_subtree_array(ett
, array_length(ett
));
91 /* Register our configuration options for P7, particularly our port */
93 p7_module
= prefs_register_protocol_subtree("OSI/X.400", proto_p7
, NULL
);
95 prefs_register_obsolete_preference(p7_module
, "tcp.port");
97 prefs_register_static_text_preference(p7_module
, "tcp_port_info",
98 "The TCP ports used by the P7 protocol should be added to the TPKT preference \"TPKT TCP ports\", or by selecting \"TPKT\" as the \"Transport\" protocol in the \"Decode As\" dialog.",
99 "P7 TCP Port preference moved information");
103 /*--- proto_reg_handoff_p7 --- */
104 void proto_reg_handoff_p7(void) {
106 #include "packet-p7-dis-tab.c"
108 /* APPLICATION CONTEXT */
110 oid_add_from_string("id-ac-ms-access","2.6.0.1.11");
111 oid_add_from_string("id-ac-ms-reliable-access","2.6.0.1.12");
113 /* ABSTRACT SYNTAXES */
115 /* Register P7 with ROS (with no use of RTSE) */
116 register_ros_protocol_info("2.6.0.2.9", &p7_ros_info
, 0, "id-as-ms", false);
117 register_ros_protocol_info("2.6.0.2.5", &p7_ros_info
, 0, "id-as-mrse", false);
118 register_ros_protocol_info("2.6.0.2.1", &p7_ros_info
, 0, "id-as-msse", false);