2 * Routines for ETSI IP Datacast ESG Bootstrap parsing
3 * Copyright 2009 by Holger Hans Peter Freyther <zecke@selfish.org>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 #include <epan/packet.h>
30 void proto_register_dvb_ipdc(void);
31 void proto_reg_handoff_dvb_ipdc(void);
33 /* Initialize the protocol and registered fields */
34 static int proto_ipdc = -1;
36 /* static int hf_ipdc_esg_bootstrap_xml = -1; */
38 /* Initialize the subtree pointers */
39 static gint ett_ipdc = -1;
47 static dissector_handle_t sub_handles[DVB_IPDC_SUB_MAX];
49 #define UDP_PORT_IPDC_ESG_BOOTSTRAP 9214
52 /* Code to actually dissect the packets */
54 dissect_ipdc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
57 proto_tree *esg_tree = NULL;
59 col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPDC");
60 col_clear(pinfo->cinfo, COL_INFO);
66 ti = proto_tree_add_protocol_format(tree, proto_ipdc, tvb, 0, -1,
68 esg_tree = proto_item_add_subtree(ti, ett_ipdc);
71 next_tvb = tvb_new_subset_remaining(tvb, 0);
72 call_dissector(sub_handles[DVB_IPDC_SUB_FLUTE], next_tvb, pinfo, esg_tree);
76 proto_register_dvb_ipdc(void)
79 static hf_register_info hf[] = {
80 {&hf_ipdc_esg_bootstrap_xml,
81 {"ESG Provider Discovery", "ipdc.bootstrap",
82 FT_STRING, BASE_NONE, NULL, 0x0, "List of ESG Providers", HFILL}}
86 static gint *ett[] = {
90 proto_ipdc = proto_register_protocol("ETSI IPDC Bootstrap",
91 "ESG Bootstrap", "dvb_ipdc");
93 proto_register_field_array(proto_ipdc, hf, array_length(hf));
95 proto_register_subtree_array(ett, array_length(ett));
97 register_dissector("dvb_ipdc", dissect_ipdc, proto_ipdc);
101 proto_reg_handoff_dvb_ipdc(void)
103 dissector_handle_t ipdc_handle;
105 sub_handles[DVB_IPDC_SUB_FLUTE] = find_dissector("alc");
107 ipdc_handle = create_dissector_handle(dissect_ipdc, proto_ipdc);
108 dissector_add_uint("udp.port", UDP_PORT_IPDC_ESG_BOOTSTRAP, ipdc_handle);
112 * Editor modelines - http://www.wireshark.org/tools/modelines.html
117 * indent-tabs-mode: nil
120 * vi: set shiftwidth=4 tabstop=8 expandtab:
121 * :indentSize=4:tabSize=8:noTabs=true: