1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Ethereal dissector compiler */
3 /* ./packet-h248_package_bcp.c */
4 /* ../../tools/asn2eth.py -X -b -e -p h248_package_bcp -c h248_package_bcp.cnf -s packet-h248_package_bcp-template BCP.asn */
6 /* Input file: packet-h248_package_bcp-template.c */
8 /* packet-h248_package_bcp.c
9 * Routines for H.248/MEGACO-Package_bcp packet dissection
10 * Ronnie Sahlberg 2004
14 * Ethereal - Network traffic analyzer
15 * By Gerald Combs <gerald@ethereal.com>
16 * Copyright 1998 Gerald Combs
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License
20 * as published by the Free Software Foundation; either version 2
21 * of the License, or (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
38 #include <epan/packet.h>
39 #include <epan/conversation.h>
44 #include "packet-ber.h"
45 #include "packet-h248_package_bcp.h"
47 #define PNAME "H.248 MEGACO/BCP"
48 #define PSNAME "H248BCP"
49 #define PFNAME "h248bcp"
51 /* Initialize the protocol and registered fields */
52 static int proto_h248_package_bcp = -1;
54 /*--- Included file: packet-h248_package_bcp-hf.c ---*/
56 static int hf_h248_package_bcp_BNCChar_PDU = -1; /* BNCChar */
58 /*--- End of included file: packet-h248_package_bcp-hf.c ---*/
61 /* Initialize the subtree pointers */
62 static gint ett_h248_package_bcp = -1;
63 /*#include "packet-h248_package_bcp-ett.c"*/
67 /*--- Included file: packet-h248_package_bcp-fn.c ---*/
69 /*--- Fields for imported types ---*/
73 static const value_string BNCChar_vals[] = {
84 dissect_h248_package_bcp_BNCChar(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
85 offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_index, NULL);
92 static void dissect_BNCChar_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
93 dissect_h248_package_bcp_BNCChar(FALSE, tvb, 0, pinfo, tree, hf_h248_package_bcp_BNCChar_PDU);
97 /*--- End of included file: packet-h248_package_bcp-fn.c ---*/
101 /*--- proto_register_h248_package_bcp ----------------------------------------------*/
102 void proto_register_h248_package_bcp(void) {
105 static hf_register_info hf[] = {
107 /*--- Included file: packet-h248_package_bcp-hfarr.c ---*/
109 { &hf_h248_package_bcp_BNCChar_PDU,
110 { "BNCChar", "h248_package_bcp.BNCChar",
111 FT_UINT32, BASE_DEC, VALS(BNCChar_vals), 0,
114 /*--- End of included file: packet-h248_package_bcp-hfarr.c ---*/
118 /* List of subtrees */
119 static gint *ett[] = {
120 &ett_h248_package_bcp,
121 /*#include "packet-h248_package_bcp-ettarr.c"*/
124 /* Register protocol */
125 proto_h248_package_bcp = proto_register_protocol(PNAME, PSNAME, PFNAME);
127 /* Register fields and subtrees */
128 proto_register_field_array(proto_h248_package_bcp, hf, array_length(hf));
129 proto_register_subtree_array(ett, array_length(ett));
134 /*--- proto_reg_handoff_h248_package_bcp -------------------------------------------*/
135 void proto_reg_handoff_h248_package_bcp(void) {
136 dissector_handle_t h248_package_bcp_handle;
139 h248_package_bcp_handle = create_dissector_handle(dissect_BNCChar_PDU, proto_h248_package_bcp);
140 dissector_add("h248.package.bin", 0x001e0001, h248_package_bcp_handle);