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>
34 #include <epan/asn1.h>
35 #include "packet-ber.h"
37 #define PNAME "MULTIPOINT-COMMUNICATION-SERVICE T.125"
38 #define PSNAME "T.125"
42 /* Initialize the protocol and registered fields */
43 static int proto_t125 = -1;
44 #include "packet-t125-hf.c"
46 /* Initialize the subtree pointers */
47 static int ett_t125 = -1;
48 #include "packet-t125-ett.c"
50 #include "packet-t125-fn.c"
53 dissect_t125(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
55 proto_item *item = NULL;
56 proto_tree *tree = NULL;
61 col_set_str(pinfo->cinfo, COL_PROTOCOL, "T.125");
62 col_clear(pinfo->cinfo, COL_INFO);
64 item = proto_tree_add_item(parent_tree, proto_t125, tvb, 0, tvb_length(tvb), FALSE);
65 tree = proto_item_add_subtree(item, ett_t125);
67 get_ber_identifier(tvb, 0, &class, &pc, &tag);
69 if ( (class==BER_CLASS_APP) && (tag>=101) && (tag<=104) ){
70 dissect_ConnectMCSPDU_PDU(tvb, pinfo, tree);
72 col_set_str(pinfo->cinfo, COL_INFO, "T.125 payload");
73 proto_tree_add_text(tree, tvb, 0, -1, "T.125 payload");
76 return tvb_length(tvb);
80 /*--- proto_register_t125 -------------------------------------------*/
81 void proto_register_t125(void) {
84 static hf_register_info hf[] = {
85 #include "packet-t125-hfarr.c"
88 /* List of subtrees */
89 static gint *ett[] = {
91 #include "packet-t125-ettarr.c"
94 /* Register protocol */
95 proto_t125 = proto_register_protocol(PNAME, PSNAME, PFNAME);
96 /* Register fields and subtrees */
97 proto_register_field_array(proto_t125, hf, array_length(hf));
98 proto_register_subtree_array(ett, array_length(ett));
100 new_register_dissector("t125", dissect_t125, proto_t125);
104 /*--- proto_reg_handoff_t125 ---------------------------------------*/
105 void proto_reg_handoff_t125(void) {