2 * Routines for H.450 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/strutil.h>
16 #include <epan/asn1.h>
17 #include <epan/expert.h>
18 #include <wsutil/array.h>
20 #include "packet-per.h"
21 #include "packet-h450-ros.h"
23 #define PNAME "H.450 Remote Operations Apdus"
24 #define PSNAME "H450.ROS"
25 #define PFNAME "h450.ros"
27 void proto_register_h450_ros(void);
28 void proto_reg_handoff_h450_ros(void);
30 /* Initialize the protocol and registered fields */
31 static int proto_h450_ros
;
32 #include "packet-h450-ros-hf.c"
34 /* Initialize the subtree pointers */
35 #include "packet-h450-ros-ett.c"
37 static expert_field ei_ros_undecoded
;
42 static dissector_handle_t data_handle
;
44 /* Global variables */
45 static int32_t problem_val
;
46 static char problem_str
[64];
47 static tvbuff_t
*arg_next_tvb
, *res_next_tvb
, *err_next_tvb
;
50 argument_cb(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void* data _U_
) {
52 return tvb_captured_length(tvb
);
56 result_cb(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void* data _U_
) {
58 return tvb_captured_length(tvb
);
62 error_cb(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void* data _U_
) {
64 return tvb_captured_length(tvb
);
67 #include "packet-h450-ros-fn.c"
69 /*--- proto_register_h450_ros -----------------------------------------------*/
70 void proto_register_h450_ros(void) {
73 static hf_register_info hf
[] = {
74 #include "packet-h450-ros-hfarr.c"
77 /* List of subtrees */
79 #include "packet-h450-ros-ettarr.c"
82 static ei_register_info ei
[] = {
83 { &ei_ros_undecoded
, { "h450.ros.undecoded", PI_UNDECODED
, PI_WARN
, "Undecoded", EXPFILL
}},
86 expert_module_t
* expert_h450_ros
;
88 /* Register protocol and dissector */
89 proto_h450_ros
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
90 proto_set_cant_toggle(proto_h450_ros
);
92 /* Register fields and subtrees */
93 proto_register_field_array(proto_h450_ros
, hf
, array_length(hf
));
94 proto_register_subtree_array(ett
, array_length(ett
));
95 expert_h450_ros
= expert_register_protocol(proto_h450_ros
);
96 expert_register_field_array(expert_h450_ros
, ei
, array_length(ei
));
99 /*--- proto_reg_handoff_h450_ros --------------------------------------------*/
100 void proto_reg_handoff_h450_ros(void) {
101 data_handle
= find_dissector("data");
104 /*---------------------------------------------------------------------------*/