HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / asn1 / h282 / packet-h282-template.c
blob4191e93d336e22457ceab5e81a3f5838fcae1766
1 /* packet-h282.c
2 * Routines for H.282 packet dissection
3 * 2007 Tomas Kukosa
5 * $Id$
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include "config.h"
28 #include <glib.h>
29 #include <epan/packet.h>
30 #include <epan/oids.h>
31 #include <epan/asn1.h>
33 #include "packet-per.h"
35 #define PNAME "H.282 Remote Device Control"
36 #define PSNAME "RDC"
37 #define PFNAME "rdc"
39 /* Initialize the protocol and registered fields */
40 static int proto_h282 = -1;
41 #include "packet-h282-hf.c"
43 /* Initialize the subtree pointers */
44 static int ett_h282 = -1;
45 #include "packet-h282-ett.c"
47 /* Dissectors */
49 /* Subdissectors */
51 #include "packet-h282-fn.c"
53 static int
54 dissect_h282(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
56 proto_item *ti = NULL;
57 proto_tree *h282_tree = NULL;
59 col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
61 ti = proto_tree_add_item(tree, proto_h282, tvb, 0, -1, ENC_NA);
62 h282_tree = proto_item_add_subtree(ti, ett_h282);
64 return dissect_RDCPDU_PDU(tvb, pinfo, h282_tree, NULL);
67 /*--- proto_register_h282 ----------------------------------------------*/
68 void proto_register_h282(void) {
70 /* List of fields */
71 static hf_register_info hf[] = {
72 #include "packet-h282-hfarr.c"
75 /* List of subtrees */
76 static gint *ett[] = {
77 &ett_h282,
78 #include "packet-h282-ettarr.c"
81 /* Register protocol */
82 proto_h282 = proto_register_protocol(PNAME, PSNAME, PFNAME);
84 /* Register fields and subtrees */
85 proto_register_field_array(proto_h282, hf, array_length(hf));
86 proto_register_subtree_array(ett, array_length(ett));
88 new_register_dissector(PFNAME, dissect_h282, proto_h282);
89 new_register_dissector(PFNAME".device_list", dissect_NonCollapsingCapabilities_PDU, proto_h282);
93 /*--- proto_reg_handoff_h282 -------------------------------------------*/
94 void proto_reg_handoff_h282(void)