aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dvb-ipdc.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2012-02-22 15:42:50 +0000
committerBill Meier <wmeier@newsguy.com>2012-02-22 15:42:50 +0000
commit397d29e83b00c21481cd2372d9a4df9e0a8a9a14 (patch)
tree021119db5db31ee04b48f3b2975ccbc7cc4b6078 /epan/dissectors/packet-dvb-ipdc.c
parent8fff390455a8286a17de1ae9d1924f2301b80f96 (diff)
Rename some enumeration constants; Do some minor code simplification & reformatting.
svn path=/trunk/; revision=41138
Diffstat (limited to 'epan/dissectors/packet-dvb-ipdc.c')
-rw-r--r--epan/dissectors/packet-dvb-ipdc.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/epan/dissectors/packet-dvb-ipdc.c b/epan/dissectors/packet-dvb-ipdc.c
index cbd1528c5b..de78e5c342 100644
--- a/epan/dissectors/packet-dvb-ipdc.c
+++ b/epan/dissectors/packet-dvb-ipdc.c
@@ -42,11 +42,11 @@ static gint ett_ipdc = -1;
enum {
- SUB_FLUTE,
- SUB_MAX,
+ DVB_IPDC_SUB_FLUTE,
+ DVB_IPDC_SUB_MAX,
};
-static dissector_handle_t sub_handles[SUB_MAX];
+static dissector_handle_t sub_handles[DVB_IPDC_SUB_MAX];
#define UDP_PORT_IPDC_ESG_BOOTSTRAP 9214
@@ -55,26 +55,23 @@ static dissector_handle_t sub_handles[SUB_MAX];
static void
dissect_ipdc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- tvbuff_t *next_tvb;
- guint16 len;
+ tvbuff_t *next_tvb;
proto_tree *esg_tree = NULL;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPDC");
col_clear(pinfo->cinfo, COL_INFO);
/* call into flute */
- len = tvb_reported_length_remaining(tvb, 0);
-
if (tree) {
proto_item *ti;
- ti = proto_tree_add_protocol_format(tree, proto_ipdc, tvb, 0, len,
- "ESG Bootstrap");
+ ti = proto_tree_add_protocol_format(tree, proto_ipdc, tvb, 0, -1,
+ "ESG Bootstrap");
esg_tree = proto_item_add_subtree(ti, ett_ipdc);
}
- next_tvb = tvb_new_subset(tvb, 0, len, len);
- call_dissector(sub_handles[SUB_FLUTE], next_tvb, pinfo, esg_tree);
+ next_tvb = tvb_new_subset_remaining(tvb, 0);
+ call_dissector(sub_handles[DVB_IPDC_SUB_FLUTE], next_tvb, pinfo, esg_tree);
}
void
@@ -82,8 +79,8 @@ proto_register_dvb_ipdc(void)
{
static hf_register_info hf[] = {
{&hf_ipdc_esg_bootstrap_xml,
- {"ESG Provider Discovery", "ipdc.bootstrap",
- FT_STRING, BASE_NONE, NULL, 0x0, "List of ESG Providers", HFILL}}
+ {"ESG Provider Discovery", "ipdc.bootstrap",
+ FT_STRING, BASE_NONE, NULL, 0x0, "List of ESG Providers", HFILL}}
};
static gint *ett[] = {
@@ -91,7 +88,7 @@ proto_register_dvb_ipdc(void)
};
proto_ipdc = proto_register_protocol("ETSI IPDC Bootstrap",
- "ESG Bootstrap", "dvb_ipdc");
+ "ESG Bootstrap", "dvb_ipdc");
proto_register_field_array(proto_ipdc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -103,7 +100,7 @@ proto_reg_handoff_dvb_ipdc(void)
{
dissector_handle_t ipdc_handle;
- sub_handles[SUB_FLUTE] = find_dissector("alc");
+ sub_handles[DVB_IPDC_SUB_FLUTE] = find_dissector("alc");
ipdc_handle = create_dissector_handle(dissect_ipdc, proto_ipdc);
dissector_add_uint("udp.port", UDP_PORT_IPDC_ESG_BOOTSTRAP, ipdc_handle);