aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dvb-sdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-dvb-sdt.c')
-rw-r--r--epan/dissectors/packet-dvb-sdt.c60
1 files changed, 26 insertions, 34 deletions
diff --git a/epan/dissectors/packet-dvb-sdt.c b/epan/dissectors/packet-dvb-sdt.c
index d8062056b1..761cb963d4 100644
--- a/epan/dissectors/packet-dvb-sdt.c
+++ b/epan/dissectors/packet-dvb-sdt.c
@@ -18,27 +18,29 @@
void proto_register_dvb_sdt(void);
void proto_reg_handoff_dvb_sdt(void);
-static int proto_dvb_sdt = -1;
-static int hf_dvb_sdt_transport_stream_id = -1;
-static int hf_dvb_sdt_reserved1 = -1;
-static int hf_dvb_sdt_version_number = -1;
-static int hf_dvb_sdt_current_next_indicator = -1;
-static int hf_dvb_sdt_section_number = -1;
-static int hf_dvb_sdt_last_section_number = -1;
-
-static int hf_dvb_sdt_original_network_id = -1;
-static int hf_dvb_sdt_reserved2 = -1;
-
-static int hf_dvb_sdt_service_id = -1;
-static int hf_dvb_sdt_reserved3 = -1;
-static int hf_dvb_sdt_eit_schedule_flag = -1;
-static int hf_dvb_sdt_eit_present_following_flag = -1;
-static int hf_dvb_sdt_running_status = -1;
-static int hf_dvb_sdt_free_ca_mode = -1;
-static int hf_dvb_sdt_descriptors_loop_length = -1;
-
-static gint ett_dvb_sdt = -1;
-static gint ett_dvb_sdt_service = -1;
+static dissector_handle_t dvb_sdt_handle;
+
+static int proto_dvb_sdt;
+static int hf_dvb_sdt_transport_stream_id;
+static int hf_dvb_sdt_reserved1;
+static int hf_dvb_sdt_version_number;
+static int hf_dvb_sdt_current_next_indicator;
+static int hf_dvb_sdt_section_number;
+static int hf_dvb_sdt_last_section_number;
+
+static int hf_dvb_sdt_original_network_id;
+static int hf_dvb_sdt_reserved2;
+
+static int hf_dvb_sdt_service_id;
+static int hf_dvb_sdt_reserved3;
+static int hf_dvb_sdt_eit_schedule_flag;
+static int hf_dvb_sdt_eit_present_following_flag;
+static int hf_dvb_sdt_running_status;
+static int hf_dvb_sdt_free_ca_mode;
+static int hf_dvb_sdt_descriptors_loop_length;
+
+static gint ett_dvb_sdt;
+static gint ett_dvb_sdt_service;
#define DVB_SDT_RESERVED1_MASK 0xC0
#define DVB_SDT_VERSION_NUMBER_MASK 0x3E
@@ -52,14 +54,6 @@ static gint ett_dvb_sdt_service = -1;
#define DVB_SDT_FREE_CA_MODE_MASK 0x1000
#define DVB_SDT_DESCRIPTORS_LOOP_LENGTH_MASK 0x0FFF
-
-static const value_string dvb_sdt_cur_next_vals[] = {
- { 0, "Not yet applicable" },
- { 1, "Currently applicable" },
-
- { 0, NULL }
-};
-
static const value_string dvb_sdt_running_status_vals[] = {
{ 0, "Undefined" },
{ 1, "Not Running" },
@@ -177,7 +171,7 @@ proto_register_dvb_sdt(void)
{ &hf_dvb_sdt_current_next_indicator, {
"Current/Next Indicator", "dvb_sdt.cur_next_ind",
- FT_UINT8, BASE_DEC, VALS(dvb_sdt_cur_next_vals), DVB_SDT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
+ FT_BOOLEAN, 8, TFS(&tfs_current_not_yet), DVB_SDT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
} },
{ &hf_dvb_sdt_section_number, {
@@ -233,7 +227,7 @@ proto_register_dvb_sdt(void)
{ &hf_dvb_sdt_descriptors_loop_length, {
"Descriptors Loop Length", "dvb_sdt.svc.descr_loop_len",
- FT_UINT16, BASE_HEX, NULL, DVB_SDT_DESCRIPTORS_LOOP_LENGTH_MASK, NULL, HFILL
+ FT_UINT16, BASE_DEC, NULL, DVB_SDT_DESCRIPTORS_LOOP_LENGTH_MASK, NULL, HFILL
} }
};
@@ -248,14 +242,12 @@ proto_register_dvb_sdt(void)
proto_register_field_array(proto_dvb_sdt, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ dvb_sdt_handle = register_dissector("dvb_sdt", dissect_dvb_sdt, proto_dvb_sdt);
}
void proto_reg_handoff_dvb_sdt(void)
{
- dissector_handle_t dvb_sdt_handle;
-
- dvb_sdt_handle = create_dissector_handle(dissect_dvb_sdt, proto_dvb_sdt);
dissector_add_uint("mpeg_sect.tid", DVB_SDT_TID_ACTUAL, dvb_sdt_handle);
dissector_add_uint("mpeg_sect.tid", DVB_SDT_TID_OTHER, dvb_sdt_handle);
}