TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags
[wireshark-sm.git] / epan / dissectors / packet-dvb-ipdc.c
blobc49808d9a8596ca9a992d7f0c2c3baa0a6e5adea
1 /* packet-dvb-ipdc.c
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 * SPDX-License-Identifier: GPL-2.0-or-later
12 #include "config.h"
14 #include <epan/packet.h>
16 void proto_register_dvb_ipdc(void);
17 void proto_reg_handoff_dvb_ipdc(void);
19 /* Initialize the protocol and registered fields */
20 static int proto_ipdc;
22 /* static int hf_ipdc_esg_bootstrap_xml; */
24 /* Initialize the subtree pointers */
25 static int ett_ipdc;
28 enum {
29 DVB_IPDC_SUB_FLUTE,
30 DVB_IPDC_SUB_MAX
33 static dissector_handle_t ipdc_handle;
35 static dissector_handle_t sub_handles[DVB_IPDC_SUB_MAX];
37 #define UDP_PORT_IPDC_ESG_BOOTSTRAP 9214
40 /* Code to actually dissect the packets */
41 static int
42 dissect_ipdc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
44 tvbuff_t *next_tvb;
45 proto_tree *esg_tree = NULL;
47 col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPDC");
48 col_clear(pinfo->cinfo, COL_INFO);
50 /* call into flute */
51 if (tree) {
52 proto_item *ti;
54 ti = proto_tree_add_protocol_format(tree, proto_ipdc, tvb, 0, -1,
55 "ESG Bootstrap");
56 esg_tree = proto_item_add_subtree(ti, ett_ipdc);
59 next_tvb = tvb_new_subset_remaining(tvb, 0);
60 call_dissector(sub_handles[DVB_IPDC_SUB_FLUTE], next_tvb, pinfo, esg_tree);
61 return tvb_captured_length(tvb);
64 void
65 proto_register_dvb_ipdc(void)
67 #if 0
68 static hf_register_info hf[] = {
69 {&hf_ipdc_esg_bootstrap_xml,
70 {"ESG Provider Discovery", "dvb_ipdc.bootstrap",
71 FT_STRING, BASE_NONE, NULL, 0x0, "List of ESG Providers", HFILL}}
73 #endif
75 static int *ett[] = {
76 &ett_ipdc,
79 proto_ipdc = proto_register_protocol("ETSI IPDC Bootstrap",
80 "ESG Bootstrap", "dvb_ipdc");
81 #if 0
82 proto_register_field_array(proto_ipdc, hf, array_length(hf));
83 #endif
84 proto_register_subtree_array(ett, array_length(ett));
86 ipdc_handle = register_dissector("dvb_ipdc", dissect_ipdc, proto_ipdc);
89 void
90 proto_reg_handoff_dvb_ipdc(void)
92 sub_handles[DVB_IPDC_SUB_FLUTE] = find_dissector_add_dependency("alc", proto_ipdc);
94 dissector_add_uint_with_preference("udp.port", UDP_PORT_IPDC_ESG_BOOTSTRAP, ipdc_handle);
98 * Editor modelines - https://www.wireshark.org/tools/modelines.html
100 * Local variables:
101 * c-basic-offset: 4
102 * tab-width: 8
103 * indent-tabs-mode: nil
104 * End:
106 * vi: set shiftwidth=4 tabstop=8 expandtab:
107 * :indentSize=4:tabSize=8:noTabs=true: