2 * Routines for Q.932 packet dissection
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
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.
32 #include <epan/packet.h>
33 #include <epan/prefs.h>
34 #include <epan/strutil.h>
35 #include <epan/emem.h>
36 #include <epan/asn1.h>
38 #include "packet-ber.h"
39 #include "packet-q932-ros.h"
41 #define PNAME "Q.932 Operations Service Element"
42 #define PSNAME "Q932.ROS"
43 #define PFNAME "q932.ros"
45 /* Initialize the protocol and registered fields */
47 #include "packet-q932-ros-hf.c"
49 /* Initialize the subtree pointers */
50 #include "packet-q932-ros-ett.c"
55 static dissector_handle_t data_handle = NULL;
57 /* Gloabl variables */
58 static rose_context *rose_ctx;
60 static gint32 code_choice;
61 static guint32 code_local;
62 static const gchar *code_global;
63 static guint32 problem_val;
64 static gchar problem_str[64];
65 static tvbuff_t *arg_next_tvb, *res_next_tvb, *err_next_tvb;
68 #include "packet-q932-ros-fn.c"
70 /*--- dissect_rose_apdu -----------------------------------------------------*/
71 int dissect_rose_apdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, rose_context *rctx) {
74 return dissect_RoseAPDU_PDU(tvb, pinfo, tree);
77 /*--- proto_register_rose ---------------------------------------------------*/
78 void proto_register_rose(void) {
81 static hf_register_info hf[] = {
82 #include "packet-q932-ros-hfarr.c"
85 /* List of subtrees */
86 static gint *ett[] = {
87 #include "packet-q932-ros-ettarr.c"
90 /* Register protocol and dissector */
91 proto_rose = proto_register_protocol(PNAME, PSNAME, PFNAME);
92 proto_set_cant_toggle(proto_rose);
94 /* Register fields and subtrees */
95 proto_register_field_array(proto_rose, hf, array_length(hf));
96 proto_register_subtree_array(ett, array_length(ett));
100 /*--- proto_reg_handoff_rose ------------------------------------------------*/
101 void proto_reg_handoff_rose(void) {
102 data_handle = find_dissector("data");
105 /*---------------------------------------------------------------------------*/