2 * Routines for t125 packet dissection
3 * Copyright 2007, Ronnie Sahlberg
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>
36 #include <epan/asn1.h>
37 #include "packet-ber.h"
39 #define PNAME "MULTIPOINT-COMMUNICATION-SERVICE T.125"
40 #define PSNAME "T.125"
44 /* Initialize the protocol and registered fields */
45 static int proto_t125 = -1;
46 #include "packet-t125-hf.c"
48 /* Initialize the subtree pointers */
49 static int ett_t125 = -1;
50 #include "packet-t125-ett.c"
52 #include "packet-t125-fn.c"
55 dissect_t125(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
57 proto_item *item = NULL;
58 proto_tree *tree = NULL;
63 col_set_str(pinfo->cinfo, COL_PROTOCOL, "T.125");
64 col_clear(pinfo->cinfo, COL_INFO);
66 item = proto_tree_add_item(parent_tree, proto_t125, tvb, 0, tvb_length(tvb), FALSE);
67 tree = proto_item_add_subtree(item, ett_t125);
69 get_ber_identifier(tvb, 0, &class, &pc, &tag);
71 if ( (class==BER_CLASS_APP) && (tag>=101) && (tag<=104) ){
72 dissect_ConnectMCSPDU_PDU(tvb, pinfo, tree);
74 col_set_str(pinfo->cinfo, COL_INFO, "T.125 payload");
75 proto_tree_add_text(tree, tvb, 0, -1, "T.125 payload");
78 return tvb_length(tvb);
82 /*--- proto_register_t125 -------------------------------------------*/
83 void proto_register_t125(void) {
86 static hf_register_info hf[] = {
87 #include "packet-t125-hfarr.c"
90 /* List of subtrees */
91 static gint *ett[] = {
93 #include "packet-t125-ettarr.c"
96 /* Register protocol */
97 proto_t125 = proto_register_protocol(PNAME, PSNAME, PFNAME);
98 /* Register fields and subtrees */
99 proto_register_field_array(proto_t125, hf, array_length(hf));
100 proto_register_subtree_array(ett, array_length(ett));
102 new_register_dissector("t125", dissect_t125, proto_t125);
106 /*--- proto_reg_handoff_t125 ---------------------------------------*/
107 void proto_reg_handoff_t125(void) {