2 * Routines for H.283 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.
31 #include <epan/packet.h>
32 #include <epan/conversation.h>
33 #include <epan/oids.h>
34 #include <epan/asn1.h>
39 #include "packet-per.h"
41 #define PNAME "H.283 Logical Channel Transport"
45 /* Initialize the protocol and registered fields */
47 #include "packet-h283-hf.c"
49 /* Initialize the subtree pointers */
50 static int ett_h283 = -1;
51 #include "packet-h283-ett.c"
54 static dissector_handle_t rdc_pdu_handle;
55 static dissector_handle_t rdc_device_list_handle;
56 static dissector_handle_t data_handle;
58 static gboolean info_is_set;
60 #include "packet-h283-fn.c"
63 dissect_h283_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
65 proto_item *ti = NULL;
66 proto_tree *h283_tree = NULL;
68 if (check_col(pinfo->cinfo, COL_PROTOCOL))
69 col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
73 ti = proto_tree_add_item(tree, proto_h283, tvb, 0, -1, FALSE);
74 h283_tree = proto_item_add_subtree(ti, ett_h283);
76 return dissect_LCTPDU_PDU(tvb, pinfo, h283_tree);
79 /*--- proto_register_h283 ----------------------------------------------*/
80 void proto_register_h283(void) {
83 static hf_register_info hf[] = {
84 #include "packet-h283-hfarr.c"
87 /* List of subtrees */
88 static gint *ett[] = {
90 #include "packet-h283-ettarr.c"
93 /* Register protocol */
94 proto_h283 = proto_register_protocol(PNAME, PSNAME, PFNAME);
96 /* Register fields and subtrees */
97 proto_register_field_array(proto_h283, hf, array_length(hf));
98 proto_register_subtree_array(ett, array_length(ett));
100 new_register_dissector(PFNAME, dissect_h283_udp, proto_h283);
104 /*--- proto_reg_handoff_h283 -------------------------------------------*/
105 void proto_reg_handoff_h283(void)
107 dissector_handle_t h283_udp_handle;
109 h283_udp_handle = find_dissector(PFNAME);
110 dissector_add_handle("udp.port", h283_udp_handle);
112 rdc_pdu_handle = find_dissector("rdc");
113 rdc_device_list_handle = find_dissector("rdc.device_list");
114 data_handle = find_dissector("data");