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 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include <epan/packet.h>
27 #include <epan/strutil.h>
28 #include <epan/asn1.h>
29 #include <epan/expert.h>
31 #include "packet-per.h"
32 #include "packet-h450-ros.h"
34 #define PNAME "H.450 Remote Operations Apdus"
35 #define PSNAME "H450.ROS"
36 #define PFNAME "h450.ros"
38 void proto_register_h450_ros(void);
39 void proto_reg_handoff_h450_ros(void);
41 /* Initialize the protocol and registered fields */
42 static int proto_h450_ros = -1;
43 #include "packet-h450-ros-hf.c"
45 /* Initialize the subtree pointers */
46 #include "packet-h450-ros-ett.c"
48 static expert_field ei_ros_undecoded = EI_INIT;
53 static dissector_handle_t data_handle = NULL;
55 /* Global variables */
56 static gint32 problem_val;
57 static gchar problem_str[64];
58 static tvbuff_t *arg_next_tvb, *res_next_tvb, *err_next_tvb;
61 argument_cb(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_) {
63 return tvb_captured_length(tvb);
67 result_cb(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_) {
69 return tvb_captured_length(tvb);
73 error_cb(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, void* data _U_) {
75 return tvb_captured_length(tvb);
78 #include "packet-h450-ros-fn.c"
80 /*--- proto_register_h450_ros -----------------------------------------------*/
81 void proto_register_h450_ros(void) {
84 static hf_register_info hf[] = {
85 #include "packet-h450-ros-hfarr.c"
88 /* List of subtrees */
89 static gint *ett[] = {
90 #include "packet-h450-ros-ettarr.c"
93 static ei_register_info ei[] = {
94 { &ei_ros_undecoded, { "h450.ros.undecoded", PI_UNDECODED, PI_WARN, "Undecoded", EXPFILL }},
97 expert_module_t* expert_h450_ros;
99 /* Register protocol and dissector */
100 proto_h450_ros = proto_register_protocol(PNAME, PSNAME, PFNAME);
101 proto_set_cant_toggle(proto_h450_ros);
103 /* Register fields and subtrees */
104 proto_register_field_array(proto_h450_ros, hf, array_length(hf));
105 proto_register_subtree_array(ett, array_length(ett));
106 expert_h450_ros = expert_register_protocol(proto_h450_ros);
107 expert_register_field_array(expert_h450_ros, ei, array_length(ei));
110 /*--- proto_reg_handoff_h450_ros --------------------------------------------*/
111 void proto_reg_handoff_h450_ros(void) {
112 data_handle = find_dissector("data");
115 /*---------------------------------------------------------------------------*/