aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2013-03-14 14:42:12 +0000
committerBill Meier <wmeier@newsguy.com>2013-03-14 14:42:12 +0000
commit77376a2363be6fda0576876db550acfe412dd223 (patch)
tree794079ad93eb7f803d955d85b18ee37d0c331ef0
parent8dfa2eac7e61a0d46c7b9e0f86a71252903c1ee5 (diff)
Change "4 space tabs" indentation to use "4 spaces" indentation.
Also: - remove some unneeded initializers; - remove several unneeded 'col_clear()' calls; - guint8 --> guint to prevent a possible overflow; - reformat for style in some cases. svn path=/trunk/; revision=48297
-rw-r--r--epan/dissectors/packet-dvb-bat.c331
-rw-r--r--epan/dissectors/packet-dvb-data-mpe.c214
-rw-r--r--epan/dissectors/packet-dvb-eit.c391
-rw-r--r--epan/dissectors/packet-dvb-nit.c313
-rw-r--r--epan/dissectors/packet-dvb-sdt.c307
-rw-r--r--epan/dissectors/packet-dvb-tdt.c72
-rw-r--r--epan/dissectors/packet-dvb-tot.c110
-rw-r--r--epan/dissectors/packet-mpeg-ca.c128
-rw-r--r--epan/dissectors/packet-mpeg-descriptor.c6238
-rw-r--r--epan/dissectors/packet-mpeg-dsmcc.c1646
-rw-r--r--epan/dissectors/packet-mpeg-pat.c195
-rw-r--r--epan/dissectors/packet-mpeg-pmt.c397
-rw-r--r--epan/dissectors/packet-mpeg-sect.c456
13 files changed, 5401 insertions, 5397 deletions
diff --git a/epan/dissectors/packet-dvb-bat.c b/epan/dissectors/packet-dvb-bat.c
index ae214fd5b6..12b96e5355 100644
--- a/epan/dissectors/packet-dvb-bat.c
+++ b/epan/dissectors/packet-dvb-bat.c
@@ -55,120 +55,119 @@ static gint ett_dvb_bat = -1;
static gint ett_dvb_bat_transport_stream = -1;
-#define DVB_BAT_TID 0x4A
+#define DVB_BAT_TID 0x4A
-#define DVB_BAT_RESERVED1_MASK 0xC0
-#define DVB_BAT_VERSION_NUMBER_MASK 0x3E
-#define DVB_BAT_CURRENT_NEXT_INDICATOR_MASK 0x01
+#define DVB_BAT_RESERVED1_MASK 0xC0
+#define DVB_BAT_VERSION_NUMBER_MASK 0x3E
+#define DVB_BAT_CURRENT_NEXT_INDICATOR_MASK 0x01
-#define DVB_BAT_RESERVED2_MASK 0xF000
-#define DVB_BAT_BOUQUET_DESCRIPTORS_LENGTH_MASK 0x0FFF
+#define DVB_BAT_RESERVED2_MASK 0xF000
+#define DVB_BAT_BOUQUET_DESCRIPTORS_LENGTH_MASK 0x0FFF
-#define DVB_BAT_RESERVED3_MASK 0xF000
-#define DVB_BAT_TRANSPORT_STREAM_LOOP_LENGTH_MASK 0x0FFF
+#define DVB_BAT_RESERVED3_MASK 0xF000
+#define DVB_BAT_TRANSPORT_STREAM_LOOP_LENGTH_MASK 0x0FFF
-#define DVB_BAT_RESERVED4_MASK 0xF000
-#define DVB_BAT_TRANSPORT_DESCRIPTORS_LENGTH_MASK 0x0FFF
+#define DVB_BAT_RESERVED4_MASK 0xF000
+#define DVB_BAT_TRANSPORT_DESCRIPTORS_LENGTH_MASK 0x0FFF
static const value_string dvb_bat_cur_next_vals[] = {
- { 0, "Not yet applicable" },
- { 1, "Currently applicable" },
+ { 0, "Not yet applicable" },
+ { 1, "Currently applicable" },
- { 0, NULL }
+ { 0, NULL }
};
static const value_string dvb_bat_running_status_vals[] = {
- { 0, "Undefined" },
- { 1, "Not Running" },
- { 2, "Starts in a few seconds" },
- { 3, "Pausing" },
- { 4, "Running" },
- { 5, "Service off-air" },
-
- { 0, NULL }
+ { 0, "Undefined" },
+ { 1, "Not Running" },
+ { 2, "Starts in a few seconds" },
+ { 3, "Pausing" },
+ { 4, "Running" },
+ { 5, "Service off-air" },
+
+ { 0, NULL }
};
static const value_string dvb_bat_free_ca_mode_vals[] = {
- { 0, "Not Scrambled" },
- { 1, "One or more component scrambled" },
+ { 0, "Not Scrambled" },
+ { 1, "One or more component scrambled" },
- { 0, NULL }
+ { 0, NULL }
};
static void
dissect_dvb_bat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset = 0, length = 0, descriptor_end = 0, ts_loop_end = 0;
- guint16 ts_id = 0, descriptor_len = 0, ts_loop_len = 0;
+ guint offset = 0, length = 0, descriptor_end, ts_loop_end;
+ guint16 ts_id, descriptor_len, ts_loop_len;
- proto_item *ti;
- proto_tree *dvb_bat_tree;
- proto_item *tsi;
- proto_tree *transport_stream_tree;
+ proto_item *ti;
+ proto_tree *dvb_bat_tree;
+ proto_item *tsi;
+ proto_tree *transport_stream_tree;
- col_clear(pinfo->cinfo, COL_INFO);
- col_set_str(pinfo->cinfo, COL_INFO, "Bouquet Association Table (BAT)");
+ col_set_str(pinfo->cinfo, COL_INFO, "Bouquet Association Table (BAT)");
- ti = proto_tree_add_item(tree, proto_dvb_bat, tvb, offset, -1, ENC_NA);
- dvb_bat_tree = proto_item_add_subtree(ti, ett_dvb_bat);
+ ti = proto_tree_add_item(tree, proto_dvb_bat, tvb, offset, -1, ENC_NA);
+ dvb_bat_tree = proto_item_add_subtree(ti, ett_dvb_bat);
- offset += packet_mpeg_sect_header(tvb, offset, dvb_bat_tree, &length, NULL);
- length -= 4;
+ offset += packet_mpeg_sect_header(tvb, offset, dvb_bat_tree, &length, NULL);
+ length -= 4;
- proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_bouquet_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_bouquet_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- descriptor_len = tvb_get_ntohs(tvb, offset) & DVB_BAT_BOUQUET_DESCRIPTORS_LENGTH_MASK;
- proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_reserved2, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_bouquet_descriptors_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ descriptor_len = tvb_get_ntohs(tvb, offset) & DVB_BAT_BOUQUET_DESCRIPTORS_LENGTH_MASK;
+ proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_reserved2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_bouquet_descriptors_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- descriptor_end = offset + descriptor_len;
- while (offset < descriptor_end)
- offset += proto_mpeg_descriptor_dissect(tvb, offset, dvb_bat_tree);
+ descriptor_end = offset + descriptor_len;
+ while (offset < descriptor_end)
+ offset += proto_mpeg_descriptor_dissect(tvb, offset, dvb_bat_tree);
- ts_loop_len = tvb_get_ntohs(tvb, offset) & DVB_BAT_TRANSPORT_STREAM_LOOP_LENGTH_MASK;
- proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_reserved3, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_transport_stream_loop_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ ts_loop_len = tvb_get_ntohs(tvb, offset) & DVB_BAT_TRANSPORT_STREAM_LOOP_LENGTH_MASK;
+ proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_reserved3, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_bat_tree, hf_dvb_bat_transport_stream_loop_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- ts_loop_end = offset + ts_loop_len;
- while (offset < ts_loop_end) {
- ts_id = tvb_get_ntohs(tvb, offset);
- descriptor_len = tvb_get_ntohs(tvb, offset + 4) & DVB_BAT_TRANSPORT_DESCRIPTORS_LENGTH_MASK;
+ ts_loop_end = offset + ts_loop_len;
+ while (offset < ts_loop_end) {
+ ts_id = tvb_get_ntohs(tvb, offset);
+ descriptor_len = tvb_get_ntohs(tvb, offset + 4) & DVB_BAT_TRANSPORT_DESCRIPTORS_LENGTH_MASK;
- tsi = proto_tree_add_text(dvb_bat_tree, tvb, offset, 6 + descriptor_len, "Transport Stream 0x%04x", ts_id);
- transport_stream_tree = proto_item_add_subtree(tsi, ett_dvb_bat_transport_stream);
+ tsi = proto_tree_add_text(dvb_bat_tree, tvb, offset, 6 + descriptor_len, "Transport Stream 0x%04x", ts_id);
+ transport_stream_tree = proto_item_add_subtree(tsi, ett_dvb_bat_transport_stream);
- proto_tree_add_item(transport_stream_tree, hf_dvb_bat_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(transport_stream_tree, hf_dvb_bat_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(transport_stream_tree, hf_dvb_bat_original_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(transport_stream_tree, hf_dvb_bat_original_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(transport_stream_tree, hf_dvb_bat_reserved4, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(transport_stream_tree, hf_dvb_bat_transport_descriptors_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(transport_stream_tree, hf_dvb_bat_reserved4, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(transport_stream_tree, hf_dvb_bat_transport_descriptors_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- descriptor_end = offset + descriptor_len;
- while (offset < descriptor_end)
- offset += proto_mpeg_descriptor_dissect(tvb, offset, transport_stream_tree);
- }
+ descriptor_end = offset + descriptor_len;
+ while (offset < descriptor_end)
+ offset += proto_mpeg_descriptor_dissect(tvb, offset, transport_stream_tree);
+ }
- offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_bat_tree, 0, offset);
- proto_item_set_len(ti, offset);
+ offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_bat_tree, 0, offset);
+ proto_item_set_len(ti, offset);
}
@@ -176,100 +175,100 @@ void
proto_register_dvb_bat(void)
{
- static hf_register_info hf[] = {
-
- { &hf_dvb_bat_bouquet_id, {
- "Service ID", "dvb_bat.sid",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_bat_reserved1, {
- "Reserved", "dvb_bat.reserved1",
- FT_UINT8, BASE_HEX, NULL, DVB_BAT_RESERVED1_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_bat_version_number, {
- "Version Number", "dvb_bat.version",
- FT_UINT8, BASE_HEX, NULL, DVB_BAT_VERSION_NUMBER_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_bat_current_next_indicator, {
- "Current/Next Indicator", "dvb_bat.cur_next_ind",
- FT_UINT8, BASE_DEC, VALS(dvb_bat_cur_next_vals), DVB_BAT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_bat_section_number, {
- "Section Number", "dvb_bat.sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_bat_last_section_number, {
- "Last Section Number", "dvb_bat.last_sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_bat_reserved2, {
- "Reserved", "dvb_bat.reserved2",
- FT_UINT16, BASE_HEX, NULL, DVB_BAT_RESERVED2_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_bat_bouquet_descriptors_length, {
- "Bouquet Descriptors Length", "dvb_bat.bouquet_desc_len",
- FT_UINT16, BASE_DEC, NULL, DVB_BAT_BOUQUET_DESCRIPTORS_LENGTH_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_bat_reserved3, {
- "Reserved", "dvb_bat.reserved3",
- FT_UINT16, BASE_HEX, NULL, DVB_BAT_RESERVED3_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_bat_transport_stream_loop_length, {
- "Transport Stream Loop Length", "dvb_bat.ts_loop_len",
- FT_UINT16, BASE_DEC, NULL, DVB_BAT_TRANSPORT_STREAM_LOOP_LENGTH_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_bat_transport_stream_id, {
- "Transport Stream ID", "dvb_bat.ts.id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_bat_original_network_id, {
- "Original Network ID", "dvb_bat.ts.original_nid",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_bat_reserved4, {
- "Reserved", "dvb_bat.ts.reserved",
- FT_UINT16, BASE_HEX, NULL, DVB_BAT_RESERVED4_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_bat_transport_descriptors_length, {
- "Bouquet Descriptors Length", "dvb_bat.ts.desc_len",
- FT_UINT16, BASE_DEC, NULL, DVB_BAT_BOUQUET_DESCRIPTORS_LENGTH_MASK, NULL, HFILL
- } },
-
- };
-
- static gint *ett[] = {
- &ett_dvb_bat,
- &ett_dvb_bat_transport_stream
- };
-
- proto_dvb_bat = proto_register_protocol("DVB Bouquet Association Table", "DVB BAT", "dvb_bat");
-
- proto_register_field_array(proto_dvb_bat, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ static hf_register_info hf[] = {
+
+ { &hf_dvb_bat_bouquet_id, {
+ "Service ID", "dvb_bat.sid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_reserved1, {
+ "Reserved", "dvb_bat.reserved1",
+ FT_UINT8, BASE_HEX, NULL, DVB_BAT_RESERVED1_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_version_number, {
+ "Version Number", "dvb_bat.version",
+ FT_UINT8, BASE_HEX, NULL, DVB_BAT_VERSION_NUMBER_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_current_next_indicator, {
+ "Current/Next Indicator", "dvb_bat.cur_next_ind",
+ FT_UINT8, BASE_DEC, VALS(dvb_bat_cur_next_vals), DVB_BAT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_section_number, {
+ "Section Number", "dvb_bat.sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_last_section_number, {
+ "Last Section Number", "dvb_bat.last_sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_reserved2, {
+ "Reserved", "dvb_bat.reserved2",
+ FT_UINT16, BASE_HEX, NULL, DVB_BAT_RESERVED2_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_bouquet_descriptors_length, {
+ "Bouquet Descriptors Length", "dvb_bat.bouquet_desc_len",
+ FT_UINT16, BASE_DEC, NULL, DVB_BAT_BOUQUET_DESCRIPTORS_LENGTH_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_reserved3, {
+ "Reserved", "dvb_bat.reserved3",
+ FT_UINT16, BASE_HEX, NULL, DVB_BAT_RESERVED3_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_transport_stream_loop_length, {
+ "Transport Stream Loop Length", "dvb_bat.ts_loop_len",
+ FT_UINT16, BASE_DEC, NULL, DVB_BAT_TRANSPORT_STREAM_LOOP_LENGTH_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_transport_stream_id, {
+ "Transport Stream ID", "dvb_bat.ts.id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_original_network_id, {
+ "Original Network ID", "dvb_bat.ts.original_nid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_reserved4, {
+ "Reserved", "dvb_bat.ts.reserved",
+ FT_UINT16, BASE_HEX, NULL, DVB_BAT_RESERVED4_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_bat_transport_descriptors_length, {
+ "Bouquet Descriptors Length", "dvb_bat.ts.desc_len",
+ FT_UINT16, BASE_DEC, NULL, DVB_BAT_BOUQUET_DESCRIPTORS_LENGTH_MASK, NULL, HFILL
+ } },
+
+ };
+
+ static gint *ett[] = {
+ &ett_dvb_bat,
+ &ett_dvb_bat_transport_stream
+ };
+
+ proto_dvb_bat = proto_register_protocol("DVB Bouquet Association Table", "DVB BAT", "dvb_bat");
+
+ proto_register_field_array(proto_dvb_bat, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
void proto_reg_handoff_dvb_bat(void)
{
- dissector_handle_t dvb_bat_handle;
+ dissector_handle_t dvb_bat_handle;
- dvb_bat_handle = create_dissector_handle(dissect_dvb_bat, proto_dvb_bat);
+ dvb_bat_handle = create_dissector_handle(dissect_dvb_bat, proto_dvb_bat);
- dissector_add_uint("mpeg_sect.tid", DVB_BAT_TID, dvb_bat_handle);
+ dissector_add_uint("mpeg_sect.tid", DVB_BAT_TID, dvb_bat_handle);
}
/*
@@ -277,10 +276,10 @@ void proto_reg_handoff_dvb_bat(void)
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/
diff --git a/epan/dissectors/packet-dvb-data-mpe.c b/epan/dissectors/packet-dvb-data-mpe.c
index b5adf8bfdb..1b795a215d 100644
--- a/epan/dissectors/packet-dvb-data-mpe.c
+++ b/epan/dissectors/packet-dvb-data-mpe.c
@@ -45,20 +45,20 @@ static gint ett_dvb_data_mpe = -1;
static dissector_handle_t ip_handle;
static dissector_handle_t llc_handle;
-#define DVB_DATA_MPE_TID 0x3E
+#define DVB_DATA_MPE_TID 0x3E
-#define DVB_DATA_MPE_RESERVED_MASK 0xC0
-#define DVB_DATA_MPE_PAYLOAD_SCRAMBLING_MASK 0x30
-#define DVB_DATA_MPE_ADDRESS_SCRAMBLING_MASK 0x0C
-#define DVB_DATA_MPE_LLC_SNAP_FLAG_MASK 0x02
-#define DVB_DATA_MPE_CURRENT_NEXT_INDICATOR_MASK 0x01
+#define DVB_DATA_MPE_RESERVED_MASK 0xC0
+#define DVB_DATA_MPE_PAYLOAD_SCRAMBLING_MASK 0x30
+#define DVB_DATA_MPE_ADDRESS_SCRAMBLING_MASK 0x0C
+#define DVB_DATA_MPE_LLC_SNAP_FLAG_MASK 0x02
+#define DVB_DATA_MPE_CURRENT_NEXT_INDICATOR_MASK 0x01
static const value_string dvb_rcs_cur_next_vals[] = {
- { 0x0, "Not yet applicable" },
- { 0x1, "Currently applicable" },
- { 0, NULL },
+ { 0x0, "Not yet applicable" },
+ { 0x1, "Currently applicable" },
+ { 0, NULL },
};
@@ -67,73 +67,73 @@ static void
dissect_dvb_data_mpe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset = 0, tot_len = 0;
- guint8 llc_snap_flag = 0;
- int i;
+ guint offset = 0, tot_len = 0;
+ guint8 llc_snap_flag;
+ int i;
- proto_item *ti = NULL;
- proto_tree *dvb_data_mpe_tree = NULL;
- tvbuff_t *mac_tvb = NULL;
- tvbuff_t *mac_bytes_tvb[6];
- tvbuff_t *data_tvb = NULL;
+ proto_item *ti;
+ proto_tree *dvb_data_mpe_tree;
+ tvbuff_t *mac_tvb;
+ tvbuff_t *mac_bytes_tvb[6];
+ tvbuff_t *data_tvb;
- /* The TVB should start right after the section_length in the Section packet */
+ /* The TVB should start right after the section_length in the Section packet */
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "DVB-DATA");
- col_set_str(pinfo->cinfo, COL_INFO, "MultiProtocol Encapsulation");
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "DVB-DATA");
+ col_set_str(pinfo->cinfo, COL_INFO, "MultiProtocol Encapsulation");
- ti = proto_tree_add_item(tree, proto_dvb_data_mpe, tvb, offset, -1, ENC_NA);
- dvb_data_mpe_tree = proto_item_add_subtree(ti, ett_dvb_data_mpe);
+ ti = proto_tree_add_item(tree, proto_dvb_data_mpe, tvb, offset, -1, ENC_NA);
+ dvb_data_mpe_tree = proto_item_add_subtree(ti, ett_dvb_data_mpe);
- offset += packet_mpeg_sect_header(tvb, offset, dvb_data_mpe_tree, &tot_len, NULL);
+ offset += packet_mpeg_sect_header(tvb, offset, dvb_data_mpe_tree, &tot_len, NULL);
- /* Parse the DMC-CC private section header */
+ /* Parse the DMC-CC private section header */
- mac_bytes_tvb[5] = tvb_new_subset(tvb, offset, 1, 1);
- offset++;
- mac_bytes_tvb[4] = tvb_new_subset(tvb, offset, 1, 1);
- offset++;
+ mac_bytes_tvb[5] = tvb_new_subset(tvb, offset, 1, 1);
+ offset += 1;
+ mac_bytes_tvb[4] = tvb_new_subset(tvb, offset, 1, 1);
+ offset += 1;
- proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_payload_scrambling_control, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_address_scrambling_control, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_llc_snap_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
- llc_snap_flag = tvb_get_guint8(tvb, offset) & DVB_DATA_MPE_LLC_SNAP_FLAG_MASK;
- offset++;
+ proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_payload_scrambling_control, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_address_scrambling_control, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_llc_snap_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
+ llc_snap_flag = tvb_get_guint8(tvb, offset) & DVB_DATA_MPE_LLC_SNAP_FLAG_MASK;
+ offset += 1;
- proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- for (i = 3; i >= 0; i--) {
- mac_bytes_tvb[i] = tvb_new_subset(tvb, offset, 1, 1);
- offset++;
- }
+ for (i = 3; i >= 0; i--) {
+ mac_bytes_tvb[i] = tvb_new_subset(tvb, offset, 1, 1);
+ offset += 1;
+ }
- mac_tvb = tvb_new_composite();
+ mac_tvb = tvb_new_composite();
- for (i = 0; i < 6; i++)
- tvb_composite_append(mac_tvb, mac_bytes_tvb[i]);
+ for (i = 0; i < 6; i++)
+ tvb_composite_append(mac_tvb, mac_bytes_tvb[i]);
- tvb_composite_finalize(mac_tvb);
+ tvb_composite_finalize(mac_tvb);
- proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_dst_mac, mac_tvb, 0 , 6, ENC_NA);
- col_add_str(pinfo->cinfo, COL_RES_DL_DST, tvb_ether_to_str(mac_tvb, 0));
+ proto_tree_add_item(dvb_data_mpe_tree, hf_dvb_data_mpe_dst_mac, mac_tvb, 0 , 6, ENC_NA);
+ col_add_str(pinfo->cinfo, COL_RES_DL_DST, tvb_ether_to_str(mac_tvb, 0));
- data_tvb = tvb_new_subset_remaining(tvb, offset);
+ data_tvb = tvb_new_subset_remaining(tvb, offset);
- if (llc_snap_flag) {
- call_dissector(llc_handle, data_tvb, pinfo, tree);
- } else {
- call_dissector(ip_handle, data_tvb, pinfo, tree);
- }
+ if (llc_snap_flag) {
+ call_dissector(llc_handle, data_tvb, pinfo, tree);
+ } else {
+ call_dissector(ip_handle, data_tvb, pinfo, tree);
+ }
- packet_mpeg_sect_crc(tvb, pinfo, dvb_data_mpe_tree, 0, tot_len - 1);
- return;
+ packet_mpeg_sect_crc(tvb, pinfo, dvb_data_mpe_tree, 0, tot_len - 1);
+ return;
}
@@ -141,60 +141,60 @@ void
proto_register_dvb_data_mpe(void)
{
- static hf_register_info hf[] = {
+ static hf_register_info hf[] = {
- /* DSM-CC common fields */
- { &hf_dvb_data_mpe_reserved, {
- "Reserved", "dvb_data_mpe.reserved",
- FT_UINT8, BASE_HEX, NULL, DVB_DATA_MPE_RESERVED_MASK, NULL, HFILL
- } },
+ /* DSM-CC common fields */
+ { &hf_dvb_data_mpe_reserved, {
+ "Reserved", "dvb_data_mpe.reserved",
+ FT_UINT8, BASE_HEX, NULL, DVB_DATA_MPE_RESERVED_MASK, NULL, HFILL
+ } },
- { &hf_dvb_data_mpe_payload_scrambling_control, {
- "Payload Scrambling Control", "dvb_data_mpe.pload_scrambling",
- FT_UINT8, BASE_HEX, NULL, DVB_DATA_MPE_PAYLOAD_SCRAMBLING_MASK, NULL, HFILL
- } },
+ { &hf_dvb_data_mpe_payload_scrambling_control, {
+ "Payload Scrambling Control", "dvb_data_mpe.pload_scrambling",
+ FT_UINT8, BASE_HEX, NULL, DVB_DATA_MPE_PAYLOAD_SCRAMBLING_MASK, NULL, HFILL
+ } },
- { &hf_dvb_data_mpe_address_scrambling_control, {
- "Address Scrambling Control", "dvb_data_mpe.addr_scrambling",
- FT_UINT8, BASE_HEX, NULL, DVB_DATA_MPE_ADDRESS_SCRAMBLING_MASK, NULL, HFILL
- } },
+ { &hf_dvb_data_mpe_address_scrambling_control, {
+ "Address Scrambling Control", "dvb_data_mpe.addr_scrambling",
+ FT_UINT8, BASE_HEX, NULL, DVB_DATA_MPE_ADDRESS_SCRAMBLING_MASK, NULL, HFILL
+ } },
- { &hf_dvb_data_mpe_llc_snap_flag, {
- "LLC SNAP Flag", "dvb_data_mpe.llc_snap_flag",
- FT_UINT8, BASE_HEX, NULL, DVB_DATA_MPE_LLC_SNAP_FLAG_MASK, NULL, HFILL
- } },
+ { &hf_dvb_data_mpe_llc_snap_flag, {
+ "LLC SNAP Flag", "dvb_data_mpe.llc_snap_flag",
+ FT_UINT8, BASE_HEX, NULL, DVB_DATA_MPE_LLC_SNAP_FLAG_MASK, NULL, HFILL
+ } },
- { &hf_dvb_data_mpe_current_next_indicator, {
- "Current/Next Indicator", "mpeg_sect.cur_next_ind",
- FT_UINT8, BASE_HEX, VALS(dvb_rcs_cur_next_vals), DVB_DATA_MPE_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
- } },
+ { &hf_dvb_data_mpe_current_next_indicator, {
+ "Current/Next Indicator", "mpeg_sect.cur_next_ind",
+ FT_UINT8, BASE_HEX, VALS(dvb_rcs_cur_next_vals), DVB_DATA_MPE_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
+ } },
- { &hf_dvb_data_mpe_section_number, {
- "Section Number", "dvb_data_mpe.sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
+ { &hf_dvb_data_mpe_section_number, {
+ "Section Number", "dvb_data_mpe.sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
- { &hf_dvb_data_mpe_last_section_number, {
- "Last Section Number", "dvb_data_mpe.last_sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
+ { &hf_dvb_data_mpe_last_section_number, {
+ "Last Section Number", "dvb_data_mpe.last_sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
- { &hf_dvb_data_mpe_dst_mac, {
- "Destination MAC address", "dvb_data_mpe.dst_mac",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
+ { &hf_dvb_data_mpe_dst_mac, {
+ "Destination MAC address", "dvb_data_mpe.dst_mac",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
- };
+ };
- static gint *ett[] = {
- &ett_dvb_data_mpe,
- };
+ static gint *ett[] = {
+ &ett_dvb_data_mpe,
+ };
- proto_dvb_data_mpe = proto_register_protocol("DVB-DATA MultiProtocol Encapsulation", "DVB-DATA MPE", "dvb_data_mpe");
- proto_register_field_array(proto_dvb_data_mpe, hf, array_length(hf));
+ proto_dvb_data_mpe = proto_register_protocol("DVB-DATA MultiProtocol Encapsulation", "DVB-DATA MPE", "dvb_data_mpe");
+ proto_register_field_array(proto_dvb_data_mpe, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_register_subtree_array(ett, array_length(ett));
}
@@ -203,13 +203,13 @@ void
proto_reg_handoff_dvb_data_mpe(void)
{
- dissector_handle_t dvb_data_mpe_handle;
+ dissector_handle_t dvb_data_mpe_handle;
- dvb_data_mpe_handle = create_dissector_handle(dissect_dvb_data_mpe, proto_dvb_data_mpe);
- dissector_add_uint("mpeg_sect.tid", DVB_DATA_MPE_TID, dvb_data_mpe_handle);
+ dvb_data_mpe_handle = create_dissector_handle(dissect_dvb_data_mpe, proto_dvb_data_mpe);
+ dissector_add_uint("mpeg_sect.tid", DVB_DATA_MPE_TID, dvb_data_mpe_handle);
- ip_handle = find_dissector("ip");
- llc_handle = find_dissector("llc");
+ ip_handle = find_dissector("ip");
+ llc_handle = find_dissector("llc");
}
@@ -218,10 +218,10 @@ proto_reg_handoff_dvb_data_mpe(void)
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/
diff --git a/epan/dissectors/packet-dvb-eit.c b/epan/dissectors/packet-dvb-eit.c
index 48068349d9..c696c9aa9f 100644
--- a/epan/dissectors/packet-dvb-eit.c
+++ b/epan/dissectors/packet-dvb-eit.c
@@ -56,142 +56,142 @@ static gint ett_dvb_eit = -1;
static gint ett_dvb_eit_event = -1;
-#define DVB_EIT_TID_MIN 0x4E
-#define DVB_EIT_TID_MAX 0x6F
+#define DVB_EIT_TID_MIN 0x4E
+#define DVB_EIT_TID_MAX 0x6F
-#define DVB_EIT_RESERVED_MASK 0xC0
-#define DVB_EIT_VERSION_NUMBER_MASK 0x3E
-#define DVB_EIT_CURRENT_NEXT_INDICATOR_MASK 0x01
+#define DVB_EIT_RESERVED_MASK 0xC0
+#define DVB_EIT_VERSION_NUMBER_MASK 0x3E
+#define DVB_EIT_CURRENT_NEXT_INDICATOR_MASK 0x01
-#define DVB_EIT_RUNNING_STATUS_MASK 0xE000
-#define DVB_EIT_FREE_CA_MODE_MASK 0x1000
-#define DVB_EIT_DESCRIPTORS_LOOP_LENGTH_MASK 0x0FFF
+#define DVB_EIT_RUNNING_STATUS_MASK 0xE000
+#define DVB_EIT_FREE_CA_MODE_MASK 0x1000
+#define DVB_EIT_DESCRIPTORS_LOOP_LENGTH_MASK 0x0FFF
static const value_string dvb_eit_cur_next_vals[] = {
- { 0, "Not yet applicable" },
- { 1, "Currently applicable" },
+ { 0, "Not yet applicable" },
+ { 1, "Currently applicable" },
- { 0, NULL }
+ { 0, NULL }
};
static const value_string dvb_eit_running_status_vals[] = {
- { 0, "Undefined" },
- { 1, "Not Running" },
- { 2, "Starts in a few seconds" },
- { 3, "Pausing" },
- { 4, "Running" },
- { 5, "Service off-air" },
-
- { 0, NULL }
+ { 0, "Undefined" },
+ { 1, "Not Running" },
+ { 2, "Starts in a few seconds" },
+ { 3, "Pausing" },
+ { 4, "Running" },
+ { 5, "Service off-air" },
+
+ { 0, NULL }
};
static const value_string dvb_eit_free_ca_mode_vals[] = {
- { 0, "Not Scrambled" },
- { 1, "One or more component scrambled" },
+ { 0, "Not Scrambled" },
+ { 1, "One or more component scrambled" },
- { 0, NULL }
+ { 0, NULL }
};
static void
dissect_dvb_eit(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset = 0, length = 0;
- guint descriptor_len, descriptor_end;
- guint16 evt_id;
+ guint offset = 0, length = 0;
+ guint descriptor_len, descriptor_end;
+ guint16 evt_id;
- proto_item *ti;
- proto_tree *dvb_eit_tree;
- proto_item *ei;
- proto_tree *dvb_eit_event_tree;
- proto_item *duration_item;
+ proto_item *ti;
+ proto_tree *dvb_eit_tree;
+ proto_item *ei;
+ proto_tree *dvb_eit_event_tree;
+ proto_item *duration_item;
- nstime_t start_time;
+ nstime_t start_time;
- col_set_str(pinfo->cinfo, COL_INFO, "Event Information Table (EIT)");
+ col_set_str(pinfo->cinfo, COL_INFO, "Event Information Table (EIT)");
- ti = proto_tree_add_item(tree, proto_dvb_eit, tvb, offset, -1, ENC_NA);
- dvb_eit_tree = proto_item_add_subtree(ti, ett_dvb_eit);
+ ti = proto_tree_add_item(tree, proto_dvb_eit, tvb, offset, -1, ENC_NA);
+ dvb_eit_tree = proto_item_add_subtree(ti, ett_dvb_eit);
- offset += packet_mpeg_sect_header(tvb, offset, dvb_eit_tree, &length, NULL);
- length -= 4;
+ offset += packet_mpeg_sect_header(tvb, offset, dvb_eit_tree, &length, NULL);
+ length -= 4;
- proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_original_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_original_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_segment_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_segment_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_last_table_id, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_eit_tree, hf_dvb_eit_last_table_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- if (offset >= length) {
- packet_mpeg_sect_crc(tvb, pinfo, dvb_eit_tree, 0, offset);
+ if (offset >= length) {
+ packet_mpeg_sect_crc(tvb, pinfo, dvb_eit_tree, 0, offset);
- return;
- }
+ return;
+ }
- /* Parse all the events */
- while (offset < length) {
+ /* Parse all the events */
+ while (offset < length) {
- evt_id = tvb_get_ntohs(tvb, offset);
- ei = proto_tree_add_text(dvb_eit_tree, tvb, offset, 12, "Event 0x%04hx", evt_id);
- dvb_eit_event_tree = proto_item_add_subtree(ei, ett_dvb_eit_event);
+ evt_id = tvb_get_ntohs(tvb, offset);
+ ei = proto_tree_add_text(dvb_eit_tree, tvb, offset, 12, "Event 0x%04hx", evt_id);
+ dvb_eit_event_tree = proto_item_add_subtree(ei, ett_dvb_eit_event);
- proto_tree_add_item(dvb_eit_event_tree, hf_dvb_eit_event_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(dvb_eit_event_tree, hf_dvb_eit_event_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- if (tvb_memeql(tvb, offset, "\xFF\xFF\xFF\xFF\xFF", 5)) {
- if (packet_mpeg_sect_mjd_to_utc_time(tvb, offset, &start_time) < 0) {
- proto_tree_add_text(tree, tvb, offset, 5, "Unparseable time");
- } else {
- proto_tree_add_time_format(dvb_eit_event_tree, hf_dvb_eit_start_time, tvb, offset,
- 5, &start_time,
- "Start Time: %s UTC", abs_time_to_str(&start_time, ABSOLUTE_TIME_UTC, FALSE));
- }
- } else {
- proto_tree_add_text(tree, tvb, offset, 5, "Start Time: Undefined (0xFFFFFFFFFF)");
- }
- offset += 5;
+ if (tvb_memeql(tvb, offset, "\xFF\xFF\xFF\xFF\xFF", 5)) {
+ if (packet_mpeg_sect_mjd_to_utc_time(tvb, offset, &start_time) < 0) {
+ proto_tree_add_text(tree, tvb, offset, 5, "Unparseable time");
+ } else {
+ proto_tree_add_time_format(dvb_eit_event_tree, hf_dvb_eit_start_time, tvb, offset,
+ 5, &start_time,
+ "Start Time: %s UTC", abs_time_to_str(&start_time, ABSOLUTE_TIME_UTC, FALSE));
+ }
+ } else {
+ proto_tree_add_text(tree, tvb, offset, 5, "Start Time: Undefined (0xFFFFFFFFFF)");
+ }
+ offset += 5;
- duration_item = proto_tree_add_item(dvb_eit_event_tree, hf_dvb_eit_duration, tvb, offset, 3, ENC_BIG_ENDIAN);
- proto_item_append_text(duration_item, " (%02u:%02u:%02u)",
- MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, offset)),
- MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, offset + 1)),
- MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, offset + 2)));
- offset += 3;
+ duration_item = proto_tree_add_item(dvb_eit_event_tree, hf_dvb_eit_duration, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_item_append_text(duration_item, " (%02u:%02u:%02u)",
+ MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, offset)),
+ MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, offset + 1)),
+ MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, offset + 2)));
+ offset += 3;
- proto_tree_add_item(dvb_eit_event_tree, hf_dvb_eit_running_status, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_eit_event_tree, hf_dvb_eit_free_ca_mode, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_eit_event_tree, hf_dvb_eit_descriptors_loop_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- descriptor_len = tvb_get_ntohs(tvb, offset) & DVB_EIT_DESCRIPTORS_LOOP_LENGTH_MASK;
- offset += 2;
+ proto_tree_add_item(dvb_eit_event_tree, hf_dvb_eit_running_status, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_eit_event_tree, hf_dvb_eit_free_ca_mode, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_eit_event_tree, hf_dvb_eit_descriptors_loop_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ descriptor_len = tvb_get_ntohs(tvb, offset) & DVB_EIT_DESCRIPTORS_LOOP_LENGTH_MASK;
+ offset += 2;
- descriptor_end = offset + descriptor_len;
- while (offset < descriptor_end)
- offset += proto_mpeg_descriptor_dissect(tvb, offset, dvb_eit_event_tree);
+ descriptor_end = offset + descriptor_len;
+ while (offset < descriptor_end)
+ offset += proto_mpeg_descriptor_dissect(tvb, offset, dvb_eit_event_tree);
- }
+ }
- offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_eit_tree, 0, offset);
- proto_item_set_len(ti, offset);
+ offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_eit_tree, 0, offset);
+ proto_item_set_len(ti, offset);
}
@@ -199,122 +199,123 @@ void
proto_register_dvb_eit(void)
{
- static hf_register_info hf[] = {
-
- { &hf_dvb_eit_service_id, {
- "Service ID", "dvb_eit.sid",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_eit_reserved, {
- "Reserved", "dvb_eit.reserved",
- FT_UINT8, BASE_HEX, NULL, DVB_EIT_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_eit_version_number, {
- "Version Number", "dvb_eit.version",
- FT_UINT8, BASE_HEX, NULL, DVB_EIT_VERSION_NUMBER_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_eit_current_next_indicator, {
- "Current/Next Indicator", "dvb_eit.cur_next_ind",
- FT_UINT8, BASE_DEC, VALS(dvb_eit_cur_next_vals), DVB_EIT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_eit_section_number, {
- "Section Number", "dvb_eit.sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_eit_last_section_number, {
- "Last Section Number", "dvb_eit.last_sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_eit_transport_stream_id, {
- "Transport Stream ID", "dvb_eit.tsid",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_eit_original_network_id, {
- "Original Network ID", "dvb_eit.original_nid",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_eit_segment_last_section_number, {
- "Segment Last Section Number", "dvb_eit.segment_last_sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_eit_last_table_id, {
- "Last Table ID", "dvb_eit.last_tid",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_eit_event_id, {
- "Event ID", "dvb_eit.evt.id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_eit_start_time, {
- "UTC Start Time", "dvb_eit.evt.start_time",
- FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_eit_duration, {
- "Duration", "dvb_eit.evt.duration",
- FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_eit_running_status, {
- "Running Status", "dvb_eit.evt.running_status",
- FT_UINT16, BASE_HEX, VALS(dvb_eit_running_status_vals), DVB_EIT_RUNNING_STATUS_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_eit_free_ca_mode, {
- "Free CA Mode", "dvb_eit.evt.free_ca_mode",
- FT_UINT16, BASE_HEX, VALS(dvb_eit_free_ca_mode_vals), DVB_EIT_FREE_CA_MODE_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_eit_descriptors_loop_length, {
- "Descriptors Loop Length", "dvb_eit.evt.descr_loop_len",
- FT_UINT16, BASE_HEX, NULL, DVB_EIT_DESCRIPTORS_LOOP_LENGTH_MASK, NULL, HFILL
- } }
- };
-
- static gint *ett[] = {
- &ett_dvb_eit,
- &ett_dvb_eit_event
- };
-
- proto_dvb_eit = proto_register_protocol("DVB Event Information Table", "DVB EIT", "dvb_eit");
-
- proto_register_field_array(proto_dvb_eit, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ static hf_register_info hf[] = {
+
+ { &hf_dvb_eit_service_id, {
+ "Service ID", "dvb_eit.sid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_reserved, {
+ "Reserved", "dvb_eit.reserved",
+ FT_UINT8, BASE_HEX, NULL, DVB_EIT_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_version_number, {
+ "Version Number", "dvb_eit.version",
+ FT_UINT8, BASE_HEX, NULL, DVB_EIT_VERSION_NUMBER_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_current_next_indicator, {
+ "Current/Next Indicator", "dvb_eit.cur_next_ind",
+ FT_UINT8, BASE_DEC, VALS(dvb_eit_cur_next_vals), DVB_EIT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_section_number, {
+ "Section Number", "dvb_eit.sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_last_section_number, {
+ "Last Section Number", "dvb_eit.last_sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_transport_stream_id, {
+ "Transport Stream ID", "dvb_eit.tsid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_original_network_id, {
+ "Original Network ID", "dvb_eit.original_nid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_segment_last_section_number, {
+ "Segment Last Section Number", "dvb_eit.segment_last_sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_last_table_id, {
+ "Last Table ID", "dvb_eit.last_tid",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_event_id, {
+ "Event ID", "dvb_eit.evt.id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_start_time, {
+ "UTC Start Time", "dvb_eit.evt.start_time",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_duration, {
+ "Duration", "dvb_eit.evt.duration",
+ FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_running_status, {
+ "Running Status", "dvb_eit.evt.running_status",
+ FT_UINT16, BASE_HEX, VALS(dvb_eit_running_status_vals), DVB_EIT_RUNNING_STATUS_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_free_ca_mode, {
+ "Free CA Mode", "dvb_eit.evt.free_ca_mode",
+ FT_UINT16, BASE_HEX, VALS(dvb_eit_free_ca_mode_vals), DVB_EIT_FREE_CA_MODE_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_eit_descriptors_loop_length, {
+ "Descriptors Loop Length", "dvb_eit.evt.descr_loop_len",
+ FT_UINT16, BASE_HEX, NULL, DVB_EIT_DESCRIPTORS_LOOP_LENGTH_MASK, NULL, HFILL
+ } }
+ };
+
+ static gint *ett[] = {
+ &ett_dvb_eit,
+ &ett_dvb_eit_event
+ };
+
+ proto_dvb_eit = proto_register_protocol("DVB Event Information Table", "DVB EIT", "dvb_eit");
+
+ proto_register_field_array(proto_dvb_eit, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
void proto_reg_handoff_dvb_eit(void)
{
- int tid;
- dissector_handle_t dvb_eit_handle;
+ int tid;
+ dissector_handle_t dvb_eit_handle;
- dvb_eit_handle = create_dissector_handle(dissect_dvb_eit, proto_dvb_eit);
+ dvb_eit_handle = create_dissector_handle(dissect_dvb_eit, proto_dvb_eit);
- for (tid = DVB_EIT_TID_MIN; tid <= DVB_EIT_TID_MAX; tid++)
- dissector_add_uint("mpeg_sect.tid", tid, dvb_eit_handle);
+ for (tid = DVB_EIT_TID_MIN; tid <= DVB_EIT_TID_MAX; tid++)
+ dissector_add_uint("mpeg_sect.tid", tid, dvb_eit_handle);
}
+
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/
diff --git a/epan/dissectors/packet-dvb-nit.c b/epan/dissectors/packet-dvb-nit.c
index 3cdab10bd6..f80db9f38c 100644
--- a/epan/dissectors/packet-dvb-nit.c
+++ b/epan/dissectors/packet-dvb-nit.c
@@ -54,24 +54,24 @@ static gint ett_dvb_nit = -1;
static gint ett_dvb_nit_ts = -1;
-#define DVB_NIT_TID 0x40
-#define DVB_NIT_TID_OTHER 0x41
-
-#define DVB_NIT_RESERVED1_MASK 0xC0
-#define DVB_NIT_VERSION_NUMBER_MASK 0x3E
-#define DVB_NIT_CURRENT_NEXT_INDICATOR_MASK 0x01
-#define DVB_NIT_RESERVED2_MASK 0xF000
-#define DVB_NIT_NETWORK_DESCRIPTORS_LENGTH_MASK 0x0FFF
-#define DVB_NIT_RESERVED3_MASK 0xF000
-#define DVB_NIT_TRANSPORT_STREAM_LOOP_LENGTH_MASK 0x0FFF
-#define DVB_NIT_RESERVED4_MASK 0xF000
-#define DVB_NIT_TRANSPORT_DESCRIPTORS_LENGTH_MASK 0x0FFF
+#define DVB_NIT_TID 0x40
+#define DVB_NIT_TID_OTHER 0x41
+
+#define DVB_NIT_RESERVED1_MASK 0xC0
+#define DVB_NIT_VERSION_NUMBER_MASK 0x3E
+#define DVB_NIT_CURRENT_NEXT_INDICATOR_MASK 0x01
+#define DVB_NIT_RESERVED2_MASK 0xF000
+#define DVB_NIT_NETWORK_DESCRIPTORS_LENGTH_MASK 0x0FFF
+#define DVB_NIT_RESERVED3_MASK 0xF000
+#define DVB_NIT_TRANSPORT_STREAM_LOOP_LENGTH_MASK 0x0FFF
+#define DVB_NIT_RESERVED4_MASK 0xF000
+#define DVB_NIT_TRANSPORT_DESCRIPTORS_LENGTH_MASK 0x0FFF
static const value_string dvb_nit_cur_next_vals[] = {
- { 0, "Not yet applicable" },
- { 1, "Currently applicable" },
+ { 0, "Not yet applicable" },
+ { 1, "Currently applicable" },
- { 0, NULL }
+ { 0, NULL }
};
@@ -79,74 +79,74 @@ static int
dissect_dvb_nit(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
- guint offset = 0;
- guint ts_desc_len, desc_loop_len, ts_end;
+ guint offset = 0;
+ guint ts_desc_len, desc_loop_len, ts_end;
- guint16 tsid;
+ guint16 tsid;
- proto_item *ti;
- proto_tree *dvb_nit_tree;
- proto_item *tsi;
- proto_tree *dvb_nit_ts_tree;
+ proto_item *ti;
+ proto_tree *dvb_nit_tree;
+ proto_item *tsi;
+ proto_tree *dvb_nit_ts_tree;
- col_set_str(pinfo->cinfo, COL_INFO, "Network Information Table (NIT)");
+ col_set_str(pinfo->cinfo, COL_INFO, "Network Information Table (NIT)");
- ti = proto_tree_add_item(tree, proto_dvb_nit, tvb, offset, -1, ENC_NA);
- dvb_nit_tree = proto_item_add_subtree(ti, ett_dvb_nit);
+ ti = proto_tree_add_item(tree, proto_dvb_nit, tvb, offset, -1, ENC_NA);
+ dvb_nit_tree = proto_item_add_subtree(ti, ett_dvb_nit);
- offset += packet_mpeg_sect_header(tvb, offset, dvb_nit_tree, NULL, NULL);
+ offset += packet_mpeg_sect_header(tvb, offset, dvb_nit_tree, NULL, NULL);
- proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_reserved2, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_network_descriptors_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- desc_loop_len = tvb_get_ntohs(tvb, offset) & DVB_NIT_NETWORK_DESCRIPTORS_LENGTH_MASK;
- offset += 2;
+ proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_reserved2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_network_descriptors_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ desc_loop_len = tvb_get_ntohs(tvb, offset) & DVB_NIT_NETWORK_DESCRIPTORS_LENGTH_MASK;
+ offset += 2;
- offset += proto_mpeg_descriptor_loop_dissect(tvb, offset, desc_loop_len, dvb_nit_tree);
+ offset += proto_mpeg_descriptor_loop_dissect(tvb, offset, desc_loop_len, dvb_nit_tree);
- proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_reserved3, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_transport_stream_loop_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- ts_end = offset + (tvb_get_ntohs(tvb, offset) & DVB_NIT_TRANSPORT_STREAM_LOOP_LENGTH_MASK);
- offset += 2;
+ proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_reserved3, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_nit_tree, hf_dvb_nit_transport_stream_loop_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ ts_end = offset + (tvb_get_ntohs(tvb, offset) & DVB_NIT_TRANSPORT_STREAM_LOOP_LENGTH_MASK);
+ offset += 2;
- while (offset < ts_end) {
- tsid = tvb_get_ntohs(tvb, offset);
- ts_desc_len = 3 + (tvb_get_ntohs(tvb, offset + 4) & DVB_NIT_TRANSPORT_DESCRIPTORS_LENGTH_MASK);
+ while (offset < ts_end) {
+ tsid = tvb_get_ntohs(tvb, offset);
+ ts_desc_len = 3 + (tvb_get_ntohs(tvb, offset + 4) & DVB_NIT_TRANSPORT_DESCRIPTORS_LENGTH_MASK);
- tsi = proto_tree_add_text(dvb_nit_tree, tvb, offset, ts_desc_len, "Stream ID=0x%04hx", tsid);
- dvb_nit_ts_tree = proto_item_add_subtree(tsi, ett_dvb_nit_ts);
+ tsi = proto_tree_add_text(dvb_nit_tree, tvb, offset, ts_desc_len, "Stream ID=0x%04hx", tsid);
+ dvb_nit_ts_tree = proto_item_add_subtree(tsi, ett_dvb_nit_ts);
- proto_tree_add_item(dvb_nit_ts_tree, hf_dvb_nit_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(dvb_nit_ts_tree, hf_dvb_nit_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(dvb_nit_ts_tree, hf_dvb_nit_original_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(dvb_nit_ts_tree, hf_dvb_nit_original_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(dvb_nit_ts_tree, hf_dvb_nit_reserved4, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_nit_ts_tree, hf_dvb_nit_transport_descriptors_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- desc_loop_len = tvb_get_ntohs(tvb, offset) & DVB_NIT_TRANSPORT_DESCRIPTORS_LENGTH_MASK;
- offset += 2;
+ proto_tree_add_item(dvb_nit_ts_tree, hf_dvb_nit_reserved4, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_nit_ts_tree, hf_dvb_nit_transport_descriptors_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ desc_loop_len = tvb_get_ntohs(tvb, offset) & DVB_NIT_TRANSPORT_DESCRIPTORS_LENGTH_MASK;
+ offset += 2;
- offset += proto_mpeg_descriptor_loop_dissect(tvb, offset, desc_loop_len, dvb_nit_ts_tree);
- }
+ offset += proto_mpeg_descriptor_loop_dissect(tvb, offset, desc_loop_len, dvb_nit_ts_tree);
+ }
- offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_nit_tree, 0, offset);
+ offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_nit_tree, 0, offset);
- proto_item_set_len(ti, offset);
- return offset;
+ proto_item_set_len(ti, offset);
+ return offset;
}
@@ -154,113 +154,114 @@ void
proto_register_dvb_nit(void)
{
- static hf_register_info hf[] = {
-
- { &hf_dvb_nit_network_id, {
- "Network ID", "dvb_nit.sid",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_nit_reserved1, {
- "Reserved", "dvb_nit.reserved1",
- FT_UINT8, BASE_HEX, NULL, DVB_NIT_RESERVED1_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_nit_version_number, {
- "Version Number", "dvb_nit.version",
- FT_UINT8, BASE_HEX, NULL, DVB_NIT_VERSION_NUMBER_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_nit_current_next_indicator, {
- "Current/Next Indicator", "dvb_nit.cur_next_ind",
- FT_UINT8, BASE_DEC, VALS(dvb_nit_cur_next_vals), DVB_NIT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_nit_section_number, {
- "Section Number", "dvb_nit.sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_nit_last_section_number, {
- "Last Section Number", "dvb_nit.last_sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_nit_reserved2, {
- "Reserved", "dvb_nit.reserved2",
- FT_UINT16, BASE_HEX, NULL, DVB_NIT_RESERVED2_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_nit_network_descriptors_length, {
- "Network Descriptors Length", "dvb_nit.network_desc_len",
- FT_UINT16, BASE_DEC, NULL, DVB_NIT_NETWORK_DESCRIPTORS_LENGTH_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_nit_reserved3, {
- "Reserved", "dvb_nit.reserved3",
- FT_UINT16, BASE_HEX, NULL, DVB_NIT_RESERVED3_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_nit_transport_stream_loop_length, {
- "Transport Stream Loop Length", "dvb_nit.ts_loop_len",
- FT_UINT16, BASE_DEC, NULL, DVB_NIT_TRANSPORT_STREAM_LOOP_LENGTH_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_nit_transport_stream_id, {
- "Transport Stream ID", "dvb_nit.ts.id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_nit_original_network_id, {
- "Original Network ID", "dvb_nit.ts.original_network_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dvb_nit_reserved4, {
- "Reserved", "dvb_nit.ts.reserved",
- FT_UINT16, BASE_HEX, NULL, DVB_NIT_RESERVED4_MASK, NULL, HFILL
- } },
-
- { &hf_dvb_nit_transport_descriptors_length, {
- "Transport Descriptors Length", "dvb_nit.ts.desc_len",
- FT_UINT16, BASE_DEC, NULL, DVB_NIT_TRANSPORT_DESCRIPTORS_LENGTH_MASK, NULL, HFILL
- } },
-
- };
-
- static gint *ett[] = {
- &ett_dvb_nit,
- &ett_dvb_nit_ts
- };
-
- proto_dvb_nit = proto_register_protocol("DVB Network Information Table", "DVB NIT", "dvb_nit");
-
- proto_register_field_array(proto_dvb_nit, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
-
- new_register_dissector("dvb_nit", dissect_dvb_nit, proto_dvb_nit);
+ static hf_register_info hf[] = {
+
+ { &hf_dvb_nit_network_id, {
+ "Network ID", "dvb_nit.sid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_reserved1, {
+ "Reserved", "dvb_nit.reserved1",
+ FT_UINT8, BASE_HEX, NULL, DVB_NIT_RESERVED1_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_version_number, {
+ "Version Number", "dvb_nit.version",
+ FT_UINT8, BASE_HEX, NULL, DVB_NIT_VERSION_NUMBER_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_current_next_indicator, {
+ "Current/Next Indicator", "dvb_nit.cur_next_ind",
+ FT_UINT8, BASE_DEC, VALS(dvb_nit_cur_next_vals), DVB_NIT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_section_number, {
+ "Section Number", "dvb_nit.sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_last_section_number, {
+ "Last Section Number", "dvb_nit.last_sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_reserved2, {
+ "Reserved", "dvb_nit.reserved2",
+ FT_UINT16, BASE_HEX, NULL, DVB_NIT_RESERVED2_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_network_descriptors_length, {
+ "Network Descriptors Length", "dvb_nit.network_desc_len",
+ FT_UINT16, BASE_DEC, NULL, DVB_NIT_NETWORK_DESCRIPTORS_LENGTH_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_reserved3, {
+ "Reserved", "dvb_nit.reserved3",
+ FT_UINT16, BASE_HEX, NULL, DVB_NIT_RESERVED3_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_transport_stream_loop_length, {
+ "Transport Stream Loop Length", "dvb_nit.ts_loop_len",
+ FT_UINT16, BASE_DEC, NULL, DVB_NIT_TRANSPORT_STREAM_LOOP_LENGTH_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_transport_stream_id, {
+ "Transport Stream ID", "dvb_nit.ts.id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_original_network_id, {
+ "Original Network ID", "dvb_nit.ts.original_network_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_reserved4, {
+ "Reserved", "dvb_nit.ts.reserved",
+ FT_UINT16, BASE_HEX, NULL, DVB_NIT_RESERVED4_MASK, NULL, HFILL
+ } },
+
+ { &hf_dvb_nit_transport_descriptors_length, {
+ "Transport Descriptors Length", "dvb_nit.ts.desc_len",
+ FT_UINT16, BASE_DEC, NULL, DVB_NIT_TRANSPORT_DESCRIPTORS_LENGTH_MASK, NULL, HFILL
+ } },
+
+ };
+
+ static gint *ett[] = {
+ &ett_dvb_nit,
+ &ett_dvb_nit_ts
+ };
+
+ proto_dvb_nit = proto_register_protocol("DVB Network Information Table", "DVB NIT", "dvb_nit");
+
+ proto_register_field_array(proto_dvb_nit, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ new_register_dissector("dvb_nit", dissect_dvb_nit, proto_dvb_nit);
}
void proto_reg_handoff_dvb_nit(void)
{
- dissector_handle_t dvb_nit_handle;
+ dissector_handle_t dvb_nit_handle;
- dvb_nit_handle = new_create_dissector_handle(dissect_dvb_nit, proto_dvb_nit);
+ dvb_nit_handle = find_dissector("dvb_nit");
- dissector_add_uint("mpeg_sect.tid", DVB_NIT_TID, dvb_nit_handle);
- dissector_add_uint("mpeg_sect.tid", DVB_NIT_TID_OTHER, dvb_nit_handle);
+ dissector_add_uint("mpeg_sect.tid", DVB_NIT_TID, dvb_nit_handle);
+ dissector_add_uint("mpeg_sect.tid", DVB_NIT_TID_OTHER, dvb_nit_handle);
}
+
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/
diff --git a/epan/dissectors/packet-dvb-sdt.c b/epan/dissectors/packet-dvb-sdt.c
index 9e42385215..98364d08a9 100644
--- a/epan/dissectors/packet-dvb-sdt.c
+++ b/epan/dissectors/packet-dvb-sdt.c
@@ -54,123 +54,123 @@ static int hf_dvb_sdt_descriptors_loop_length = -1;
static gint ett_dvb_sdt = -1;
static gint ett_dvb_sdt_service = -1;
-#define DVB_SDT_TID_ACTUAL 0x42
-#define DVB_SDT_TID_OTHER 0x46
+#define DVB_SDT_TID_ACTUAL 0x42
+#define DVB_SDT_TID_OTHER 0x46
-#define DVB_SDT_RESERVED1_MASK 0xC0
-#define DVB_SDT_VERSION_NUMBER_MASK 0x3E
-#define DVB_SDT_CURRENT_NEXT_INDICATOR_MASK 0x01
+#define DVB_SDT_RESERVED1_MASK 0xC0
+#define DVB_SDT_VERSION_NUMBER_MASK 0x3E
+#define DVB_SDT_CURRENT_NEXT_INDICATOR_MASK 0x01
-#define DVB_SDT_RESERVED3_MASK 0xFC
-#define DVB_SDT_EIT_SCHEDULE_FLAG_MASK 0x02
-#define DVB_SDT_EIT_PRESENT_FOLLOWING_FLAG_MASK 0x01
+#define DVB_SDT_RESERVED3_MASK 0xFC
+#define DVB_SDT_EIT_SCHEDULE_FLAG_MASK 0x02
+#define DVB_SDT_EIT_PRESENT_FOLLOWING_FLAG_MASK 0x01
-#define DVB_SDT_RUNNING_STATUS_MASK 0xE000
-#define DVB_SDT_FREE_CA_MODE_MASK 0x1000
-#define DVB_SDT_DESCRIPTORS_LOOP_LENGTH_MASK 0x0FFF
+#define DVB_SDT_RUNNING_STATUS_MASK 0xE000
+#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, "Not yet applicable" },
+ { 1, "Currently applicable" },
- { 0, NULL }
+ { 0, NULL }
};
static const value_string dvb_sdt_running_status_vals[] = {
- { 0, "Undefined" },
- { 1, "Not Running" },
- { 2, "Starts in a few seconds" },
- { 3, "Pausing" },
- { 4, "Running" },
- { 5, "Service off-air" },
-
- { 0, NULL }
+ { 0, "Undefined" },
+ { 1, "Not Running" },
+ { 2, "Starts in a few seconds" },
+ { 3, "Pausing" },
+ { 4, "Running" },
+ { 5, "Service off-air" },
+
+ { 0, NULL }
};
static const value_string dvb_sdt_free_ca_mode_vals[] = {
- { 0, "Not Scrambled" },
- { 1, "One or more component scrambled" },
+ { 0, "Not Scrambled" },
+ { 1, "One or more component scrambled" },
- { 0, NULL }
+ { 0, NULL }
};
static void
dissect_dvb_sdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset = 0, length = 0;
- guint descriptor_len, descriptor_end;
- guint16 svc_id;
+ guint offset = 0, length = 0;
+ guint descriptor_len, descriptor_end;
+ guint16 svc_id;
- proto_item *ti;
- proto_tree *dvb_sdt_tree;
- proto_item *si;
- proto_tree *dvb_sdt_service_tree;
+ proto_item *ti;
+ proto_tree *dvb_sdt_tree;
+ proto_item *si;
+ proto_tree *dvb_sdt_service_tree;
- /* The TVB should start right after the section_length in the Section packet */
+ /* The TVB should start right after the section_length in the Section packet */
- col_set_str(pinfo->cinfo, COL_INFO, "Service Description Table (SDT)");
+ col_set_str(pinfo->cinfo, COL_INFO, "Service Description Table (SDT)");
- ti = proto_tree_add_item(tree, proto_dvb_sdt, tvb, offset, -1, ENC_NA);
- dvb_sdt_tree = proto_item_add_subtree(ti, ett_dvb_sdt);
+ ti = proto_tree_add_item(tree, proto_dvb_sdt, tvb, offset, -1, ENC_NA);
+ dvb_sdt_tree = proto_item_add_subtree(ti, ett_dvb_sdt);
- offset += packet_mpeg_sect_header(tvb, offset, dvb_sdt_tree, &length, NULL);
- length -= 4;
+ offset += packet_mpeg_sect_header(tvb, offset, dvb_sdt_tree, &length, NULL);
+ length -= 4;
- proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_original_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_original_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_sdt_tree, hf_dvb_sdt_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- if (offset >= length)
- return;
+ if (offset >= length)
+ return;
- /* Parse all the services */
- while (offset < length) {
+ /* Parse all the services */
+ while (offset < length) {
- svc_id = tvb_get_ntohs(tvb, offset);
- si = proto_tree_add_text(dvb_sdt_tree, tvb, offset, 5, "Service 0x%04hx", svc_id);
- dvb_sdt_service_tree = proto_item_add_subtree(si, ett_dvb_sdt_service);
+ svc_id = tvb_get_ntohs(tvb, offset);
+ si = proto_tree_add_text(dvb_sdt_tree, tvb, offset, 5, "Service 0x%04hx", svc_id);
+ dvb_sdt_service_tree = proto_item_add_subtree(si, ett_dvb_sdt_service);
- proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_reserved3, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_eit_schedule_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_eit_present_following_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
+ proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_reserved3, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_eit_schedule_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_eit_present_following_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_running_status, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_free_ca_mode, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_descriptors_loop_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- descriptor_len = tvb_get_ntohs(tvb, offset) & DVB_SDT_DESCRIPTORS_LOOP_LENGTH_MASK;
- offset += 2;
+ proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_running_status, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_free_ca_mode, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_sdt_service_tree, hf_dvb_sdt_descriptors_loop_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ descriptor_len = tvb_get_ntohs(tvb, offset) & DVB_SDT_DESCRIPTORS_LOOP_LENGTH_MASK;
+ offset += 2;
- descriptor_end = offset + descriptor_len;
- while (offset < descriptor_end)
- offset += proto_mpeg_descriptor_dissect(tvb, offset, dvb_sdt_service_tree);
+ descriptor_end = offset + descriptor_len;
+ while (offset < descriptor_end)
+ offset += proto_mpeg_descriptor_dissect(tvb, offset, dvb_sdt_service_tree);
- }
+ }
- offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_sdt_tree, 0, offset);
- proto_item_set_len(ti, offset);
+ offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_sdt_tree, 0, offset);
+ proto_item_set_len(ti, offset);
}
@@ -178,117 +178,118 @@ void
proto_register_dvb_sdt(void)
{
- static hf_register_info hf[] = {
+ static hf_register_info hf[] = {
- { &hf_dvb_sdt_transport_stream_id, {
- "Transport Stream ID", "dvb_sdt.tsid",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
+ { &hf_dvb_sdt_transport_stream_id, {
+ "Transport Stream ID", "dvb_sdt.tsid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
- { &hf_dvb_sdt_reserved1, {
- "Reserved", "dvb_sdt.reserved1",
- FT_UINT8, BASE_HEX, NULL, DVB_SDT_RESERVED1_MASK, NULL, HFILL
- } },
+ { &hf_dvb_sdt_reserved1, {
+ "Reserved", "dvb_sdt.reserved1",
+ FT_UINT8, BASE_HEX, NULL, DVB_SDT_RESERVED1_MASK, NULL, HFILL
+ } },
- { &hf_dvb_sdt_version_number, {
- "Version Number", "dvb_sdt.version",
- FT_UINT8, BASE_HEX, NULL, DVB_SDT_VERSION_NUMBER_MASK, NULL, HFILL
- } },
+ { &hf_dvb_sdt_version_number, {
+ "Version Number", "dvb_sdt.version",
+ FT_UINT8, BASE_HEX, NULL, DVB_SDT_VERSION_NUMBER_MASK, NULL, HFILL
+ } },
- { &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
- } },
+ { &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
+ } },
- { &hf_dvb_sdt_section_number, {
- "Section Number", "dvb_sdt.sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
+ { &hf_dvb_sdt_section_number, {
+ "Section Number", "dvb_sdt.sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
- { &hf_dvb_sdt_last_section_number, {
- "Last Section Number", "dvb_sdt.last_sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
+ { &hf_dvb_sdt_last_section_number, {
+ "Last Section Number", "dvb_sdt.last_sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
- { &hf_dvb_sdt_original_network_id, {
- "Original Network ID", "dvb_sdt.original_nid",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
+ { &hf_dvb_sdt_original_network_id, {
+ "Original Network ID", "dvb_sdt.original_nid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
- { &hf_dvb_sdt_reserved2, {
- "Reserved", "dvb_sdt.reserved2",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
+ { &hf_dvb_sdt_reserved2, {
+ "Reserved", "dvb_sdt.reserved2",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
- { &hf_dvb_sdt_service_id, {
- "Service ID", "dvb_sdt.svc.id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
+ { &hf_dvb_sdt_service_id, {
+ "Service ID", "dvb_sdt.svc.id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
- { &hf_dvb_sdt_reserved3, {
- "Reserved", "dvb_sdt.svc.reserved",
- FT_UINT8, BASE_HEX, NULL, DVB_SDT_RESERVED3_MASK, NULL, HFILL
- } },
+ { &hf_dvb_sdt_reserved3, {
+ "Reserved", "dvb_sdt.svc.reserved",
+ FT_UINT8, BASE_HEX, NULL, DVB_SDT_RESERVED3_MASK, NULL, HFILL
+ } },
- { &hf_dvb_sdt_eit_schedule_flag, {
- "EIT Schedule Flag", "dvb_sdt.svc.eit_schedule_flag",
- FT_UINT8, BASE_DEC, NULL, DVB_SDT_EIT_SCHEDULE_FLAG_MASK, NULL, HFILL
- } },
+ { &hf_dvb_sdt_eit_schedule_flag, {
+ "EIT Schedule Flag", "dvb_sdt.svc.eit_schedule_flag",
+ FT_UINT8, BASE_DEC, NULL, DVB_SDT_EIT_SCHEDULE_FLAG_MASK, NULL, HFILL
+ } },
- { &hf_dvb_sdt_eit_present_following_flag, {
- "EIT Present Following Flag", "dvb_sdt.svc.eit_present_following_flag",
- FT_UINT8, BASE_DEC, NULL, DVB_SDT_EIT_PRESENT_FOLLOWING_FLAG_MASK, NULL, HFILL
- } },
+ { &hf_dvb_sdt_eit_present_following_flag, {
+ "EIT Present Following Flag", "dvb_sdt.svc.eit_present_following_flag",
+ FT_UINT8, BASE_DEC, NULL, DVB_SDT_EIT_PRESENT_FOLLOWING_FLAG_MASK, NULL, HFILL
+ } },
- { &hf_dvb_sdt_running_status, {
- "Running Status", "dvb_sdt.svc.running_status",
- FT_UINT16, BASE_HEX, VALS(dvb_sdt_running_status_vals), DVB_SDT_RUNNING_STATUS_MASK, NULL, HFILL
- } },
+ { &hf_dvb_sdt_running_status, {
+ "Running Status", "dvb_sdt.svc.running_status",
+ FT_UINT16, BASE_HEX, VALS(dvb_sdt_running_status_vals), DVB_SDT_RUNNING_STATUS_MASK, NULL, HFILL
+ } },
- { &hf_dvb_sdt_free_ca_mode, {
- "Free CA Mode", "dvb_sdt.svc.free_ca_mode",
- FT_UINT16, BASE_HEX, VALS(dvb_sdt_free_ca_mode_vals), DVB_SDT_FREE_CA_MODE_MASK, NULL, HFILL
- } },
+ { &hf_dvb_sdt_free_ca_mode, {
+ "Free CA Mode", "dvb_sdt.svc.free_ca_mode",
+ FT_UINT16, BASE_HEX, VALS(dvb_sdt_free_ca_mode_vals), DVB_SDT_FREE_CA_MODE_MASK, NULL, HFILL
+ } },
- { &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
- } }
+ { &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
+ } }
- };
+ };
- static gint *ett[] = {
- &ett_dvb_sdt,
- &ett_dvb_sdt_service
- };
+ static gint *ett[] = {
+ &ett_dvb_sdt,
+ &ett_dvb_sdt_service
+ };
- proto_dvb_sdt = proto_register_protocol("DVB Service Description Table", "DVB SDT", "dvb_sdt");
+ proto_dvb_sdt = proto_register_protocol("DVB Service Description Table", "DVB SDT", "dvb_sdt");
- proto_register_field_array(proto_dvb_sdt, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_register_field_array(proto_dvb_sdt, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
void proto_reg_handoff_dvb_sdt(void)
{
- dissector_handle_t dvb_sdt_handle;
+ 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);
+ 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);
}
+
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/
diff --git a/epan/dissectors/packet-dvb-tdt.c b/epan/dissectors/packet-dvb-tdt.c
index a7755365ab..eb76308afc 100644
--- a/epan/dissectors/packet-dvb-tdt.c
+++ b/epan/dissectors/packet-dvb-tdt.c
@@ -35,35 +35,35 @@ static int hf_dvb_tdt_utc_time = -1;
static gint ett_dvb_tdt = -1;
-#define DVB_TDT_TID 0x70
+#define DVB_TDT_TID 0x70
static void
dissect_dvb_tdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset = 0;
+ guint offset = 0;
- proto_item *ti;
- proto_tree *dvb_tdt_tree;
+ proto_item *ti;
+ proto_tree *dvb_tdt_tree;
- nstime_t utc_time;
+ nstime_t utc_time;
- col_set_str(pinfo->cinfo, COL_INFO, "Time and Date Table (TDT)");
+ col_set_str(pinfo->cinfo, COL_INFO, "Time and Date Table (TDT)");
- ti = proto_tree_add_item(tree, proto_dvb_tdt, tvb, offset, -1, ENC_NA);
- dvb_tdt_tree = proto_item_add_subtree(ti, ett_dvb_tdt);
+ ti = proto_tree_add_item(tree, proto_dvb_tdt, tvb, offset, -1, ENC_NA);
+ dvb_tdt_tree = proto_item_add_subtree(ti, ett_dvb_tdt);
- offset += packet_mpeg_sect_header(tvb, offset, dvb_tdt_tree, NULL, NULL);
+ offset += packet_mpeg_sect_header(tvb, offset, dvb_tdt_tree, NULL, NULL);
- if (packet_mpeg_sect_mjd_to_utc_time(tvb, offset, &utc_time) < 0) {
- proto_tree_add_text(dvb_tdt_tree, tvb, offset, 5, "Unparseable time");
- } else {
- proto_tree_add_time_format(dvb_tdt_tree, hf_dvb_tdt_utc_time, tvb, offset, 5, &utc_time,
- "UTC Time : %s UTC", abs_time_to_str(&utc_time, ABSOLUTE_TIME_UTC, FALSE));
- }
- offset += 5;
+ if (packet_mpeg_sect_mjd_to_utc_time(tvb, offset, &utc_time) < 0) {
+ proto_tree_add_text(dvb_tdt_tree, tvb, offset, 5, "Unparseable time");
+ } else {
+ proto_tree_add_time_format(dvb_tdt_tree, hf_dvb_tdt_utc_time, tvb, offset, 5, &utc_time,
+ "UTC Time : %s UTC", abs_time_to_str(&utc_time, ABSOLUTE_TIME_UTC, FALSE));
+ }
+ offset += 5;
- proto_item_set_len(ti, offset);
+ proto_item_set_len(ti, offset);
}
@@ -71,33 +71,33 @@ void
proto_register_dvb_tdt(void)
{
- static hf_register_info hf[] = {
+ static hf_register_info hf[] = {
- { &hf_dvb_tdt_utc_time, {
- "UTC Time", "dvb_tdt.utc_time",
- FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL
- } }
- };
+ { &hf_dvb_tdt_utc_time, {
+ "UTC Time", "dvb_tdt.utc_time",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL
+ } }
+ };
- static gint *ett[] = {
- &ett_dvb_tdt
- };
+ static gint *ett[] = {
+ &ett_dvb_tdt
+ };
- proto_dvb_tdt = proto_register_protocol("DVB Time and Date Table", "DVB TDT", "dvb_tdt");
+ proto_dvb_tdt = proto_register_protocol("DVB Time and Date Table", "DVB TDT", "dvb_tdt");
- proto_register_field_array(proto_dvb_tdt, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_register_field_array(proto_dvb_tdt, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
void proto_reg_handoff_dvb_tdt(void)
{
- dissector_handle_t dvb_tdt_handle;
+ dissector_handle_t dvb_tdt_handle;
- dvb_tdt_handle = create_dissector_handle(dissect_dvb_tdt, proto_dvb_tdt);
+ dvb_tdt_handle = create_dissector_handle(dissect_dvb_tdt, proto_dvb_tdt);
- dissector_add_uint("mpeg_sect.tid", DVB_TDT_TID, dvb_tdt_handle);
+ dissector_add_uint("mpeg_sect.tid", DVB_TDT_TID, dvb_tdt_handle);
}
/*
@@ -105,10 +105,10 @@ void proto_reg_handoff_dvb_tdt(void)
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/
diff --git a/epan/dissectors/packet-dvb-tot.c b/epan/dissectors/packet-dvb-tot.c
index d4219890a8..494f521bfb 100644
--- a/epan/dissectors/packet-dvb-tot.c
+++ b/epan/dissectors/packet-dvb-tot.c
@@ -39,50 +39,50 @@ static int hf_dvb_tot_descriptors_loop_length = -1;
static gint ett_dvb_tot = -1;
-#define DVB_TOT_TID 0x73
+#define DVB_TOT_TID 0x73
-#define DVB_TOT_RESERVED_MASK 0xF000
-#define DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK 0x0FFF
+#define DVB_TOT_RESERVED_MASK 0xF000
+#define DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK 0x0FFF
static void
dissect_dvb_tot(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset = 0;
- guint descriptor_len, descriptor_end;
+ guint offset = 0;
+ guint descriptor_len, descriptor_end;
- proto_item *ti;
- proto_tree *dvb_tot_tree;
+ proto_item *ti;
+ proto_tree *dvb_tot_tree;
- nstime_t utc_time;
+ nstime_t utc_time;
- col_set_str(pinfo->cinfo, COL_INFO, "Time Offset Table (TOT)");
+ col_set_str(pinfo->cinfo, COL_INFO, "Time Offset Table (TOT)");
- ti = proto_tree_add_item(tree, proto_dvb_tot, tvb, offset, -1, ENC_NA);
- dvb_tot_tree = proto_item_add_subtree(ti, ett_dvb_tot);
+ ti = proto_tree_add_item(tree, proto_dvb_tot, tvb, offset, -1, ENC_NA);
+ dvb_tot_tree = proto_item_add_subtree(ti, ett_dvb_tot);
- offset += packet_mpeg_sect_header(tvb, offset, dvb_tot_tree, NULL, NULL);
+ offset += packet_mpeg_sect_header(tvb, offset, dvb_tot_tree, NULL, NULL);
- if (packet_mpeg_sect_mjd_to_utc_time(tvb, offset, &utc_time) < 0) {
- proto_tree_add_text(dvb_tot_tree, tvb, offset, 5, "UTC Time : Unparseable time");
- } else {
- proto_tree_add_time_format(dvb_tot_tree, hf_dvb_tot_utc_time, tvb, offset, 5, &utc_time,
- "UTC Time : %s UTC", abs_time_to_str(&utc_time, ABSOLUTE_TIME_UTC, FALSE));
- }
+ if (packet_mpeg_sect_mjd_to_utc_time(tvb, offset, &utc_time) < 0) {
+ proto_tree_add_text(dvb_tot_tree, tvb, offset, 5, "UTC Time : Unparseable time");
+ } else {
+ proto_tree_add_time_format(dvb_tot_tree, hf_dvb_tot_utc_time, tvb, offset, 5, &utc_time,
+ "UTC Time : %s UTC", abs_time_to_str(&utc_time, ABSOLUTE_TIME_UTC, FALSE));
+ }
- offset += 5;
+ offset += 5;
- descriptor_len = tvb_get_ntohs(tvb, offset) & DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK;
- proto_tree_add_item(dvb_tot_tree, hf_dvb_tot_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(dvb_tot_tree, hf_dvb_tot_descriptors_loop_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ descriptor_len = tvb_get_ntohs(tvb, offset) & DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK;
+ proto_tree_add_item(dvb_tot_tree, hf_dvb_tot_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(dvb_tot_tree, hf_dvb_tot_descriptors_loop_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- descriptor_end = offset + descriptor_len;
- while (offset < descriptor_end)
- offset += proto_mpeg_descriptor_dissect(tvb, offset, dvb_tot_tree);
+ descriptor_end = offset + descriptor_len;
+ while (offset < descriptor_end)
+ offset += proto_mpeg_descriptor_dissect(tvb, offset, dvb_tot_tree);
- offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_tot_tree, 0, offset);
- proto_item_set_len(ti, offset);
+ offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_tot_tree, 0, offset);
+ proto_item_set_len(ti, offset);
}
@@ -90,43 +90,43 @@ void
proto_register_dvb_tot(void)
{
- static hf_register_info hf[] = {
+ static hf_register_info hf[] = {
- { &hf_dvb_tot_utc_time, {
- "UTC Time", "dvb_tot.utc_time",
- FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL
- } },
+ { &hf_dvb_tot_utc_time, {
+ "UTC Time", "dvb_tot.utc_time",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL
+ } },
- { &hf_dvb_tot_reserved, {
- "Reserved", "dvb_tot.reserved",
- FT_UINT16, BASE_HEX, NULL, DVB_TOT_RESERVED_MASK, NULL, HFILL
- } },
+ { &hf_dvb_tot_reserved, {
+ "Reserved", "dvb_tot.reserved",
+ FT_UINT16, BASE_HEX, NULL, DVB_TOT_RESERVED_MASK, NULL, HFILL
+ } },
- { &hf_dvb_tot_descriptors_loop_length, {
- "Descriptors Loop Length", "dvb_tot.descr_loop_len",
- FT_UINT16, BASE_DEC, NULL, DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK, NULL, HFILL
- } }
- };
+ { &hf_dvb_tot_descriptors_loop_length, {
+ "Descriptors Loop Length", "dvb_tot.descr_loop_len",
+ FT_UINT16, BASE_DEC, NULL, DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK, NULL, HFILL
+ } }
+ };
- static gint *ett[] = {
- &ett_dvb_tot
- };
+ static gint *ett[] = {
+ &ett_dvb_tot
+ };
- proto_dvb_tot = proto_register_protocol("DVB Time Offset Table", "DVB TOT", "dvb_tot");
+ proto_dvb_tot = proto_register_protocol("DVB Time Offset Table", "DVB TOT", "dvb_tot");
- proto_register_field_array(proto_dvb_tot, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_register_field_array(proto_dvb_tot, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
void proto_reg_handoff_dvb_tot(void)
{
- dissector_handle_t dvb_tot_handle;
+ dissector_handle_t dvb_tot_handle;
- dvb_tot_handle = create_dissector_handle(dissect_dvb_tot, proto_dvb_tot);
+ dvb_tot_handle = create_dissector_handle(dissect_dvb_tot, proto_dvb_tot);
- dissector_add_uint("mpeg_sect.tid", DVB_TOT_TID, dvb_tot_handle);
+ dissector_add_uint("mpeg_sect.tid", DVB_TOT_TID, dvb_tot_handle);
}
/*
@@ -134,10 +134,10 @@ void proto_reg_handoff_dvb_tot(void)
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/
diff --git a/epan/dissectors/packet-mpeg-ca.c b/epan/dissectors/packet-mpeg-ca.c
index 25ecc0c3b8..00a900e738 100644
--- a/epan/dissectors/packet-mpeg-ca.c
+++ b/epan/dissectors/packet-mpeg-ca.c
@@ -41,17 +41,17 @@ static int hf_mpeg_ca_last_section_number = -1;
static gint ett_mpeg_ca = -1;
-#define MPEG_CA_TID 0x01
+#define MPEG_CA_TID 0x01
-#define MPEG_CA_RESERVED_MASK 0xFFFFC0
-#define MPEG_CA_VERSION_NUMBER_MASK 0x00003E
-#define MPEG_CA_CURRENT_NEXT_INDICATOR_MASK 0x000001
+#define MPEG_CA_RESERVED_MASK 0xFFFFC0
+#define MPEG_CA_VERSION_NUMBER_MASK 0x00003E
+#define MPEG_CA_CURRENT_NEXT_INDICATOR_MASK 0x000001
static const value_string mpeg_ca_cur_next_vals[] = {
- { 0x0, "Not yet applicable" },
- { 0x1, "Currently applicable" },
- { 0x0, NULL }
+ { 0x0, "Not yet applicable" },
+ { 0x1, "Currently applicable" },
+ { 0x0, NULL }
};
@@ -59,39 +59,39 @@ static void
dissect_mpeg_ca(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset = 0, length = 0;
+ guint offset = 0, length = 0;
- proto_item *ti;
- proto_tree *mpeg_ca_tree;
+ proto_item *ti;
+ proto_tree *mpeg_ca_tree;
- /* The TVB should start right after the section_length in the Section packet */
+ /* The TVB should start right after the section_length in the Section packet */
- col_set_str(pinfo->cinfo, COL_INFO, "Conditional Access Table (CA)");
+ col_set_str(pinfo->cinfo, COL_INFO, "Conditional Access Table (CA)");
- ti = proto_tree_add_item(tree, proto_mpeg_ca, tvb, offset, -1, ENC_NA);
- mpeg_ca_tree = proto_item_add_subtree(ti, ett_mpeg_ca);
+ ti = proto_tree_add_item(tree, proto_mpeg_ca, tvb, offset, -1, ENC_NA);
+ mpeg_ca_tree = proto_item_add_subtree(ti, ett_mpeg_ca);
- offset += packet_mpeg_sect_header(tvb, offset, mpeg_ca_tree, &length, NULL);
- length -= 4;
+ offset += packet_mpeg_sect_header(tvb, offset, mpeg_ca_tree, &length, NULL);
+ length -= 4;
- proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_reserved, tvb, offset, 3, ENC_BIG_ENDIAN);
- proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_version_number, tvb, offset, 3, ENC_BIG_ENDIAN);
- proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_current_next_indicator, tvb, offset, 3, ENC_BIG_ENDIAN);
- offset += 3;
+ proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_reserved, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_version_number, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_current_next_indicator, tvb, offset, 3, ENC_BIG_ENDIAN);
+ offset += 3;
- proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- /* Parse all the programs */
- while (offset < length)
- offset += proto_mpeg_descriptor_dissect(tvb, offset, mpeg_ca_tree);
+ /* Parse all the programs */
+ while (offset < length)
+ offset += proto_mpeg_descriptor_dissect(tvb, offset, mpeg_ca_tree);
- offset += packet_mpeg_sect_crc(tvb, pinfo, mpeg_ca_tree, 0, offset);
+ offset += packet_mpeg_sect_crc(tvb, pinfo, mpeg_ca_tree, 0, offset);
- proto_item_set_len(ti, offset);
+ proto_item_set_len(ti, offset);
}
@@ -99,58 +99,58 @@ void
proto_register_mpeg_ca(void)
{
- static hf_register_info hf[] = {
+ static hf_register_info hf[] = {
- { &hf_mpeg_ca_reserved, {
- "Reserved", "mpeg_ca.reserved",
- FT_UINT24, BASE_HEX, NULL, MPEG_CA_RESERVED_MASK,
+ { &hf_mpeg_ca_reserved, {
+ "Reserved", "mpeg_ca.reserved",
+ FT_UINT24, BASE_HEX, NULL, MPEG_CA_RESERVED_MASK,
NULL, HFILL
- } },
+ } },
- { &hf_mpeg_ca_version_number, {
- "Version Number", "mpeg_ca.version",
- FT_UINT24, BASE_HEX, NULL, MPEG_CA_VERSION_NUMBER_MASK,
+ { &hf_mpeg_ca_version_number, {
+ "Version Number", "mpeg_ca.version",
+ FT_UINT24, BASE_HEX, NULL, MPEG_CA_VERSION_NUMBER_MASK,
NULL, HFILL
- } },
+ } },
- { &hf_mpeg_ca_current_next_indicator, {
- "Current/Next Indicator", "mpeg_ca.cur_next_ind",
- FT_UINT24, BASE_HEX, VALS(mpeg_ca_cur_next_vals), MPEG_CA_CURRENT_NEXT_INDICATOR_MASK,
+ { &hf_mpeg_ca_current_next_indicator, {
+ "Current/Next Indicator", "mpeg_ca.cur_next_ind",
+ FT_UINT24, BASE_HEX, VALS(mpeg_ca_cur_next_vals), MPEG_CA_CURRENT_NEXT_INDICATOR_MASK,
NULL, HFILL
- } },
+ } },
- { &hf_mpeg_ca_section_number, {
- "Section Number", "mpeg_ca.sect_num",
- FT_UINT8, BASE_DEC, NULL, 0,
+ { &hf_mpeg_ca_section_number, {
+ "Section Number", "mpeg_ca.sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL
- } },
+ } },
- { &hf_mpeg_ca_last_section_number, {
- "Last Section Number", "mpeg_ca.last_sect_num",
- FT_UINT8, BASE_DEC, NULL, 0,
+ { &hf_mpeg_ca_last_section_number, {
+ "Last Section Number", "mpeg_ca.last_sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL
- } },
+ } },
- };
+ };
- static gint *ett[] = {
- &ett_mpeg_ca,
- };
+ static gint *ett[] = {
+ &ett_mpeg_ca,
+ };
- proto_mpeg_ca = proto_register_protocol("MPEG2 Conditional Access Table", "MPEG CA", "mpeg_ca");
+ proto_mpeg_ca = proto_register_protocol("MPEG2 Conditional Access Table", "MPEG CA", "mpeg_ca");
- proto_register_field_array(proto_mpeg_ca, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_register_field_array(proto_mpeg_ca, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
void proto_reg_handoff_mpeg_ca(void)
{
- dissector_handle_t mpeg_ca_handle;
+ dissector_handle_t mpeg_ca_handle;
- mpeg_ca_handle = create_dissector_handle(dissect_mpeg_ca, proto_mpeg_ca);
- dissector_add_uint("mpeg_sect.tid", MPEG_CA_TID, mpeg_ca_handle);
+ mpeg_ca_handle = create_dissector_handle(dissect_mpeg_ca, proto_mpeg_ca);
+ dissector_add_uint("mpeg_sect.tid", MPEG_CA_TID, mpeg_ca_handle);
}
/*
@@ -158,10 +158,10 @@ void proto_reg_handoff_mpeg_ca(void)
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/
diff --git a/epan/dissectors/packet-mpeg-descriptor.c b/epan/dissectors/packet-mpeg-descriptor.c
index 08ff5b9ea1..72206637e0 100644
--- a/epan/dissectors/packet-mpeg-descriptor.c
+++ b/epan/dissectors/packet-mpeg-descriptor.c
@@ -37,143 +37,143 @@ static int hf_mpeg_descriptor_data = -1;
static gint ett_mpeg_descriptor = -1;
static const value_string mpeg_descriptor_tag_vals[] = {
- /* From ISO/IEC 13818-1 */
- { 0x00, "Reserved" },
- { 0x01, "Reserved" },
- { 0x02, "Video Stream Descriptor" },
- { 0x03, "Audio Stream Descriptor" },
- { 0x04, "Hierarchy Descriptor" },
- { 0x05, "Registration Descriptor" },
- { 0x06, "Data Stream Alignment Descriptor" },
- { 0x07, "Target Background Grid Descriptor" },
- { 0x08, "Video Window Descriptor" },
- { 0x09, "CA Descriptor" },
- { 0x0A, "ISO 639 Language Descriptor" },
- { 0x0B, "System Clock Descriptor" },
- { 0x0C, "Multiplex Buffer Utilization Descriptor" },
- { 0x0D, "Copyright Descriptor" },
- { 0x0E, "Maximum Bitrate Descriptor" },
- { 0x0F, "Private Data Indicator Descriptor" },
- { 0x10, "Smoothing Buffer Descriptor" },
- { 0x11, "STD Descriptor" },
- { 0x12, "IBP Descriptor" },
-
- /* From ETSI TR 101 202 */
- { 0x13, "Carousel Identifier Descriptor" },
- { 0x14, "Association Tag Descriptor" },
- { 0x15, "Deferred Association Tag Descriptor" },
-
- /* From ISO/IEC 13818-1 */
- { 0x1B, "MPEG 4 Video Descriptor" },
- { 0x1C, "MPEG 4 Audio Descriptor" },
- { 0x1D, "IOD Descriptor" },
- { 0x1E, "SL Descriptor" },
- { 0x1F, "FMC Descriptor" },
- { 0x20, "External ES ID Descriptor" },
- { 0x21, "MuxCode Descriptor" },
- { 0x22, "FmxBufferSize Descriptor" },
- { 0x23, "MultiplexBuffer Descriptor" },
- { 0x24, "Content Labeling Descriptor" },
- { 0x25, "Metadata Pointer Descriptor" },
- { 0x26, "Metadata Descriptor" },
- { 0x27, "Metadata STD Descriptor" },
- { 0x28, "AVC Video Descriptor" },
- { 0x29, "IPMP Descriptor" },
- { 0x2A, "AVC Timing and HRD Descriptor" },
- { 0x2B, "MPEG2 AAC Descriptor" },
- { 0x2C, "FlexMuxTiming Descriptor" },
-
- /* From ETSI EN 300 468 */
- { 0x40, "Network Name Descriptor" },
- { 0x41, "Service List Descriptor" },
- { 0x42, "Stuffing Descriptor" },
- { 0x43, "Satellite Delivery System Descriptor" },
- { 0x44, "Cable Delivery System Descriptor" },
- { 0x45, "VBI Data Descriptor" },
- { 0x46, "VBI Teletext Descriptor" },
- { 0x47, "Bouquet Name Descriptor" },
- { 0x48, "Service Descriptor" },
- { 0x49, "Country Availability Descriptor" },
- { 0x4A, "Linkage Descriptor" },
- { 0x4B, "NVOD Reference Descriptor" },
- { 0x4C, "Time Shifted Service Descriptor" },
- { 0x4D, "Short Event Descriptor" },
- { 0x4E, "Extended Event Descriptor" },
- { 0x4F, "Time Shifted Event Descriptor" },
- { 0x50, "Component Descriptor" },
- { 0x51, "Mosaic Descriptor" },
- { 0x52, "Stream Identifier Descriptor" },
- { 0x53, "CA Identifier Descriptor" },
- { 0x54, "Content Descriptor" },
- { 0x55, "Parent Rating Descriptor" },
- { 0x56, "Teletext Descriptor" },
- { 0x57, "Telephone Descriptor" },
- { 0x58, "Local Time Offset Descriptor" },
- { 0x59, "Subtitling Descriptor" },
- { 0x5A, "Terrestrial Delivery System Descriptor" },
- { 0x5B, "Multilingual Network Name Descriptor" },
- { 0x5C, "Multilingual Bouquet Name Descriptor" },
- { 0x5D, "Multilingual Service Name Descriptor" },
- { 0x5E, "Multilingual Component Descriptor" },
- { 0x5F, "Private Data Specifier Descriptor" },
- { 0x60, "Service Move Descriptor" },
- { 0x61, "Short Smoothing Buffer Descriptor" },
- { 0x62, "Frequency List Descriptor" },
- { 0x63, "Partial Transport Stream Descriptor" },
- { 0x64, "Data Broadcast Descriptor" },
- { 0x65, "Scrambling Descriptor" },
- { 0x66, "Data Broadcast ID Descriptor" },
- { 0x67, "Transport Stream Descriptor" },
- { 0x68, "DSNG Descriptor" },
- { 0x69, "PDC Descriptor" },
- { 0x6A, "AC-3 Descriptor" },
- { 0x6B, "Ancillary Data Descriptor" },
- { 0x6C, "Cell List Descriptor" },
- { 0x6D, "Cell Frequency Link Descriptor" },
- { 0x6E, "Announcement Support Descriptor" },
- { 0x6F, "Application Signalling Descriptor" },
- { 0x70, "Adaptation Field Data Descriptor" },
- { 0x71, "Service Identifier Descriptor" },
- { 0x72, "Service Availability Descriptor" },
- { 0x73, "Default Authority Descriptor" },
- { 0x74, "Related Content Descriptor" },
- { 0x75, "TVA ID Descriptor" },
- { 0x76, "Content Identifier Descriptor" },
- { 0x77, "Time Slice FEC Identifier Descriptor" },
- { 0x78, "ECM Repetition Rate Descriptor" },
- { 0x79, "S2 Satellite Delivery System Descriptor" },
- { 0x7A, "Enhanced AC-3 Descriptor" },
- { 0x7B, "DTS Descriptor" },
- { 0x7C, "AAC Descriptor" },
- { 0x7D, "XAIT Content Location Descriptor" },
- { 0x7E, "FTA Content Management Descriptor" },
- { 0x7F, "Extension Descriptor" },
-
- /* From ETSI EN 301 790 */
- { 0xA0, "Network Layer Info Descriptor" },
- { 0xA1, "Correction Message Descriptor" },
- { 0xA2, "Logon Initialize Descriptor" },
- { 0xA3, "ACQ Assign Descriptor" },
- { 0xA4, "SYNC Assign Descriptor" },
- { 0xA5, "Encrypted Logon ID Descriptor" },
- { 0xA6, "Echo Value Descriptor" },
- { 0xA7, "RCS Content Descriptor" },
- { 0xA8, "Satellite Forward Link Descriptor" },
- { 0xA9, "Satellite Return Link Descriptor" },
- { 0xAA, "Table Update Descriptor" },
- { 0xAB, "Contention Control Descriptor" },
- { 0xAC, "Correction Control Descriptor" },
- { 0xAD, "Forward Interaction Path Descriptor" },
- { 0xAE, "Return Interaction Path Descriptor" },
- { 0xAf, "Connection Control Descriptor" },
- { 0xB0, "Mobility Control Descriptor" },
- { 0xB1, "Correction Message Extension Descriptor" },
- { 0xB2, "Return Transmission Modes Descriptor" },
- { 0xB3, "Mesh Logon Initialize Descriptor" },
- { 0xB5, "Implementation Type Descriptor" },
- { 0xB6, "LL FEC Identifier Descriptor" },
-
- { 0x00, NULL}
+ /* From ISO/IEC 13818-1 */
+ { 0x00, "Reserved" },
+ { 0x01, "Reserved" },
+ { 0x02, "Video Stream Descriptor" },
+ { 0x03, "Audio Stream Descriptor" },
+ { 0x04, "Hierarchy Descriptor" },
+ { 0x05, "Registration Descriptor" },
+ { 0x06, "Data Stream Alignment Descriptor" },
+ { 0x07, "Target Background Grid Descriptor" },
+ { 0x08, "Video Window Descriptor" },
+ { 0x09, "CA Descriptor" },
+ { 0x0A, "ISO 639 Language Descriptor" },
+ { 0x0B, "System Clock Descriptor" },
+ { 0x0C, "Multiplex Buffer Utilization Descriptor" },
+ { 0x0D, "Copyright Descriptor" },
+ { 0x0E, "Maximum Bitrate Descriptor" },
+ { 0x0F, "Private Data Indicator Descriptor" },
+ { 0x10, "Smoothing Buffer Descriptor" },
+ { 0x11, "STD Descriptor" },
+ { 0x12, "IBP Descriptor" },
+
+ /* From ETSI TR 101 202 */
+ { 0x13, "Carousel Identifier Descriptor" },
+ { 0x14, "Association Tag Descriptor" },
+ { 0x15, "Deferred Association Tag Descriptor" },
+
+ /* From ISO/IEC 13818-1 */
+ { 0x1B, "MPEG 4 Video Descriptor" },
+ { 0x1C, "MPEG 4 Audio Descriptor" },
+ { 0x1D, "IOD Descriptor" },
+ { 0x1E, "SL Descriptor" },
+ { 0x1F, "FMC Descriptor" },
+ { 0x20, "External ES ID Descriptor" },
+ { 0x21, "MuxCode Descriptor" },
+ { 0x22, "FmxBufferSize Descriptor" },
+ { 0x23, "MultiplexBuffer Descriptor" },
+ { 0x24, "Content Labeling Descriptor" },
+ { 0x25, "Metadata Pointer Descriptor" },
+ { 0x26, "Metadata Descriptor" },
+ { 0x27, "Metadata STD Descriptor" },
+ { 0x28, "AVC Video Descriptor" },
+ { 0x29, "IPMP Descriptor" },
+ { 0x2A, "AVC Timing and HRD Descriptor" },
+ { 0x2B, "MPEG2 AAC Descriptor" },
+ { 0x2C, "FlexMuxTiming Descriptor" },
+
+ /* From ETSI EN 300 468 */
+ { 0x40, "Network Name Descriptor" },
+ { 0x41, "Service List Descriptor" },
+ { 0x42, "Stuffing Descriptor" },
+ { 0x43, "Satellite Delivery System Descriptor" },
+ { 0x44, "Cable Delivery System Descriptor" },
+ { 0x45, "VBI Data Descriptor" },
+ { 0x46, "VBI Teletext Descriptor" },
+ { 0x47, "Bouquet Name Descriptor" },
+ { 0x48, "Service Descriptor" },
+ { 0x49, "Country Availability Descriptor" },
+ { 0x4A, "Linkage Descriptor" },
+ { 0x4B, "NVOD Reference Descriptor" },
+ { 0x4C, "Time Shifted Service Descriptor" },
+ { 0x4D, "Short Event Descriptor" },
+ { 0x4E, "Extended Event Descriptor" },
+ { 0x4F, "Time Shifted Event Descriptor" },
+ { 0x50, "Component Descriptor" },
+ { 0x51, "Mosaic Descriptor" },
+ { 0x52, "Stream Identifier Descriptor" },
+ { 0x53, "CA Identifier Descriptor" },
+ { 0x54, "Content Descriptor" },
+ { 0x55, "Parent Rating Descriptor" },
+ { 0x56, "Teletext Descriptor" },
+ { 0x57, "Telephone Descriptor" },
+ { 0x58, "Local Time Offset Descriptor" },
+ { 0x59, "Subtitling Descriptor" },
+ { 0x5A, "Terrestrial Delivery System Descriptor" },
+ { 0x5B, "Multilingual Network Name Descriptor" },
+ { 0x5C, "Multilingual Bouquet Name Descriptor" },
+ { 0x5D, "Multilingual Service Name Descriptor" },
+ { 0x5E, "Multilingual Component Descriptor" },
+ { 0x5F, "Private Data Specifier Descriptor" },
+ { 0x60, "Service Move Descriptor" },
+ { 0x61, "Short Smoothing Buffer Descriptor" },
+ { 0x62, "Frequency List Descriptor" },
+ { 0x63, "Partial Transport Stream Descriptor" },
+ { 0x64, "Data Broadcast Descriptor" },
+ { 0x65, "Scrambling Descriptor" },
+ { 0x66, "Data Broadcast ID Descriptor" },
+ { 0x67, "Transport Stream Descriptor" },
+ { 0x68, "DSNG Descriptor" },
+ { 0x69, "PDC Descriptor" },
+ { 0x6A, "AC-3 Descriptor" },
+ { 0x6B, "Ancillary Data Descriptor" },
+ { 0x6C, "Cell List Descriptor" },
+ { 0x6D, "Cell Frequency Link Descriptor" },
+ { 0x6E, "Announcement Support Descriptor" },
+ { 0x6F, "Application Signalling Descriptor" },
+ { 0x70, "Adaptation Field Data Descriptor" },
+ { 0x71, "Service Identifier Descriptor" },
+ { 0x72, "Service Availability Descriptor" },
+ { 0x73, "Default Authority Descriptor" },
+ { 0x74, "Related Content Descriptor" },
+ { 0x75, "TVA ID Descriptor" },
+ { 0x76, "Content Identifier Descriptor" },
+ { 0x77, "Time Slice FEC Identifier Descriptor" },
+ { 0x78, "ECM Repetition Rate Descriptor" },
+ { 0x79, "S2 Satellite Delivery System Descriptor" },
+ { 0x7A, "Enhanced AC-3 Descriptor" },
+ { 0x7B, "DTS Descriptor" },
+ { 0x7C, "AAC Descriptor" },
+ { 0x7D, "XAIT Content Location Descriptor" },
+ { 0x7E, "FTA Content Management Descriptor" },
+ { 0x7F, "Extension Descriptor" },
+
+ /* From ETSI EN 301 790 */
+ { 0xA0, "Network Layer Info Descriptor" },
+ { 0xA1, "Correction Message Descriptor" },
+ { 0xA2, "Logon Initialize Descriptor" },
+ { 0xA3, "ACQ Assign Descriptor" },
+ { 0xA4, "SYNC Assign Descriptor" },
+ { 0xA5, "Encrypted Logon ID Descriptor" },
+ { 0xA6, "Echo Value Descriptor" },
+ { 0xA7, "RCS Content Descriptor" },
+ { 0xA8, "Satellite Forward Link Descriptor" },
+ { 0xA9, "Satellite Return Link Descriptor" },
+ { 0xAA, "Table Update Descriptor" },
+ { 0xAB, "Contention Control Descriptor" },
+ { 0xAC, "Correction Control Descriptor" },
+ { 0xAD, "Forward Interaction Path Descriptor" },
+ { 0xAE, "Return Interaction Path Descriptor" },
+ { 0xAf, "Connection Control Descriptor" },
+ { 0xB0, "Mobility Control Descriptor" },
+ { 0xB1, "Correction Message Extension Descriptor" },
+ { 0xB2, "Return Transmission Modes Descriptor" },
+ { 0xB3, "Mesh Logon Initialize Descriptor" },
+ { 0xB5, "Implementation Type Descriptor" },
+ { 0xB6, "LL FEC Identifier Descriptor" },
+
+ { 0x00, NULL}
};
static value_string_ext mpeg_descriptor_tag_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descriptor_tag_vals);
@@ -188,46 +188,46 @@ static int hf_mpeg_descr_video_stream_chroma_format = -1;
static int hf_mpeg_descr_video_stream_frame_rate_extension_flag = -1;
static int hf_mpeg_descr_video_stream_reserved = -1;
-#define MPEG_DESCR_VIDEO_STREAM_MULTIPLE_FRAME_RATE_FLAG_MASK 0x80
-#define MPEG_DESCR_VIDEO_STREAM_FRAME_RATE_CODE_MASK 0x78
-#define MPEG_DESCR_VIDEO_STREAM_MPEG1_ONLY_FLAG_MASK 0x04
-#define MPEG_DESCR_VIDEO_STREAM_CONSTRAINED_PARAMETER_FLAG_MASK 0x02
-#define MPEG_DESCR_VIDEO_STREAM_STILL_PICTURE_FLAG_MASK 0x01
-#define MPEG_DESCR_VIDEO_STREAM_CHROMA_FORMAT_MASK 0xC0
-#define MPEG_DESCR_VIDEO_STREAM_FRAME_RATE_EXTENSION_FLAG_MASK 0x20
-#define MPEG_DESCR_VIDEO_STREAM_RESERVED_MASK 0x1F
+#define MPEG_DESCR_VIDEO_STREAM_MULTIPLE_FRAME_RATE_FLAG_MASK 0x80
+#define MPEG_DESCR_VIDEO_STREAM_FRAME_RATE_CODE_MASK 0x78
+#define MPEG_DESCR_VIDEO_STREAM_MPEG1_ONLY_FLAG_MASK 0x04
+#define MPEG_DESCR_VIDEO_STREAM_CONSTRAINED_PARAMETER_FLAG_MASK 0x02
+#define MPEG_DESCR_VIDEO_STREAM_STILL_PICTURE_FLAG_MASK 0x01
+#define MPEG_DESCR_VIDEO_STREAM_CHROMA_FORMAT_MASK 0xC0
+#define MPEG_DESCR_VIDEO_STREAM_FRAME_RATE_EXTENSION_FLAG_MASK 0x20
+#define MPEG_DESCR_VIDEO_STREAM_RESERVED_MASK 0x1F
static const value_string mpeg_descr_video_stream_multiple_frame_rate_flag_vals[] = {
- { 0x00, "Single frame rate present" },
- { 0x01, "Multiple frame rate present" },
+ { 0x00, "Single frame rate present" },
+ { 0x01, "Multiple frame rate present" },
- { 0x00, NULL }
+ { 0x00, NULL }
};
static void
proto_mpeg_descriptor_dissect_video_stream(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- guint8 mpeg1_only_flag;
+ guint8 mpeg1_only_flag;
- mpeg1_only_flag = tvb_get_guint8(tvb, offset) & MPEG_DESCR_VIDEO_STREAM_MPEG1_ONLY_FLAG_MASK;
- proto_tree_add_item(tree, hf_mpeg_descr_video_stream_multiple_frame_rate_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_video_stream_frame_rate_code, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_video_stream_mpeg1_only_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_video_stream_constrained_parameter_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_video_stream_still_picture_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ mpeg1_only_flag = tvb_get_guint8(tvb, offset) & MPEG_DESCR_VIDEO_STREAM_MPEG1_ONLY_FLAG_MASK;
+ proto_tree_add_item(tree, hf_mpeg_descr_video_stream_multiple_frame_rate_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_video_stream_frame_rate_code, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_video_stream_mpeg1_only_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_video_stream_constrained_parameter_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_video_stream_still_picture_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ offset += 1;
- if (mpeg1_only_flag == 0) {
+ if (mpeg1_only_flag == 0) {
- proto_tree_add_item(tree, hf_mpeg_descr_video_stream_profile_and_level_indication, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_video_stream_profile_and_level_indication, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_video_stream_chroma_format, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_video_stream_frame_rate_extension_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_video_stream_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- }
+ proto_tree_add_item(tree, hf_mpeg_descr_video_stream_chroma_format, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_video_stream_frame_rate_extension_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_video_stream_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ }
}
/* 0x03 Audio Stream Descriptor */
@@ -237,61 +237,61 @@ static int hf_mpeg_descr_audio_stream_layer = -1;
static int hf_mpeg_descr_audio_stream_variable_rate_audio_indicator = -1;
static int hf_mpeg_descr_audio_stream_reserved = -1;
-#define MPEG_DESCR_AUDIO_STREAM_FREE_FORMAT_FLAG_MASK 0x80
-#define MPEG_DESCR_AUDIO_STREAM_ID_MASK 0x40
-#define MPEG_DESCR_AUDIO_STREAM_LAYER_MASK 0x30
-#define MPEG_DESCR_AUDIO_STREAM_VARIABLE_RATE_AUDIO_INDICATOR_MASK 0x08
-#define MPEG_DESCR_AUDIO_STREAM_RESERVED_MASK 0x07
+#define MPEG_DESCR_AUDIO_STREAM_FREE_FORMAT_FLAG_MASK 0x80
+#define MPEG_DESCR_AUDIO_STREAM_ID_MASK 0x40
+#define MPEG_DESCR_AUDIO_STREAM_LAYER_MASK 0x30
+#define MPEG_DESCR_AUDIO_STREAM_VARIABLE_RATE_AUDIO_INDICATOR_MASK 0x08
+#define MPEG_DESCR_AUDIO_STREAM_RESERVED_MASK 0x07
static const value_string mpeg_descr_audio_stream_free_format_flag_vals[] = {
- { 0x00, "bitrate_index is not 0" },
- { 0x01, "One more more audio frame has bitrate_index = 0" },
+ { 0x00, "bitrate_index is not 0" },
+ { 0x01, "One more more audio frame has bitrate_index = 0" },
- { 0x00, NULL }
+ { 0x00, NULL }
};
static const value_string mpeg_descr_audio_stream_id_vals[] = {
- { 0x00, "ID not set to 1 in all the frames" },
- { 0x01, "ID set to 1 in all the frames" },
+ { 0x00, "ID not set to 1 in all the frames" },
+ { 0x01, "ID set to 1 in all the frames" },
- { 0x00, NULL }
+ { 0x00, NULL }
};
static const value_string mpeg_descr_audio_stream_variable_rate_audio_indicator_vals[] = {
- { 0x00, "Constant bitrate" },
- { 0x01, "Variable bitrate" },
+ { 0x00, "Constant bitrate" },
+ { 0x01, "Variable bitrate" },
- { 0x00, NULL }
+ { 0x00, NULL }
};
static void
proto_mpeg_descriptor_dissect_audio_stream(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_free_format_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_id, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_layer, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_variable_rate_audio_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_free_format_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_layer, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_variable_rate_audio_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_audio_stream_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
}
/* 0x06 Data Stream Alignment Descriptor */
static int hf_mpeg_descr_data_stream_alignment = -1;
static const value_string mpeg_descr_data_stream_alignment_vals[] = {
- { 0x00, "Reserved" },
- { 0x01, "Slice, or video access unit" },
- { 0x02, "Video access unit" },
- { 0x03, "GOP, or SEQ" },
- { 0x04, "SEQ" },
+ { 0x00, "Reserved" },
+ { 0x01, "Slice, or video access unit" },
+ { 0x02, "Video access unit" },
+ { 0x03, "GOP, or SEQ" },
+ { 0x04, "SEQ" },
- { 0x00, NULL }
+ { 0x00, NULL }
};
static void
proto_mpeg_descriptor_dissect_data_stream_alignment(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_data_stream_alignment, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_data_stream_alignment, tvb, offset, 1, ENC_BIG_ENDIAN);
}
/* 0x09 CA Descriptor */
@@ -300,21 +300,21 @@ static int hf_mpeg_descr_ca_reserved = -1;
static int hf_mpeg_descr_ca_pid = -1;
static int hf_mpeg_descr_ca_private = -1;
-#define MPEG_DESCR_CA_RESERVED_MASK 0xE000
-#define MPEG_DESCR_CA_PID_MASK 0x1FFF
+#define MPEG_DESCR_CA_RESERVED_MASK 0xE000
+#define MPEG_DESCR_CA_PID_MASK 0x1FFF
static void
-proto_mpeg_descriptor_dissect_ca(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_ca(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_ca_system_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_ca_system_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(tree, hf_mpeg_descr_ca_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_ca_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_ca_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_ca_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- if (len > 4)
- proto_tree_add_item(tree, hf_mpeg_descr_ca_private, tvb, offset, len - 4, ENC_NA);
+ if (len > 4)
+ proto_tree_add_item(tree, hf_mpeg_descr_ca_private, tvb, offset, len - 4, ENC_NA);
}
@@ -323,21 +323,21 @@ static int hf_mpeg_descr_iso639_lang = -1;
static int hf_mpeg_descr_iso639_type = -1;
static const value_string mpeg_descr_iso639_type_vals[] = {
- { 0x00, "Undefined" },
- { 0x01, "Clean Effects" },
- { 0x02, "Hearing Impaired" },
- { 0x03, "Visual Impaired Comentary" },
+ { 0x00, "Undefined" },
+ { 0x01, "Clean Effects" },
+ { 0x02, "Hearing Impaired" },
+ { 0x03, "Visual Impaired Comentary" },
- { 0x00, NULL }
+ { 0x00, NULL }
};
static void
-proto_mpeg_descriptor_dissect_iso639(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_iso639(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- if (len > 1)
- proto_tree_add_item(tree, hf_mpeg_descr_iso639_lang, tvb, offset, len - 1, ENC_ASCII|ENC_NA);
- offset += len - 1;
- proto_tree_add_item(tree, hf_mpeg_descr_iso639_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ if (len > 1)
+ proto_tree_add_item(tree, hf_mpeg_descr_iso639_lang, tvb, offset, len - 1, ENC_ASCII|ENC_NA);
+ offset += len - 1;
+ proto_tree_add_item(tree, hf_mpeg_descr_iso639_type, tvb, offset, 1, ENC_BIG_ENDIAN);
}
/* 0x0B System Clock Descriptor */
@@ -347,42 +347,42 @@ static int hf_mpeg_descr_system_clock_accuracy_integer = -1;
static int hf_mpeg_descr_system_clock_accuracy_exponent = -1;
static int hf_mpeg_descr_system_clock_reserved2 = -1;
-#define MPEG_DESCR_SYSTEM_CLOCK_EXTERNAL_CLOCK_REFERENCE_INDICATOR_MASK 0x80
-#define MPEG_DESCR_SYSTEM_CLOCK_RESERVED1_MASK 0x40
-#define MPEG_DESCR_SYSTEM_CLOCK_ACCURACY_INTEGER_MASK 0x3F
-#define MPEG_DESCR_SYSTEM_CLOCK_ACCURACY_EXPONENT_MASK 0xE0
-#define MPEG_DESCR_SYSTEM_CLOCK_RESERVED2_MASK 0x1F
+#define MPEG_DESCR_SYSTEM_CLOCK_EXTERNAL_CLOCK_REFERENCE_INDICATOR_MASK 0x80
+#define MPEG_DESCR_SYSTEM_CLOCK_RESERVED1_MASK 0x40
+#define MPEG_DESCR_SYSTEM_CLOCK_ACCURACY_INTEGER_MASK 0x3F
+#define MPEG_DESCR_SYSTEM_CLOCK_ACCURACY_EXPONENT_MASK 0xE0
+#define MPEG_DESCR_SYSTEM_CLOCK_RESERVED2_MASK 0x1F
static void
proto_mpeg_descriptor_dissect_system_clock(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_system_clock_external_clock_reference_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_system_clock_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_system_clock_accuracy_integer, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_system_clock_external_clock_reference_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_system_clock_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_system_clock_accuracy_integer, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_system_clock_accuracy_exponent, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_system_clock_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_system_clock_accuracy_exponent, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_system_clock_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN);
}
/* 0x0E Maximum Bitrate Descriptor */
static int hf_mpeg_descr_max_bitrate_reserved = -1;
static int hf_mpeg_descr_max_bitrate = -1;
-#define MPEG_DESCR_MAX_BITRATE_RESERVED_MASK 0xC00000
-#define MPEG_DESCR_MAX_BITRATE_MASK 0x3FFFFF
+#define MPEG_DESCR_MAX_BITRATE_RESERVED_MASK 0xC00000
+#define MPEG_DESCR_MAX_BITRATE_MASK 0x3FFFFF
static void
proto_mpeg_descriptor_dissect_max_bitrate(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- proto_item *rate_item;
+ proto_item *rate_item;
- guint32 rate;
+ guint32 rate;
- proto_tree_add_item(tree, hf_mpeg_descr_max_bitrate_reserved, tvb, offset, 3, ENC_BIG_ENDIAN);
- rate = tvb_get_ntoh24(tvb, offset) & MPEG_DESCR_MAX_BITRATE_MASK;
- rate_item = proto_tree_add_item(tree, hf_mpeg_descr_max_bitrate, tvb, offset, 3, ENC_BIG_ENDIAN);
- proto_item_append_text(rate_item, " (%u bytes/sec)", rate * 50);
+ proto_tree_add_item(tree, hf_mpeg_descr_max_bitrate_reserved, tvb, offset, 3, ENC_BIG_ENDIAN);
+ rate = tvb_get_ntoh24(tvb, offset) & MPEG_DESCR_MAX_BITRATE_MASK;
+ rate_item = proto_tree_add_item(tree, hf_mpeg_descr_max_bitrate, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_item_append_text(rate_item, " (%u bytes/sec)", rate * 50);
}
/* 0x10 Smoothing Buffer Descriptor */
@@ -391,26 +391,26 @@ static int hf_mpeg_descr_smoothing_buffer_leak_rate = -1;
static int hf_mpeg_descr_smoothing_buffer_reserved2 = -1;
static int hf_mpeg_descr_smoothing_buffer_size = -1;
-#define MPEG_DESCR_SMOOTHING_BUFFER_RESERVED1_MASK 0xC00000
-#define MPEG_DESCR_SMOOTHING_BUFFER_LEAK_RATE_MASK 0x3FFFFF
-#define MPEG_DESCR_SMOOTHING_BUFFER_RESERVED2_MASK 0xC00000
-#define MPEG_DESCR_SMOOTHING_BUFFER_SIZE_MASK 0x3FFFFF
+#define MPEG_DESCR_SMOOTHING_BUFFER_RESERVED1_MASK 0xC00000
+#define MPEG_DESCR_SMOOTHING_BUFFER_LEAK_RATE_MASK 0x3FFFFF
+#define MPEG_DESCR_SMOOTHING_BUFFER_RESERVED2_MASK 0xC00000
+#define MPEG_DESCR_SMOOTHING_BUFFER_SIZE_MASK 0x3FFFFF
static void
proto_mpeg_descriptor_dissect_smoothing_buffer(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- proto_item *leak_rate_item;
+ proto_item *leak_rate_item;
- guint32 leak_rate;
+ guint32 leak_rate;
- proto_tree_add_item(tree, hf_mpeg_descr_smoothing_buffer_reserved1, tvb, offset, 3, ENC_BIG_ENDIAN);
- leak_rate = tvb_get_ntoh24(tvb, offset) & MPEG_DESCR_SMOOTHING_BUFFER_LEAK_RATE_MASK;
- leak_rate_item = proto_tree_add_item(tree, hf_mpeg_descr_smoothing_buffer_leak_rate, tvb, offset, 3, ENC_BIG_ENDIAN);
- proto_item_append_text(leak_rate_item, " (%u bytes/sec)", leak_rate * 400 / 8);
- offset += 3;
+ proto_tree_add_item(tree, hf_mpeg_descr_smoothing_buffer_reserved1, tvb, offset, 3, ENC_BIG_ENDIAN);
+ leak_rate = tvb_get_ntoh24(tvb, offset) & MPEG_DESCR_SMOOTHING_BUFFER_LEAK_RATE_MASK;
+ leak_rate_item = proto_tree_add_item(tree, hf_mpeg_descr_smoothing_buffer_leak_rate, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_item_append_text(leak_rate_item, " (%u bytes/sec)", leak_rate * 400 / 8);
+ offset += 3;
- proto_tree_add_item(tree, hf_mpeg_descr_smoothing_buffer_reserved2, tvb, offset, 3, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_smoothing_buffer_size, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_smoothing_buffer_reserved2, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_smoothing_buffer_size, tvb, offset, 3, ENC_BIG_ENDIAN);
}
@@ -418,14 +418,14 @@ proto_mpeg_descriptor_dissect_smoothing_buffer(tvbuff_t *tvb, guint offset, prot
static int hf_mpeg_descr_std_reserved = -1;
static int hf_mpeg_descr_std_leak_valid = -1;
-#define MPEG_DESCR_STD_RESERVED_MASK 0xFE
-#define MPEG_DESCR_STD_LEAK_VALID_MASK 0x01
+#define MPEG_DESCR_STD_RESERVED_MASK 0xFE
+#define MPEG_DESCR_STD_LEAK_VALID_MASK 0x01
static void
proto_mpeg_descriptor_dissect_std(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_std_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_std_leak_valid, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_std_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_std_leak_valid, tvb, offset, 1, ENC_BIG_ENDIAN);
}
/* 0x13 Carousel Identifier Descriptor */
@@ -443,64 +443,65 @@ static int hf_mpeg_descr_carousel_identifier_object_key_data = -1;
static int hf_mpeg_descr_carousel_identifier_private = -1;
static const value_string mpeg_descr_carousel_identifier_format_id_vals[] = {
- { 0x00, "No Format Specifier" },
- { 0x01, "Format Specifier" },
+ { 0x00, "No Format Specifier" },
+ { 0x01, "Format Specifier" },
- { 0, NULL }
+ { 0, NULL }
};
static void
-proto_mpeg_descriptor_dissect_carousel_identifier(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_carousel_identifier(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint8 key_len, format_id;
- guint private_len = 0;
+ guint key_len;
+ guint8 format_id;
+ guint private_len = 0;
- proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_id, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
+ proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_id, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
- format_id = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_format_id, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ format_id = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_format_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- if (format_id == 0x01) {
- proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_module_version, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ if (format_id == 0x01) {
+ proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_module_version, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_module_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_module_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_block_size, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_block_size, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_module_size, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
+ proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_module_size, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
- proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_compression_method, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_compression_method, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_original_size, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
+ proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_original_size, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
- proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_timeout, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_timeout, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- key_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_object_key_len, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ key_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_object_key_len, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_object_key_data, tvb, offset, key_len, ENC_NA);
- offset += key_len;
+ proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_object_key_data, tvb, offset, key_len, ENC_NA);
+ offset += key_len;
- if (len > 20 + key_len)
- private_len = len - 20 - key_len;
+ if (len > (key_len + 20))
+ private_len = len - 20 - key_len;
- } else {
- if (len > 5)
- private_len = len - 5;
- }
+ } else {
+ if (len > 5)
+ private_len = len - 5;
+ }
- if (private_len)
- proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_private, tvb, offset, private_len, ENC_NA);
+ if (private_len)
+ proto_tree_add_item(tree, hf_mpeg_descr_carousel_identifier_private, tvb, offset, private_len, ENC_NA);
}
@@ -514,39 +515,39 @@ static int hf_mpeg_descr_association_tag_selector_bytes = -1;
static int hf_mpeg_descr_association_tag_private_bytes = -1;
static void
-proto_mpeg_descriptor_dissect_association_tag(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_association_tag(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint end = offset + len;
- guint16 use;
- guint8 selector_len;
+ guint end = offset + len;
+ guint16 use;
+ guint8 selector_len;
- proto_tree_add_item(tree, hf_mpeg_descr_association_tag, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_association_tag, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- use = tvb_get_ntohs(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_association_tag_use, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ use = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_association_tag_use, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- selector_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_association_tag_selector_len, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset ++;
+ selector_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_association_tag_selector_len, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset ++;
- if (use == 0x00) {
- if (selector_len != 8)
- return;
- proto_tree_add_item(tree, hf_mpeg_descr_association_tag_transaction_id, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
+ if (use == 0x00) {
+ if (selector_len != 8)
+ return;
+ proto_tree_add_item(tree, hf_mpeg_descr_association_tag_transaction_id, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
- proto_tree_add_item(tree, hf_mpeg_descr_association_tag_timeout, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
+ proto_tree_add_item(tree, hf_mpeg_descr_association_tag_timeout, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
- } else {
- proto_tree_add_item(tree, hf_mpeg_descr_association_tag_selector_bytes, tvb, offset, selector_len, ENC_NA);
- offset += selector_len;
- }
+ } else {
+ proto_tree_add_item(tree, hf_mpeg_descr_association_tag_selector_bytes, tvb, offset, selector_len, ENC_NA);
+ offset += selector_len;
+ }
- if (offset < end)
- proto_tree_add_item(tree, hf_mpeg_descr_association_tag_private_bytes, tvb, offset, end - offset, ENC_NA);
+ if (offset < end)
+ proto_tree_add_item(tree, hf_mpeg_descr_association_tag_private_bytes, tvb, offset, end - offset, ENC_NA);
}
/* 0x28 AVC Video Descriptor */
@@ -560,41 +561,41 @@ static int hf_mpeg_descr_avc_vid_still_present = -1;
static int hf_mpeg_descr_avc_vid_24h_picture_flag = -1;
static int hf_mpeg_descr_avc_vid_reserved = -1;
-#define MPEG_DESCR_AVC_VID_CONSTRAINT_SET0_FLAG_MASK 0x80
-#define MPEG_DESCR_AVC_VID_CONSTRAINT_SET1_FLAG_MASK 0x40
-#define MPEG_DESCR_AVC_VID_CONSTRAINT_SET2_FLAG_MASK 0x20
-#define MPEG_DESCR_AVC_VID_COMPATIBLE_FLAGS_MASK 0x1F
-#define MPEG_DESCR_AVC_VID_STILL_PRESENT_MASK 0x80
-#define MPEG_DESCR_AVC_VID_24H_PICTURE_FLAG_MASK 0x40
-#define MPEG_DESCR_AVC_VID_RESERVED_MASK 0x3F
+#define MPEG_DESCR_AVC_VID_CONSTRAINT_SET0_FLAG_MASK 0x80
+#define MPEG_DESCR_AVC_VID_CONSTRAINT_SET1_FLAG_MASK 0x40
+#define MPEG_DESCR_AVC_VID_CONSTRAINT_SET2_FLAG_MASK 0x20
+#define MPEG_DESCR_AVC_VID_COMPATIBLE_FLAGS_MASK 0x1F
+#define MPEG_DESCR_AVC_VID_STILL_PRESENT_MASK 0x80
+#define MPEG_DESCR_AVC_VID_24H_PICTURE_FLAG_MASK 0x40
+#define MPEG_DESCR_AVC_VID_RESERVED_MASK 0x3F
static void
proto_mpeg_descriptor_dissect_avc_vid(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_profile_idc, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_profile_idc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_constraint_set0_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_constraint_set1_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_constraint_set2_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_compatible_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_constraint_set0_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_constraint_set1_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_constraint_set2_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_compatible_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_level_idc, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_level_idc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_still_present, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_24h_picture_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_still_present, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_24h_picture_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_avc_vid_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
}
/* 0x40 Network Name Descriptor */
static int hf_mpeg_descr_network_name_descriptor = -1;
static void
-proto_mpeg_descriptor_dissect_network_name(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_network_name(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_network_name_descriptor, tvb, offset, len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_mpeg_descr_network_name_descriptor, tvb, offset, len, ENC_ASCII|ENC_NA);
}
/* 0x41 Service List Descriptor */
@@ -604,36 +605,36 @@ static int hf_mpeg_descr_service_list_type = -1;
static gint ett_mpeg_descriptor_service_list = -1;
static void
-proto_mpeg_descriptor_dissect_service_list(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_service_list(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint end = offset + len;
- guint16 svc_id;
+ guint end = offset + len;
+ guint16 svc_id;
- proto_item *si;
- proto_tree *svc_tree;
+ proto_item *si;
+ proto_tree *svc_tree;
- while (offset < end) {
- svc_id = tvb_get_ntohs(tvb, offset);
+ while (offset < end) {
+ svc_id = tvb_get_ntohs(tvb, offset);
- si = proto_tree_add_text(tree, tvb, offset, 3, "Service 0x%02x", svc_id);
- svc_tree = proto_item_add_subtree(si, ett_mpeg_descriptor_service_list);
+ si = proto_tree_add_text(tree, tvb, offset, 3, "Service 0x%02x", svc_id);
+ svc_tree = proto_item_add_subtree(si, ett_mpeg_descriptor_service_list);
- proto_tree_add_item(svc_tree, hf_mpeg_descr_service_list_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(svc_tree, hf_mpeg_descr_service_list_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(svc_tree, hf_mpeg_descr_service_list_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- }
+ proto_tree_add_item(svc_tree, hf_mpeg_descr_service_list_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ }
}
/* 0x42 Stuffing Descriptor */
static int hf_mpeg_descr_stuffing = -1;
static void
-proto_mpeg_descriptor_stuffing(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_stuffing(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_stuffing, tvb, offset, len, ENC_NA);
+ proto_tree_add_item(tree, hf_mpeg_descr_stuffing, tvb, offset, len, ENC_NA);
}
/* 0x43 Satellite Delivery System Descriptor */
@@ -648,121 +649,121 @@ static int hf_mpeg_descr_satellite_delivery_modulation_type = -1;
static int hf_mpeg_descr_satellite_delivery_symbol_rate = -1;
static int hf_mpeg_descr_satellite_delivery_fec_inner = -1;
-#define MPEG_DESCR_SATELLITE_DELIVERY_WEST_EAST_FLAG_MASK 0x80
-#define MPEG_DESCR_SATELLITE_DELIVERY_POLARIZATION_MASK 0x60
-#define MPEG_DESCR_SATELLITE_DELIVERY_ROLL_OFF_MASK 0x18
-#define MPEG_DESCR_SATELLITE_DELIVERY_ZERO_MASK 0x18
-#define MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_SYSTEM_MASK 0x06
-#define MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_TYPE_MASK 0x01
-#define MPEG_DESCR_SATELLITE_DELIVERY_FEC_INNER_MASK 0x0F
+#define MPEG_DESCR_SATELLITE_DELIVERY_WEST_EAST_FLAG_MASK 0x80
+#define MPEG_DESCR_SATELLITE_DELIVERY_POLARIZATION_MASK 0x60
+#define MPEG_DESCR_SATELLITE_DELIVERY_ROLL_OFF_MASK 0x18
+#define MPEG_DESCR_SATELLITE_DELIVERY_ZERO_MASK 0x18
+#define MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_SYSTEM_MASK 0x06
+#define MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_TYPE_MASK 0x01
+#define MPEG_DESCR_SATELLITE_DELIVERY_FEC_INNER_MASK 0x0F
static const value_string mpeg_descr_satellite_delivery_west_east_flag_vals[] = {
- { 0x0, "West" },
- { 0x1, "East" },
+ { 0x0, "West" },
+ { 0x1, "East" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_satellite_delivery_polarization_vals[] = {
- { 0x0, "Linear - Horizontal" },
- { 0x1, "Linear - Vertical" },
- { 0x2, "Circular - Left" },
- { 0x3, "Circular - Right" },
+ { 0x0, "Linear - Horizontal" },
+ { 0x1, "Linear - Vertical" },
+ { 0x2, "Circular - Left" },
+ { 0x3, "Circular - Right" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_satellite_delivery_roll_off_vals[] = {
- { 0x0, "alpha = 0,35" },
- { 0x1, "alpha = 0,25" },
- { 0x2, "alpha = 0,20" },
+ { 0x0, "alpha = 0,35" },
+ { 0x1, "alpha = 0,25" },
+ { 0x2, "alpha = 0,20" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_satellite_delivery_modulation_system_vals[] = {
- { 0x0, "DVB-S" },
- { 0x1, "DVB-S2" },
+ { 0x0, "DVB-S" },
+ { 0x1, "DVB-S2" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_satellite_delivery_modulation_type_vals[] = {
- { 0x0, "Auto" },
- { 0x1, "QPSK" },
- { 0x2, "8PSK" },
- { 0x3, "16-QAM (n/a for DVB-S2)" },
+ { 0x0, "Auto" },
+ { 0x1, "QPSK" },
+ { 0x2, "8PSK" },
+ { 0x3, "16-QAM (n/a for DVB-S2)" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_satellite_delivery_fec_inner_vals[] = {
- { 0x0, "Not defined" },
- { 0x1, "1/2 convolutional code rate" },
- { 0x2, "2/3 convolutional code rate" },
- { 0x3, "3/4 convolutional code rate" },
- { 0x4, "5/6 convolutional code rate" },
- { 0x5, "7/8 convolutional code rate" },
- { 0x6, "8/9 convolutional code rate" },
- { 0x7, "3/5 convolutional code rate" },
- { 0x8, "4/5 convolutional code rate" },
- { 0x9, "9/10 convolutional code rate" },
- { 0xF, "No convolutional coding" },
-
- { 0x0, NULL }
+ { 0x0, "Not defined" },
+ { 0x1, "1/2 convolutional code rate" },
+ { 0x2, "2/3 convolutional code rate" },
+ { 0x3, "3/4 convolutional code rate" },
+ { 0x4, "5/6 convolutional code rate" },
+ { 0x5, "7/8 convolutional code rate" },
+ { 0x6, "8/9 convolutional code rate" },
+ { 0x7, "3/5 convolutional code rate" },
+ { 0x8, "4/5 convolutional code rate" },
+ { 0x9, "9/10 convolutional code rate" },
+ { 0xF, "No convolutional coding" },
+
+ { 0x0, NULL }
};
static value_string_ext mpeg_descr_satellite_delivery_fec_inner_vals_ext =
- VALUE_STRING_EXT_INIT(mpeg_descr_satellite_delivery_fec_inner_vals);
+ VALUE_STRING_EXT_INIT(mpeg_descr_satellite_delivery_fec_inner_vals);
static void
proto_mpeg_descriptor_dissect_satellite_delivery(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- guint32 frequency, symbol_rate;
- guint16 orbital_position;
- guint8 modulation_system;
-
- frequency = tvb_get_ntohl(tvb, offset);
- proto_tree_add_string_format_value(tree, hf_mpeg_descr_satellite_delivery_frequency, tvb, offset, 4,
- "Frequency", "%2u%01u,%01u%02u%02u GHz",
- MPEG_SECT_BCD44_TO_DEC(frequency >> 24),
- MPEG_SECT_BCD44_TO_DEC(frequency >> 16) / 10,
- MPEG_SECT_BCD44_TO_DEC(frequency >> 16) % 10,
- MPEG_SECT_BCD44_TO_DEC(frequency >> 8),
- MPEG_SECT_BCD44_TO_DEC(frequency));
- offset += 4;
-
- orbital_position = tvb_get_ntohs(tvb, offset);
- proto_tree_add_string_format_value(tree, hf_mpeg_descr_satellite_delivery_orbital_position, tvb, offset, 2,
- "Orbital Position", "%2u%1u,%1u degrees",
- MPEG_SECT_BCD44_TO_DEC(orbital_position >> 8),
- MPEG_SECT_BCD44_TO_DEC(orbital_position) / 10,
- MPEG_SECT_BCD44_TO_DEC(orbital_position) % 10);
- offset += 2;
-
- modulation_system = tvb_get_guint8(tvb, offset) & MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_SYSTEM_MASK;
-
- proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_west_east_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_polarization, tvb, offset, 1, ENC_BIG_ENDIAN);
- if (modulation_system)
- proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_roll_off, tvb, offset, 1, ENC_BIG_ENDIAN);
- else
- proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_zero, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_modulation_system, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_modulation_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- symbol_rate = tvb_get_ntohl(tvb, offset) >> 4;
- proto_tree_add_string_format_value(tree, hf_mpeg_descr_satellite_delivery_symbol_rate, tvb, offset, 4,
- "Symbol Rate", "%2u%02u%02u%01u,%01u KSymbol/s",
- MPEG_SECT_BCD44_TO_DEC(symbol_rate >> 24),
- MPEG_SECT_BCD44_TO_DEC(symbol_rate >> 16),
- MPEG_SECT_BCD44_TO_DEC(symbol_rate >> 8),
- MPEG_SECT_BCD44_TO_DEC(symbol_rate) / 10,
- MPEG_SECT_BCD44_TO_DEC(symbol_rate) % 10);
-
- offset += 3;
- proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_fec_inner, tvb, offset, 1, ENC_BIG_ENDIAN);
+ guint32 frequency, symbol_rate;
+ guint16 orbital_position;
+ guint8 modulation_system;
+
+ frequency = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_string_format_value(tree, hf_mpeg_descr_satellite_delivery_frequency, tvb, offset, 4,
+ "Frequency", "%2u%01u,%01u%02u%02u GHz",
+ MPEG_SECT_BCD44_TO_DEC(frequency >> 24),
+ MPEG_SECT_BCD44_TO_DEC(frequency >> 16) / 10,
+ MPEG_SECT_BCD44_TO_DEC(frequency >> 16) % 10,
+ MPEG_SECT_BCD44_TO_DEC(frequency >> 8),
+ MPEG_SECT_BCD44_TO_DEC(frequency));
+ offset += 4;
+
+ orbital_position = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_string_format_value(tree, hf_mpeg_descr_satellite_delivery_orbital_position, tvb, offset, 2,
+ "Orbital Position", "%2u%1u,%1u degrees",
+ MPEG_SECT_BCD44_TO_DEC(orbital_position >> 8),
+ MPEG_SECT_BCD44_TO_DEC(orbital_position) / 10,
+ MPEG_SECT_BCD44_TO_DEC(orbital_position) % 10);
+ offset += 2;
+
+ modulation_system = tvb_get_guint8(tvb, offset) & MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_SYSTEM_MASK;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_west_east_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_polarization, tvb, offset, 1, ENC_BIG_ENDIAN);
+ if (modulation_system)
+ proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_roll_off, tvb, offset, 1, ENC_BIG_ENDIAN);
+ else
+ proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_zero, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_modulation_system, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_modulation_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ symbol_rate = tvb_get_ntohl(tvb, offset) >> 4;
+ proto_tree_add_string_format_value(tree, hf_mpeg_descr_satellite_delivery_symbol_rate, tvb, offset, 4,
+ "Symbol Rate", "%2u%02u%02u%01u,%01u KSymbol/s",
+ MPEG_SECT_BCD44_TO_DEC(symbol_rate >> 24),
+ MPEG_SECT_BCD44_TO_DEC(symbol_rate >> 16),
+ MPEG_SECT_BCD44_TO_DEC(symbol_rate >> 8),
+ MPEG_SECT_BCD44_TO_DEC(symbol_rate) / 10,
+ MPEG_SECT_BCD44_TO_DEC(symbol_rate) % 10);
+
+ offset += 3;
+ proto_tree_add_item(tree, hf_mpeg_descr_satellite_delivery_fec_inner, tvb, offset, 1, ENC_BIG_ENDIAN);
}
@@ -774,78 +775,78 @@ static int hf_mpeg_descr_cable_delivery_modulation = -1;
static int hf_mpeg_descr_cable_delivery_symbol_rate = -1;
static int hf_mpeg_descr_cable_delivery_fec_inner = -1;
-#define MPEG_DESCR_CABLE_DELIVERY_RESERVED_MASK 0xFFF0
-#define MPEG_DESCR_CABLE_DELIVERY_FEC_OUTER_MASK 0x000F
-#define MPEG_DESCR_CABLE_DELIVERY_FEC_INNER_MASK 0x0F
+#define MPEG_DESCR_CABLE_DELIVERY_RESERVED_MASK 0xFFF0
+#define MPEG_DESCR_CABLE_DELIVERY_FEC_OUTER_MASK 0x000F
+#define MPEG_DESCR_CABLE_DELIVERY_FEC_INNER_MASK 0x0F
static const value_string mpeg_descr_cable_delivery_fec_outer_vals[] = {
- { 0x0, "Not defined" },
- { 0x1, "No outer FEC coding" },
- { 0x2, "RS(204/188)" },
+ { 0x0, "Not defined" },
+ { 0x1, "No outer FEC coding" },
+ { 0x2, "RS(204/188)" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_cable_delivery_modulation_vals[] = {
- { 0x00, "Not defined" },
- { 0x01, "16-QAM" },
- { 0x02, "32-QAM" },
- { 0x03, "64-QAM" },
- { 0x04, "128-QAM" },
- { 0x05, "256-QAM" },
-
- { 0x0, NULL }
+ { 0x00, "Not defined" },
+ { 0x01, "16-QAM" },
+ { 0x02, "32-QAM" },
+ { 0x03, "64-QAM" },
+ { 0x04, "128-QAM" },
+ { 0x05, "256-QAM" },
+
+ { 0x0, NULL }
};
static const value_string mpeg_descr_cable_delivery_fec_inner_vals[] = {
- { 0x0, "Not defined" },
- { 0x1, "1/2 convolutional code rate" },
- { 0x2, "2/3 convolutional code rate" },
- { 0x3, "3/4 convolutional code rate" },
- { 0x4, "5/6 convolutional code rate" },
- { 0x5, "7/8 convolutional code rate" },
- { 0x6, "8/9 convolutional code rate" },
- { 0x7, "3/5 convolutional code rate" },
- { 0x8, "4/5 convolutional code rate" },
- { 0x9, "9/10 convolutional code rate" },
- { 0xF, "No convolutional coding" },
-
- { 0x0, NULL }
+ { 0x0, "Not defined" },
+ { 0x1, "1/2 convolutional code rate" },
+ { 0x2, "2/3 convolutional code rate" },
+ { 0x3, "3/4 convolutional code rate" },
+ { 0x4, "5/6 convolutional code rate" },
+ { 0x5, "7/8 convolutional code rate" },
+ { 0x6, "8/9 convolutional code rate" },
+ { 0x7, "3/5 convolutional code rate" },
+ { 0x8, "4/5 convolutional code rate" },
+ { 0x9, "9/10 convolutional code rate" },
+ { 0xF, "No convolutional coding" },
+
+ { 0x0, NULL }
};
static value_string_ext mpeg_descr_cable_delivery_fec_inner_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_cable_delivery_fec_inner_vals);
static void
proto_mpeg_descriptor_dissect_cable_delivery(tvbuff_t *tvb, guint offset, proto_tree *tree) {
- guint32 frequency, symbol_rate;
+ guint32 frequency, symbol_rate;
- frequency = tvb_get_ntohl(tvb, offset);
- proto_tree_add_string_format_value(tree, hf_mpeg_descr_cable_delivery_frequency, tvb, offset, 4,
- "Frequency", "%2u%02u,%02u%02u MHz",
- MPEG_SECT_BCD44_TO_DEC(frequency >> 24),
- MPEG_SECT_BCD44_TO_DEC(frequency >> 16),
- MPEG_SECT_BCD44_TO_DEC(frequency >> 8),
- MPEG_SECT_BCD44_TO_DEC(frequency));
- offset += 4;
+ frequency = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_string_format_value(tree, hf_mpeg_descr_cable_delivery_frequency, tvb, offset, 4,
+ "Frequency", "%2u%02u,%02u%02u MHz",
+ MPEG_SECT_BCD44_TO_DEC(frequency >> 24),
+ MPEG_SECT_BCD44_TO_DEC(frequency >> 16),
+ MPEG_SECT_BCD44_TO_DEC(frequency >> 8),
+ MPEG_SECT_BCD44_TO_DEC(frequency));
+ offset += 4;
- proto_tree_add_item(tree, hf_mpeg_descr_cable_delivery_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_cable_delivery_fec_outer, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_cable_delivery_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_cable_delivery_fec_outer, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(tree, hf_mpeg_descr_cable_delivery_modulation, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_cable_delivery_modulation, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- symbol_rate = tvb_get_ntohl(tvb, offset) >> 4;
- proto_tree_add_string_format_value(tree, hf_mpeg_descr_cable_delivery_symbol_rate, tvb, offset, 4,
- "Symbol Rate", "%2u%02u%02u%01u,%01u KSymbol/s",
- MPEG_SECT_BCD44_TO_DEC(symbol_rate >> 24),
- MPEG_SECT_BCD44_TO_DEC(symbol_rate >> 16),
- MPEG_SECT_BCD44_TO_DEC(symbol_rate >> 8),
- MPEG_SECT_BCD44_TO_DEC(symbol_rate) / 10,
- MPEG_SECT_BCD44_TO_DEC(symbol_rate) % 10);
+ symbol_rate = tvb_get_ntohl(tvb, offset) >> 4;
+ proto_tree_add_string_format_value(tree, hf_mpeg_descr_cable_delivery_symbol_rate, tvb, offset, 4,
+ "Symbol Rate", "%2u%02u%02u%01u,%01u KSymbol/s",
+ MPEG_SECT_BCD44_TO_DEC(symbol_rate >> 24),
+ MPEG_SECT_BCD44_TO_DEC(symbol_rate >> 16),
+ MPEG_SECT_BCD44_TO_DEC(symbol_rate >> 8),
+ MPEG_SECT_BCD44_TO_DEC(symbol_rate) / 10,
+ MPEG_SECT_BCD44_TO_DEC(symbol_rate) % 10);
- offset += 3;
- proto_tree_add_item(tree, hf_mpeg_descr_cable_delivery_fec_inner, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 3;
+ proto_tree_add_item(tree, hf_mpeg_descr_cable_delivery_fec_inner, tvb, offset, 1, ENC_BIG_ENDIAN);
}
@@ -858,86 +859,86 @@ static int hf_mpeg_descr_vbi_data_field_parity = -1;
static int hf_mpeg_descr_vbi_data_line_offset = -1;
static int hf_mpeg_descr_vbi_data_reserved2 = -1;
-#define MPEG_DESCR_VBI_DATA_RESERVED1_MASK 0xC0
-#define MPEG_DESCR_VBI_DATA_FIELD_PARITY_MASK 0x20
-#define MPEG_DESCR_VBI_DATA_LINE_OFFSET_MASK 0x1F
+#define MPEG_DESCR_VBI_DATA_RESERVED1_MASK 0xC0
+#define MPEG_DESCR_VBI_DATA_FIELD_PARITY_MASK 0x20
+#define MPEG_DESCR_VBI_DATA_LINE_OFFSET_MASK 0x1F
static gint ett_mpeg_descriptor_vbi_data_service = -1;
static const value_string mpeg_descr_vbi_data_service_id_vals[] = {
- { 0x00, "Reserved" },
- { 0x01, "EBU Teletext" },
- { 0x02, "Inverted Teletext" },
- { 0x03, "Reserved" },
- { 0x04, "VPS" },
- { 0x05, "WSS" },
- { 0x06, "Closed Captioning" },
- { 0x07, "Monochrome 4:2:2 samples" },
+ { 0x00, "Reserved" },
+ { 0x01, "EBU Teletext" },
+ { 0x02, "Inverted Teletext" },
+ { 0x03, "Reserved" },
+ { 0x04, "VPS" },
+ { 0x05, "WSS" },
+ { 0x06, "Closed Captioning" },
+ { 0x07, "Monochrome 4:2:2 samples" },
- { 0, NULL }
+ { 0, NULL }
};
static const value_string mpeg_descr_vbi_data_field_parity_vals[] = {
- { 0x00, "Second (even) field of frame" },
- { 0x01, "First (odd) field of frame" },
+ { 0x00, "Second (even) field of frame" },
+ { 0x01, "First (odd) field of frame" },
- { 0, NULL }
+ { 0, NULL }
};
static void
-proto_mpeg_descriptor_dissect_vbi_data(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_vbi_data(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint8 svc_id, svc_len;
- guint end = offset + len, svc_end;
-
- proto_item *si;
- proto_tree *svc_tree;
-
- while (offset < end) {
- svc_id = tvb_get_guint8(tvb, offset);
- svc_len = tvb_get_guint8(tvb, offset + 1);
- si = proto_tree_add_text(tree, tvb, offset, svc_len + 2, "Service 0x%02x", svc_id);
- svc_tree = proto_item_add_subtree(si, ett_mpeg_descriptor_vbi_data_service);
-
- proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_service_id, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_descr_len, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- switch (svc_id) {
- case 0x01:
- case 0x02:
- case 0x04:
- case 0x05:
- case 0x06:
- case 0x07:
- svc_end = offset + svc_len;
- while (offset < svc_end) {
- proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_field_parity, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_line_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- }
- break;
- default:
- proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_reserved2, tvb, offset, svc_len, ENC_NA);
- offset += svc_len;
- break;
- }
-
- }
+ guint8 svc_id, svc_len;
+ guint end = offset + len, svc_end;
+
+ proto_item *si;
+ proto_tree *svc_tree;
+
+ while (offset < end) {
+ svc_id = tvb_get_guint8(tvb, offset);
+ svc_len = tvb_get_guint8(tvb, offset + 1);
+ si = proto_tree_add_text(tree, tvb, offset, svc_len + 2, "Service 0x%02x", svc_id);
+ svc_tree = proto_item_add_subtree(si, ett_mpeg_descriptor_vbi_data_service);
+
+ proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_service_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_descr_len, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ switch (svc_id) {
+ case 0x01:
+ case 0x02:
+ case 0x04:
+ case 0x05:
+ case 0x06:
+ case 0x07:
+ svc_end = offset + svc_len;
+ while (offset < svc_end) {
+ proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_field_parity, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_line_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ }
+ break;
+ default:
+ proto_tree_add_item(svc_tree, hf_mpeg_descr_vbi_data_reserved2, tvb, offset, svc_len, ENC_NA);
+ offset += svc_len;
+ break;
+ }
+
+ }
}
/* 0x47 Bouquet Name Descriptor */
static int hf_mpeg_descr_bouquet_name = -1;
static void
-proto_mpeg_descriptor_dissect_bouquet_name(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_bouquet_name(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_bouquet_name, tvb, offset, len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_mpeg_descr_bouquet_name, tvb, offset, len, ENC_ASCII|ENC_NA);
}
/* 0x48 Service Descriptor */
@@ -949,54 +950,54 @@ static int hf_mpeg_descr_service_name = -1;
static const value_string mpeg_descr_service_type_vals[] = {
- { 0x00, "reserved" },
- { 0x01, "digital television service" },
- { 0x02, "digital radio sound service" },
- { 0x03, "Teletext service" },
- { 0x04, "NVOD reference service" },
- { 0x05, "NVOD time-shifted service" },
- { 0x06, "mosaic service" },
- { 0x07, "FM radio service" },
- { 0x08, "DVB SRM service" },
- { 0x09, "reserved" },
- { 0x0A, "advanced codec digital radio sound service" },
- { 0x0B, "advanced codec mosaic service" },
- { 0x0C, "data broadcast service" },
- { 0x0D, "reserved for Common Interface Usage (EN 50221)" },
- { 0x0E, "RCS Map (see EN 301 790)" },
- { 0x0F, "RCS FLS (see EN 301 790)" },
- { 0x10, "DVB MHP service" },
- { 0x11, "MPEG-2 HD digital television service" },
- { 0x16, "advanced codec SD digital television service" },
- { 0x17, "advanced codec SD NVOD time-shifted service" },
- { 0x18, "advanced codec SD NVOD reference service" },
- { 0x19, "advanced codec HD digital television service" },
- { 0x1A, "advanced codec HD NVOD time-shifted service" },
-
- { 0x00, NULL }
+ { 0x00, "reserved" },
+ { 0x01, "digital television service" },
+ { 0x02, "digital radio sound service" },
+ { 0x03, "Teletext service" },
+ { 0x04, "NVOD reference service" },
+ { 0x05, "NVOD time-shifted service" },
+ { 0x06, "mosaic service" },
+ { 0x07, "FM radio service" },
+ { 0x08, "DVB SRM service" },
+ { 0x09, "reserved" },
+ { 0x0A, "advanced codec digital radio sound service" },
+ { 0x0B, "advanced codec mosaic service" },
+ { 0x0C, "data broadcast service" },
+ { 0x0D, "reserved for Common Interface Usage (EN 50221)" },
+ { 0x0E, "RCS Map (see EN 301 790)" },
+ { 0x0F, "RCS FLS (see EN 301 790)" },
+ { 0x10, "DVB MHP service" },
+ { 0x11, "MPEG-2 HD digital television service" },
+ { 0x16, "advanced codec SD digital television service" },
+ { 0x17, "advanced codec SD NVOD time-shifted service" },
+ { 0x18, "advanced codec SD NVOD reference service" },
+ { 0x19, "advanced codec HD digital television service" },
+ { 0x1A, "advanced codec HD NVOD time-shifted service" },
+
+ { 0x00, NULL }
};
static value_string_ext mpeg_descr_service_type_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_service_type_vals);
static void
proto_mpeg_descriptor_dissect_service(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- guint8 descr_len, name_len;
+ guint8 descr_len, name_len;
- proto_tree_add_item(tree, hf_mpeg_descr_service_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_service_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- descr_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_service_provider_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ descr_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_service_provider_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_service_provider, tvb, offset, descr_len, ENC_ASCII|ENC_NA);
- offset += descr_len;
+ proto_tree_add_item(tree, hf_mpeg_descr_service_provider, tvb, offset, descr_len, ENC_ASCII|ENC_NA);
+ offset += descr_len;
- name_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_service_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ name_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_service_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_service_name, tvb, offset, name_len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_mpeg_descr_service_name, tvb, offset, name_len, ENC_ASCII|ENC_NA);
}
@@ -1027,141 +1028,141 @@ static int hf_mpeg_descr_linkage_private_data_byte = -1;
static gint ett_mpeg_descriptor_linkage_population_id = -1;
-#define MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_MASK 0xF0
-#define MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_SHIFT 0x04
-#define MPEG_DESCR_LINKAGE_RESERVED1_MASK 0x0E
-#define MPEG_DESCR_LINKAGE_ORIGIN_TYPE_MASK 0x01
+#define MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_MASK 0xF0
+#define MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_SHIFT 0x04
+#define MPEG_DESCR_LINKAGE_RESERVED1_MASK 0x0E
+#define MPEG_DESCR_LINKAGE_ORIGIN_TYPE_MASK 0x01
-#define MPEG_DESCR_LINKAGE_TARGET_LISTED_MASK 0x80
-#define MPEG_DESCR_LINKAGE_EVENT_SIMULCAST_MASK 0x40
-#define MPEG_DESCR_LINKAGE_RESERVED2_MASK 0x3F
+#define MPEG_DESCR_LINKAGE_TARGET_LISTED_MASK 0x80
+#define MPEG_DESCR_LINKAGE_EVENT_SIMULCAST_MASK 0x40
+#define MPEG_DESCR_LINKAGE_RESERVED2_MASK 0x3F
static const value_string mpeg_descr_linkage_linkage_type_vals[] = {
- { 0x01, "Information service" },
- { 0x02, "EPG service" },
- { 0x03, "CA replacement service" },
- { 0x04, "TS containing complete Network/Bouquet SI" },
- { 0x05, "Service replacement service" },
- { 0x06, "Data broadcast service" },
- { 0x07, "RCS Map" },
- { 0x08, "Mobile hand-over" },
- { 0x09, "System Software Update Service" },
- { 0x0A, "TS containing SSU BAT or NIT" },
- { 0x0B, "IP/MAC Notification Service" },
- { 0x0C, "TS containing INT BAT or NIT" },
- { 0x0D, "Event linkage" },
- { 0x81, "RCS FLS" },
-
- { 0x00, NULL }
+ { 0x01, "Information service" },
+ { 0x02, "EPG service" },
+ { 0x03, "CA replacement service" },
+ { 0x04, "TS containing complete Network/Bouquet SI" },
+ { 0x05, "Service replacement service" },
+ { 0x06, "Data broadcast service" },
+ { 0x07, "RCS Map" },
+ { 0x08, "Mobile hand-over" },
+ { 0x09, "System Software Update Service" },
+ { 0x0A, "TS containing SSU BAT or NIT" },
+ { 0x0B, "IP/MAC Notification Service" },
+ { 0x0C, "TS containing INT BAT or NIT" },
+ { 0x0D, "Event linkage" },
+ { 0x81, "RCS FLS" },
+
+ { 0x00, NULL }
};
static value_string_ext mpeg_descr_linkage_linkage_type_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_linkage_linkage_type_vals);
static const value_string mpeg_descr_linkage_hand_over_type_vals[] = {
- { 0x01, "DVB hand-over to an identical service in a neighbouring country" },
- { 0x02, "DVB hand-over to a local variation of the same service" },
- { 0x03, "DVB hand-over to an associated service" },
+ { 0x01, "DVB hand-over to an identical service in a neighbouring country" },
+ { 0x02, "DVB hand-over to a local variation of the same service" },
+ { 0x03, "DVB hand-over to an associated service" },
- { 0x00, NULL }
+ { 0x00, NULL }
};
static const value_string mpeg_descr_linkage_origin_type_vals[] = {
- { 0x0, "NIT" },
- { 0x1, "SDT" },
+ { 0x0, "NIT" },
+ { 0x1, "SDT" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_linkage_target_listed_vals[] = {
- { 0x0, "Service may not be included in SDT" },
- { 0x1, "Service should be included in SDT" },
+ { 0x0, "Service may not be included in SDT" },
+ { 0x1, "Service should be included in SDT" },
- { 0x0, NULL}
+ { 0x0, NULL}
};
static const value_string mpeg_descr_linkage_event_simulcast_vals[] = {
- { 0x0, "Events are offset in time" },
- { 0x1, "Target and source events are being sumulcast" },
+ { 0x0, "Events are offset in time" },
+ { 0x1, "Target and source events are being sumulcast" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static void
-proto_mpeg_descriptor_dissect_linkage(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_linkage(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint8 linkage_type, hand_over_type, origin_type;
- guint end = offset + len;
- guint population_id_loop_count;
- guint16 population_id_base, population_id_mask;
+ guint8 linkage_type, hand_over_type, origin_type;
+ guint end = offset + len;
+ guint population_id_loop_count;
+ guint16 population_id_base, population_id_mask;
- proto_item *pi;
- proto_tree *population_tree;
+ proto_item *pi;
+ proto_tree *population_tree;
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_original_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_original_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_linkage_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- linkage_type = tvb_get_guint8(tvb, offset);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_linkage_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ linkage_type = tvb_get_guint8(tvb, offset);
+ offset += 1;
- if (linkage_type == 0x08) {
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_hand_over_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_origin_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- hand_over_type = (tvb_get_guint8(tvb, offset) & MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_MASK) >> MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_SHIFT;
- origin_type = tvb_get_guint8(tvb, offset) & MPEG_DESCR_LINKAGE_ORIGIN_TYPE_MASK;
- offset++;
+ if (linkage_type == 0x08) {
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_hand_over_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_origin_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ hand_over_type = (tvb_get_guint8(tvb, offset) & MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_MASK) >> MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_SHIFT;
+ origin_type = tvb_get_guint8(tvb, offset) & MPEG_DESCR_LINKAGE_ORIGIN_TYPE_MASK;
+ offset += 1;
- if (hand_over_type == 1 || hand_over_type == 2 || hand_over_type == 3) {
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- }
+ if ((hand_over_type == 1) || (hand_over_type == 2) || (hand_over_type == 3)) {
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ }
- if (origin_type) {
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_initial_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- }
+ if (origin_type) {
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_initial_service_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ }
- } else if (linkage_type == 0x0D) {
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_target_event_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ } else if (linkage_type == 0x0D) {
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_target_event_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_target_listed, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_event_simulcast, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN);
- } else if (linkage_type == 0x81) {
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_interactive_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_target_listed, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_event_simulcast, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN);
+ } else if (linkage_type == 0x81) {
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_interactive_network_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- population_id_loop_count = tvb_get_guint8(tvb, offset) + 1;
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_population_id_loop_count, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ population_id_loop_count = tvb_get_guint8(tvb, offset) + 1;
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_population_id_loop_count, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- while (population_id_loop_count--) {
+ while (population_id_loop_count--) {
- population_id_base = tvb_get_ntohs(tvb, offset);
- population_id_mask = tvb_get_ntohs(tvb, offset + 2);
- pi = proto_tree_add_string_format_value(tree, hf_mpeg_descr_linkage_population_id, tvb, offset, 4, "Population ID", "0x%04x/0x%04x",
- population_id_base, population_id_mask);
- population_tree = proto_item_add_subtree(pi, ett_mpeg_descriptor_linkage_population_id);
+ population_id_base = tvb_get_ntohs(tvb, offset);
+ population_id_mask = tvb_get_ntohs(tvb, offset + 2);
+ pi = proto_tree_add_string_format_value(tree, hf_mpeg_descr_linkage_population_id, tvb, offset, 4, "Population ID", "0x%04x/0x%04x",
+ population_id_base, population_id_mask);
+ population_tree = proto_item_add_subtree(pi, ett_mpeg_descriptor_linkage_population_id);
- proto_tree_add_item(population_tree, hf_mpeg_descr_linkage_population_id_base, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(population_tree, hf_mpeg_descr_linkage_population_id_base, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(population_tree, hf_mpeg_descr_linkage_population_id_mask, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- }
+ proto_tree_add_item(population_tree, hf_mpeg_descr_linkage_population_id_mask, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ }
- }
+ }
- if (end - offset > 0)
- proto_tree_add_item(tree, hf_mpeg_descr_linkage_private_data_byte, tvb, offset, end - offset, ENC_NA);
+ if (end - offset > 0)
+ proto_tree_add_item(tree, hf_mpeg_descr_linkage_private_data_byte, tvb, offset, end - offset, ENC_NA);
}
/* 0x4D Short Event Descriptor */
@@ -1174,23 +1175,23 @@ static int hf_mpeg_descr_short_event_text = -1;
static void
proto_mpeg_descriptor_dissect_short_event(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- guint8 name_len, text_len;
+ guint8 name_len, text_len;
- proto_tree_add_item(tree, hf_mpeg_descr_short_event_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
- offset += 3;
+ proto_tree_add_item(tree, hf_mpeg_descr_short_event_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
+ offset += 3;
- name_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_short_event_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ name_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_short_event_name_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_short_event_name, tvb, offset, name_len, ENC_ASCII|ENC_NA);
- offset += name_len;
+ proto_tree_add_item(tree, hf_mpeg_descr_short_event_name, tvb, offset, name_len, ENC_ASCII|ENC_NA);
+ offset += name_len;
- text_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_short_event_text_length, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ text_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_short_event_text_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_short_event_text, tvb, offset, text_len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_mpeg_descr_short_event_text, tvb, offset, text_len, ENC_ASCII|ENC_NA);
}
@@ -1206,8 +1207,8 @@ static int hf_mpeg_descr_extended_event_item_char = -1;
static int hf_mpeg_descr_extended_event_text_length = -1;
static int hf_mpeg_descr_extended_event_text_char = -1;
-#define MPEG_DESCR_EXTENDED_EVENT_DESCRIPTOR_NUMBER_MASK 0xF0
-#define MPEG_DESCR_EXTENDED_EVENT_LAST_DESCRIPTOR_NUMBER_MASK 0x0F
+#define MPEG_DESCR_EXTENDED_EVENT_DESCRIPTOR_NUMBER_MASK 0xF0
+#define MPEG_DESCR_EXTENDED_EVENT_LAST_DESCRIPTOR_NUMBER_MASK 0x0F
static gint ett_mpeg_descriptor_extended_event_item = -1;
@@ -1215,49 +1216,49 @@ static void
proto_mpeg_descriptor_dissect_extended_event(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- guint8 items_len, item_descr_len, item_len, text_len;
- guint items_end;
+ guint8 items_len, item_descr_len, item_len, text_len;
+ guint items_end;
- proto_item *ii;
- proto_tree *item_tree;
+ proto_item *ii;
+ proto_tree *item_tree;
- proto_tree_add_item(tree, hf_mpeg_descr_extended_event_descriptor_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_extended_event_last_descriptor_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_extended_event_descriptor_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_extended_event_last_descriptor_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_extended_event_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
- offset += 3;
+ proto_tree_add_item(tree, hf_mpeg_descr_extended_event_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
+ offset += 3;
- items_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_extended_event_length_of_items, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ items_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_extended_event_length_of_items, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- items_end = offset + items_len;
+ items_end = offset + items_len;
- while (offset < items_end) {
- ii = proto_tree_add_text(tree, tvb, offset, 0, "Item");
- item_tree = proto_item_add_subtree(ii, ett_mpeg_descriptor_extended_event_item);
+ while (offset < items_end) {
+ ii = proto_tree_add_text(tree, tvb, offset, 0, "Item");
+ item_tree = proto_item_add_subtree(ii, ett_mpeg_descriptor_extended_event_item);
- item_descr_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(item_tree, hf_mpeg_descr_extended_event_item_description_length, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ item_descr_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(item_tree, hf_mpeg_descr_extended_event_item_description_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(item_tree, hf_mpeg_descr_extended_event_item_description_char, tvb, offset, item_descr_len, ENC_ASCII|ENC_NA);
- offset += item_descr_len;
+ proto_tree_add_item(item_tree, hf_mpeg_descr_extended_event_item_description_char, tvb, offset, item_descr_len, ENC_ASCII|ENC_NA);
+ offset += item_descr_len;
- item_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(item_tree, hf_mpeg_descr_extended_event_item_length, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ item_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(item_tree, hf_mpeg_descr_extended_event_item_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(item_tree, hf_mpeg_descr_extended_event_item_char, tvb, offset, item_len, ENC_ASCII|ENC_NA);
- offset += item_len;
- }
+ proto_tree_add_item(item_tree, hf_mpeg_descr_extended_event_item_char, tvb, offset, item_len, ENC_ASCII|ENC_NA);
+ offset += item_len;
+ }
- text_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_extended_event_text_length, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ text_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_extended_event_text_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_extended_event_text_char, tvb, offset, text_len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_mpeg_descr_extended_event_text_char, tvb, offset, text_len, ENC_ASCII|ENC_NA);
}
@@ -1270,125 +1271,125 @@ static int hf_mpeg_descr_component_tag = -1;
static int hf_mpeg_descr_component_lang_code = -1;
static int hf_mpeg_descr_component_text = -1;
-#define MPEG_DESCR_COMPONENT_RESERVED_MASK 0xF0
-#define MPEG_DESCR_COMPONENT_STREAM_CONTENT_MASK 0x0F
-#define MPEG_DESCR_COMPONENT_CONTENT_TYPE_MASK 0x0FFF
+#define MPEG_DESCR_COMPONENT_RESERVED_MASK 0xF0
+#define MPEG_DESCR_COMPONENT_STREAM_CONTENT_MASK 0x0F
+#define MPEG_DESCR_COMPONENT_CONTENT_TYPE_MASK 0x0FFF
static gint ett_mpeg_descriptor_component_content_type = -1;
static const value_string mpeg_descr_component_stream_content_vals[] = {
- { 0x01, "Video (MPEG-2)" },
- { 0x02, "Audio (MPEG-1 Layer 2)" },
- { 0x03, "EBU Data (Teletext, Subtitle, ...)" },
- { 0x04, "Audio (AC-3)" },
- { 0x05, "Video (H.264/AVC)" },
- { 0x06, "Audio (HE-AAC)" },
- { 0x07, "Audio (DTS)" },
+ { 0x01, "Video (MPEG-2)" },
+ { 0x02, "Audio (MPEG-1 Layer 2)" },
+ { 0x03, "EBU Data (Teletext, Subtitle, ...)" },
+ { 0x04, "Audio (AC-3)" },
+ { 0x05, "Video (H.264/AVC)" },
+ { 0x06, "Audio (HE-AAC)" },
+ { 0x07, "Audio (DTS)" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_component_content_type_vals[] = {
- { 0x0101, "MPEG-2 video, 4:3 aspect ratio, 25 Hz" },
- { 0x0102, "MPEG-2 video, 16:9 aspect ratio with pan vectors, 25 Hz" },
- { 0x0103, "MPEG-2 video, 16:9 aspect ratio without pan vectors, 25 Hz" },
- { 0x0104, "MPEG-2 video, > 16:9 aspect ratio, 25 Hz" },
- { 0x0105, "MPEG-2 video, 4:3 aspect ratio, 30 Hz" },
- { 0x0106, "MPEG-2 video, 16:9 aspect ratio with pan vectors, 30 Hz" },
- { 0x0107, "MPEG-2 video, 16:9 aspect ratio without pan vectors, 30 Hz" },
- { 0x0108, "MPEG-2 video, > 16:9 aspect ratio, 30 Hz" },
- { 0x0109, "MPEG-2 high definition video, 4:3 aspect ratio, 25 Hz" },
- { 0x010A, "MPEG-2 high definition video, 16:9 aspect ratio with pan vectors, 25 Hz" },
- { 0x010B, "MPEG-2 high definition video, 16:9 aspect ratio without pan vectors, 25 Hz" },
- { 0x010C, "MPEG-2 high definition video, > 16:9 aspect ratio, 25 Hz" },
- { 0x010D, "MPEG-2 high definition video, 4:3 aspect ratio, 30 Hz" },
- { 0x010E, "MPEG-2 high definition video, 16:9 aspect ratio with pan vectors, 30 Hz" },
- { 0x010F, "MPEG-2 high definition video, 16:9 aspect ratio without pan vectors, 30 Hz" },
- { 0x0110, "MPEG-2 high definition video, > 16:9 aspect ratio, 30 Hz" },
- { 0x0201, "MPEG-1 Layer 2 audio, single mono channel" },
- { 0x0202, "MPEG-1 Layer 2 audio, dual mono channel" },
- { 0x0203, "MPEG-1 Layer 2 audio, stereo" },
- { 0x0204, "MPEG-1 Layer 2 audio, multi-lingual, multi-channel" },
- { 0x0205, "MPEG-1 Layer 2 audio, surround sound" },
- { 0x0240, "MPEG-1 Layer 2 audio description for the visually impaired" },
- { 0x0241, "MPEG-1 Layer 2 audio for the hard of hearing" },
- { 0x0242, "receiver-mixed supplementary audio as per annex E of TS 101 154 [9]" },
- { 0x0247, "MPEG-1 Layer 2 audio, receiver mix audio description as per annex E of TS 101 154 [9]" },
- { 0x0248, "MPEG-1 Layer 2 audio, broadcaster mix audio description" },
- { 0x0301, "EBU Teletext subtitles" },
- { 0x0302, "associated EBU Teletext" },
- { 0x0303, "VBI data" },
- { 0x0310, "DVB subtitles (normal) with no monitor aspect ratio criticality" },
- { 0x0311, "DVB subtitles (normal) for display on 4:3 aspect ratio monitor" },
- { 0x0312, "DVB subtitles (normal) for display on 16:9 aspect ratio monitor" },
- { 0x0313, "DVB subtitles (normal) for display on 2.21:1 aspect ratio monitor" },
- { 0x0314, "DVB subtitles (normal) for display on a high definition monitor" },
- { 0x0320, "DVB subtitles (for the hard of hearing) with no monitor aspect ratio criticality" },
- { 0x0321, "DVB subtitles (for the hard of hearing) for display on 4:3 aspect ratio monitor" },
- { 0x0322, "DVB subtitles (for the hard of hearing) for display on 16:9 aspect ratio monitor" },
- { 0x0323, "DVB subtitles (for the hard of hearing) for display on 2.21:1 aspect ratio monitor" },
- { 0x0324, "DVB subtitles (for the hard of hearing) for display on a high definition monitor" },
- { 0x0330, "Open (in-vision) sign language interpretation for the deaf" },
- { 0x0331, "Closed sign language interpretation for the deaf" },
- { 0x0340, "video up-sampled from standard definition source material" },
- { 0x0501, "H.264/AVC standard definition video, 4:3 aspect ratio, 25 Hz" },
- { 0x0503, "H.264/AVC standard definition video, 16:9 aspect ratio, 25 Hz" },
- { 0x0504, "H.264/AVC standard definition video, > 16:9 aspect ratio, 25 Hz" },
- { 0x0505, "H.264/AVC standard definition video, 4:3 aspect ratio, 30 Hz" },
- { 0x0507, "H.264/AVC standard definition video, 16:9 aspect ratio, 30 Hz" },
- { 0x0508, "H.264/AVC standard definition video, > 16:9 aspect ratio, 30 Hz" },
- { 0x050B, "H.264/AVC high definition video, 16:9 aspect ratio, 25 Hz" },
- { 0x050C, "H.264/AVC high definition video, > 16:9 aspect ratio, 25 Hz" },
- { 0x050F, "H.264/AVC high definition video, 16:9 aspect ratio, 30 Hz" },
- { 0x0510, "H.264/AVC high definition video, > 16:9 aspect ratio, 30 Hz" },
- { 0x0601, "HE-AAC audio, single mono channel" },
- { 0x0603, "HE-AAC audio, stereo" },
- { 0x0605, "HE-AAC audio, surround sound" },
- { 0x0640, "HE-AAC audio description for the visually impaired" },
- { 0x0641, "HE-AAC audio for the hard of hearing" },
- { 0x0642, "HE-AAC receiver-mixed supplementary audio as per annex E of TS 101 154 [9]" },
- { 0x0643, "HE-AAC v2 audio, stereo" },
- { 0x0644, "HE-AAC v2 audio description for the visually impaired" },
- { 0x0645, "HE-AAC v2 audio for the hard of hearing" },
- { 0x0646, "HE-AAC v2 receiver-mixed supplementary audio as per annex E of TS 101 154 [9]" },
- { 0x0647, "HE-AAC receiver mix audio description for the visually impaired" },
- { 0x0648, "HE-AAC broadcaster mix audio description for the visually impaired" },
- { 0x0649, "HE-AAC v2 receiver mix audio description for the visually impaired" },
- { 0x064A, "HE-AAC v2 broadcaster mix audio description for the visually impaired" },
- { 0x0801, "DVB SRM data" },
-
- { 0x0, NULL }
+ { 0x0101, "MPEG-2 video, 4:3 aspect ratio, 25 Hz" },
+ { 0x0102, "MPEG-2 video, 16:9 aspect ratio with pan vectors, 25 Hz" },
+ { 0x0103, "MPEG-2 video, 16:9 aspect ratio without pan vectors, 25 Hz" },
+ { 0x0104, "MPEG-2 video, > 16:9 aspect ratio, 25 Hz" },
+ { 0x0105, "MPEG-2 video, 4:3 aspect ratio, 30 Hz" },
+ { 0x0106, "MPEG-2 video, 16:9 aspect ratio with pan vectors, 30 Hz" },
+ { 0x0107, "MPEG-2 video, 16:9 aspect ratio without pan vectors, 30 Hz" },
+ { 0x0108, "MPEG-2 video, > 16:9 aspect ratio, 30 Hz" },
+ { 0x0109, "MPEG-2 high definition video, 4:3 aspect ratio, 25 Hz" },
+ { 0x010A, "MPEG-2 high definition video, 16:9 aspect ratio with pan vectors, 25 Hz" },
+ { 0x010B, "MPEG-2 high definition video, 16:9 aspect ratio without pan vectors, 25 Hz" },
+ { 0x010C, "MPEG-2 high definition video, > 16:9 aspect ratio, 25 Hz" },
+ { 0x010D, "MPEG-2 high definition video, 4:3 aspect ratio, 30 Hz" },
+ { 0x010E, "MPEG-2 high definition video, 16:9 aspect ratio with pan vectors, 30 Hz" },
+ { 0x010F, "MPEG-2 high definition video, 16:9 aspect ratio without pan vectors, 30 Hz" },
+ { 0x0110, "MPEG-2 high definition video, > 16:9 aspect ratio, 30 Hz" },
+ { 0x0201, "MPEG-1 Layer 2 audio, single mono channel" },
+ { 0x0202, "MPEG-1 Layer 2 audio, dual mono channel" },
+ { 0x0203, "MPEG-1 Layer 2 audio, stereo" },
+ { 0x0204, "MPEG-1 Layer 2 audio, multi-lingual, multi-channel" },
+ { 0x0205, "MPEG-1 Layer 2 audio, surround sound" },
+ { 0x0240, "MPEG-1 Layer 2 audio description for the visually impaired" },
+ { 0x0241, "MPEG-1 Layer 2 audio for the hard of hearing" },
+ { 0x0242, "receiver-mixed supplementary audio as per annex E of TS 101 154 [9]" },
+ { 0x0247, "MPEG-1 Layer 2 audio, receiver mix audio description as per annex E of TS 101 154 [9]" },
+ { 0x0248, "MPEG-1 Layer 2 audio, broadcaster mix audio description" },
+ { 0x0301, "EBU Teletext subtitles" },
+ { 0x0302, "associated EBU Teletext" },
+ { 0x0303, "VBI data" },
+ { 0x0310, "DVB subtitles (normal) with no monitor aspect ratio criticality" },
+ { 0x0311, "DVB subtitles (normal) for display on 4:3 aspect ratio monitor" },
+ { 0x0312, "DVB subtitles (normal) for display on 16:9 aspect ratio monitor" },
+ { 0x0313, "DVB subtitles (normal) for display on 2.21:1 aspect ratio monitor" },
+ { 0x0314, "DVB subtitles (normal) for display on a high definition monitor" },
+ { 0x0320, "DVB subtitles (for the hard of hearing) with no monitor aspect ratio criticality" },
+ { 0x0321, "DVB subtitles (for the hard of hearing) for display on 4:3 aspect ratio monitor" },
+ { 0x0322, "DVB subtitles (for the hard of hearing) for display on 16:9 aspect ratio monitor" },
+ { 0x0323, "DVB subtitles (for the hard of hearing) for display on 2.21:1 aspect ratio monitor" },
+ { 0x0324, "DVB subtitles (for the hard of hearing) for display on a high definition monitor" },
+ { 0x0330, "Open (in-vision) sign language interpretation for the deaf" },
+ { 0x0331, "Closed sign language interpretation for the deaf" },
+ { 0x0340, "video up-sampled from standard definition source material" },
+ { 0x0501, "H.264/AVC standard definition video, 4:3 aspect ratio, 25 Hz" },
+ { 0x0503, "H.264/AVC standard definition video, 16:9 aspect ratio, 25 Hz" },
+ { 0x0504, "H.264/AVC standard definition video, > 16:9 aspect ratio, 25 Hz" },
+ { 0x0505, "H.264/AVC standard definition video, 4:3 aspect ratio, 30 Hz" },
+ { 0x0507, "H.264/AVC standard definition video, 16:9 aspect ratio, 30 Hz" },
+ { 0x0508, "H.264/AVC standard definition video, > 16:9 aspect ratio, 30 Hz" },
+ { 0x050B, "H.264/AVC high definition video, 16:9 aspect ratio, 25 Hz" },
+ { 0x050C, "H.264/AVC high definition video, > 16:9 aspect ratio, 25 Hz" },
+ { 0x050F, "H.264/AVC high definition video, 16:9 aspect ratio, 30 Hz" },
+ { 0x0510, "H.264/AVC high definition video, > 16:9 aspect ratio, 30 Hz" },
+ { 0x0601, "HE-AAC audio, single mono channel" },
+ { 0x0603, "HE-AAC audio, stereo" },
+ { 0x0605, "HE-AAC audio, surround sound" },
+ { 0x0640, "HE-AAC audio description for the visually impaired" },
+ { 0x0641, "HE-AAC audio for the hard of hearing" },
+ { 0x0642, "HE-AAC receiver-mixed supplementary audio as per annex E of TS 101 154 [9]" },
+ { 0x0643, "HE-AAC v2 audio, stereo" },
+ { 0x0644, "HE-AAC v2 audio description for the visually impaired" },
+ { 0x0645, "HE-AAC v2 audio for the hard of hearing" },
+ { 0x0646, "HE-AAC v2 receiver-mixed supplementary audio as per annex E of TS 101 154 [9]" },
+ { 0x0647, "HE-AAC receiver mix audio description for the visually impaired" },
+ { 0x0648, "HE-AAC broadcaster mix audio description for the visually impaired" },
+ { 0x0649, "HE-AAC v2 receiver mix audio description for the visually impaired" },
+ { 0x064A, "HE-AAC v2 broadcaster mix audio description for the visually impaired" },
+ { 0x0801, "DVB SRM data" },
+
+ { 0x0, NULL }
};
static value_string_ext mpeg_descr_component_content_type_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_component_content_type_vals);
static void
-proto_mpeg_descriptor_dissect_component(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_component(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- proto_item *cti;
- proto_tree *content_type_tree;
+ proto_item *cti;
+ proto_tree *content_type_tree;
- proto_tree_add_item(tree, hf_mpeg_descr_component_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_component_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- cti = proto_tree_add_item(tree, hf_mpeg_descr_component_content_type, tvb, offset, 2, ENC_BIG_ENDIAN);
- content_type_tree = proto_item_add_subtree(cti, ett_mpeg_descriptor_component_content_type);
+ cti = proto_tree_add_item(tree, hf_mpeg_descr_component_content_type, tvb, offset, 2, ENC_BIG_ENDIAN);
+ content_type_tree = proto_item_add_subtree(cti, ett_mpeg_descriptor_component_content_type);
- proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_stream_content, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_stream_content, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(content_type_tree, hf_mpeg_descr_component_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_component_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_component_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_component_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
- offset += 3;
+ proto_tree_add_item(tree, hf_mpeg_descr_component_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
+ offset += 3;
- if (offset < len)
- proto_tree_add_item(tree, hf_mpeg_descr_component_text, tvb, offset, len - offset, ENC_ASCII|ENC_NA);
+ if (offset < len)
+ proto_tree_add_item(tree, hf_mpeg_descr_component_text, tvb, offset, len - offset, ENC_ASCII|ENC_NA);
}
/* 0x52 Stream Identifier Descriptor */
@@ -1397,21 +1398,21 @@ static int hf_mpeg_descr_stream_identifier_component_tag = -1;
static void
proto_mpeg_descriptor_dissect_stream_identifier(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_stream_identifier_component_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_stream_identifier_component_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
}
/* 0x53 CA Identifier Descriptor */
static int hf_mpeg_descr_ca_identifier_system_id = -1;
static void
-proto_mpeg_descriptor_dissect_ca_identifier(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_ca_identifier(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint end = offset + len;
+ guint end = offset + len;
- while (offset < end) {
- proto_tree_add_item(tree, hf_mpeg_descr_ca_identifier_system_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- }
+ while (offset < end) {
+ proto_tree_add_item(tree, hf_mpeg_descr_ca_identifier_system_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ }
}
@@ -1421,155 +1422,155 @@ static int hf_mpeg_descr_content_nibble_level_1 = -1;
static int hf_mpeg_descr_content_nibble_level_2 = -1;
static int hf_mpeg_descr_content_user_byte = -1;
-#define MPEG_DESCR_CONTENT_NIBBLE_LEVEL_1_MASK 0xF0
-#define MPEG_DESCR_CONTENT_NIBBLE_LEVEL_2_MASK 0x0F
+#define MPEG_DESCR_CONTENT_NIBBLE_LEVEL_1_MASK 0xF0
+#define MPEG_DESCR_CONTENT_NIBBLE_LEVEL_2_MASK 0x0F
static gint ett_mpeg_descriptor_content_nibble = -1;
static const value_string mpeg_descr_content_nibble_vals[] = {
- { 0x10, "movie/drama (general)" },
- { 0x11, "detective/thriller" },
- { 0x12, "adventure/western/war" },
- { 0x13, "science fiction/fantasy/horror" },
- { 0x14, "comedy" },
- { 0x15, "soap/melodrama/folkloric" },
- { 0x16, "romance" },
- { 0x17, "serious/classical/religious/historical movie/drama" },
- { 0x18, "adult movie/drama" },
- { 0x1F, "user defined (movie/drama)" },
-
- { 0x20, "news/current affairs (general)" },
- { 0x21, "news/weather report" },
- { 0x22, "news magazine" },
- { 0x23, "documentary" },
- { 0x24, "discussion/interview/debate" },
- { 0x2F, "user defined (news/current affairs)" },
-
- { 0x30, "show/game show (general)" },
- { 0x31, "game show/quiz/contest" },
- { 0x32, "variety show" },
- { 0x33, "talk show" },
- { 0x3F, "user defined (show/game show)" },
-
- { 0x40, "sports (general)" },
- { 0x41, "special events (Olympic Games, World Cup, etc.)" },
- { 0x42, "sports magazines" },
- { 0x43, "football/soccer" },
- { 0x44, "tennis/squash" },
- { 0x45, "team sports (excluding football)" },
- { 0x46, "athletics" },
- { 0x47, "motor sport" },
- { 0x48, "water sport" },
- { 0x49, "winter sports" },
- { 0x4A, "equestrian" },
- { 0x4B, "martial sports" },
- { 0x4F, "user defined (sports)" },
-
- { 0x50, "children's/youth programmes (general)" },
- { 0x51, "pre-school children's programmes" },
- { 0x52, "entertainment programmes for 6 to14" },
- { 0x53, "entertainment programmes for 10 to 16" },
- { 0x54, "informational/educational/school programmes" },
- { 0x55, "cartoons/puppets" },
- { 0x5F, "user defined (children's/youth programmes)" },
-
- { 0x60, "music/ballet/dance (general)" },
- { 0x61, "rock/pop" },
- { 0x62, "serious music/classical music" },
- { 0x63, "folk/traditional music" },
- { 0x64, "jazz" },
- { 0x65, "musical/opera" },
- { 0x66, "ballet" },
- { 0x6F, "user defined (music/ballet/dance)" },
-
- { 0x70, "arts/culture (without music, general)" },
- { 0x71, "performing arts" },
- { 0x72, "fine arts" },
- { 0x73, "religion" },
- { 0x74, "popular culture/traditional arts" },
- { 0x75, "literature" },
- { 0x76, "film/cinema" },
- { 0x77, "experimental film/video" },
- { 0x78, "broadcasting/press" },
- { 0x79, "new media" },
- { 0x7A, "arts/culture magazines" },
- { 0x7B, "fashion" },
- { 0x7F, "user defined (arts/culture)" },
-
- { 0x80, "social/political issues/economics (general)" },
- { 0x81, "magazines/reports/documentary" },
- { 0x82, "economics/social advisory" },
- { 0x83, "remarkable people" },
- { 0x8F, "user defined (social/political issues/economics)" },
-
- { 0x90, "education/science/factual topics (general)" },
- { 0x91, "nature/animals/environment" },
- { 0x92, "technology/natural sciences" },
- { 0x93, "medicine/physiology/psychology" },
- { 0x94, "foreign countries/expeditions" },
- { 0x95, "social/spiritual sciences" },
- { 0x96, "further education" },
- { 0x97, "languages" },
- { 0x9F, "user defined (education/science/factual topics)" },
-
- { 0xA0, "leisure hobbies (general)" },
- { 0xA1, "tourism/travel" },
- { 0xA2, "handicraft" },
- { 0xA3, "motoring" },
- { 0xA4, "fitness and health" },
- { 0xA5, "cooking" },
- { 0xA6, "advertisement/shopping" },
- { 0xA7, "gardening" },
- { 0xAF, "user defined (leisure hobbies)" },
-
- { 0xB0, "original language" },
- { 0xB1, "black and white" },
- { 0xB2, "unpublished" },
- { 0xB3, "live broadcast" },
- { 0xBF, "user defined (special charateristics)" },
-
- { 0x00, NULL }
+ { 0x10, "movie/drama (general)" },
+ { 0x11, "detective/thriller" },
+ { 0x12, "adventure/western/war" },
+ { 0x13, "science fiction/fantasy/horror" },
+ { 0x14, "comedy" },
+ { 0x15, "soap/melodrama/folkloric" },
+ { 0x16, "romance" },
+ { 0x17, "serious/classical/religious/historical movie/drama" },
+ { 0x18, "adult movie/drama" },
+ { 0x1F, "user defined (movie/drama)" },
+
+ { 0x20, "news/current affairs (general)" },
+ { 0x21, "news/weather report" },
+ { 0x22, "news magazine" },
+ { 0x23, "documentary" },
+ { 0x24, "discussion/interview/debate" },
+ { 0x2F, "user defined (news/current affairs)" },
+
+ { 0x30, "show/game show (general)" },
+ { 0x31, "game show/quiz/contest" },
+ { 0x32, "variety show" },
+ { 0x33, "talk show" },
+ { 0x3F, "user defined (show/game show)" },
+
+ { 0x40, "sports (general)" },
+ { 0x41, "special events (Olympic Games, World Cup, etc.)" },
+ { 0x42, "sports magazines" },
+ { 0x43, "football/soccer" },
+ { 0x44, "tennis/squash" },
+ { 0x45, "team sports (excluding football)" },
+ { 0x46, "athletics" },
+ { 0x47, "motor sport" },
+ { 0x48, "water sport" },
+ { 0x49, "winter sports" },
+ { 0x4A, "equestrian" },
+ { 0x4B, "martial sports" },
+ { 0x4F, "user defined (sports)" },
+
+ { 0x50, "children's/youth programmes (general)" },
+ { 0x51, "pre-school children's programmes" },
+ { 0x52, "entertainment programmes for 6 to14" },
+ { 0x53, "entertainment programmes for 10 to 16" },
+ { 0x54, "informational/educational/school programmes" },
+ { 0x55, "cartoons/puppets" },
+ { 0x5F, "user defined (children's/youth programmes)" },
+
+ { 0x60, "music/ballet/dance (general)" },
+ { 0x61, "rock/pop" },
+ { 0x62, "serious music/classical music" },
+ { 0x63, "folk/traditional music" },
+ { 0x64, "jazz" },
+ { 0x65, "musical/opera" },
+ { 0x66, "ballet" },
+ { 0x6F, "user defined (music/ballet/dance)" },
+
+ { 0x70, "arts/culture (without music, general)" },
+ { 0x71, "performing arts" },
+ { 0x72, "fine arts" },
+ { 0x73, "religion" },
+ { 0x74, "popular culture/traditional arts" },
+ { 0x75, "literature" },
+ { 0x76, "film/cinema" },
+ { 0x77, "experimental film/video" },
+ { 0x78, "broadcasting/press" },
+ { 0x79, "new media" },
+ { 0x7A, "arts/culture magazines" },
+ { 0x7B, "fashion" },
+ { 0x7F, "user defined (arts/culture)" },
+
+ { 0x80, "social/political issues/economics (general)" },
+ { 0x81, "magazines/reports/documentary" },
+ { 0x82, "economics/social advisory" },
+ { 0x83, "remarkable people" },
+ { 0x8F, "user defined (social/political issues/economics)" },
+
+ { 0x90, "education/science/factual topics (general)" },
+ { 0x91, "nature/animals/environment" },
+ { 0x92, "technology/natural sciences" },
+ { 0x93, "medicine/physiology/psychology" },
+ { 0x94, "foreign countries/expeditions" },
+ { 0x95, "social/spiritual sciences" },
+ { 0x96, "further education" },
+ { 0x97, "languages" },
+ { 0x9F, "user defined (education/science/factual topics)" },
+
+ { 0xA0, "leisure hobbies (general)" },
+ { 0xA1, "tourism/travel" },
+ { 0xA2, "handicraft" },
+ { 0xA3, "motoring" },
+ { 0xA4, "fitness and health" },
+ { 0xA5, "cooking" },
+ { 0xA6, "advertisement/shopping" },
+ { 0xA7, "gardening" },
+ { 0xAF, "user defined (leisure hobbies)" },
+
+ { 0xB0, "original language" },
+ { 0xB1, "black and white" },
+ { 0xB2, "unpublished" },
+ { 0xB3, "live broadcast" },
+ { 0xBF, "user defined (special charateristics)" },
+
+ { 0x00, NULL }
};
static value_string_ext mpeg_descr_content_nibble_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_content_nibble_vals);
static const value_string mpeg_descr_content_nibble_level_1_vals[] = {
- { 0x1, "Movie/Drama" },
- { 0x2, "News/Current affairs" },
- { 0x3, "Show/Game show" },
- { 0x4, "Sports" },
- { 0x5, "Children's/Youth programmes" },
- { 0x6, "Music/Ballet/Dance" },
- { 0x7, "Arts/Culture (without music)" },
- { 0x8, "Social/Political issues/Economics" },
- { 0x9, "Education/Science/Factual topics" },
- { 0xA, "Leisure hobbies" },
- { 0xB, "Special characteristics" },
-
- { 0x00, NULL }
+ { 0x1, "Movie/Drama" },
+ { 0x2, "News/Current affairs" },
+ { 0x3, "Show/Game show" },
+ { 0x4, "Sports" },
+ { 0x5, "Children's/Youth programmes" },
+ { 0x6, "Music/Ballet/Dance" },
+ { 0x7, "Arts/Culture (without music)" },
+ { 0x8, "Social/Political issues/Economics" },
+ { 0x9, "Education/Science/Factual topics" },
+ { 0xA, "Leisure hobbies" },
+ { 0xB, "Special characteristics" },
+
+ { 0x00, NULL }
};
static value_string_ext mpeg_descr_content_nibble_level_1_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_content_nibble_level_1_vals);
static void
-proto_mpeg_descriptor_dissect_content(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_content(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- proto_item *ni;
- proto_tree *nibble_tree;
+ proto_item *ni;
+ proto_tree *nibble_tree;
- guint end = offset + len;
+ guint end = offset + len;
- while (offset < end) {
- ni = proto_tree_add_item(tree, hf_mpeg_descr_content_nibble, tvb, offset, 1, ENC_BIG_ENDIAN);
- nibble_tree = proto_item_add_subtree(ni, ett_mpeg_descriptor_content_nibble);
+ while (offset < end) {
+ ni = proto_tree_add_item(tree, hf_mpeg_descr_content_nibble, tvb, offset, 1, ENC_BIG_ENDIAN);
+ nibble_tree = proto_item_add_subtree(ni, ett_mpeg_descriptor_content_nibble);
- proto_tree_add_item(nibble_tree, hf_mpeg_descr_content_nibble_level_1, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(nibble_tree, hf_mpeg_descr_content_nibble_level_2, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(nibble_tree, hf_mpeg_descr_content_nibble_level_1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(nibble_tree, hf_mpeg_descr_content_nibble_level_2, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_content_user_byte, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- }
+ proto_tree_add_item(tree, hf_mpeg_descr_content_user_byte, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ }
}
@@ -1578,24 +1579,24 @@ static int hf_mpeg_descr_parental_rating_country_code = -1;
static int hf_mpeg_descr_parental_rating_rating = -1;
static const value_string mpeg_descr_parental_rating_vals[] = {
- { 0x00, "Undefined" },
- { 0x01, "Minimum 4 year old" },
- { 0x02, "Minimum 5 year old" },
- { 0x03, "Minimum 6 year old" },
- { 0x04, "Minimum 7 year old" },
- { 0x05, "Minimum 8 year old" },
- { 0x06, "Minimum 9 year old" },
- { 0x07, "Minimum 10 year old" },
- { 0x08, "Minimum 11 year old" },
- { 0x09, "Minimum 12 year old" },
- { 0x0A, "Minimum 13 year old" },
- { 0x0B, "Minimum 14 year old" },
- { 0x0C, "Minimum 15 year old" },
- { 0x0D, "Minimum 16 year old" },
- { 0x0E, "Minimum 17 year old" },
- { 0x0F, "Minimum 18 year old" },
-
- { 0x00, NULL }
+ { 0x00, "Undefined" },
+ { 0x01, "Minimum 4 year old" },
+ { 0x02, "Minimum 5 year old" },
+ { 0x03, "Minimum 6 year old" },
+ { 0x04, "Minimum 7 year old" },
+ { 0x05, "Minimum 8 year old" },
+ { 0x06, "Minimum 9 year old" },
+ { 0x07, "Minimum 10 year old" },
+ { 0x08, "Minimum 11 year old" },
+ { 0x09, "Minimum 12 year old" },
+ { 0x0A, "Minimum 13 year old" },
+ { 0x0B, "Minimum 14 year old" },
+ { 0x0C, "Minimum 15 year old" },
+ { 0x0D, "Minimum 16 year old" },
+ { 0x0E, "Minimum 17 year old" },
+ { 0x0F, "Minimum 18 year old" },
+
+ { 0x00, NULL }
};
static value_string_ext mpeg_descr_parental_rating_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_parental_rating_vals);
@@ -1603,10 +1604,10 @@ static value_string_ext mpeg_descr_parental_rating_vals_ext = VALUE_STRING_EXT_I
static void
proto_mpeg_descriptor_dissect_parental_rating(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_parental_rating_country_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
- offset += 3;
+ proto_tree_add_item(tree, hf_mpeg_descr_parental_rating_country_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
+ offset += 3;
- proto_tree_add_item(tree, hf_mpeg_descr_parental_rating_rating, tvb, offset, 1, ENC_NA);
+ proto_tree_add_item(tree, hf_mpeg_descr_parental_rating_rating, tvb, offset, 1, ENC_NA);
}
/* 0x56 Teletext Descriptor */
@@ -1615,37 +1616,37 @@ static int hf_mpeg_descr_teletext_type = -1;
static int hf_mpeg_descr_teletext_magazine_number = -1;
static int hf_mpeg_descr_teletext_page_number = -1;
-#define MPEG_DESCR_TELETEXT_TYPE_MASK 0xF8
-#define MPEG_DESCR_TELETEXT_MAGAZINE_NUMBER_MASK 0x07
+#define MPEG_DESCR_TELETEXT_TYPE_MASK 0xF8
+#define MPEG_DESCR_TELETEXT_MAGAZINE_NUMBER_MASK 0x07
static const value_string mpeg_descr_teletext_type_vals[] = {
- { 0x00, "Reserved" },
- { 0x01, "Initial Teletext Page" },
- { 0x02, "Teletext Subtitle Page" },
- { 0x03, "Additional Information Page" },
- { 0x04, "Programme Schedule Page" },
- { 0x05, "Teletext Subtitle Page for hearing impaired people" },
+ { 0x00, "Reserved" },
+ { 0x01, "Initial Teletext Page" },
+ { 0x02, "Teletext Subtitle Page" },
+ { 0x03, "Additional Information Page" },
+ { 0x04, "Programme Schedule Page" },
+ { 0x05, "Teletext Subtitle Page for hearing impaired people" },
- { 0, NULL }
+ { 0, NULL }
};
static void
-proto_mpeg_descriptor_dissect_teletext(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_teletext(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint end = offset + len;
+ guint end = offset + len;
- while (offset < end) {
- proto_tree_add_item(tree, hf_mpeg_descr_teletext_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
- offset += 3;
+ while (offset < end) {
+ proto_tree_add_item(tree, hf_mpeg_descr_teletext_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
+ offset += 3;
- proto_tree_add_item(tree, hf_mpeg_descr_teletext_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_teletext_magazine_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_teletext_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_teletext_magazine_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_teletext_page_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- }
+ proto_tree_add_item(tree, hf_mpeg_descr_teletext_page_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ }
}
/* 0x58 Local Time Offset Descriptor */
@@ -1657,57 +1658,57 @@ static int hf_mpeg_descr_local_time_offset_offset = -1;
static int hf_mpeg_descr_local_time_offset_time_of_change = -1;
static int hf_mpeg_descr_local_time_offset_next_time_offset = -1;
-#define MPEG_DESCR_LOCAL_TIME_OFFSET_COUNTRY_REGION_ID_MASK 0xFC
-#define MPEG_DESCR_LOCAL_TIME_OFFSET_RESERVED_MASK 0x02
-#define MPEG_DESCR_LOCAL_TIME_OFFSET_POLARITY 0x01
+#define MPEG_DESCR_LOCAL_TIME_OFFSET_COUNTRY_REGION_ID_MASK 0xFC
+#define MPEG_DESCR_LOCAL_TIME_OFFSET_RESERVED_MASK 0x02
+#define MPEG_DESCR_LOCAL_TIME_OFFSET_POLARITY 0x01
static const value_string mpeg_descr_local_time_offset_polarity_vals[] = {
- { 0x0, "Positive (local time ahead of UTC)" },
- { 0x1, "Negative (local time behind UTC)" },
+ { 0x0, "Positive (local time ahead of UTC)" },
+ { 0x1, "Negative (local time behind UTC)" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static void
-proto_mpeg_descriptor_dissect_local_time_offset(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_local_time_offset(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint end = offset + len;
- guint16 time_offset;
- nstime_t time_of_change;
-
- while (offset < end) {
- proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_country_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
- offset += 3;
-
- proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_region_id, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_polarity, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- time_offset = tvb_get_ntohs(tvb, offset);
- proto_tree_add_string_format_value(tree, hf_mpeg_descr_local_time_offset_offset, tvb, offset, 2,
- "Local Time Offset", "%02u:%02u",
- MPEG_SECT_BCD44_TO_DEC(time_offset >> 8),
- MPEG_SECT_BCD44_TO_DEC(time_offset));
- offset += 2;
-
-
- if (packet_mpeg_sect_mjd_to_utc_time(tvb, offset, &time_of_change) < 0) {
- proto_tree_add_text(tree, tvb, offset, 5, "Time of Change : Unparseable time");
- } else {
- proto_tree_add_time_format(tree, hf_mpeg_descr_local_time_offset_time_of_change, tvb, offset, 5,
- &time_of_change, "Time of Change : %s UTC",
- abs_time_to_str(&time_of_change, ABSOLUTE_TIME_UTC, FALSE));
- }
- offset += 5;
-
- time_offset = tvb_get_ntohs(tvb, offset);
- proto_tree_add_string_format_value(tree, hf_mpeg_descr_local_time_offset_next_time_offset, tvb, offset, 2,
- "Next Time Offset", "%02u:%02u",
- MPEG_SECT_BCD44_TO_DEC(time_offset >> 8),
- MPEG_SECT_BCD44_TO_DEC(time_offset));
- offset += 2;
- }
+ guint end = offset + len;
+ guint16 time_offset;
+ nstime_t time_of_change;
+
+ while (offset < end) {
+ proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_country_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
+ offset += 3;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_region_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_local_time_offset_polarity, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ time_offset = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_string_format_value(tree, hf_mpeg_descr_local_time_offset_offset, tvb, offset, 2,
+ "Local Time Offset", "%02u:%02u",
+ MPEG_SECT_BCD44_TO_DEC(time_offset >> 8),
+ MPEG_SECT_BCD44_TO_DEC(time_offset));
+ offset += 2;
+
+
+ if (packet_mpeg_sect_mjd_to_utc_time(tvb, offset, &time_of_change) < 0) {
+ proto_tree_add_text(tree, tvb, offset, 5, "Time of Change : Unparseable time");
+ } else {
+ proto_tree_add_time_format(tree, hf_mpeg_descr_local_time_offset_time_of_change, tvb, offset, 5,
+ &time_of_change, "Time of Change : %s UTC",
+ abs_time_to_str(&time_of_change, ABSOLUTE_TIME_UTC, FALSE));
+ }
+ offset += 5;
+
+ time_offset = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_string_format_value(tree, hf_mpeg_descr_local_time_offset_next_time_offset, tvb, offset, 2,
+ "Next Time Offset", "%02u:%02u",
+ MPEG_SECT_BCD44_TO_DEC(time_offset >> 8),
+ MPEG_SECT_BCD44_TO_DEC(time_offset));
+ offset += 2;
+ }
}
/* 0x59 Subtitling Descriptor */
@@ -1718,46 +1719,46 @@ static int hf_mpeg_descr_subtitling_ancillary_page_id = -1;
static const value_string mpeg_descr_subtitling_type_vals[] = {
- { 0x01, "EBU Teletext subtitles" },
- { 0x02, "associated EBU Teletext" },
- { 0x03, "VBI data" },
- { 0x10, "DVB subtitles (normal) with no monitor aspect ratio criticality" },
- { 0x11, "DVB subtitles (normal) for display on 4:3 aspect ratio monitor" },
- { 0x12, "DVB subtitles (normal) for display on 16:9 aspect ratio monitor" },
- { 0x13, "DVB subtitles (normal) for display on 2.21:1 aspect ratio monitor" },
- { 0x14, "DVB subtitles (normal) for display on a high definition monitor" },
- { 0x20, "DVB subtitles (for the hard of hearing) with no monitor aspect ratio criticality" },
- { 0x21, "DVB subtitles (for the hard of hearing) for display on 4:3 aspect ratio monitor" },
- { 0x22, "DVB subtitles (for the hard of hearing) for display on 16:9 aspect ratio monitor" },
- { 0x23, "DVB subtitles (for the hard of hearing) for display on 2.21:1 aspect ratio monitor" },
- { 0x24, "DVB subtitles (for the hard of hearing) for display on a high definition monitor" },
- { 0x30, "Open (in-vision) sign language interpretation for the deaf" },
- { 0x31, "Closed sign language interpretation for the deaf" },
- { 0x40, "video up-sampled from standard definition source material" },
-
- { 0, NULL }
+ { 0x01, "EBU Teletext subtitles" },
+ { 0x02, "associated EBU Teletext" },
+ { 0x03, "VBI data" },
+ { 0x10, "DVB subtitles (normal) with no monitor aspect ratio criticality" },
+ { 0x11, "DVB subtitles (normal) for display on 4:3 aspect ratio monitor" },
+ { 0x12, "DVB subtitles (normal) for display on 16:9 aspect ratio monitor" },
+ { 0x13, "DVB subtitles (normal) for display on 2.21:1 aspect ratio monitor" },
+ { 0x14, "DVB subtitles (normal) for display on a high definition monitor" },
+ { 0x20, "DVB subtitles (for the hard of hearing) with no monitor aspect ratio criticality" },
+ { 0x21, "DVB subtitles (for the hard of hearing) for display on 4:3 aspect ratio monitor" },
+ { 0x22, "DVB subtitles (for the hard of hearing) for display on 16:9 aspect ratio monitor" },
+ { 0x23, "DVB subtitles (for the hard of hearing) for display on 2.21:1 aspect ratio monitor" },
+ { 0x24, "DVB subtitles (for the hard of hearing) for display on a high definition monitor" },
+ { 0x30, "Open (in-vision) sign language interpretation for the deaf" },
+ { 0x31, "Closed sign language interpretation for the deaf" },
+ { 0x40, "video up-sampled from standard definition source material" },
+
+ { 0, NULL }
};
static value_string_ext mpeg_descr_subtitling_type_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_subtitling_type_vals);
static void
-proto_mpeg_descriptor_dissect_subtitling(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_subtitling(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint end = offset + len;
+ guint end = offset + len;
- while (offset < end) {
- proto_tree_add_item(tree, hf_mpeg_descr_subtitling_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
- offset += 3;
+ while (offset < end) {
+ proto_tree_add_item(tree, hf_mpeg_descr_subtitling_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
+ offset += 3;
- proto_tree_add_item(tree, hf_mpeg_descr_subtitling_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_subtitling_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_subtitling_composition_page_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_subtitling_composition_page_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(tree, hf_mpeg_descr_subtitling_ancillary_page_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_subtitling_ancillary_page_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- }
+ }
}
/* 0x5A Terrestrial Delivery System Descriptor */
@@ -1776,133 +1777,133 @@ static int hf_mpeg_descr_terrestrial_delivery_transmission_mode = -1;
static int hf_mpeg_descr_terrestrial_delivery_other_frequency_flag = -1;
static int hf_mpeg_descr_terrestrial_delivery_reserved2 = -1;
-#define MPEG_DESCR_TERRESTRIAL_DELIVERY_BANDWIDTH_MASK 0xE0
-#define MPEG_DESCR_TERRESTRIAL_DELIVERY_PRIORITY_MASK 0x10
-#define MPEG_DESCR_TERRESTRIAL_DELIVERY_TIME_SLICING_INDICATOR_MASK 0x08
-#define MPEG_DESCR_TERRESTRIAL_DELIVERY_MPE_FEC_INDICATOR_MASK 0x04
-#define MPEG_DESCR_TERRESTRIAL_DELIVERY_RESERVED1_MASK 0x03
-#define MPEG_DESCR_TERRESTRIAL_DELIVERY_CONSTELLATION_MASK 0xC0
-#define MPEG_DESCR_TERRESTRIAL_DELIVERY_HIERARCHY_INFORMATION_MASK 0x38
-#define MPEG_DESCR_TERRESTRIAL_DELIVERY_CODE_RATE_HP_STREAM_MASK 0x07
-#define MPEG_DESCR_TERRESTRIAL_DELIVERY_CODE_RATE_LP_STREAM_MASK 0xE0
-#define MPEG_DESCR_TERRESTRIAL_DELIVERY_GUARD_INTERVAL_MASK 0x18
-#define MPEG_DESCR_TERRESTRIAL_DELIVERY_TRANSMISSION_MODE_MASK 0x06
-#define MPEG_DESCR_TERRESTRIAL_DELIVERY_OTHER_FREQUENCY_FLAG_MASK 0x01
+#define MPEG_DESCR_TERRESTRIAL_DELIVERY_BANDWIDTH_MASK 0xE0
+#define MPEG_DESCR_TERRESTRIAL_DELIVERY_PRIORITY_MASK 0x10
+#define MPEG_DESCR_TERRESTRIAL_DELIVERY_TIME_SLICING_INDICATOR_MASK 0x08
+#define MPEG_DESCR_TERRESTRIAL_DELIVERY_MPE_FEC_INDICATOR_MASK 0x04
+#define MPEG_DESCR_TERRESTRIAL_DELIVERY_RESERVED1_MASK 0x03
+#define MPEG_DESCR_TERRESTRIAL_DELIVERY_CONSTELLATION_MASK 0xC0
+#define MPEG_DESCR_TERRESTRIAL_DELIVERY_HIERARCHY_INFORMATION_MASK 0x38
+#define MPEG_DESCR_TERRESTRIAL_DELIVERY_CODE_RATE_HP_STREAM_MASK 0x07
+#define MPEG_DESCR_TERRESTRIAL_DELIVERY_CODE_RATE_LP_STREAM_MASK 0xE0
+#define MPEG_DESCR_TERRESTRIAL_DELIVERY_GUARD_INTERVAL_MASK 0x18
+#define MPEG_DESCR_TERRESTRIAL_DELIVERY_TRANSMISSION_MODE_MASK 0x06
+#define MPEG_DESCR_TERRESTRIAL_DELIVERY_OTHER_FREQUENCY_FLAG_MASK 0x01
static const value_string mpeg_descr_terrestrial_delivery_bandwidth_vals[] = {
- { 0x0, "8 MHz" },
- { 0x1, "7 MHz" },
- { 0x2, "6 MHz" },
- { 0x3, "5 Mhz" },
+ { 0x0, "8 MHz" },
+ { 0x1, "7 MHz" },
+ { 0x2, "6 MHz" },
+ { 0x3, "5 Mhz" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_terrestrial_delivery_priority_vals[] = {
- { 0x0, "Low Priority" },
- { 0x1, "High Priority (or N/A if not hierarchical stream)" },
+ { 0x0, "Low Priority" },
+ { 0x1, "High Priority (or N/A if not hierarchical stream)" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_terrestrial_delivery_time_slicing_indicator_vals[] = {
- { 0x0, "At least one elementary stream uses Time Slicing" },
- { 0x1, "Time Slicing not used" },
+ { 0x0, "At least one elementary stream uses Time Slicing" },
+ { 0x1, "Time Slicing not used" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_terrestrial_delivery_mpe_fec_indicator_vals[] = {
- { 0x0, "At least one elementary stream uses MPE-FEC" },
- { 0x1, "MPE-FEC not used" },
+ { 0x0, "At least one elementary stream uses MPE-FEC" },
+ { 0x1, "MPE-FEC not used" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_terrestrial_delivery_constellation_vals[] = {
- { 0x0, "QPSK" },
- { 0x1, "16-QAM" },
- { 0x2, "64-QAM" },
+ { 0x0, "QPSK" },
+ { 0x1, "16-QAM" },
+ { 0x2, "64-QAM" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_terrestrial_delivery_hierarchy_information_vals[] = {
- { 0x0, "Non-hierarchical, native interleaver" },
- { 0x1, "alpha = 1, native interleaver" },
- { 0x2, "alpha = 2, native interleaver" },
- { 0x3, "alpha = 4, native interleaver" },
- { 0x4, "Non-hierarchical, in-depth interleaver" },
- { 0x5, "alpha = 1, in-depth interleaver" },
- { 0x6, "alpha = 2, in-depth interleaver" },
- { 0x7, "alpha = 4, in-depth interleaver" },
-
- { 0x0, NULL }
+ { 0x0, "Non-hierarchical, native interleaver" },
+ { 0x1, "alpha = 1, native interleaver" },
+ { 0x2, "alpha = 2, native interleaver" },
+ { 0x3, "alpha = 4, native interleaver" },
+ { 0x4, "Non-hierarchical, in-depth interleaver" },
+ { 0x5, "alpha = 1, in-depth interleaver" },
+ { 0x6, "alpha = 2, in-depth interleaver" },
+ { 0x7, "alpha = 4, in-depth interleaver" },
+
+ { 0x0, NULL }
};
static const value_string mpeg_descr_terrestrial_delivery_code_rate_vals[] = {
- { 0x0, "1/2 convolutional code rate" },
- { 0x1, "2/3 convolutional code rate" },
- { 0x2, "3/4 convolutional code rate" },
- { 0x3, "5/6 convolutional code rate" },
- { 0x4, "7/8 convolutional code rate" },
+ { 0x0, "1/2 convolutional code rate" },
+ { 0x1, "2/3 convolutional code rate" },
+ { 0x2, "3/4 convolutional code rate" },
+ { 0x3, "5/6 convolutional code rate" },
+ { 0x4, "7/8 convolutional code rate" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_terrestrial_delivery_guard_interval_vals[] = {
- { 0x0, "1/32" },
- { 0x1, "1/16" },
- { 0x2, "1/8" },
- { 0x3, "1/4" },
+ { 0x0, "1/32" },
+ { 0x1, "1/16" },
+ { 0x2, "1/8" },
+ { 0x3, "1/4" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_terrestrial_delivery_other_frequency_flag_vals[] = {
- { 0x0, "No other frequency is in use" },
- { 0x1, "One or more frequencies are in use" },
+ { 0x0, "No other frequency is in use" },
+ { 0x1, "One or more frequencies are in use" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_terrestrial_delivery_transmission_mode_vals[] = {
- { 0x0, "2k mode" },
- { 0x1, "8k mode" },
- { 0x2, "4k mode" },
+ { 0x0, "2k mode" },
+ { 0x1, "8k mode" },
+ { 0x2, "4k mode" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static void
proto_mpeg_descriptor_dissect_terrestrial_delivery(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- guint32 centre_freq;
+ guint32 centre_freq;
- centre_freq = tvb_get_ntohl(tvb, offset);
- proto_tree_add_string_format_value(tree, hf_mpeg_descr_terrestrial_delivery_centre_frequency, tvb, offset, 4,
- "CentreFrequency", "%u0 Hz", centre_freq);
- offset += 4;
+ centre_freq = tvb_get_ntohl(tvb, offset);
+ proto_tree_add_string_format_value(tree, hf_mpeg_descr_terrestrial_delivery_centre_frequency, tvb, offset, 4,
+ "CentreFrequency", "%u0 Hz", centre_freq);
+ offset += 4;
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_bandwidth, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_priority, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_time_slicing_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_mpe_fec_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_bandwidth, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_priority, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_time_slicing_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_mpe_fec_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_constellation, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_hierarchy_information, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_code_rate_hp_stream, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_constellation, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_hierarchy_information, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_code_rate_hp_stream, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_code_rate_lp_stream, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_guard_interval, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_transmission_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_other_frequency_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_code_rate_lp_stream, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_guard_interval, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_transmission_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_other_frequency_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_reserved2, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_reserved2, tvb, offset, 4, ENC_BIG_ENDIAN);
}
@@ -1915,18 +1916,18 @@ static int hf_mpeg_descr_private_data_specifier_id = -1;
#define PRIVATE_DATA_SPECIFIER_CIPLUS_LLP 0x00000040
static const value_string mpeg_descr_data_specifier_id_vals[] = {
- { PRIVATE_DATA_SPECIFIER_RESERVED, "reserved" },
- { PRIVATE_DATA_SPECIFIER_NORDIG, "NorDig" },
- { PRIVATE_DATA_SPECIFIER_CIPLUS_LLP, "CI+ LLP" },
- /* See dvbservices.com for complete and current list */
+ { PRIVATE_DATA_SPECIFIER_RESERVED, "reserved" },
+ { PRIVATE_DATA_SPECIFIER_NORDIG, "NorDig" },
+ { PRIVATE_DATA_SPECIFIER_CIPLUS_LLP, "CI+ LLP" },
+ /* See dvbservices.com for complete and current list */
- { 0, NULL }
+ { 0, NULL }
};
static void
proto_mpeg_descriptor_dissect_private_data_specifier(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_private_data_specifier_id, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_private_data_specifier_id, tvb, offset, 4, ENC_BIG_ENDIAN);
}
/* 0x64 Data Broadcast Descriptor */
@@ -1940,22 +1941,22 @@ static int hf_mpeg_descr_data_bcast_text = -1;
static const value_string mpeg_descr_data_bcast_id_vals[] = {
- { 0x0001, "Data pipe" },
- { 0x0002, "Asynchronous data stream" },
- { 0x0003, "Synchronous data stream" },
- { 0x0004, "Synchronised data stream" },
- { 0x0005, "Multi protocol encapsulation" },
- { 0x0006, "Data Carousel" },
- { 0x0007, "Object Carousel" },
- { 0x0008, "DVB ATM streams" },
- { 0x0009, "Higher Protocols based on asynchronous data streams" },
- { 0x000A, "System Software Update service" },
- { 0x000B, "IP/MAC Notification service" },
- { 0x00F0, "MHP Object Carousel" },
- { 0x00F1, "MHP Multiprotocol Encapsulation" },
- /* See dvbservices.com for complete and current list */
-
- { 0, NULL }
+ { 0x0001, "Data pipe" },
+ { 0x0002, "Asynchronous data stream" },
+ { 0x0003, "Synchronous data stream" },
+ { 0x0004, "Synchronised data stream" },
+ { 0x0005, "Multi protocol encapsulation" },
+ { 0x0006, "Data Carousel" },
+ { 0x0007, "Object Carousel" },
+ { 0x0008, "DVB ATM streams" },
+ { 0x0009, "Higher Protocols based on asynchronous data streams" },
+ { 0x000A, "System Software Update service" },
+ { 0x000B, "IP/MAC Notification service" },
+ { 0x00F0, "MHP Object Carousel" },
+ { 0x00F1, "MHP Multiprotocol Encapsulation" },
+ /* See dvbservices.com for complete and current list */
+
+ { 0, NULL }
};
static value_string_ext mpeg_descr_data_bcast_id_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_data_bcast_id_vals);
@@ -1963,32 +1964,32 @@ static void
proto_mpeg_descriptor_dissect_data_bcast(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- guint8 selector_len, text_len;
+ guint8 selector_len, text_len;
- proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_bcast_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_bcast_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_component_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_component_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- selector_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_selector_len, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ selector_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_selector_len, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- if (selector_len > 0) {
- proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_selector_bytes, tvb, offset, selector_len, ENC_NA);
- offset += selector_len;
- }
+ if (selector_len > 0) {
+ proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_selector_bytes, tvb, offset, selector_len, ENC_NA);
+ offset += selector_len;
+ }
- proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
- offset += 3;
+ proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
+ offset += 3;
- text_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_text_len, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ text_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_text_len, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- if (text_len > 0)
- proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_text, tvb, offset, text_len, ENC_ASCII|ENC_NA);
+ if (text_len > 0)
+ proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_text, tvb, offset, text_len, ENC_ASCII|ENC_NA);
}
/* 0x66 Data Broadcast ID Descriptor */
@@ -1996,13 +1997,13 @@ static int hf_mpeg_descr_data_bcast_id_bcast_id = -1;
static int hf_mpeg_descr_data_bcast_id_id_selector_bytes = -1;
static void
-proto_mpeg_descriptor_dissect_data_bcast_id(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_data_bcast_id(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_id_bcast_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_id_bcast_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- if (len > 2)
- proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_id_id_selector_bytes, tvb, offset, len - 2, ENC_NA);
+ if (len > 2)
+ proto_tree_add_item(tree, hf_mpeg_descr_data_bcast_id_id_selector_bytes, tvb, offset, len - 2, ENC_NA);
}
/* 0x6A AC-3 Descriptor */
@@ -2022,120 +2023,120 @@ static int hf_mpeg_descr_ac3_additional_info = -1;
static gint ett_mpeg_descriptor_ac3_component_type = -1;
-#define MPEG_DESCR_AC3_COMPONENT_TYPE_FLAG_MASK 0x80
-#define MPEG_DESCR_AC3_BSID_FLAG_MASK 0x40
-#define MPEG_DESCR_AC3_MAINID_FLAG_MASK 0x20
-#define MPEG_DESCR_AC3_ASVC_FLAG_MASK 0x10
-#define MPEG_DESCR_AC3_RESERVED_MASK 0x0F
+#define MPEG_DESCR_AC3_COMPONENT_TYPE_FLAG_MASK 0x80
+#define MPEG_DESCR_AC3_BSID_FLAG_MASK 0x40
+#define MPEG_DESCR_AC3_MAINID_FLAG_MASK 0x20
+#define MPEG_DESCR_AC3_ASVC_FLAG_MASK 0x10
+#define MPEG_DESCR_AC3_RESERVED_MASK 0x0F
-#define MPEG_DESCR_AC3_COMPONENT_TYPE_RESERVED_FLAG_MASK 0x80
-#define MPEG_DESCR_AC3_COMPONENT_TYPE_FULL_SERVICE_FLAG_MASK 0x40
-#define MPEG_DESCR_AC3_COMPONENT_TYPE_SERVICE_TYPE_FLAGS_MASK 0x38
-#define MPEG_DESCR_AC3_COMPONENT_TYPE_NUMBER_OF_CHANNELS_FLAGS 0x07
+#define MPEG_DESCR_AC3_COMPONENT_TYPE_RESERVED_FLAG_MASK 0x80
+#define MPEG_DESCR_AC3_COMPONENT_TYPE_FULL_SERVICE_FLAG_MASK 0x40
+#define MPEG_DESCR_AC3_COMPONENT_TYPE_SERVICE_TYPE_FLAGS_MASK 0x38
+#define MPEG_DESCR_AC3_COMPONENT_TYPE_NUMBER_OF_CHANNELS_FLAGS 0x07
static const value_string mpeg_descr_ac3_component_type_flag_vals[] = {
- { 0x0, "Component type field not included" },
- { 0x1, "Component type field included" },
+ { 0x0, "Component type field not included" },
+ { 0x1, "Component type field included" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_ac3_bsid_flag_vals[] = {
- { 0x0, "BSID field not included" },
- { 0x1, "BSID field included" },
+ { 0x0, "BSID field not included" },
+ { 0x1, "BSID field included" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_ac3_mainid_flag_vals[] = {
- { 0x0, "Main ID field not included" },
- { 0x1, "Main ID field included" },
+ { 0x0, "Main ID field not included" },
+ { 0x1, "Main ID field included" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_ac3_asvc_flag_vals[] = {
- { 0x0, "ASVC field not included" },
- { 0x1, "ASVC field included" },
+ { 0x0, "ASVC field not included" },
+ { 0x1, "ASVC field included" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_descr_ac3_component_type_full_service_flag_vals[] = {
- { 0x0, "Decoded audio stream is intended to be combined with another decoded audio stream" },
- { 0x1, "Decoded audio stream is a full service" },
+ { 0x0, "Decoded audio stream is intended to be combined with another decoded audio stream" },
+ { 0x1, "Decoded audio stream is a full service" },
- { 0x0, NULL}
+ { 0x0, NULL}
};
static const value_string mpeg_descr_ac3_component_type_service_type_flags_vals[] = {
- { 0x0, "Complete Main (CM)" },
- { 0x1, "Music and effects (ME)" },
- { 0x2, "Visually impaired (VI)" },
- { 0x3, "Hearing impaired (HI)" },
- { 0x4, "Dialogue (D)" },
- { 0x5, "Commentary (C)" },
- { 0x6, "Emergency (E)" },
- { 0x7, "Voiceover (VO) if Full Service Flag is 0, else Karaoke" },
-
- { 0x0, NULL }
+ { 0x0, "Complete Main (CM)" },
+ { 0x1, "Music and effects (ME)" },
+ { 0x2, "Visually impaired (VI)" },
+ { 0x3, "Hearing impaired (HI)" },
+ { 0x4, "Dialogue (D)" },
+ { 0x5, "Commentary (C)" },
+ { 0x6, "Emergency (E)" },
+ { 0x7, "Voiceover (VO) if Full Service Flag is 0, else Karaoke" },
+
+ { 0x0, NULL }
};
static const value_string mpeg_descr_ac3_component_type_number_of_channels_flags_vals[] = {
- { 0x0, "Mono" },
- { 0x1, "1+1 Mode" },
- { 0x2, "2 Channel (stereo)" },
- { 0x3, "2 Channel Dolby surround encoded (stereo)" },
- { 0x4, "Multichannel audio (> 2 channels)" },
+ { 0x0, "Mono" },
+ { 0x1, "1+1 Mode" },
+ { 0x2, "2 Channel (stereo)" },
+ { 0x3, "2 Channel Dolby surround encoded (stereo)" },
+ { 0x4, "Multichannel audio (> 2 channels)" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static void
-proto_mpeg_descriptor_dissect_ac3(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_ac3(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint end = offset + len;
- guint8 flags, component_type;
-
- proto_item *ci;
- proto_tree *component_type_tree;
-
- flags = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_ac3_component_type_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_ac3_bsid_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_ac3_mainid_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_ac3_asvc_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_ac3_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- if (flags & MPEG_DESCR_AC3_COMPONENT_TYPE_FLAG_MASK) {
- component_type = tvb_get_guint8(tvb, offset);
- ci = proto_tree_add_text(tree, tvb, offset, 3, "Component Type 0x%02x", component_type);
- component_type_tree = proto_item_add_subtree(ci, ett_mpeg_descriptor_ac3_component_type);
- proto_tree_add_item(component_type_tree, hf_mpeg_descr_ac3_component_type_reserved_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(component_type_tree, hf_mpeg_descr_ac3_component_type_full_service_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(component_type_tree, hf_mpeg_descr_ac3_component_type_service_type_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(component_type_tree, hf_mpeg_descr_ac3_component_type_number_of_channels_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- }
-
- if (flags & MPEG_DESCR_AC3_BSID_FLAG_MASK) {
- proto_tree_add_item(tree, hf_mpeg_descr_ac3_bsid, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- }
-
- if (flags & MPEG_DESCR_AC3_MAINID_FLAG_MASK) {
- proto_tree_add_item(tree, hf_mpeg_descr_ac3_mainid, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- }
-
- if (flags & MPEG_DESCR_AC3_ASVC_FLAG_MASK) {
- proto_tree_add_item(tree, hf_mpeg_descr_ac3_asvc, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- }
-
- if (offset < end)
- proto_tree_add_item(tree, hf_mpeg_descr_ac3_additional_info, tvb, offset, end - offset, ENC_NA);
+ guint end = offset + len;
+ guint8 flags, component_type;
+
+ proto_item *ci;
+ proto_tree *component_type_tree;
+
+ flags = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_ac3_component_type_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_ac3_bsid_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_ac3_mainid_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_ac3_asvc_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_ac3_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ if (flags & MPEG_DESCR_AC3_COMPONENT_TYPE_FLAG_MASK) {
+ component_type = tvb_get_guint8(tvb, offset);
+ ci = proto_tree_add_text(tree, tvb, offset, 3, "Component Type 0x%02x", component_type);
+ component_type_tree = proto_item_add_subtree(ci, ett_mpeg_descriptor_ac3_component_type);
+ proto_tree_add_item(component_type_tree, hf_mpeg_descr_ac3_component_type_reserved_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(component_type_tree, hf_mpeg_descr_ac3_component_type_full_service_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(component_type_tree, hf_mpeg_descr_ac3_component_type_service_type_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(component_type_tree, hf_mpeg_descr_ac3_component_type_number_of_channels_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ }
+
+ if (flags & MPEG_DESCR_AC3_BSID_FLAG_MASK) {
+ proto_tree_add_item(tree, hf_mpeg_descr_ac3_bsid, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ }
+
+ if (flags & MPEG_DESCR_AC3_MAINID_FLAG_MASK) {
+ proto_tree_add_item(tree, hf_mpeg_descr_ac3_mainid, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ }
+
+ if (flags & MPEG_DESCR_AC3_ASVC_FLAG_MASK) {
+ proto_tree_add_item(tree, hf_mpeg_descr_ac3_asvc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ }
+
+ if (offset < end)
+ proto_tree_add_item(tree, hf_mpeg_descr_ac3_additional_info, tvb, offset, end - offset, ENC_NA);
}
/* 0x6F Application Signalling Descriptor */
@@ -2143,26 +2144,26 @@ static int hf_mpeg_descr_app_sig_app_type = -1;
static int hf_mpeg_descr_app_sig_ait_ver = -1;
static void
-proto_mpeg_descriptor_dissect_app_sig(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_app_sig(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint offset_start;
-
- offset_start = offset;
- while (offset-offset_start < len) {
- proto_tree_add_item(tree, hf_mpeg_descr_app_sig_app_type, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(tree, hf_mpeg_descr_app_sig_ait_ver, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset++;
- }
+ guint offset_start;
+
+ offset_start = offset;
+ while ((offset - offset_start) < len) {
+ proto_tree_add_item(tree, hf_mpeg_descr_app_sig_app_type, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tree, hf_mpeg_descr_app_sig_ait_ver, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 1;
+ }
}
/* 0x73 Default Authority Descriptor */
static int hf_mpeg_descr_default_authority_name = -1;
static void
-proto_mpeg_descriptor_dissect_default_authority(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_default_authority(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_mpeg_descr_default_authority_name, tvb, offset, len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(tree, hf_mpeg_descr_default_authority_name, tvb, offset, len, ENC_ASCII|ENC_NA);
}
/* 0x76 Content Identifier Descriptor */
@@ -2172,68 +2173,68 @@ static int hf_mpeg_descr_content_identifier_crid_length = -1;
static int hf_mpeg_descr_content_identifier_crid_bytes = -1;
static int hf_mpeg_descr_content_identifier_cird_ref = -1;
-#define MPEG_DESCR_CONTENT_IDENTIFIER_CRID_TYPE_MASK 0xFC
-#define MPEG_DESCR_CONTENT_IDENTIFIER_CRID_LOCATION_MASK 0x03
+#define MPEG_DESCR_CONTENT_IDENTIFIER_CRID_TYPE_MASK 0xFC
+#define MPEG_DESCR_CONTENT_IDENTIFIER_CRID_LOCATION_MASK 0x03
static gint ett_mpeg_descriptor_content_identifier_crid = -1;
static const value_string mpeg_descr_content_identifier_crid_type_vals[] = {
- { 0x00, "No type defined" },
- { 0x01, "CRID references the item of content that this event is an instance of" },
- { 0x02, "CRID references a series that this event belongs to" },
- { 0x03, "CRID references a recommendation" },
+ { 0x00, "No type defined" },
+ { 0x01, "CRID references the item of content that this event is an instance of" },
+ { 0x02, "CRID references a series that this event belongs to" },
+ { 0x03, "CRID references a recommendation" },
- { 0, NULL }
+ { 0, NULL }
};
static const value_string mpeg_descr_content_identifier_crid_location_vals[] = {
- { 0x00, "Carried explicitly within descriptor" },
- { 0x01, "Carried in Content Identifier Table (CIT)" },
+ { 0x00, "Carried explicitly within descriptor" },
+ { 0x01, "Carried in Content Identifier Table (CIT)" },
- { 0, NULL }
+ { 0, NULL }
};
static void
-proto_mpeg_descriptor_dissect_content_identifier(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_content_identifier(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint end = offset + len, crid_len;
- guint8 crid, crid_location, crid_type;
+ guint end = offset + len, crid_len;
+ guint8 crid, crid_location, crid_type;
- proto_item *ci;
- proto_tree *crid_tree;
+ proto_item *ci;
+ proto_tree *crid_tree;
- while (offset < end) {
- crid = tvb_get_guint8(tvb, offset);
- crid_type = (crid & MPEG_DESCR_CONTENT_IDENTIFIER_CRID_TYPE_MASK) >> 2;
- crid_location = crid & MPEG_DESCR_CONTENT_IDENTIFIER_CRID_LOCATION_MASK;
+ while (offset < end) {
+ crid = tvb_get_guint8(tvb, offset);
+ crid_type = (crid & MPEG_DESCR_CONTENT_IDENTIFIER_CRID_TYPE_MASK) >> 2;
+ crid_location = crid & MPEG_DESCR_CONTENT_IDENTIFIER_CRID_LOCATION_MASK;
- if (crid_location == 0) {
- crid_len = 2 + tvb_get_guint8(tvb, offset + 1);
- } else if (crid_location == 1) {
- crid_len = 3;
- } else {
- crid_len = 1;
- }
+ if (crid_location == 0) {
+ crid_len = 2 + tvb_get_guint8(tvb, offset + 1);
+ } else if (crid_location == 1) {
+ crid_len = 3;
+ } else {
+ crid_len = 1;
+ }
- ci = proto_tree_add_text(tree, tvb, offset, crid_len, "CRID type=0%02x", crid_type);
- crid_tree = proto_item_add_subtree(ci, ett_mpeg_descriptor_content_identifier_crid);
+ ci = proto_tree_add_text(tree, tvb, offset, crid_len, "CRID type=0%02x", crid_type);
+ crid_tree = proto_item_add_subtree(ci, ett_mpeg_descriptor_content_identifier_crid);
- proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_crid_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_crid_location, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_crid_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_crid_location, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- if (crid_location == 0x00) {
- crid_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_crid_length, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ if (crid_location == 0x00) {
+ crid_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_crid_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_crid_bytes, tvb, offset, crid_len, ENC_NA);
- offset += crid_len;
- } else if (crid_location == 0x01) {
- proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_cird_ref, tvb, offset, 2, ENC_BIG_ENDIAN);
- }
+ proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_crid_bytes, tvb, offset, crid_len, ENC_NA);
+ offset += crid_len;
+ } else if (crid_location == 0x01) {
+ proto_tree_add_item(crid_tree, hf_mpeg_descr_content_identifier_cird_ref, tvb, offset, 2, ENC_BIG_ENDIAN);
+ }
- }
+ }
}
@@ -2261,74 +2262,74 @@ static int hf_mpeg_descr_extension_supp_audio_lang_code = -1;
#define EXT_TAG_SVC_RELOC 0x0B
static const value_string mpeg_descr_extension_tag_extension_vals[] = {
- { EXT_TAG_IMG_ICON, "Image Icon Descriptor" },
- { EXT_TAG_CPCM_DLV, "CPCM Delivery Dignalling Descriptor" },
- { EXT_TAG_CP, "CP Descriptor" },
- { EXT_TAG_CP_ID, "CP Identifier Descriptor" },
- { EXT_TAG_T2, "T2 Delivery System Descriptor" },
- { EXT_TAG_SH, "SH Delivery System Descriptor" },
- { EXT_TAG_SUPP_AUDIO, "Supplementary Audio Descriptor" },
- { EXT_TAG_NW_CHANGE, "Network Change Notify Descriptor" },
- { EXT_TAG_MSG, "Message Descriptor" },
- { EXT_TAG_TRGT_REG, "Target Region Descriptor" },
- { EXT_TAG_TRGT_REG_NAME, "Target Region Name Descriptor" },
- { EXT_TAG_SVC_RELOC, "Service Relocated Descriptor" },
- { 0x0, NULL }
+ { EXT_TAG_IMG_ICON, "Image Icon Descriptor" },
+ { EXT_TAG_CPCM_DLV, "CPCM Delivery Dignalling Descriptor" },
+ { EXT_TAG_CP, "CP Descriptor" },
+ { EXT_TAG_CP_ID, "CP Identifier Descriptor" },
+ { EXT_TAG_T2, "T2 Delivery System Descriptor" },
+ { EXT_TAG_SH, "SH Delivery System Descriptor" },
+ { EXT_TAG_SUPP_AUDIO, "Supplementary Audio Descriptor" },
+ { EXT_TAG_NW_CHANGE, "Network Change Notify Descriptor" },
+ { EXT_TAG_MSG, "Message Descriptor" },
+ { EXT_TAG_TRGT_REG, "Target Region Descriptor" },
+ { EXT_TAG_TRGT_REG_NAME, "Target Region Name Descriptor" },
+ { EXT_TAG_SVC_RELOC, "Service Relocated Descriptor" },
+ { 0x0, NULL }
};
static value_string_ext mpeg_descr_extension_tag_extension_vals_ext = VALUE_STRING_EXT_INIT(mpeg_descr_extension_tag_extension_vals);
static const value_string supp_audio_mix_type_vals[] = {
- { 0x00, "Audio stream is a supplementary stream" },
- { 0x01, "Audio stream is a complete and independent stream" },
- { 0x0, NULL }
+ { 0x00, "Audio stream is a supplementary stream" },
+ { 0x01, "Audio stream is a complete and independent stream" },
+ { 0x0, NULL }
};
/* if we wanted to distinguish between reserved and user defined,
we'd have to convert this into a range string */
static const value_string supp_audio_ed_cla[] = {
- { 0x00, "Main audio" },
- { 0x01, "Audio description for the visually impaired" },
- { 0x02, "Clean audio for the hearing impaired" },
- { 0x03, "Spoken subtitles for the visually impaired" },
- { 0x0, NULL }
+ { 0x00, "Main audio" },
+ { 0x01, "Audio description for the visually impaired" },
+ { 0x02, "Clean audio for the hearing impaired" },
+ { 0x03, "Spoken subtitles for the visually impaired" },
+ { 0x0, NULL }
};
static void
-proto_mpeg_descriptor_dissect_extension(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_extension(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint offset_start;
- guint8 tag_ext;
- gboolean lang_code_present;
- guint already_dissected;
-
- offset_start = offset;
-
- tag_ext = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_mpeg_descr_extension_tag_extension, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- switch (tag_ext) {
- case EXT_TAG_SUPP_AUDIO:
- proto_tree_add_item(tree, hf_mpeg_descr_extension_supp_audio_mix_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_extension_supp_audio_ed_cla, tvb, offset, 1, ENC_BIG_ENDIAN);
- lang_code_present = ((tvb_get_guint8(tvb, offset) & 0x01) == 0x01);
- proto_tree_add_item(tree, hf_mpeg_descr_extension_supp_audio_lang_code_present, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- if (lang_code_present) {
- proto_tree_add_item(tree, hf_mpeg_descr_extension_supp_audio_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
- offset += 3;
- }
- already_dissected = offset-offset_start;
- if (already_dissected<len)
- proto_tree_add_text(tree, tvb, offset, len-already_dissected, "Private data");
- break;
- default:
- already_dissected = offset-offset_start;
- if (already_dissected<len)
- proto_tree_add_item(tree, hf_mpeg_descr_extension_data, tvb, offset, len-already_dissected, ENC_NA);
- break;
- }
+ guint offset_start;
+ guint8 tag_ext;
+ gboolean lang_code_present;
+ guint already_dissected;
+
+ offset_start = offset;
+
+ tag_ext = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_mpeg_descr_extension_tag_extension, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ switch (tag_ext) {
+ case EXT_TAG_SUPP_AUDIO:
+ proto_tree_add_item(tree, hf_mpeg_descr_extension_supp_audio_mix_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_extension_supp_audio_ed_cla, tvb, offset, 1, ENC_BIG_ENDIAN);
+ lang_code_present = ((tvb_get_guint8(tvb, offset) & 0x01) == 0x01);
+ proto_tree_add_item(tree, hf_mpeg_descr_extension_supp_audio_lang_code_present, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ if (lang_code_present) {
+ proto_tree_add_item(tree, hf_mpeg_descr_extension_supp_audio_lang_code, tvb, offset, 3, ENC_ASCII|ENC_NA);
+ offset += 3;
+ }
+ already_dissected = offset-offset_start;
+ if (already_dissected<len)
+ proto_tree_add_text(tree, tvb, offset, len-already_dissected, "Private data");
+ break;
+ default:
+ already_dissected = offset-offset_start;
+ if (already_dissected<len)
+ proto_tree_add_item(tree, hf_mpeg_descr_extension_data, tvb, offset, len-already_dissected, ENC_NA);
+ break;
+ }
}
@@ -2367,127 +2368,127 @@ static int hf_mpeg_descr_logon_initialize_rbdc_max = -1;
static int hf_mpeg_descr_logon_initialize_rbdc_timeout = -1;
-#define MPEG_DESCR_LOGON_INITIALIZE_CONTINUOUS_CARRIER_RESERVED_MASK 0xC0
-#define MPEG_DESCR_LOGON_INITIALIZE_CONTINUOUS_CARRIER_MASK 0x20
-#define MPEG_DESCR_LOGON_INITIALIZE_SECURITY_HANDSHAKE_REQUIRED_MASK 0x10
-#define MPEG_DESCR_LOGON_INITIALIZE_PREFIX_FLAG_MASK 0x08
-#define MPEG_DESCR_LOGON_INITIALIZE_DATA_UNIT_LABELLING_FLAG_MASK 0x04
-#define MPEG_DESCR_LOGON_INITIALIZE_MINI_SLOT_FLAG_MASK 0x02
-#define MPEG_DESCR_LOGON_INITIALIZE_CONTENTION_BASED_MINI_SLOT_FLAG_MASK 0x01
+#define MPEG_DESCR_LOGON_INITIALIZE_CONTINUOUS_CARRIER_RESERVED_MASK 0xC0
+#define MPEG_DESCR_LOGON_INITIALIZE_CONTINUOUS_CARRIER_MASK 0x20
+#define MPEG_DESCR_LOGON_INITIALIZE_SECURITY_HANDSHAKE_REQUIRED_MASK 0x10
+#define MPEG_DESCR_LOGON_INITIALIZE_PREFIX_FLAG_MASK 0x08
+#define MPEG_DESCR_LOGON_INITIALIZE_DATA_UNIT_LABELLING_FLAG_MASK 0x04
+#define MPEG_DESCR_LOGON_INITIALIZE_MINI_SLOT_FLAG_MASK 0x02
+#define MPEG_DESCR_LOGON_INITIALIZE_CONTENTION_BASED_MINI_SLOT_FLAG_MASK 0x01
-#define MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_RESERVED_MASK 0x80
-#define MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_MASK 0x40
-#define MPEG_DESCR_LOGON_INITIALIZE_TRAFFIC_BURST_TYPE_MASK 0x20
+#define MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_RESERVED_MASK 0x80
+#define MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_MASK 0x40
+#define MPEG_DESCR_LOGON_INITIALIZE_TRAFFIC_BURST_TYPE_MASK 0x20
-#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_TRF_PID_MASK 0x1FFF
-#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_CTRL_MNGM_PID_RESERVED_MASK 0xE000
-#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_CTRL_MNGM_PID_MASK 0x1FFF
+#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_TRF_PID_MASK 0x1FFF
+#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_CTRL_MNGM_PID_RESERVED_MASK 0xE000
+#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_CTRL_MNGM_PID_MASK 0x1FFF
-#define MPEG_DESCR_LOGON_INITIALIZE_CONNECTIVITY_MASK 0x1000
-#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_VPI_RESERVED_MASK 0x0F00
-#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_VPI_MASK 0x00FF
+#define MPEG_DESCR_LOGON_INITIALIZE_CONNECTIVITY_MASK 0x1000
+#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_VPI_RESERVED_MASK 0x0F00
+#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_VPI_MASK 0x00FF
-#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_RESERVED_MASK 0x0F00
-#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_MASK 0x00FF
-#define MPEG_DESCR_LOGON_INITIALIZE_FORWARD_SIGNALLING_VPI_RESERVED_MASK 0xFF00
-#define MPEG_DESCR_LOGON_INITIALIZE_FORWARD_SIGNALLING_VPI_MASK 0x00FF
+#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_RESERVED_MASK 0x0F00
+#define MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_MASK 0x00FF
+#define MPEG_DESCR_LOGON_INITIALIZE_FORWARD_SIGNALLING_VPI_RESERVED_MASK 0xFF00
+#define MPEG_DESCR_LOGON_INITIALIZE_FORWARD_SIGNALLING_VPI_MASK 0x00FF
-#define MPEG_DESCR_LOGON_INITIALIZE_VDBC_MAX_RESERVED_MASK 0xF800
-#define MPEG_DESCR_LOGON_INITIALIZE_VDBC_MAX_MASK 0x0700
+#define MPEG_DESCR_LOGON_INITIALIZE_VDBC_MAX_RESERVED_MASK 0xF800
+#define MPEG_DESCR_LOGON_INITIALIZE_VDBC_MAX_MASK 0x0700
static void
-proto_mpeg_descriptor_dissect_logon_initialize(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_logon_initialize(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint end = offset + len;
- guint8 flags;
- guint16 flags2;
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_group_id, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_logon_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_continuous_carrier_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_continuous_carrier, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_security_handshake_required, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_prefix_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_data_unit_labelling_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_mini_slot_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_contention_based_mini_slot_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- flags = tvb_get_guint8(tvb, offset);
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_capacity_type_flag_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_capacity_type_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_traffic_burst_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- if (flags & MPEG_DESCR_LOGON_INITIALIZE_TRAFFIC_BURST_TYPE_MASK) {
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_connectivity, tvb, offset, 2, ENC_BIG_ENDIAN);
- flags2 = tvb_get_ntohs(tvb, offset);
- if (flags2 & MPEG_DESCR_LOGON_INITIALIZE_CONNECTIVITY_MASK) {
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_signalling_vpi_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_signalling_vpi, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_signalling_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_forward_signalling_vpi_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_forward_signalling_vpi, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_forward_signalling_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- } else {
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_vpi_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_vpi, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- }
- } else {
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_trf_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- }
-
- if (offset < end && (flags & MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_MASK)) {
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_cra_level, tvb, offset, 3, ENC_BIG_ENDIAN);
- offset += 3;
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_vbdc_max_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_vbdc_max, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_rbdc_max, tvb, offset, 3, ENC_BIG_ENDIAN);
- offset += 3;
-
- proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_rbdc_timeout, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- }
+ guint end = offset + len;
+ guint8 flags;
+ guint16 flags2;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_group_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_logon_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_continuous_carrier_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_continuous_carrier, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_security_handshake_required, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_prefix_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_data_unit_labelling_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_mini_slot_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_contention_based_mini_slot_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ flags = tvb_get_guint8(tvb, offset);
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_capacity_type_flag_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_capacity_type_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_traffic_burst_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ if (flags & MPEG_DESCR_LOGON_INITIALIZE_TRAFFIC_BURST_TYPE_MASK) {
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_connectivity, tvb, offset, 2, ENC_BIG_ENDIAN);
+ flags2 = tvb_get_ntohs(tvb, offset);
+ if (flags2 & MPEG_DESCR_LOGON_INITIALIZE_CONNECTIVITY_MASK) {
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_signalling_vpi_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_signalling_vpi, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_signalling_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_forward_signalling_vpi_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_forward_signalling_vpi, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_forward_signalling_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ } else {
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_vpi_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_vpi, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_vci, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ }
+ } else {
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_trf_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ }
+
+ if ((offset < end) && (flags & MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_MASK)) {
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_cra_level, tvb, offset, 3, ENC_BIG_ENDIAN);
+ offset += 3;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_vbdc_max_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_vbdc_max, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_rbdc_max, tvb, offset, 3, ENC_BIG_ENDIAN);
+ offset += 3;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_logon_initialize_rbdc_timeout, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ }
}
/* 0xA7 RCS Content Descriptor */
static int hf_mpeg_descr_rcs_content_table_id = -1;
static void
-proto_mpeg_descriptor_dissect_rcs_content(tvbuff_t *tvb, guint offset, guint8 len, proto_tree *tree)
+proto_mpeg_descriptor_dissect_rcs_content(tvbuff_t *tvb, guint offset, guint len, proto_tree *tree)
{
- guint end = offset + len;
+ guint end = offset + len;
- while (offset < end) {
- proto_tree_add_item(tree, hf_mpeg_descr_rcs_content_table_id, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- }
+ while (offset < end) {
+ proto_tree_add_item(tree, hf_mpeg_descr_rcs_content_table_id, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ }
}
/* Private descriptors
@@ -2509,75 +2510,75 @@ static int hf_mpeg_descr_ciplus_svc_prov_name = -1;
static int hf_mpeg_descr_ciplus_svc_name = -1;
static const value_string mpeg_descriptor_ciplus_tag_vals[] = {
- /* From CI+ 1.3.1 */
- { 0xCB, "CI+ Content Label Descriptor" },
- { 0xCC, "CI+ Service Descriptor" },
- { 0x00, NULL}
+ /* From CI+ 1.3.1 */
+ { 0xCB, "CI+ Content Label Descriptor" },
+ { 0xCC, "CI+ Service Descriptor" },
+ { 0x00, NULL}
};
static guint
proto_mpeg_descriptor_dissect_private_ciplus(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- guint offset_start;
- guint8 tag, len;
- const gchar *tag_str;
- proto_item *di;
- proto_tree *descriptor_tree;
- guint8 str_len_byte;
-
- offset_start=offset;
-
- tag = tvb_get_guint8(tvb, offset);
- tag_str = match_strval(tag, mpeg_descriptor_ciplus_tag_vals);
- if (!tag_str)
- return 0;
-
- di = proto_tree_add_text(tree, tvb, offset_start, -1, "CI+ private descriptor Tag=0x%02x", tag);
- descriptor_tree = proto_item_add_subtree(di, ett_mpeg_descriptor);
-
- proto_tree_add_uint_format(descriptor_tree, hf_mpeg_descriptor_tag, tvb, offset, 1, tag, "Descriptor Tag: %s (0x%x)", tag_str, tag);
- offset++;
-
- len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(descriptor_tree, hf_mpeg_descriptor_length, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- if (tag==0xCB) {
- proto_tree_add_item(tree, hf_mpeg_descr_ciplus_cl_cb_min, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- proto_tree_add_item(tree, hf_mpeg_descr_ciplus_cl_cb_max, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- proto_tree_add_item(tree, hf_mpeg_descr_ciplus_cl_lang, tvb, offset, 3, ENC_BIG_ENDIAN);
- offset += 3;
-
- proto_tree_add_item(tree, hf_mpeg_descr_ciplus_cl_label, tvb, offset, len-offset, ENC_BIG_ENDIAN);
- offset += len-offset;
- }
- else if (tag==0xCC) {
- proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_visible, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_selectable, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_lcn, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- str_len_byte = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_prov_name, tvb, offset, 1, ENC_ASCII|ENC_NA);
- offset += 1+str_len_byte;
-
- str_len_byte = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_name, tvb, offset, 1, ENC_ASCII|ENC_NA);
- offset += 1+str_len_byte;
- }
-
- proto_item_set_len(di, offset-offset_start);
- return offset-offset_start;
+ guint offset_start;
+ guint8 tag, len;
+ const gchar *tag_str;
+ proto_item *di;
+ proto_tree *descriptor_tree;
+ guint8 str_len_byte;
+
+ offset_start=offset;
+
+ tag = tvb_get_guint8(tvb, offset);
+ tag_str = match_strval(tag, mpeg_descriptor_ciplus_tag_vals);
+ if (!tag_str)
+ return 0;
+
+ di = proto_tree_add_text(tree, tvb, offset_start, -1, "CI+ private descriptor Tag=0x%02x", tag);
+ descriptor_tree = proto_item_add_subtree(di, ett_mpeg_descriptor);
+
+ proto_tree_add_uint_format(descriptor_tree, hf_mpeg_descriptor_tag, tvb, offset, 1, tag, "Descriptor Tag: %s (0x%x)", tag_str, tag);
+ offset += 1;
+
+ len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(descriptor_tree, hf_mpeg_descriptor_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ if (tag == 0xCB) {
+ proto_tree_add_item(tree, hf_mpeg_descr_ciplus_cl_cb_min, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_ciplus_cl_cb_max, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_ciplus_cl_lang, tvb, offset, 3, ENC_BIG_ENDIAN);
+ offset += 3;
+
+ proto_tree_add_item(tree, hf_mpeg_descr_ciplus_cl_label, tvb, offset, len-offset, ENC_BIG_ENDIAN);
+ offset += len-offset;
+ }
+ else if (tag == 0xCC) {
+ proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_visible, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_selectable, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_lcn, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ str_len_byte = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_prov_name, tvb, offset, 1, ENC_ASCII|ENC_NA);
+ offset += 1+str_len_byte;
+
+ str_len_byte = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(descriptor_tree, hf_mpeg_descr_ciplus_svc_name, tvb, offset, 1, ENC_ASCII|ENC_NA);
+ offset += 1+str_len_byte;
+ }
+
+ proto_item_set_len(di, offset-offset_start);
+ return offset-offset_start;
}
@@ -2586,159 +2587,159 @@ proto_mpeg_descriptor_dissect_private_ciplus(tvbuff_t *tvb, guint offset, proto_
guint
proto_mpeg_descriptor_dissect(tvbuff_t *tvb, guint offset, proto_tree *tree)
{
- guint8 tag, len;
-
- proto_item *di;
- proto_tree *descriptor_tree;
-
- tag = tvb_get_guint8(tvb, offset);
- len = tvb_get_guint8(tvb, offset + 1);
-
- di = proto_tree_add_text(tree, tvb, offset, len + 2, "Descriptor Tag=0x%02x", tag);
- descriptor_tree = proto_item_add_subtree(di, ett_mpeg_descriptor);
-
- proto_tree_add_item(descriptor_tree, hf_mpeg_descriptor_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- proto_tree_add_item(descriptor_tree, hf_mpeg_descriptor_length, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- if (len == 0)
- return 2;
-
- switch (tag) {
- case 0x02: /* Video Stream Descriptor */
- proto_mpeg_descriptor_dissect_video_stream(tvb, offset, descriptor_tree);
- break;
- case 0x03: /* Audio Stream Descriptor */
- proto_mpeg_descriptor_dissect_audio_stream(tvb, offset, descriptor_tree);
- break;
- case 0x06: /* Data Stream Alignment Descriptor */
- proto_mpeg_descriptor_dissect_data_stream_alignment(tvb, offset, descriptor_tree);
- break;
- case 0x09: /* CA Descriptor */
- proto_mpeg_descriptor_dissect_ca(tvb, offset, len, descriptor_tree);
- break;
- case 0x0A: /* ISO 639 Language Descriptor */
- proto_mpeg_descriptor_dissect_iso639(tvb, offset, len, descriptor_tree);
- break;
- case 0x0B: /* System Clock Descriptor */
- proto_mpeg_descriptor_dissect_system_clock(tvb, offset, descriptor_tree);
- break;
- case 0x0E: /* Maximum Bitrate Descriptor */
- proto_mpeg_descriptor_dissect_max_bitrate(tvb, offset, descriptor_tree);
- break;
- case 0x10: /* Smoothing Buffer Descriptor */
- proto_mpeg_descriptor_dissect_smoothing_buffer(tvb, offset, descriptor_tree);
- break;
- case 0x11: /* STD Descriptor */
- proto_mpeg_descriptor_dissect_std(tvb, offset, descriptor_tree);
- break;
- case 0x13: /* Carousel Identifier Descriptor */
- proto_mpeg_descriptor_dissect_carousel_identifier(tvb, offset, len, descriptor_tree);
- break;
- case 0x14: /* Association Tag Descriptor */
- proto_mpeg_descriptor_dissect_association_tag(tvb, offset, len, descriptor_tree);
- break;
- case 0x28: /* AVC Video Descriptor */
- proto_mpeg_descriptor_dissect_avc_vid(tvb, offset, descriptor_tree);
- break;
- case 0x40: /* Network Name Descriptor */
- proto_mpeg_descriptor_dissect_network_name(tvb, offset, len, descriptor_tree);
- break;
- case 0x41: /* Service List Descriptor */
- proto_mpeg_descriptor_dissect_service_list(tvb, offset, len, descriptor_tree);
- break;
- case 0x42: /* Stuffing Descriptor */
- proto_mpeg_descriptor_stuffing(tvb, offset, len, descriptor_tree);
- break;
- case 0x43: /* Satellite Delivery System Descriptor */
- proto_mpeg_descriptor_dissect_satellite_delivery(tvb, offset, descriptor_tree);
- break;
- case 0x44: /* Cable Delivery System Descriptor */
- proto_mpeg_descriptor_dissect_cable_delivery(tvb, offset, descriptor_tree);
- break;
- case 0x45: /* VBI Data Descriptor */
- proto_mpeg_descriptor_dissect_vbi_data(tvb, offset, len, descriptor_tree);
- break;
- case 0x47: /* Bouquet Name Descriptor */
- proto_mpeg_descriptor_dissect_bouquet_name(tvb, offset, len, descriptor_tree);
- break;
- case 0x48: /* Service Descriptor */
- proto_mpeg_descriptor_dissect_service(tvb, offset, descriptor_tree);
- break;
- case 0x4A: /* Linkage Descriptor */
- proto_mpeg_descriptor_dissect_linkage(tvb, offset, len, descriptor_tree);
- break;
- case 0x4D: /* Short Event Descriptor */
- proto_mpeg_descriptor_dissect_short_event(tvb, offset, descriptor_tree);
- break;
- case 0x4E: /* Extended Event Descriptor */
- proto_mpeg_descriptor_dissect_extended_event(tvb, offset, descriptor_tree);
- break;
- case 0x50: /* Component Descriptor */
- proto_mpeg_descriptor_dissect_component(tvb, offset, len, descriptor_tree);
- break;
- case 0x52: /* Stream Identifier Descriptor */
- proto_mpeg_descriptor_dissect_stream_identifier(tvb, offset, descriptor_tree);
- break;
- case 0x53: /* CA Identifier Descriptor */
- proto_mpeg_descriptor_dissect_ca_identifier(tvb, offset, len, descriptor_tree);
- break;
- case 0x54: /* Content Descriptor */
- proto_mpeg_descriptor_dissect_content(tvb, offset, len, descriptor_tree);
- break;
- case 0x55: /* Parental Rating Descriptor */
- proto_mpeg_descriptor_dissect_parental_rating(tvb, offset, descriptor_tree);
- break;
- case 0x56: /* Teletext Descriptor */
- proto_mpeg_descriptor_dissect_teletext(tvb, offset, len, descriptor_tree);
- break;
- case 0x58: /* Local Time Offset Descriptor */
- proto_mpeg_descriptor_dissect_local_time_offset(tvb, offset, len, descriptor_tree);
- break;
- case 0x59: /* Subtitling Descriptor */
- proto_mpeg_descriptor_dissect_subtitling(tvb, offset, len, descriptor_tree);
- break;
- case 0x5A: /* Terrestrial Delivery System Descriptor */
- proto_mpeg_descriptor_dissect_terrestrial_delivery(tvb, offset, descriptor_tree);
- break;
- case 0x5F: /* Private Data Specifier Descriptor */
- proto_mpeg_descriptor_dissect_private_data_specifier(tvb, offset, descriptor_tree);
- break;
- case 0x64: /* Data Broadcast Descriptor */
- proto_mpeg_descriptor_dissect_data_bcast(tvb, offset, descriptor_tree);
- break;
- case 0x66: /* Data Broadcast ID Descriptor */
- proto_mpeg_descriptor_dissect_data_bcast_id(tvb, offset, len, descriptor_tree);
- break;
- case 0x6A: /* AC-3 Descriptor */
- proto_mpeg_descriptor_dissect_ac3(tvb, offset, len, descriptor_tree);
- break;
- case 0x6F: /* Application Signalling Descriptor */
- proto_mpeg_descriptor_dissect_app_sig(tvb, offset, len, descriptor_tree);
- break;
- case 0x73: /* Default Authority Descriptor */
- proto_mpeg_descriptor_dissect_default_authority(tvb, offset, len, descriptor_tree);
- break;
- case 0x76: /* Content Identifier Descriptor */
- proto_mpeg_descriptor_dissect_content_identifier(tvb, offset, len, descriptor_tree);
- break;
- case 0x7F: /* Extension Descriptor */
- proto_mpeg_descriptor_dissect_extension(tvb, offset, len, descriptor_tree);
- break;
- case 0xA2: /* Logon Initialize Descriptor */
- proto_mpeg_descriptor_dissect_logon_initialize(tvb, offset, len, descriptor_tree);
- break;
- case 0xA7: /* RCS Content Descriptor */
- proto_mpeg_descriptor_dissect_rcs_content(tvb, offset, len, descriptor_tree);
- break;
- default:
- proto_tree_add_item(descriptor_tree, hf_mpeg_descriptor_data, tvb, offset, len, ENC_NA);
- break;
- }
-
- return len + 2;
+ guint tag, len;
+
+ proto_item *di;
+ proto_tree *descriptor_tree;
+
+ tag = tvb_get_guint8(tvb, offset);
+ len = tvb_get_guint8(tvb, offset + 1);
+
+ di = proto_tree_add_text(tree, tvb, offset, len + 2, "Descriptor Tag=0x%02x", tag);
+ descriptor_tree = proto_item_add_subtree(di, ett_mpeg_descriptor);
+
+ proto_tree_add_item(descriptor_tree, hf_mpeg_descriptor_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ proto_tree_add_item(descriptor_tree, hf_mpeg_descriptor_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+
+ if (len == 0)
+ return 2;
+
+ switch (tag) {
+ case 0x02: /* Video Stream Descriptor */
+ proto_mpeg_descriptor_dissect_video_stream(tvb, offset, descriptor_tree);
+ break;
+ case 0x03: /* Audio Stream Descriptor */
+ proto_mpeg_descriptor_dissect_audio_stream(tvb, offset, descriptor_tree);
+ break;
+ case 0x06: /* Data Stream Alignment Descriptor */
+ proto_mpeg_descriptor_dissect_data_stream_alignment(tvb, offset, descriptor_tree);
+ break;
+ case 0x09: /* CA Descriptor */
+ proto_mpeg_descriptor_dissect_ca(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x0A: /* ISO 639 Language Descriptor */
+ proto_mpeg_descriptor_dissect_iso639(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x0B: /* System Clock Descriptor */
+ proto_mpeg_descriptor_dissect_system_clock(tvb, offset, descriptor_tree);
+ break;
+ case 0x0E: /* Maximum Bitrate Descriptor */
+ proto_mpeg_descriptor_dissect_max_bitrate(tvb, offset, descriptor_tree);
+ break;
+ case 0x10: /* Smoothing Buffer Descriptor */
+ proto_mpeg_descriptor_dissect_smoothing_buffer(tvb, offset, descriptor_tree);
+ break;
+ case 0x11: /* STD Descriptor */
+ proto_mpeg_descriptor_dissect_std(tvb, offset, descriptor_tree);
+ break;
+ case 0x13: /* Carousel Identifier Descriptor */
+ proto_mpeg_descriptor_dissect_carousel_identifier(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x14: /* Association Tag Descriptor */
+ proto_mpeg_descriptor_dissect_association_tag(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x28: /* AVC Video Descriptor */
+ proto_mpeg_descriptor_dissect_avc_vid(tvb, offset, descriptor_tree);
+ break;
+ case 0x40: /* Network Name Descriptor */
+ proto_mpeg_descriptor_dissect_network_name(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x41: /* Service List Descriptor */
+ proto_mpeg_descriptor_dissect_service_list(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x42: /* Stuffing Descriptor */
+ proto_mpeg_descriptor_stuffing(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x43: /* Satellite Delivery System Descriptor */
+ proto_mpeg_descriptor_dissect_satellite_delivery(tvb, offset, descriptor_tree);
+ break;
+ case 0x44: /* Cable Delivery System Descriptor */
+ proto_mpeg_descriptor_dissect_cable_delivery(tvb, offset, descriptor_tree);
+ break;
+ case 0x45: /* VBI Data Descriptor */
+ proto_mpeg_descriptor_dissect_vbi_data(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x47: /* Bouquet Name Descriptor */
+ proto_mpeg_descriptor_dissect_bouquet_name(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x48: /* Service Descriptor */
+ proto_mpeg_descriptor_dissect_service(tvb, offset, descriptor_tree);
+ break;
+ case 0x4A: /* Linkage Descriptor */
+ proto_mpeg_descriptor_dissect_linkage(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x4D: /* Short Event Descriptor */
+ proto_mpeg_descriptor_dissect_short_event(tvb, offset, descriptor_tree);
+ break;
+ case 0x4E: /* Extended Event Descriptor */
+ proto_mpeg_descriptor_dissect_extended_event(tvb, offset, descriptor_tree);
+ break;
+ case 0x50: /* Component Descriptor */
+ proto_mpeg_descriptor_dissect_component(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x52: /* Stream Identifier Descriptor */
+ proto_mpeg_descriptor_dissect_stream_identifier(tvb, offset, descriptor_tree);
+ break;
+ case 0x53: /* CA Identifier Descriptor */
+ proto_mpeg_descriptor_dissect_ca_identifier(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x54: /* Content Descriptor */
+ proto_mpeg_descriptor_dissect_content(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x55: /* Parental Rating Descriptor */
+ proto_mpeg_descriptor_dissect_parental_rating(tvb, offset, descriptor_tree);
+ break;
+ case 0x56: /* Teletext Descriptor */
+ proto_mpeg_descriptor_dissect_teletext(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x58: /* Local Time Offset Descriptor */
+ proto_mpeg_descriptor_dissect_local_time_offset(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x59: /* Subtitling Descriptor */
+ proto_mpeg_descriptor_dissect_subtitling(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x5A: /* Terrestrial Delivery System Descriptor */
+ proto_mpeg_descriptor_dissect_terrestrial_delivery(tvb, offset, descriptor_tree);
+ break;
+ case 0x5F: /* Private Data Specifier Descriptor */
+ proto_mpeg_descriptor_dissect_private_data_specifier(tvb, offset, descriptor_tree);
+ break;
+ case 0x64: /* Data Broadcast Descriptor */
+ proto_mpeg_descriptor_dissect_data_bcast(tvb, offset, descriptor_tree);
+ break;
+ case 0x66: /* Data Broadcast ID Descriptor */
+ proto_mpeg_descriptor_dissect_data_bcast_id(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x6A: /* AC-3 Descriptor */
+ proto_mpeg_descriptor_dissect_ac3(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x6F: /* Application Signalling Descriptor */
+ proto_mpeg_descriptor_dissect_app_sig(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x73: /* Default Authority Descriptor */
+ proto_mpeg_descriptor_dissect_default_authority(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x76: /* Content Identifier Descriptor */
+ proto_mpeg_descriptor_dissect_content_identifier(tvb, offset, len, descriptor_tree);
+ break;
+ case 0x7F: /* Extension Descriptor */
+ proto_mpeg_descriptor_dissect_extension(tvb, offset, len, descriptor_tree);
+ break;
+ case 0xA2: /* Logon Initialize Descriptor */
+ proto_mpeg_descriptor_dissect_logon_initialize(tvb, offset, len, descriptor_tree);
+ break;
+ case 0xA7: /* RCS Content Descriptor */
+ proto_mpeg_descriptor_dissect_rcs_content(tvb, offset, len, descriptor_tree);
+ break;
+ default:
+ proto_tree_add_item(descriptor_tree, hf_mpeg_descriptor_data, tvb, offset, len, ENC_NA);
+ break;
+ }
+
+ return len + 2;
}
@@ -2747,49 +2748,49 @@ proto_mpeg_descriptor_dissect(tvbuff_t *tvb, guint offset, proto_tree *tree)
guint
proto_mpeg_descriptor_loop_dissect(tvbuff_t *tvb, guint offset, guint loop_len, proto_tree *tree)
{
- /* we use the reserved value to indicate that no private context is active */
- guint32 private_data_specifier = PRIVATE_DATA_SPECIFIER_RESERVED;
- guint offset_start;
- guint desc_len;
- guint8 tag;
-
- offset_start = offset;
-
- while (offset-offset_start < loop_len) {
- /* don't increment offset in our pre-checks */
- tag = tvb_get_guint8(tvb, offset);
- if (tag==0x5F) {
- /* we have a private data specifier descriptor: get the private data specifier */
- /* offset+1 is length byte, offset+2 is start of payload */
- private_data_specifier = tvb_get_ntohl(tvb, offset+2);
- }
-
- /* the default descriptor function takes precedence
- however, if it does not know the current descriptor, we search for a context-specific subfunction
- this subfunction gets to see the entire descriptor, including tag and len */
- if (match_strval(tag, mpeg_descriptor_tag_vals)) {
- desc_len = proto_mpeg_descriptor_dissect(tvb, offset, tree);
- }
- else {
- switch (private_data_specifier) {
- case PRIVATE_DATA_SPECIFIER_CIPLUS_LLP:
- desc_len = proto_mpeg_descriptor_dissect_private_ciplus(tvb, offset, tree);
- break;
- default:
- desc_len = 0;
- break;
- }
- if (desc_len==0) {
- /* either there was no subfunction or it could not handle the descriptor
- fall back to the default (which will dissect it as unknown) */
- desc_len = proto_mpeg_descriptor_dissect(tvb, offset, tree);
- }
- }
-
- offset += desc_len;
- }
-
- return offset-offset_start;
+ /* we use the reserved value to indicate that no private context is active */
+ guint32 private_data_specifier = PRIVATE_DATA_SPECIFIER_RESERVED;
+ guint offset_start;
+ guint desc_len;
+ guint8 tag;
+
+ offset_start = offset;
+
+ while ((offset - offset_start) < loop_len) {
+ /* don't increment offset in our pre-checks */
+ tag = tvb_get_guint8(tvb, offset);
+ if (tag == 0x5F) {
+ /* we have a private data specifier descriptor: get the private data specifier */
+ /* offset+1 is length byte, offset+2 is start of payload */
+ private_data_specifier = tvb_get_ntohl(tvb, offset+2);
+ }
+
+ /* the default descriptor function takes precedence
+ however, if it does not know the current descriptor, we search for a context-specific subfunction
+ this subfunction gets to see the entire descriptor, including tag and len */
+ if (match_strval(tag, mpeg_descriptor_tag_vals)) {
+ desc_len = proto_mpeg_descriptor_dissect(tvb, offset, tree);
+ }
+ else {
+ switch (private_data_specifier) {
+ case PRIVATE_DATA_SPECIFIER_CIPLUS_LLP:
+ desc_len = proto_mpeg_descriptor_dissect_private_ciplus(tvb, offset, tree);
+ break;
+ default:
+ desc_len = 0;
+ break;
+ }
+ if (desc_len == 0) {
+ /* either there was no subfunction or it could not handle the descriptor
+ fall back to the default (which will dissect it as unknown) */
+ desc_len = proto_mpeg_descriptor_dissect(tvb, offset, tree);
+ }
+ }
+
+ offset += desc_len;
+ }
+
+ return offset-offset_start;
}
@@ -2797,1389 +2798,1390 @@ void
proto_register_mpeg_descriptor(void)
{
- static hf_register_info hf[] = {
- { &hf_mpeg_descriptor_tag, {
- "Descriptor Tag", "mpeg_descr.tag",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descriptor_tag_vals_ext, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descriptor_length, {
- "Descriptor Length", "mpeg_descr.len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descriptor_data, {
- "Descriptor Data", "mpeg_descr.data",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x02 Video Stream Descriptor */
- { &hf_mpeg_descr_video_stream_multiple_frame_rate_flag, {
- "Multiple Frame Rate Flag", "mpeg_descr.video_stream.multiple_frame_rate_flag",
- FT_UINT8, BASE_DEC, VALS(mpeg_descr_video_stream_multiple_frame_rate_flag_vals),
- MPEG_DESCR_VIDEO_STREAM_MULTIPLE_FRAME_RATE_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_video_stream_frame_rate_code, {
- "Frame Rate Code", "mpeg_descr.video_stream.frame_rate_code",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_VIDEO_STREAM_FRAME_RATE_CODE_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_video_stream_mpeg1_only_flag, {
- "MPEG1 Only Flag", "mpeg_descr.video_stream.mpeg1_only_flag",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_VIDEO_STREAM_MPEG1_ONLY_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_video_stream_constrained_parameter_flag, {
- "Constrained Parameter Flag", "mpeg_descr.video_stream.constrained_parameter_flag",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_VIDEO_STREAM_CONSTRAINED_PARAMETER_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_video_stream_still_picture_flag, {
- "Still Picture Flag", "mpeg_descr.video_stream.still_picture_flag",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_VIDEO_STREAM_STILL_PICTURE_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_video_stream_profile_and_level_indication, {
- "Profile and Level Indication", "mpeg_descr.video_stream.profile_level_ind",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_video_stream_chroma_format, {
- "Chroma Format", "mpeg_descr.video_stream.chroma_format",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_video_stream_frame_rate_extension_flag, {
- "Frame Rate Extension Flag", "mpeg_descr.video_stream.frame_rate_extension_flag",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_VIDEO_STREAM_FRAME_RATE_EXTENSION_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_video_stream_reserved, {
- "Reserved", "mpeg_descr.video_stream.reserved",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_VIDEO_STREAM_RESERVED_MASK, NULL, HFILL
- } },
-
- /* 0x03 Audio Stream Descriptor */
- { &hf_mpeg_descr_audio_stream_free_format_flag, {
- "Free Format Flag", "mpeg_descr.audio_stream.free_format_flag",
- FT_UINT8, BASE_DEC, VALS(mpeg_descr_audio_stream_free_format_flag_vals), MPEG_DESCR_AUDIO_STREAM_FREE_FORMAT_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_audio_stream_id, {
- "ID", "mpeg_descr.audio_stream.id",
- FT_UINT8, BASE_DEC, VALS(mpeg_descr_audio_stream_id_vals), MPEG_DESCR_AUDIO_STREAM_ID_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_audio_stream_layer, {
- "Layer", "mpeg_descr.audio_stream.layer",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AUDIO_STREAM_LAYER_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_audio_stream_variable_rate_audio_indicator, {
- "Variable Rate Audio Indicator", "mpeg_descr.audio_stream.vbr_indicator",
- FT_UINT8, BASE_DEC, VALS(mpeg_descr_audio_stream_variable_rate_audio_indicator_vals),
- MPEG_DESCR_AUDIO_STREAM_VARIABLE_RATE_AUDIO_INDICATOR_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_audio_stream_reserved, {
- "Reserved", "mpeg_descr.audio_stream.reserved",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AUDIO_STREAM_RESERVED_MASK, NULL, HFILL
- } },
-
- /* 0x06 Data Stream Alignment Descriptor */
- { &hf_mpeg_descr_data_stream_alignment, {
- "Data Stream Alignment", "mpeg_descr.data_stream_alignment.alignment",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_data_stream_alignment_vals), 0, NULL, HFILL
- } },
-
- /* 0x09 CA Descriptor */
- { &hf_mpeg_descr_ca_system_id, {
- "System ID", "mpeg_descr.ca.sys_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ca_reserved, {
- "Reserved", "mpeg_descr.ca.reserved",
- FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_CA_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ca_pid, {
- "CA PID", "mpeg_descr.ca.pid",
- FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_CA_PID_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ca_private, {
- "Private bytes", "mpeg_descr.ca.private",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x0A ISO 639 Language Descriptor */
- { &hf_mpeg_descr_iso639_lang, {
- "ISO 639 Language Code", "mpeg_descr.lang.code",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_iso639_type, {
- "ISO 639 Language Type", "mpeg_descr.lang.type",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_iso639_type_vals), 0, NULL, HFILL
- } },
-
- /* 0x0B System Clock Descriptor */
- { &hf_mpeg_descr_system_clock_external_clock_reference_indicator, {
- "External Clock Reference Indicator", "mpeg_descr.sys_clk.external_clk_ref_ind",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_SYSTEM_CLOCK_EXTERNAL_CLOCK_REFERENCE_INDICATOR_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_system_clock_reserved1, {
- "Reserved", "mpeg_descr.sys_clk.reserved1",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_SYSTEM_CLOCK_RESERVED1_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_system_clock_accuracy_integer, {
- "Accuracy Integer", "mpeg_descr.sys_clk.accuracy_integer",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_SYSTEM_CLOCK_ACCURACY_INTEGER_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_system_clock_accuracy_exponent, {
- "Accuracy Exponent", "mpeg_descr.sys_clk.accuracy_exponent",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_SYSTEM_CLOCK_ACCURACY_EXPONENT_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_system_clock_reserved2, {
- "Reserved", "mpeg_descr.sys_clk.reserved2",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_SYSTEM_CLOCK_RESERVED2_MASK, NULL, HFILL
- } },
-
- /* 0x0E Maximum Bitrate Descriptor */
- { &hf_mpeg_descr_max_bitrate_reserved, {
- "Maximum Bitrate Reserved", "mpeg_descr.max_bitrate.reserved",
- FT_UINT24, BASE_HEX, NULL, MPEG_DESCR_MAX_BITRATE_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_max_bitrate, {
- "Maximum Bitrate", "mpeg_descr.max_bitrate.rate",
- FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_MAX_BITRATE_MASK, NULL, HFILL
- } },
-
- /* 0x10 Smoothing Buffer Descriptor */
- { &hf_mpeg_descr_smoothing_buffer_reserved1, {
- "Reserved", "mpeg_descr.smoothing_buf.reserved1",
- FT_UINT24, BASE_HEX, NULL, MPEG_DESCR_SMOOTHING_BUFFER_RESERVED1_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_smoothing_buffer_leak_rate, {
- "Leak Rate", "mpeg_descr.smoothing_buf.leak_rate",
- FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_SMOOTHING_BUFFER_LEAK_RATE_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_smoothing_buffer_reserved2, {
- "Reserved", "mpeg_descr.smoothing_buf.reserved2",
- FT_UINT24, BASE_HEX, NULL, MPEG_DESCR_SMOOTHING_BUFFER_RESERVED2_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_smoothing_buffer_size, {
- "Buffer Size", "mpeg_descr.smoothing_buf.size",
- FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_SMOOTHING_BUFFER_SIZE_MASK, NULL, HFILL
- } },
-
- /* 0x11 STD Descriptor */
- { &hf_mpeg_descr_std_reserved, {
- "Reserved", "mpeg_descr.std.reserved",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_STD_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_std_leak_valid, {
- "Leak Valid", "mpeg_descr.std.leak_valid",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_STD_LEAK_VALID_MASK, NULL, HFILL
- } },
-
- /* 0x13 Carousel Identifier Descriptor */
- { &hf_mpeg_descr_carousel_identifier_id, {
- "Carousel ID", "mpeg_descr.carousel_identifier.id",
- FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_carousel_identifier_format_id, {
- "Format ID", "mpeg_descr.carousel_identifier.format_id",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_carousel_identifier_format_id_vals), 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_carousel_identifier_module_version, {
- "Module Version", "mpeg_descr.carousel_identifier.module_version",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_carousel_identifier_module_id, {
- "Module ID", "mpeg_descr.carousel_identifier.module_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_carousel_identifier_block_size, {
- "Block Size", "mpeg_descr.carousel_identifier.block_size",
- FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_carousel_identifier_module_size, {
- "Module Size", "mpeg_descr.carousel_identifier.module_size",
- FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_carousel_identifier_compression_method, {
- "Compression Method", "mpeg_descr.carousel_identifier.comp_method",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_carousel_identifier_original_size, {
- "Original Size", "mpeg_descr.carousel_identifier.orig_size",
- FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_carousel_identifier_timeout, {
- "Timeout", "mpeg_descr.carousel_identifier.timeout",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_carousel_identifier_object_key_len, {
- "Object Key Length", "mpeg_descr.carousel_identifier.key_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_carousel_identifier_object_key_data, {
- "Object Key Data", "mpeg_descr.carousel_identifier.key_data",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_carousel_identifier_private, {
- "Private Bytes", "mpeg_descr.carousel_identifier.private",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x14 Association Tag Descriptor */
- { &hf_mpeg_descr_association_tag, {
- "Association Tag", "mpeg_descr.assoc_tag.tag",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_association_tag_use, {
- "Use", "mpeg_descr.assoc_tag.use",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_association_tag_selector_len, {
- "Selector Length", "mpeg_descr.assoc_tag.selector_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_association_tag_transaction_id, {
- "Transaction ID", "mpeg_descr.assoc_tag.transaction_id",
- FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_association_tag_timeout, {
- "Timeout", "mpeg_descr.assoc_tag.timeout",
- FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_association_tag_selector_bytes, {
- "Selector Bytes", "mpeg_descr.assoc_tag.selector_bytes",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_association_tag_private_bytes, {
- "Private Bytes", "mpeg_descr.assoc_tag.private_bytes",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x28 AVC Video Descriptor */
- { &hf_mpeg_descr_avc_vid_profile_idc, {
- "Profile IDC", "mpeg_descr.avc_vid.profile_idc",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_avc_vid_constraint_set0_flag, {
- "Constraint Set0 Flag", "mpeg_descr.avc_vid.contraint_set0",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_CONSTRAINT_SET0_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_avc_vid_constraint_set1_flag, {
- "Constraint Set1 Flag", "mpeg_descr.avc_vid.contraint_set1",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_CONSTRAINT_SET1_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_avc_vid_constraint_set2_flag, {
- "Constraint Set2 Flag", "mpeg_descr.avc_vid.contraint_set2",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_CONSTRAINT_SET2_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_avc_vid_compatible_flags, {
- "Constraint Compatible Flags", "mpeg_descr.avc_vid.compatible_flags",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AVC_VID_COMPATIBLE_FLAGS_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_avc_vid_level_idc, {
- "Level IDC", "mpeg_descr.avc_vid.level_idc",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_avc_vid_still_present, {
- "AVC Still Present", "mpeg_descr.avc_vid.still_present",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_STILL_PRESENT_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_avc_vid_24h_picture_flag, {
- "AVC 24 Hour Picture Flag", "mpeg_descr.avc_vid.24h_picture_flag",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_24H_PICTURE_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_avc_vid_reserved, {
- "Reserved", "mpeg_descr.avc_vid.reserved",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AVC_VID_RESERVED_MASK, NULL, HFILL
- } },
-
- /* 0x40 Network Name Descriptor */
- { &hf_mpeg_descr_network_name_descriptor, {
- "Network Name", "mpeg_descr.net_name.name",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x41 Service List Descriptor */
- { &hf_mpeg_descr_service_list_id, {
- "Service ID", "mpeg_descr.svc_list.id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_service_list_type, {
- "Service Type", "mpeg_descr.svc_list.type",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_service_type_vals_ext, 0, NULL, HFILL
- } },
-
- /* 0x42 Stuffing Descriptor */
- { &hf_mpeg_descr_stuffing, {
- "Stuffing", "mpeg_descr.stuffing",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x43 Satellite Delivery System Descriptor */
- { &hf_mpeg_descr_satellite_delivery_frequency, {
- "Frequency", "mpeg_descr.sat_delivery.freq",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_satellite_delivery_orbital_position, {
- "Orbital Position", "mpeg_descr.sat_delivery.orbital_pos",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_satellite_delivery_west_east_flag, {
- "West East Flag", "mpeg_descr.sat_delivery.west_east_flag",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_west_east_flag_vals),
- MPEG_DESCR_SATELLITE_DELIVERY_WEST_EAST_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_satellite_delivery_polarization, {
- "Polarization", "mpeg_descr.sat_delivery.polarization",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_polarization_vals),
- MPEG_DESCR_SATELLITE_DELIVERY_POLARIZATION_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_satellite_delivery_roll_off, {
- "Roll Off", "mpeg_descr.sat_delivery.roll_off",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_roll_off_vals),
- MPEG_DESCR_SATELLITE_DELIVERY_ROLL_OFF_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_satellite_delivery_zero, {
- "Zero", "mpeg_descr.sat_delivery.zero",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_SATELLITE_DELIVERY_ZERO_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_satellite_delivery_modulation_system, {
- "Modulation System", "mpeg_descr.sat_delivery.modulation_system",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_modulation_system_vals),
- MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_SYSTEM_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_satellite_delivery_modulation_type, {
- "Modulation Type", "mpeg_descr.sat_delivery.modulation_type",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_modulation_type_vals),
- MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_TYPE_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_satellite_delivery_symbol_rate, {
- "Symbol Rate", "mpeg_descr.sat_delivery.symbol_rate",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_satellite_delivery_fec_inner, {
- "FEC Inner", "mpeg_descr.sat_delivery.fec_inner",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_satellite_delivery_fec_inner_vals_ext,
- MPEG_DESCR_SATELLITE_DELIVERY_FEC_INNER_MASK, NULL, HFILL
- } },
-
- /* 0x44 Cable Delivery System Descriptor */
- { &hf_mpeg_descr_cable_delivery_frequency, {
- "Frequency", "mpeg_descr.cable_delivery.freq",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_cable_delivery_reserved, {
- "Reserved", "mpeg_descr.cable_delivery.reserved",
- FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_CABLE_DELIVERY_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_cable_delivery_fec_outer, {
- "FEC Outer", "mpeg_descr.cable_delivery.fec_outer",
- FT_UINT16, BASE_HEX, VALS(mpeg_descr_cable_delivery_fec_outer_vals),
- MPEG_DESCR_CABLE_DELIVERY_FEC_OUTER_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_cable_delivery_modulation, {
- "Modulation", "mpeg_descr.cable_delivery.modulation",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_cable_delivery_modulation_vals), 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_cable_delivery_symbol_rate, {
- "Symbol Rate", "mpeg_descr.cable_delivery.sym_rate",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_cable_delivery_fec_inner, {
- "FEC Inner", "mpeg_descr.cable_delivery.fec_inner",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_cable_delivery_fec_inner_vals_ext,
- MPEG_DESCR_CABLE_DELIVERY_FEC_INNER_MASK, NULL, HFILL
- } },
-
- /* 0x45 VBI Data Descriptor */
- { &hf_mpeg_descr_vbi_data_service_id, {
- "Data Service ID", "mpeg_descr.vbi_data.svc_id",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_vbi_data_service_id_vals), 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_vbi_data_descr_len, {
- "Data Descriptor Length", "mpeg_descr.vbi_data.decr_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_vbi_data_reserved1, {
- "Reserved", "mpeg_descr.vbi_data.reserved1",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_VBI_DATA_RESERVED1_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_vbi_data_field_parity, {
- "Field Parity", "mpeg_descr.vbi_data.field_parity",
- FT_UINT8, BASE_DEC, VALS(mpeg_descr_vbi_data_field_parity_vals),
- MPEG_DESCR_VBI_DATA_FIELD_PARITY_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_vbi_data_line_offset, {
- "Line offset", "mpeg_descr.vbi_data.line_offset",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_vbi_data_reserved2, {
- "Reserved", "mpeg_descr.vbi_data.reserved2",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x47 Bouquet Name Descriptor */
- { &hf_mpeg_descr_bouquet_name, {
- "Bouquet Name Descriptor", "mpeg_descr.bouquet_name.name",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x48 Service Descriptor */
- { &hf_mpeg_descr_service_type, {
- "Service Type", "mpeg_descr.svc.type",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_service_type_vals_ext, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_service_provider_name_length, {
- "Provider Name Length", "mpeg_descr.svc.provider_name_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_service_provider, {
- "Service Provider Name", "mpeg_descr.svc.provider_name",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_service_name_length, {
- "Service Name Length", "mpeg_descr.svc.svc_name_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_service_name, {
- "Service Name", "mpeg_descr.svc.svc_name",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x4A Linkage Descriptor */
- { &hf_mpeg_descr_linkage_transport_stream_id, {
- "Transport Stream ID", "mpeg_descr.linkage.tsid",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_original_network_id, {
- "Original Network ID", "mpeg_descr.linkage.original_nid",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_service_id, {
- "Service ID", "mpeg_descr.linkage.svc_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_linkage_type, {
- "Linkage Type", "mpeg_descr.linkage.type",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_linkage_linkage_type_vals_ext, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_hand_over_type, {
- "Hand-Over Type", "mpeg_descr.linkage.hand_over_type",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_reserved1, {
- "Reserved", "mpeg_descr.linkage.reserved1",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LINKAGE_RESERVED1_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_origin_type, {
- "Origin Type", "mpeg_descr.linkage.origin_type",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_linkage_origin_type_vals), 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_network_id, {
- "Network ID", "mpeg_descr.linkage.network_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_initial_service_id, {
- "Initial Service ID", "mpeg_descr.linkage.initial_svc_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_target_event_id, {
- "Target Event ID", "mpeg_descr.linkage.target_evt_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_target_listed, {
- "Target Listed", "mpeg_descr.linkage.target_listed",
- FT_UINT8, BASE_DEC, VALS(mpeg_descr_linkage_target_listed_vals),
- MPEG_DESCR_LINKAGE_TARGET_LISTED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_event_simulcast, {
- "Event Simulcast", "mpeg_descr.linkage.evt_simulcast",
- FT_UINT8, BASE_DEC, VALS(mpeg_descr_linkage_event_simulcast_vals),
- MPEG_DESCR_LINKAGE_EVENT_SIMULCAST_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_reserved2, {
- "Reserved", "mpeg_descr.linkage.reserved2",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LINKAGE_RESERVED2_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_private_data_byte, {
- "Private Data", "mpeg_descr.linkage.private_data",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_interactive_network_id, {
- "Interactive Network ID", "mpeg_descr.interactive_network_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_population_id_loop_count, {
- "Population ID loop count", "mpeg_descr.population_id_loop_count",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_population_id, {
- "Population ID", "mpeg_descr.population_id",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_population_id_base, {
- "Population ID Base", "mpeg_descr.population_id_base",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_linkage_population_id_mask, {
- "Population ID Mask", "mpeg_descr.population_id_mask",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- /* 0x4D Short Event Descriptor */
- { &hf_mpeg_descr_short_event_lang_code, {
- "Language Code", "mpeg_descr.short_evt.lang_code",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_short_event_name_length, {
- "Event Name Length", "mpeg_descr.short_evt.name_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_short_event_name, {
- "Event Name", "mpeg_descr.short_evt.name",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_short_event_text_length, {
- "Event Text Length", "mpeg_descr.short_evt.txt_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_short_event_text, {
- "Event Text", "mpeg_descr.short_evt.txt",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x4E Extended Event Descriptor */
- { &hf_mpeg_descr_extended_event_descriptor_number, {
- "Descriptor Number", "mpeg_descr.ext_evt.descr_num",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_EXTENDED_EVENT_DESCRIPTOR_NUMBER_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extended_event_last_descriptor_number, {
- "Last Descriptor Number", "mpeg_descr.ext_evt.last_descr_num",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_EXTENDED_EVENT_LAST_DESCRIPTOR_NUMBER_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extended_event_lang_code, {
- "Language Code", "mpeg_descr.ext_evt.lang_code",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extended_event_length_of_items, {
- "Length of items", "mpeg_descr.ext_evt.items_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extended_event_item_description_length, {
- "Item Description Length", "mpeg_descr.ext_evt.item_descr_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extended_event_item_description_char, {
- "Item Description", "mpeg_descr.ext_evt.item_descr",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extended_event_item_length, {
- "Item Length", "mpeg_descr.ext_evt.item_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extended_event_item_char, {
- "Item", "mpeg_descr.ext_evt.item",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extended_event_text_length, {
- "Text Length", "mpeg_descr.ext_evt.txt_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extended_event_text_char, {
- "Text", "mpeg_descr.ext_evt.txt",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x50 Component Descriptor */
- { &hf_mpeg_descr_component_reserved, {
- "Reserved", "mpeg_descr.component.reserved",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_COMPONENT_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_component_stream_content, {
- "Stream Content", "mpeg_descr.component.stream_content",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_component_stream_content_vals),
- MPEG_DESCR_COMPONENT_STREAM_CONTENT_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_component_type, {
- "Component Type", "mpeg_descr.component.type",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_component_content_type, {
- "Stream Content and Component Type", "mpeg_descr.component.content_type",
- FT_UINT16, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_component_content_type_vals_ext,
- MPEG_DESCR_COMPONENT_CONTENT_TYPE_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_component_tag, {
- "Component Tag", "mpeg_descr.component.tag",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_component_lang_code, {
- "Language Code", "mpeg_descr.component.lang_code",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_component_text, {
- "Text", "mpeg_descr.component.text",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x52 Stream Identifier Descriptor */
- { &hf_mpeg_descr_stream_identifier_component_tag, {
- "Component Tag", "mpeg_descr.stream_id.component_tag",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- /* 0x53 CA Identifier Descriptor */
- { &hf_mpeg_descr_ca_identifier_system_id, {
- "CA System ID", "mpeg_descr.ca_id.sys_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- /* 0x54 Content Descriptor */
- { &hf_mpeg_descr_content_nibble, {
- "Nibble Level 1 and 2", "mpeg_descr.content.nibble_1_2",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_content_nibble_vals_ext, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_content_nibble_level_1, {
- "Nibble Level 1", "mpeg_descr.content.nibble_lvl_1",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_content_nibble_level_1_vals_ext,
- MPEG_DESCR_CONTENT_NIBBLE_LEVEL_1_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_content_nibble_level_2, {
- "Nibble Level 2", "mpeg_descr.content.nibble_lvl_2",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_CONTENT_NIBBLE_LEVEL_2_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_content_user_byte, {
- "User Byte", "mpeg_descr.content.user",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- /* 0x56 Teletext Descriptor */
- { &hf_mpeg_descr_teletext_lang_code, {
- "Language Code", "mpeg_descr.teletext.lang_code",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_teletext_type, {
- "Teletext Type", "mpeg_descr.teletext.type",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_teletext_type_vals),
- MPEG_DESCR_TELETEXT_TYPE_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_teletext_magazine_number, {
- "Magazine Number", "mpeg_descr.teletext.magazine_num",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_TELETEXT_MAGAZINE_NUMBER_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_teletext_page_number, {
- "Page Number", "mpeg_descr.teletext.page_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- /* 0x55 Parental Rating Descriptor */
- { &hf_mpeg_descr_parental_rating_country_code, {
- "Country Code", "mpeg_descr.parental_rating.country_code",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_parental_rating_rating, {
- "Rating", "mpeg_descr.parental_rating.rating",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_parental_rating_vals_ext, 0, NULL, HFILL
- } },
-
- /* 0x58 Local Time Offset Descriptor */
- { &hf_mpeg_descr_local_time_offset_country_code, {
- "Country Code", "mpeg_descr.local_time_offset.country_code",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_local_time_offset_region_id, {
- "Region ID", "mpeg_descr.local_time_offset.region_id",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOCAL_TIME_OFFSET_COUNTRY_REGION_ID_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_local_time_offset_reserved, {
- "Reserved", "mpeg_descr.local_time_offset.reserved",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOCAL_TIME_OFFSET_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_local_time_offset_polarity, {
- "Time Offset Polarity", "mpeg_descr.local_time_offset.polarity",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_local_time_offset_polarity_vals),
- MPEG_DESCR_LOCAL_TIME_OFFSET_POLARITY, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_local_time_offset_offset, {
- "Time Offset", "mpeg_descr.local_time_offset.offset",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_local_time_offset_time_of_change, {
- "Time of Change", "mpeg_descr.local_time_offset.time_of_change",
- FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_local_time_offset_next_time_offset, {
- "Next Time Offset", "mpeg_descr.local_time_offset.next_time_offset",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x59 Subtitling Descriptor */
- { &hf_mpeg_descr_subtitling_lang_code, {
- "Language Code", "mpeg_descr.subtitling.lang_code",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_subtitling_type, {
- "Subtitling Type", "mpeg_descr.subtitling.type",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_subtitling_type_vals_ext, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_subtitling_composition_page_id, {
- "Composition Page ID", "mpeg_descr.subtitling.composition_page_id",
- FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_subtitling_ancillary_page_id, {
- "Ancillary Page ID", "mpeg_descr.subtitling.ancillary_page_id",
- FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- /* 0x5A Terrestrial Delivery System Descriptor */
- { &hf_mpeg_descr_terrestrial_delivery_centre_frequency, {
- "Centre Frequency", "mpeg_descr.terr_delivery.centre_freq",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_bandwidth, {
- "Bandwidth", "mpeg_descr.terr_delivery.bandwidth",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_bandwidth_vals),
- MPEG_DESCR_TERRESTRIAL_DELIVERY_BANDWIDTH_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_priority, {
- "Priority", "mpeg_descr.terr_delivery.priority",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_priority_vals),
- MPEG_DESCR_TERRESTRIAL_DELIVERY_PRIORITY_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_time_slicing_indicator, {
- "Time Slicing Indicator", "mpeg_descr.terr_delivery.time_slicing_ind",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_time_slicing_indicator_vals),
- MPEG_DESCR_TERRESTRIAL_DELIVERY_TIME_SLICING_INDICATOR_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_mpe_fec_indicator, {
- "MPE-FEC Indicator", "mpeg_descr.terr_delivery.mpe_fec_ind",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_mpe_fec_indicator_vals),
- MPEG_DESCR_TERRESTRIAL_DELIVERY_MPE_FEC_INDICATOR_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_reserved1, {
- "Reserved", "mpeg_descr.terr_delivery.reserved1",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_TERRESTRIAL_DELIVERY_RESERVED1_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_constellation, {
- "Constellation", "mpeg_descr.terr_delivery.constellation",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_constellation_vals),
- MPEG_DESCR_TERRESTRIAL_DELIVERY_CONSTELLATION_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_hierarchy_information, {
- "Hierarchy Information", "mpeg_descr.terr_delivery.hierarchy_information",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_hierarchy_information_vals),
- MPEG_DESCR_TERRESTRIAL_DELIVERY_HIERARCHY_INFORMATION_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_code_rate_hp_stream, {
- "Code Rate High Priority Stream", "mpeg_descr.terr_delivery.code_rate_hp_stream",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_code_rate_vals),
- MPEG_DESCR_TERRESTRIAL_DELIVERY_CODE_RATE_HP_STREAM_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_code_rate_lp_stream, {
- "Code Rate Low Priority Stream", "mpeg_descr.terr_delivery.code_rate_lp_stream",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_code_rate_vals),
- MPEG_DESCR_TERRESTRIAL_DELIVERY_CODE_RATE_LP_STREAM_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_guard_interval, {
- "Guard Interval", "mpeg_descr.terr_delivery.guard_interval",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_guard_interval_vals),
- MPEG_DESCR_TERRESTRIAL_DELIVERY_GUARD_INTERVAL_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_transmission_mode, {
- "Transmission Mode", "mpeg_descr.terr_delivery.transmission_mode",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_transmission_mode_vals),
- MPEG_DESCR_TERRESTRIAL_DELIVERY_TRANSMISSION_MODE_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_other_frequency_flag, {
- "Other Frequency Flag", "mpeg_descr.terr_delivery.other_freq_flag",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_other_frequency_flag_vals),
- MPEG_DESCR_TERRESTRIAL_DELIVERY_OTHER_FREQUENCY_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_terrestrial_delivery_reserved2, {
- "Reserved", "mpeg_descr.terr_delivery.reserved2",
- FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
-
- /* 0x5F Private Data Specifier */
- { &hf_mpeg_descr_private_data_specifier_id, {
- "Private Data Specifier", "mpeg_descr.private_data_specifier.id",
- FT_UINT32, BASE_HEX, VALS(mpeg_descr_data_specifier_id_vals), 0, NULL, HFILL
- } },
-
- /* 0x64 Data Broadcast Descriptor */
- { &hf_mpeg_descr_data_bcast_bcast_id, {
- "Data Broadcast ID", "mpeg_descr.data_bcast.id",
- FT_UINT16, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_data_bcast_id_vals_ext, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_data_bcast_component_tag, {
- "Component Tag", "mpeg_descr.data_bcast.component_tag",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_data_bcast_selector_len, {
- "Selector Length", "mpeg_descr.data_bcast.selector_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_data_bcast_selector_bytes, {
- "Selector Bytes", "mpeg_descr.data_bcast.selector_bytes",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_data_bcast_lang_code, {
- "Language Code", "mpeg_descr.data_bcast.lang_code",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_data_bcast_text_len, {
- "Text Length", "mpeg_descr.data_bcast.text_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_data_bcast_text, {
- "Text", "mpeg_descr.data_bcast.text",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x66 Data Broadcast ID Descriptor */
- { &hf_mpeg_descr_data_bcast_id_bcast_id, {
- "Data Broadcast ID", "mpeg_descr.data_bcast_id.id",
- FT_UINT16, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_data_bcast_id_vals_ext, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_data_bcast_id_id_selector_bytes, {
- "ID Selector Bytes", "mpeg_descr.data_bcast_id.id_selector_bytes",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x6A AC-3 Descriptor */
- { &hf_mpeg_descr_ac3_component_type_flag, {
- "Component Type Flag", "mpeg_descr.ac3.component_type_flag",
- FT_UINT8, BASE_DEC, VALS(mpeg_descr_ac3_component_type_flag_vals),
- MPEG_DESCR_AC3_COMPONENT_TYPE_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ac3_bsid_flag, {
- "BSID Flag", "mpeg_descr.ac3.bsid_flag",
- FT_UINT8, BASE_DEC, VALS(mpeg_descr_ac3_bsid_flag_vals),
- MPEG_DESCR_AC3_BSID_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ac3_mainid_flag, {
- "Main ID Flag", "mpeg_descr.ac3_main_id_flag",
- FT_UINT8, BASE_DEC, VALS(mpeg_descr_ac3_mainid_flag_vals),
- MPEG_DESCR_AC3_MAINID_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ac3_asvc_flag, {
- "ASVC Flag", "mpeg_descr.ac3.asvc_flag",
- FT_UINT8, BASE_DEC, VALS(mpeg_descr_ac3_asvc_flag_vals),
- MPEG_DESCR_AC3_ASVC_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ac3_reserved, {
- "Reserved", "mpeg_descr.ac3.reserved",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AC3_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ac3_component_type_reserved_flag, {
- "Type Reserved Flag", "mpeg_descr.ac3.component_type.reserved_flag",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AC3_COMPONENT_TYPE_RESERVED_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ac3_component_type_full_service_flag, {
- "Full Service Flag", "mpeg_descr.ac3.component_type.full_service_flag",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_component_type_full_service_flag_vals),
- MPEG_DESCR_AC3_COMPONENT_TYPE_FULL_SERVICE_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ac3_component_type_service_type_flags, {
- "Service Type Flags", "mpeg_descr.ac3.component_type.service_type_flags",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_component_type_service_type_flags_vals),
- MPEG_DESCR_AC3_COMPONENT_TYPE_SERVICE_TYPE_FLAGS_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ac3_component_type_number_of_channels_flags, {
- "Number of Channels Flags", "mpeg_descr.ac3.component_type.number_chan_flags",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_component_type_number_of_channels_flags_vals),
- MPEG_DESCR_AC3_COMPONENT_TYPE_NUMBER_OF_CHANNELS_FLAGS, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ac3_bsid, {
- "BSID", "mpeg_descr.ac3.bsid",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ac3_mainid, {
- "Main ID", "mpeg_descr.ac3.mainid",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ac3_asvc, {
- "ASVC", "mpeg_descr.ac3.asvc",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ac3_additional_info, {
- "Additional Info", "mpeg_descr.ac3.additional_info",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x6F Application Signalling Descriptor */
- { &hf_mpeg_descr_app_sig_app_type, {
- "Application type", "mpeg_descr.app_sig.app_type",
- FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_app_sig_ait_ver, {
- "AIT version", "mpeg_descr.app_sig.ait_ver",
- FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL
- } },
-
- /* 0x73 Default Authority Descriptor */
- { &hf_mpeg_descr_default_authority_name, {
- "Default Authority Name", "mpeg_descr.default_authority.name",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0x77 Content Identifier Descriptor */
- { &hf_mpeg_descr_content_identifier_crid_type, {
- "CRID Type", "mpeg_descr.content_identifier.crid_type",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_content_identifier_crid_type_vals),
- MPEG_DESCR_CONTENT_IDENTIFIER_CRID_TYPE_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_content_identifier_crid_location, {
- "CRID Location", "mpeg_descr.content_identifier.crid_location",
- FT_UINT8, BASE_HEX, VALS(mpeg_descr_content_identifier_crid_location_vals),
- MPEG_DESCR_CONTENT_IDENTIFIER_CRID_LOCATION_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_content_identifier_crid_length, {
- "CRID Length", "mpeg_descr.content_identifier.crid_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_content_identifier_crid_bytes, {
- "CRID Bytes", "mpeg_descr.content_identifier.crid_bytes",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_content_identifier_cird_ref, {
- "CRID Reference", "mpeg_descr.content_identifier.crid_ref",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- /* 0x7F Extension Descriptor */
- { &hf_mpeg_descr_extension_tag_extension, {
- "Descriptor Tag Extension", "mpeg_descr.ext.tag",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_extension_tag_extension_vals_ext, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extension_data, {
- "Descriptor Extension Data", "mpeg_descr.ext.data",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* Supplementary Audio Descriptor (part of Extension Descriptor) */
- { &hf_mpeg_descr_extension_supp_audio_mix_type, {
- "Mix type", "mpeg_descr.ext.supp_audio.mix_type",
- FT_UINT8, BASE_HEX, VALS(supp_audio_mix_type_vals), 0x80, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extension_supp_audio_ed_cla, {
- "Editorial classification", "mpeg_descr.ext.supp_audio.ed_cla",
- FT_UINT8, BASE_HEX, VALS(supp_audio_ed_cla), 0x7C, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extension_supp_audio_lang_code_present, {
- "Language code present", "mpeg_descr.ext.supp_audio.lang_code_present",
- FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_extension_supp_audio_lang_code, {
- "ISO 639 language code", "mpeg_descr.ext.supp_audio.lang_code",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0xA2 Logon Initialize Descriptor */
- { &hf_mpeg_descr_logon_initialize_group_id, {
- "Group ID", "mpeg_descr.logon_init.group_id",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_logon_id, {
- "Logon ID", "mpeg_descr.logon_init.logon_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_continuous_carrier_reserved, {
- "Continuous Carrier Reserved", "mpeg_descr.logon_init.continuous_carrier_reserved",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_CONTINUOUS_CARRIER_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_continuous_carrier, {
- "Continuous Carrier", "mpeg_descr.logon_init.continuous_carrier",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_CONTINUOUS_CARRIER_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_security_handshake_required, {
- "Security Handshake Required", "mpeg_descr.logon_init.security_handshake_required",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_SECURITY_HANDSHAKE_REQUIRED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_prefix_flag, {
- "Prefix Flag", "mpeg_descr.logon_init.prefix_flag",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_PREFIX_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_data_unit_labelling_flag, {
- "Unit Labelling Flag", "mpeg_descr.logon_init.data_unit_labelling_flag",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_DATA_UNIT_LABELLING_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_mini_slot_flag, {
- "Mini Slot Flag", "mpeg_descr.logon_init.mini_slot_flag",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_MINI_SLOT_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_contention_based_mini_slot_flag, {
- "Contention Based Mini Slot Flag", "mpeg_descr.logon_init.contention_based_mini_slot_flag",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_CONTENTION_BASED_MINI_SLOT_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_capacity_type_flag_reserved, {
- "Capacity Type Flag Reserved", "mpeg_descr.logon_init.capactity_type_flag_reserved",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_capacity_type_flag, {
- "Capacity Type Flag", "mpeg_descr.logon_init.capactity_type_flag",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_traffic_burst_type, {
- "Traffic Burst Type", "mpeg_descr.logon_init.traffic_burst_type",
- FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_TRAFFIC_BURST_TYPE_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_return_trf_pid, {
- "Return TRF PID", "mpeg_descr.logon_init.return_trf_pid",
- FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_TRF_PID_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid_reserved, {
- "Return CTRL MNGM PID Reserved", "mpeg_descr.logon_init.return_mngm_pid_reserved",
- FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_CTRL_MNGM_PID_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid, {
- "Return CTRL MNGM PID", "mpeg_descr.logon_init.return_mngm_pid",
- FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_CTRL_MNGM_PID_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_connectivity, {
- "Connectivity", "mpeg_descr.logon_init.connectivity",
- FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_CONNECTIVITY_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_return_vpi_reserved, {
- "Return VPI Reserved", "mpeg_descr.logon_init.return_vpi_reserved",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_VPI_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_return_vpi, {
- "Return VPI", "mpeg_descr.logon_init.return_vpi",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_VPI_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_return_vci, {
- "Return VCI", "mpeg_descr.logon_init.return_vci",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_return_signalling_vpi_reserved, {
- "Return Signalling VPI Reserved", "mpeg_descr.logon_init.return_signalling_vpi_reserved",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_return_signalling_vpi, {
- "Return Signalling VPI", "mpeg_descr.logon_init.return_signalling_vpi",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_return_signalling_vci, {
- "Return Signalling VCI", "mpeg_descr.logon_init.return_signalling_vci",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_forward_signalling_vpi_reserved, {
- "Forward Signalling VPI Reserved", "mpeg_descr.logon_init.forward_signalling_vpi_reserved",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_forward_signalling_vpi, {
- "Forward Signalling VPI", "mpeg_descr.logon_init.forward_signalling_vpi",
- FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_forward_signalling_vci, {
- "Forward Signalling VCI", "mpeg_descr.logon_init.forward_signalling_vci",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_cra_level, {
- "CRA Level", "mpeg_descr.logon_init.cra_level",
- FT_UINT24, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_vbdc_max_reserved, {
- "VDBC Max Reserved", "mpeg_descr.logon_init.vdbc_max_reserved",
- FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_VDBC_MAX_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_vbdc_max, {
- "VDBC Max", "mpeg_descr.logon_init.vdbc_max",
- FT_UINT16, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_VDBC_MAX_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_rbdc_max, {
- "RDBC Max", "mpeg_descr.logon_init.rdbc_max",
- FT_UINT24, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_logon_initialize_rbdc_timeout, {
- "RDBC Timeout", "mpeg_descr.logon_init.rdbc_timeout",
- FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- /* 0xA7 RCS Content Descriptor */
- { &hf_mpeg_descr_rcs_content_table_id, {
- "Table ID", "mpeg_descr.rcs_content.tid",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- /* 0xCB CI+ Content Label Descriptor */
- { &hf_mpeg_descr_ciplus_cl_cb_min, {
- "Content byte minimum value", "mpeg_descr.ciplus_content_label.content_byte_min",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ciplus_cl_cb_max, {
- "Content byte maximum value", "mpeg_descr.ciplus_content_label.content_byte_max",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ciplus_cl_lang, {
- "ISO 639 language code", "mpeg_descr.ciplus_content_label.lang_code",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ciplus_cl_label, {
- "Content label", "mpeg_descr.ciplus_content_label.label",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- /* 0xCC CI+ Service Descriptor */
- { &hf_mpeg_descr_ciplus_svc_id, {
- "Service ID", "mpeg_descr.ciplus_svc.id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ciplus_svc_type, {
- "Service type", "mpeg_descr.ciplus_svc.type",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_service_type_vals_ext, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ciplus_svc_visible, {
- "Visible Service Flag", "mpeg_descr.ciplus_svc.visible",
- FT_UINT16, BASE_HEX, NULL, 0x8000, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ciplus_svc_selectable, {
- "Selectable Service Flag", "mpeg_descr.ciplus_svc.selectable",
- FT_UINT16, BASE_HEX, NULL, 0x4000, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ciplus_svc_lcn, {
- "Logical Channel Number", "mpeg_descr.ciplus_svc.lcn",
- FT_UINT16, BASE_HEX, NULL, 0x3FFF, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ciplus_svc_prov_name, {
- "Service Provider Name", "mpeg_descr.ciplus_svc.provider_name",
- FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_descr_ciplus_svc_name, {
- "Service Name", "mpeg_descr.ciplus_svc.name",
- FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } }
- };
-
- static gint *ett[] = {
- &ett_mpeg_descriptor,
- &ett_mpeg_descriptor_extended_event_item,
- &ett_mpeg_descriptor_component_content_type,
- &ett_mpeg_descriptor_content_nibble,
- &ett_mpeg_descriptor_vbi_data_service,
- &ett_mpeg_descriptor_content_identifier_crid,
- &ett_mpeg_descriptor_service_list,
- &ett_mpeg_descriptor_ac3_component_type,
- &ett_mpeg_descriptor_linkage_population_id
- };
-
- proto_mpeg_descriptor = proto_register_protocol("MPEG2 Descriptors", "MPEG Descriptor", "mpeg_descr");
- proto_register_field_array(proto_mpeg_descriptor, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ static hf_register_info hf[] = {
+ { &hf_mpeg_descriptor_tag, {
+ "Descriptor Tag", "mpeg_descr.tag",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descriptor_tag_vals_ext, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descriptor_length, {
+ "Descriptor Length", "mpeg_descr.len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descriptor_data, {
+ "Descriptor Data", "mpeg_descr.data",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x02 Video Stream Descriptor */
+ { &hf_mpeg_descr_video_stream_multiple_frame_rate_flag, {
+ "Multiple Frame Rate Flag", "mpeg_descr.video_stream.multiple_frame_rate_flag",
+ FT_UINT8, BASE_DEC, VALS(mpeg_descr_video_stream_multiple_frame_rate_flag_vals),
+ MPEG_DESCR_VIDEO_STREAM_MULTIPLE_FRAME_RATE_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_video_stream_frame_rate_code, {
+ "Frame Rate Code", "mpeg_descr.video_stream.frame_rate_code",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_VIDEO_STREAM_FRAME_RATE_CODE_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_video_stream_mpeg1_only_flag, {
+ "MPEG1 Only Flag", "mpeg_descr.video_stream.mpeg1_only_flag",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_VIDEO_STREAM_MPEG1_ONLY_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_video_stream_constrained_parameter_flag, {
+ "Constrained Parameter Flag", "mpeg_descr.video_stream.constrained_parameter_flag",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_VIDEO_STREAM_CONSTRAINED_PARAMETER_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_video_stream_still_picture_flag, {
+ "Still Picture Flag", "mpeg_descr.video_stream.still_picture_flag",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_VIDEO_STREAM_STILL_PICTURE_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_video_stream_profile_and_level_indication, {
+ "Profile and Level Indication", "mpeg_descr.video_stream.profile_level_ind",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_video_stream_chroma_format, {
+ "Chroma Format", "mpeg_descr.video_stream.chroma_format",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_video_stream_frame_rate_extension_flag, {
+ "Frame Rate Extension Flag", "mpeg_descr.video_stream.frame_rate_extension_flag",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_VIDEO_STREAM_FRAME_RATE_EXTENSION_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_video_stream_reserved, {
+ "Reserved", "mpeg_descr.video_stream.reserved",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_VIDEO_STREAM_RESERVED_MASK, NULL, HFILL
+ } },
+
+ /* 0x03 Audio Stream Descriptor */
+ { &hf_mpeg_descr_audio_stream_free_format_flag, {
+ "Free Format Flag", "mpeg_descr.audio_stream.free_format_flag",
+ FT_UINT8, BASE_DEC, VALS(mpeg_descr_audio_stream_free_format_flag_vals), MPEG_DESCR_AUDIO_STREAM_FREE_FORMAT_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_audio_stream_id, {
+ "ID", "mpeg_descr.audio_stream.id",
+ FT_UINT8, BASE_DEC, VALS(mpeg_descr_audio_stream_id_vals), MPEG_DESCR_AUDIO_STREAM_ID_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_audio_stream_layer, {
+ "Layer", "mpeg_descr.audio_stream.layer",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AUDIO_STREAM_LAYER_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_audio_stream_variable_rate_audio_indicator, {
+ "Variable Rate Audio Indicator", "mpeg_descr.audio_stream.vbr_indicator",
+ FT_UINT8, BASE_DEC, VALS(mpeg_descr_audio_stream_variable_rate_audio_indicator_vals),
+ MPEG_DESCR_AUDIO_STREAM_VARIABLE_RATE_AUDIO_INDICATOR_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_audio_stream_reserved, {
+ "Reserved", "mpeg_descr.audio_stream.reserved",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AUDIO_STREAM_RESERVED_MASK, NULL, HFILL
+ } },
+
+ /* 0x06 Data Stream Alignment Descriptor */
+ { &hf_mpeg_descr_data_stream_alignment, {
+ "Data Stream Alignment", "mpeg_descr.data_stream_alignment.alignment",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_data_stream_alignment_vals), 0, NULL, HFILL
+ } },
+
+ /* 0x09 CA Descriptor */
+ { &hf_mpeg_descr_ca_system_id, {
+ "System ID", "mpeg_descr.ca.sys_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ca_reserved, {
+ "Reserved", "mpeg_descr.ca.reserved",
+ FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_CA_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ca_pid, {
+ "CA PID", "mpeg_descr.ca.pid",
+ FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_CA_PID_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ca_private, {
+ "Private bytes", "mpeg_descr.ca.private",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x0A ISO 639 Language Descriptor */
+ { &hf_mpeg_descr_iso639_lang, {
+ "ISO 639 Language Code", "mpeg_descr.lang.code",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_iso639_type, {
+ "ISO 639 Language Type", "mpeg_descr.lang.type",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_iso639_type_vals), 0, NULL, HFILL
+ } },
+
+ /* 0x0B System Clock Descriptor */
+ { &hf_mpeg_descr_system_clock_external_clock_reference_indicator, {
+ "External Clock Reference Indicator", "mpeg_descr.sys_clk.external_clk_ref_ind",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_SYSTEM_CLOCK_EXTERNAL_CLOCK_REFERENCE_INDICATOR_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_system_clock_reserved1, {
+ "Reserved", "mpeg_descr.sys_clk.reserved1",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_SYSTEM_CLOCK_RESERVED1_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_system_clock_accuracy_integer, {
+ "Accuracy Integer", "mpeg_descr.sys_clk.accuracy_integer",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_SYSTEM_CLOCK_ACCURACY_INTEGER_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_system_clock_accuracy_exponent, {
+ "Accuracy Exponent", "mpeg_descr.sys_clk.accuracy_exponent",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_SYSTEM_CLOCK_ACCURACY_EXPONENT_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_system_clock_reserved2, {
+ "Reserved", "mpeg_descr.sys_clk.reserved2",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_SYSTEM_CLOCK_RESERVED2_MASK, NULL, HFILL
+ } },
+
+ /* 0x0E Maximum Bitrate Descriptor */
+ { &hf_mpeg_descr_max_bitrate_reserved, {
+ "Maximum Bitrate Reserved", "mpeg_descr.max_bitrate.reserved",
+ FT_UINT24, BASE_HEX, NULL, MPEG_DESCR_MAX_BITRATE_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_max_bitrate, {
+ "Maximum Bitrate", "mpeg_descr.max_bitrate.rate",
+ FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_MAX_BITRATE_MASK, NULL, HFILL
+ } },
+
+ /* 0x10 Smoothing Buffer Descriptor */
+ { &hf_mpeg_descr_smoothing_buffer_reserved1, {
+ "Reserved", "mpeg_descr.smoothing_buf.reserved1",
+ FT_UINT24, BASE_HEX, NULL, MPEG_DESCR_SMOOTHING_BUFFER_RESERVED1_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_smoothing_buffer_leak_rate, {
+ "Leak Rate", "mpeg_descr.smoothing_buf.leak_rate",
+ FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_SMOOTHING_BUFFER_LEAK_RATE_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_smoothing_buffer_reserved2, {
+ "Reserved", "mpeg_descr.smoothing_buf.reserved2",
+ FT_UINT24, BASE_HEX, NULL, MPEG_DESCR_SMOOTHING_BUFFER_RESERVED2_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_smoothing_buffer_size, {
+ "Buffer Size", "mpeg_descr.smoothing_buf.size",
+ FT_UINT24, BASE_DEC, NULL, MPEG_DESCR_SMOOTHING_BUFFER_SIZE_MASK, NULL, HFILL
+ } },
+
+ /* 0x11 STD Descriptor */
+ { &hf_mpeg_descr_std_reserved, {
+ "Reserved", "mpeg_descr.std.reserved",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_STD_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_std_leak_valid, {
+ "Leak Valid", "mpeg_descr.std.leak_valid",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_STD_LEAK_VALID_MASK, NULL, HFILL
+ } },
+
+ /* 0x13 Carousel Identifier Descriptor */
+ { &hf_mpeg_descr_carousel_identifier_id, {
+ "Carousel ID", "mpeg_descr.carousel_identifier.id",
+ FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_carousel_identifier_format_id, {
+ "Format ID", "mpeg_descr.carousel_identifier.format_id",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_carousel_identifier_format_id_vals), 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_carousel_identifier_module_version, {
+ "Module Version", "mpeg_descr.carousel_identifier.module_version",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_carousel_identifier_module_id, {
+ "Module ID", "mpeg_descr.carousel_identifier.module_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_carousel_identifier_block_size, {
+ "Block Size", "mpeg_descr.carousel_identifier.block_size",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_carousel_identifier_module_size, {
+ "Module Size", "mpeg_descr.carousel_identifier.module_size",
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_carousel_identifier_compression_method, {
+ "Compression Method", "mpeg_descr.carousel_identifier.comp_method",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_carousel_identifier_original_size, {
+ "Original Size", "mpeg_descr.carousel_identifier.orig_size",
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_carousel_identifier_timeout, {
+ "Timeout", "mpeg_descr.carousel_identifier.timeout",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_carousel_identifier_object_key_len, {
+ "Object Key Length", "mpeg_descr.carousel_identifier.key_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_carousel_identifier_object_key_data, {
+ "Object Key Data", "mpeg_descr.carousel_identifier.key_data",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_carousel_identifier_private, {
+ "Private Bytes", "mpeg_descr.carousel_identifier.private",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x14 Association Tag Descriptor */
+ { &hf_mpeg_descr_association_tag, {
+ "Association Tag", "mpeg_descr.assoc_tag.tag",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_association_tag_use, {
+ "Use", "mpeg_descr.assoc_tag.use",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_association_tag_selector_len, {
+ "Selector Length", "mpeg_descr.assoc_tag.selector_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_association_tag_transaction_id, {
+ "Transaction ID", "mpeg_descr.assoc_tag.transaction_id",
+ FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_association_tag_timeout, {
+ "Timeout", "mpeg_descr.assoc_tag.timeout",
+ FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_association_tag_selector_bytes, {
+ "Selector Bytes", "mpeg_descr.assoc_tag.selector_bytes",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_association_tag_private_bytes, {
+ "Private Bytes", "mpeg_descr.assoc_tag.private_bytes",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x28 AVC Video Descriptor */
+ { &hf_mpeg_descr_avc_vid_profile_idc, {
+ "Profile IDC", "mpeg_descr.avc_vid.profile_idc",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_avc_vid_constraint_set0_flag, {
+ "Constraint Set0 Flag", "mpeg_descr.avc_vid.contraint_set0",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_CONSTRAINT_SET0_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_avc_vid_constraint_set1_flag, {
+ "Constraint Set1 Flag", "mpeg_descr.avc_vid.contraint_set1",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_CONSTRAINT_SET1_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_avc_vid_constraint_set2_flag, {
+ "Constraint Set2 Flag", "mpeg_descr.avc_vid.contraint_set2",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_CONSTRAINT_SET2_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_avc_vid_compatible_flags, {
+ "Constraint Compatible Flags", "mpeg_descr.avc_vid.compatible_flags",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AVC_VID_COMPATIBLE_FLAGS_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_avc_vid_level_idc, {
+ "Level IDC", "mpeg_descr.avc_vid.level_idc",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_avc_vid_still_present, {
+ "AVC Still Present", "mpeg_descr.avc_vid.still_present",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_STILL_PRESENT_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_avc_vid_24h_picture_flag, {
+ "AVC 24 Hour Picture Flag", "mpeg_descr.avc_vid.24h_picture_flag",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_AVC_VID_24H_PICTURE_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_avc_vid_reserved, {
+ "Reserved", "mpeg_descr.avc_vid.reserved",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AVC_VID_RESERVED_MASK, NULL, HFILL
+ } },
+
+ /* 0x40 Network Name Descriptor */
+ { &hf_mpeg_descr_network_name_descriptor, {
+ "Network Name", "mpeg_descr.net_name.name",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x41 Service List Descriptor */
+ { &hf_mpeg_descr_service_list_id, {
+ "Service ID", "mpeg_descr.svc_list.id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_service_list_type, {
+ "Service Type", "mpeg_descr.svc_list.type",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_service_type_vals_ext, 0, NULL, HFILL
+ } },
+
+ /* 0x42 Stuffing Descriptor */
+ { &hf_mpeg_descr_stuffing, {
+ "Stuffing", "mpeg_descr.stuffing",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x43 Satellite Delivery System Descriptor */
+ { &hf_mpeg_descr_satellite_delivery_frequency, {
+ "Frequency", "mpeg_descr.sat_delivery.freq",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_satellite_delivery_orbital_position, {
+ "Orbital Position", "mpeg_descr.sat_delivery.orbital_pos",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_satellite_delivery_west_east_flag, {
+ "West East Flag", "mpeg_descr.sat_delivery.west_east_flag",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_west_east_flag_vals),
+ MPEG_DESCR_SATELLITE_DELIVERY_WEST_EAST_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_satellite_delivery_polarization, {
+ "Polarization", "mpeg_descr.sat_delivery.polarization",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_polarization_vals),
+ MPEG_DESCR_SATELLITE_DELIVERY_POLARIZATION_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_satellite_delivery_roll_off, {
+ "Roll Off", "mpeg_descr.sat_delivery.roll_off",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_roll_off_vals),
+ MPEG_DESCR_SATELLITE_DELIVERY_ROLL_OFF_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_satellite_delivery_zero, {
+ "Zero", "mpeg_descr.sat_delivery.zero",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_SATELLITE_DELIVERY_ZERO_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_satellite_delivery_modulation_system, {
+ "Modulation System", "mpeg_descr.sat_delivery.modulation_system",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_modulation_system_vals),
+ MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_SYSTEM_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_satellite_delivery_modulation_type, {
+ "Modulation Type", "mpeg_descr.sat_delivery.modulation_type",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_satellite_delivery_modulation_type_vals),
+ MPEG_DESCR_SATELLITE_DELIVERY_MODULATION_TYPE_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_satellite_delivery_symbol_rate, {
+ "Symbol Rate", "mpeg_descr.sat_delivery.symbol_rate",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_satellite_delivery_fec_inner, {
+ "FEC Inner", "mpeg_descr.sat_delivery.fec_inner",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_satellite_delivery_fec_inner_vals_ext,
+ MPEG_DESCR_SATELLITE_DELIVERY_FEC_INNER_MASK, NULL, HFILL
+ } },
+
+ /* 0x44 Cable Delivery System Descriptor */
+ { &hf_mpeg_descr_cable_delivery_frequency, {
+ "Frequency", "mpeg_descr.cable_delivery.freq",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_cable_delivery_reserved, {
+ "Reserved", "mpeg_descr.cable_delivery.reserved",
+ FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_CABLE_DELIVERY_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_cable_delivery_fec_outer, {
+ "FEC Outer", "mpeg_descr.cable_delivery.fec_outer",
+ FT_UINT16, BASE_HEX, VALS(mpeg_descr_cable_delivery_fec_outer_vals),
+ MPEG_DESCR_CABLE_DELIVERY_FEC_OUTER_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_cable_delivery_modulation, {
+ "Modulation", "mpeg_descr.cable_delivery.modulation",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_cable_delivery_modulation_vals), 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_cable_delivery_symbol_rate, {
+ "Symbol Rate", "mpeg_descr.cable_delivery.sym_rate",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_cable_delivery_fec_inner, {
+ "FEC Inner", "mpeg_descr.cable_delivery.fec_inner",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_cable_delivery_fec_inner_vals_ext,
+ MPEG_DESCR_CABLE_DELIVERY_FEC_INNER_MASK, NULL, HFILL
+ } },
+
+ /* 0x45 VBI Data Descriptor */
+ { &hf_mpeg_descr_vbi_data_service_id, {
+ "Data Service ID", "mpeg_descr.vbi_data.svc_id",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_vbi_data_service_id_vals), 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_vbi_data_descr_len, {
+ "Data Descriptor Length", "mpeg_descr.vbi_data.decr_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_vbi_data_reserved1, {
+ "Reserved", "mpeg_descr.vbi_data.reserved1",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_VBI_DATA_RESERVED1_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_vbi_data_field_parity, {
+ "Field Parity", "mpeg_descr.vbi_data.field_parity",
+ FT_UINT8, BASE_DEC, VALS(mpeg_descr_vbi_data_field_parity_vals),
+ MPEG_DESCR_VBI_DATA_FIELD_PARITY_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_vbi_data_line_offset, {
+ "Line offset", "mpeg_descr.vbi_data.line_offset",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_vbi_data_reserved2, {
+ "Reserved", "mpeg_descr.vbi_data.reserved2",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x47 Bouquet Name Descriptor */
+ { &hf_mpeg_descr_bouquet_name, {
+ "Bouquet Name Descriptor", "mpeg_descr.bouquet_name.name",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x48 Service Descriptor */
+ { &hf_mpeg_descr_service_type, {
+ "Service Type", "mpeg_descr.svc.type",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_service_type_vals_ext, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_service_provider_name_length, {
+ "Provider Name Length", "mpeg_descr.svc.provider_name_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_service_provider, {
+ "Service Provider Name", "mpeg_descr.svc.provider_name",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_service_name_length, {
+ "Service Name Length", "mpeg_descr.svc.svc_name_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_service_name, {
+ "Service Name", "mpeg_descr.svc.svc_name",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x4A Linkage Descriptor */
+ { &hf_mpeg_descr_linkage_transport_stream_id, {
+ "Transport Stream ID", "mpeg_descr.linkage.tsid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_original_network_id, {
+ "Original Network ID", "mpeg_descr.linkage.original_nid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_service_id, {
+ "Service ID", "mpeg_descr.linkage.svc_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_linkage_type, {
+ "Linkage Type", "mpeg_descr.linkage.type",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_linkage_linkage_type_vals_ext, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_hand_over_type, {
+ "Hand-Over Type", "mpeg_descr.linkage.hand_over_type",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LINKAGE_HAND_OVER_TYPE_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_reserved1, {
+ "Reserved", "mpeg_descr.linkage.reserved1",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LINKAGE_RESERVED1_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_origin_type, {
+ "Origin Type", "mpeg_descr.linkage.origin_type",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_linkage_origin_type_vals), 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_network_id, {
+ "Network ID", "mpeg_descr.linkage.network_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_initial_service_id, {
+ "Initial Service ID", "mpeg_descr.linkage.initial_svc_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_target_event_id, {
+ "Target Event ID", "mpeg_descr.linkage.target_evt_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_target_listed, {
+ "Target Listed", "mpeg_descr.linkage.target_listed",
+ FT_UINT8, BASE_DEC, VALS(mpeg_descr_linkage_target_listed_vals),
+ MPEG_DESCR_LINKAGE_TARGET_LISTED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_event_simulcast, {
+ "Event Simulcast", "mpeg_descr.linkage.evt_simulcast",
+ FT_UINT8, BASE_DEC, VALS(mpeg_descr_linkage_event_simulcast_vals),
+ MPEG_DESCR_LINKAGE_EVENT_SIMULCAST_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_reserved2, {
+ "Reserved", "mpeg_descr.linkage.reserved2",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LINKAGE_RESERVED2_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_private_data_byte, {
+ "Private Data", "mpeg_descr.linkage.private_data",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_interactive_network_id, {
+ "Interactive Network ID", "mpeg_descr.interactive_network_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_population_id_loop_count, {
+ "Population ID loop count", "mpeg_descr.population_id_loop_count",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_population_id, {
+ "Population ID", "mpeg_descr.population_id",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_population_id_base, {
+ "Population ID Base", "mpeg_descr.population_id_base",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_linkage_population_id_mask, {
+ "Population ID Mask", "mpeg_descr.population_id_mask",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x4D Short Event Descriptor */
+ { &hf_mpeg_descr_short_event_lang_code, {
+ "Language Code", "mpeg_descr.short_evt.lang_code",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_short_event_name_length, {
+ "Event Name Length", "mpeg_descr.short_evt.name_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_short_event_name, {
+ "Event Name", "mpeg_descr.short_evt.name",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_short_event_text_length, {
+ "Event Text Length", "mpeg_descr.short_evt.txt_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_short_event_text, {
+ "Event Text", "mpeg_descr.short_evt.txt",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x4E Extended Event Descriptor */
+ { &hf_mpeg_descr_extended_event_descriptor_number, {
+ "Descriptor Number", "mpeg_descr.ext_evt.descr_num",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_EXTENDED_EVENT_DESCRIPTOR_NUMBER_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extended_event_last_descriptor_number, {
+ "Last Descriptor Number", "mpeg_descr.ext_evt.last_descr_num",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_EXTENDED_EVENT_LAST_DESCRIPTOR_NUMBER_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extended_event_lang_code, {
+ "Language Code", "mpeg_descr.ext_evt.lang_code",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extended_event_length_of_items, {
+ "Length of items", "mpeg_descr.ext_evt.items_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extended_event_item_description_length, {
+ "Item Description Length", "mpeg_descr.ext_evt.item_descr_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extended_event_item_description_char, {
+ "Item Description", "mpeg_descr.ext_evt.item_descr",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extended_event_item_length, {
+ "Item Length", "mpeg_descr.ext_evt.item_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extended_event_item_char, {
+ "Item", "mpeg_descr.ext_evt.item",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extended_event_text_length, {
+ "Text Length", "mpeg_descr.ext_evt.txt_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extended_event_text_char, {
+ "Text", "mpeg_descr.ext_evt.txt",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x50 Component Descriptor */
+ { &hf_mpeg_descr_component_reserved, {
+ "Reserved", "mpeg_descr.component.reserved",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_COMPONENT_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_component_stream_content, {
+ "Stream Content", "mpeg_descr.component.stream_content",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_component_stream_content_vals),
+ MPEG_DESCR_COMPONENT_STREAM_CONTENT_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_component_type, {
+ "Component Type", "mpeg_descr.component.type",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_component_content_type, {
+ "Stream Content and Component Type", "mpeg_descr.component.content_type",
+ FT_UINT16, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_component_content_type_vals_ext,
+ MPEG_DESCR_COMPONENT_CONTENT_TYPE_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_component_tag, {
+ "Component Tag", "mpeg_descr.component.tag",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_component_lang_code, {
+ "Language Code", "mpeg_descr.component.lang_code",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_component_text, {
+ "Text", "mpeg_descr.component.text",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x52 Stream Identifier Descriptor */
+ { &hf_mpeg_descr_stream_identifier_component_tag, {
+ "Component Tag", "mpeg_descr.stream_id.component_tag",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x53 CA Identifier Descriptor */
+ { &hf_mpeg_descr_ca_identifier_system_id, {
+ "CA System ID", "mpeg_descr.ca_id.sys_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x54 Content Descriptor */
+ { &hf_mpeg_descr_content_nibble, {
+ "Nibble Level 1 and 2", "mpeg_descr.content.nibble_1_2",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_content_nibble_vals_ext, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_content_nibble_level_1, {
+ "Nibble Level 1", "mpeg_descr.content.nibble_lvl_1",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_content_nibble_level_1_vals_ext,
+ MPEG_DESCR_CONTENT_NIBBLE_LEVEL_1_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_content_nibble_level_2, {
+ "Nibble Level 2", "mpeg_descr.content.nibble_lvl_2",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_CONTENT_NIBBLE_LEVEL_2_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_content_user_byte, {
+ "User Byte", "mpeg_descr.content.user",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x56 Teletext Descriptor */
+ { &hf_mpeg_descr_teletext_lang_code, {
+ "Language Code", "mpeg_descr.teletext.lang_code",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_teletext_type, {
+ "Teletext Type", "mpeg_descr.teletext.type",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_teletext_type_vals),
+ MPEG_DESCR_TELETEXT_TYPE_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_teletext_magazine_number, {
+ "Magazine Number", "mpeg_descr.teletext.magazine_num",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_TELETEXT_MAGAZINE_NUMBER_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_teletext_page_number, {
+ "Page Number", "mpeg_descr.teletext.page_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x55 Parental Rating Descriptor */
+ { &hf_mpeg_descr_parental_rating_country_code, {
+ "Country Code", "mpeg_descr.parental_rating.country_code",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_parental_rating_rating, {
+ "Rating", "mpeg_descr.parental_rating.rating",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_parental_rating_vals_ext, 0, NULL, HFILL
+ } },
+
+ /* 0x58 Local Time Offset Descriptor */
+ { &hf_mpeg_descr_local_time_offset_country_code, {
+ "Country Code", "mpeg_descr.local_time_offset.country_code",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_local_time_offset_region_id, {
+ "Region ID", "mpeg_descr.local_time_offset.region_id",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOCAL_TIME_OFFSET_COUNTRY_REGION_ID_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_local_time_offset_reserved, {
+ "Reserved", "mpeg_descr.local_time_offset.reserved",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOCAL_TIME_OFFSET_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_local_time_offset_polarity, {
+ "Time Offset Polarity", "mpeg_descr.local_time_offset.polarity",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_local_time_offset_polarity_vals),
+ MPEG_DESCR_LOCAL_TIME_OFFSET_POLARITY, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_local_time_offset_offset, {
+ "Time Offset", "mpeg_descr.local_time_offset.offset",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_local_time_offset_time_of_change, {
+ "Time of Change", "mpeg_descr.local_time_offset.time_of_change",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_local_time_offset_next_time_offset, {
+ "Next Time Offset", "mpeg_descr.local_time_offset.next_time_offset",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x59 Subtitling Descriptor */
+ { &hf_mpeg_descr_subtitling_lang_code, {
+ "Language Code", "mpeg_descr.subtitling.lang_code",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_subtitling_type, {
+ "Subtitling Type", "mpeg_descr.subtitling.type",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_subtitling_type_vals_ext, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_subtitling_composition_page_id, {
+ "Composition Page ID", "mpeg_descr.subtitling.composition_page_id",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_subtitling_ancillary_page_id, {
+ "Ancillary Page ID", "mpeg_descr.subtitling.ancillary_page_id",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x5A Terrestrial Delivery System Descriptor */
+ { &hf_mpeg_descr_terrestrial_delivery_centre_frequency, {
+ "Centre Frequency", "mpeg_descr.terr_delivery.centre_freq",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_bandwidth, {
+ "Bandwidth", "mpeg_descr.terr_delivery.bandwidth",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_bandwidth_vals),
+ MPEG_DESCR_TERRESTRIAL_DELIVERY_BANDWIDTH_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_priority, {
+ "Priority", "mpeg_descr.terr_delivery.priority",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_priority_vals),
+ MPEG_DESCR_TERRESTRIAL_DELIVERY_PRIORITY_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_time_slicing_indicator, {
+ "Time Slicing Indicator", "mpeg_descr.terr_delivery.time_slicing_ind",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_time_slicing_indicator_vals),
+ MPEG_DESCR_TERRESTRIAL_DELIVERY_TIME_SLICING_INDICATOR_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_mpe_fec_indicator, {
+ "MPE-FEC Indicator", "mpeg_descr.terr_delivery.mpe_fec_ind",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_mpe_fec_indicator_vals),
+ MPEG_DESCR_TERRESTRIAL_DELIVERY_MPE_FEC_INDICATOR_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_reserved1, {
+ "Reserved", "mpeg_descr.terr_delivery.reserved1",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_TERRESTRIAL_DELIVERY_RESERVED1_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_constellation, {
+ "Constellation", "mpeg_descr.terr_delivery.constellation",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_constellation_vals),
+ MPEG_DESCR_TERRESTRIAL_DELIVERY_CONSTELLATION_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_hierarchy_information, {
+ "Hierarchy Information", "mpeg_descr.terr_delivery.hierarchy_information",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_hierarchy_information_vals),
+ MPEG_DESCR_TERRESTRIAL_DELIVERY_HIERARCHY_INFORMATION_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_code_rate_hp_stream, {
+ "Code Rate High Priority Stream", "mpeg_descr.terr_delivery.code_rate_hp_stream",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_code_rate_vals),
+ MPEG_DESCR_TERRESTRIAL_DELIVERY_CODE_RATE_HP_STREAM_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_code_rate_lp_stream, {
+ "Code Rate Low Priority Stream", "mpeg_descr.terr_delivery.code_rate_lp_stream",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_code_rate_vals),
+ MPEG_DESCR_TERRESTRIAL_DELIVERY_CODE_RATE_LP_STREAM_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_guard_interval, {
+ "Guard Interval", "mpeg_descr.terr_delivery.guard_interval",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_guard_interval_vals),
+ MPEG_DESCR_TERRESTRIAL_DELIVERY_GUARD_INTERVAL_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_transmission_mode, {
+ "Transmission Mode", "mpeg_descr.terr_delivery.transmission_mode",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_transmission_mode_vals),
+ MPEG_DESCR_TERRESTRIAL_DELIVERY_TRANSMISSION_MODE_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_other_frequency_flag, {
+ "Other Frequency Flag", "mpeg_descr.terr_delivery.other_freq_flag",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_terrestrial_delivery_other_frequency_flag_vals),
+ MPEG_DESCR_TERRESTRIAL_DELIVERY_OTHER_FREQUENCY_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_terrestrial_delivery_reserved2, {
+ "Reserved", "mpeg_descr.terr_delivery.reserved2",
+ FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+
+ /* 0x5F Private Data Specifier */
+ { &hf_mpeg_descr_private_data_specifier_id, {
+ "Private Data Specifier", "mpeg_descr.private_data_specifier.id",
+ FT_UINT32, BASE_HEX, VALS(mpeg_descr_data_specifier_id_vals), 0, NULL, HFILL
+ } },
+
+ /* 0x64 Data Broadcast Descriptor */
+ { &hf_mpeg_descr_data_bcast_bcast_id, {
+ "Data Broadcast ID", "mpeg_descr.data_bcast.id",
+ FT_UINT16, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_data_bcast_id_vals_ext, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_data_bcast_component_tag, {
+ "Component Tag", "mpeg_descr.data_bcast.component_tag",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_data_bcast_selector_len, {
+ "Selector Length", "mpeg_descr.data_bcast.selector_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_data_bcast_selector_bytes, {
+ "Selector Bytes", "mpeg_descr.data_bcast.selector_bytes",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_data_bcast_lang_code, {
+ "Language Code", "mpeg_descr.data_bcast.lang_code",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_data_bcast_text_len, {
+ "Text Length", "mpeg_descr.data_bcast.text_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_data_bcast_text, {
+ "Text", "mpeg_descr.data_bcast.text",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x66 Data Broadcast ID Descriptor */
+ { &hf_mpeg_descr_data_bcast_id_bcast_id, {
+ "Data Broadcast ID", "mpeg_descr.data_bcast_id.id",
+ FT_UINT16, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_data_bcast_id_vals_ext, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_data_bcast_id_id_selector_bytes, {
+ "ID Selector Bytes", "mpeg_descr.data_bcast_id.id_selector_bytes",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x6A AC-3 Descriptor */
+ { &hf_mpeg_descr_ac3_component_type_flag, {
+ "Component Type Flag", "mpeg_descr.ac3.component_type_flag",
+ FT_UINT8, BASE_DEC, VALS(mpeg_descr_ac3_component_type_flag_vals),
+ MPEG_DESCR_AC3_COMPONENT_TYPE_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ac3_bsid_flag, {
+ "BSID Flag", "mpeg_descr.ac3.bsid_flag",
+ FT_UINT8, BASE_DEC, VALS(mpeg_descr_ac3_bsid_flag_vals),
+ MPEG_DESCR_AC3_BSID_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ac3_mainid_flag, {
+ "Main ID Flag", "mpeg_descr.ac3_main_id_flag",
+ FT_UINT8, BASE_DEC, VALS(mpeg_descr_ac3_mainid_flag_vals),
+ MPEG_DESCR_AC3_MAINID_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ac3_asvc_flag, {
+ "ASVC Flag", "mpeg_descr.ac3.asvc_flag",
+ FT_UINT8, BASE_DEC, VALS(mpeg_descr_ac3_asvc_flag_vals),
+ MPEG_DESCR_AC3_ASVC_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ac3_reserved, {
+ "Reserved", "mpeg_descr.ac3.reserved",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AC3_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ac3_component_type_reserved_flag, {
+ "Type Reserved Flag", "mpeg_descr.ac3.component_type.reserved_flag",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_AC3_COMPONENT_TYPE_RESERVED_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ac3_component_type_full_service_flag, {
+ "Full Service Flag", "mpeg_descr.ac3.component_type.full_service_flag",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_component_type_full_service_flag_vals),
+ MPEG_DESCR_AC3_COMPONENT_TYPE_FULL_SERVICE_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ac3_component_type_service_type_flags, {
+ "Service Type Flags", "mpeg_descr.ac3.component_type.service_type_flags",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_component_type_service_type_flags_vals),
+ MPEG_DESCR_AC3_COMPONENT_TYPE_SERVICE_TYPE_FLAGS_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ac3_component_type_number_of_channels_flags, {
+ "Number of Channels Flags", "mpeg_descr.ac3.component_type.number_chan_flags",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_ac3_component_type_number_of_channels_flags_vals),
+ MPEG_DESCR_AC3_COMPONENT_TYPE_NUMBER_OF_CHANNELS_FLAGS, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ac3_bsid, {
+ "BSID", "mpeg_descr.ac3.bsid",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ac3_mainid, {
+ "Main ID", "mpeg_descr.ac3.mainid",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ac3_asvc, {
+ "ASVC", "mpeg_descr.ac3.asvc",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ac3_additional_info, {
+ "Additional Info", "mpeg_descr.ac3.additional_info",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x6F Application Signalling Descriptor */
+ { &hf_mpeg_descr_app_sig_app_type, {
+ "Application type", "mpeg_descr.app_sig.app_type",
+ FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_app_sig_ait_ver, {
+ "AIT version", "mpeg_descr.app_sig.ait_ver",
+ FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL
+ } },
+
+ /* 0x73 Default Authority Descriptor */
+ { &hf_mpeg_descr_default_authority_name, {
+ "Default Authority Name", "mpeg_descr.default_authority.name",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x77 Content Identifier Descriptor */
+ { &hf_mpeg_descr_content_identifier_crid_type, {
+ "CRID Type", "mpeg_descr.content_identifier.crid_type",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_content_identifier_crid_type_vals),
+ MPEG_DESCR_CONTENT_IDENTIFIER_CRID_TYPE_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_content_identifier_crid_location, {
+ "CRID Location", "mpeg_descr.content_identifier.crid_location",
+ FT_UINT8, BASE_HEX, VALS(mpeg_descr_content_identifier_crid_location_vals),
+ MPEG_DESCR_CONTENT_IDENTIFIER_CRID_LOCATION_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_content_identifier_crid_length, {
+ "CRID Length", "mpeg_descr.content_identifier.crid_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_content_identifier_crid_bytes, {
+ "CRID Bytes", "mpeg_descr.content_identifier.crid_bytes",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_content_identifier_cird_ref, {
+ "CRID Reference", "mpeg_descr.content_identifier.crid_ref",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0x7F Extension Descriptor */
+ { &hf_mpeg_descr_extension_tag_extension, {
+ "Descriptor Tag Extension", "mpeg_descr.ext.tag",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_extension_tag_extension_vals_ext, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extension_data, {
+ "Descriptor Extension Data", "mpeg_descr.ext.data",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* Supplementary Audio Descriptor (part of Extension Descriptor) */
+ { &hf_mpeg_descr_extension_supp_audio_mix_type, {
+ "Mix type", "mpeg_descr.ext.supp_audio.mix_type",
+ FT_UINT8, BASE_HEX, VALS(supp_audio_mix_type_vals), 0x80, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extension_supp_audio_ed_cla, {
+ "Editorial classification", "mpeg_descr.ext.supp_audio.ed_cla",
+ FT_UINT8, BASE_HEX, VALS(supp_audio_ed_cla), 0x7C, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extension_supp_audio_lang_code_present, {
+ "Language code present", "mpeg_descr.ext.supp_audio.lang_code_present",
+ FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_extension_supp_audio_lang_code, {
+ "ISO 639 language code", "mpeg_descr.ext.supp_audio.lang_code",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0xA2 Logon Initialize Descriptor */
+ { &hf_mpeg_descr_logon_initialize_group_id, {
+ "Group ID", "mpeg_descr.logon_init.group_id",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_logon_id, {
+ "Logon ID", "mpeg_descr.logon_init.logon_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_continuous_carrier_reserved, {
+ "Continuous Carrier Reserved", "mpeg_descr.logon_init.continuous_carrier_reserved",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_CONTINUOUS_CARRIER_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_continuous_carrier, {
+ "Continuous Carrier", "mpeg_descr.logon_init.continuous_carrier",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_CONTINUOUS_CARRIER_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_security_handshake_required, {
+ "Security Handshake Required", "mpeg_descr.logon_init.security_handshake_required",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_SECURITY_HANDSHAKE_REQUIRED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_prefix_flag, {
+ "Prefix Flag", "mpeg_descr.logon_init.prefix_flag",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_PREFIX_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_data_unit_labelling_flag, {
+ "Unit Labelling Flag", "mpeg_descr.logon_init.data_unit_labelling_flag",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_DATA_UNIT_LABELLING_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_mini_slot_flag, {
+ "Mini Slot Flag", "mpeg_descr.logon_init.mini_slot_flag",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_MINI_SLOT_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_contention_based_mini_slot_flag, {
+ "Contention Based Mini Slot Flag", "mpeg_descr.logon_init.contention_based_mini_slot_flag",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_CONTENTION_BASED_MINI_SLOT_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_capacity_type_flag_reserved, {
+ "Capacity Type Flag Reserved", "mpeg_descr.logon_init.capactity_type_flag_reserved",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_capacity_type_flag, {
+ "Capacity Type Flag", "mpeg_descr.logon_init.capactity_type_flag",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_CAPACITY_TYPE_FLAG_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_traffic_burst_type, {
+ "Traffic Burst Type", "mpeg_descr.logon_init.traffic_burst_type",
+ FT_UINT8, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_TRAFFIC_BURST_TYPE_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_return_trf_pid, {
+ "Return TRF PID", "mpeg_descr.logon_init.return_trf_pid",
+ FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_TRF_PID_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid_reserved, {
+ "Return CTRL MNGM PID Reserved", "mpeg_descr.logon_init.return_mngm_pid_reserved",
+ FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_CTRL_MNGM_PID_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_return_ctrl_mngm_pid, {
+ "Return CTRL MNGM PID", "mpeg_descr.logon_init.return_mngm_pid",
+ FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_CTRL_MNGM_PID_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_connectivity, {
+ "Connectivity", "mpeg_descr.logon_init.connectivity",
+ FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_CONNECTIVITY_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_return_vpi_reserved, {
+ "Return VPI Reserved", "mpeg_descr.logon_init.return_vpi_reserved",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_VPI_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_return_vpi, {
+ "Return VPI", "mpeg_descr.logon_init.return_vpi",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_VPI_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_return_vci, {
+ "Return VCI", "mpeg_descr.logon_init.return_vci",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_return_signalling_vpi_reserved, {
+ "Return Signalling VPI Reserved", "mpeg_descr.logon_init.return_signalling_vpi_reserved",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_return_signalling_vpi, {
+ "Return Signalling VPI", "mpeg_descr.logon_init.return_signalling_vpi",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_return_signalling_vci, {
+ "Return Signalling VCI", "mpeg_descr.logon_init.return_signalling_vci",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_forward_signalling_vpi_reserved, {
+ "Forward Signalling VPI Reserved", "mpeg_descr.logon_init.forward_signalling_vpi_reserved",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_forward_signalling_vpi, {
+ "Forward Signalling VPI", "mpeg_descr.logon_init.forward_signalling_vpi",
+ FT_UINT8, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_RETURN_SIGNALLING_VPI_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_forward_signalling_vci, {
+ "Forward Signalling VCI", "mpeg_descr.logon_init.forward_signalling_vci",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_cra_level, {
+ "CRA Level", "mpeg_descr.logon_init.cra_level",
+ FT_UINT24, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_vbdc_max_reserved, {
+ "VDBC Max Reserved", "mpeg_descr.logon_init.vdbc_max_reserved",
+ FT_UINT16, BASE_HEX, NULL, MPEG_DESCR_LOGON_INITIALIZE_VDBC_MAX_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_vbdc_max, {
+ "VDBC Max", "mpeg_descr.logon_init.vdbc_max",
+ FT_UINT16, BASE_DEC, NULL, MPEG_DESCR_LOGON_INITIALIZE_VDBC_MAX_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_rbdc_max, {
+ "RDBC Max", "mpeg_descr.logon_init.rdbc_max",
+ FT_UINT24, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_logon_initialize_rbdc_timeout, {
+ "RDBC Timeout", "mpeg_descr.logon_init.rdbc_timeout",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0xA7 RCS Content Descriptor */
+ { &hf_mpeg_descr_rcs_content_table_id, {
+ "Table ID", "mpeg_descr.rcs_content.tid",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0xCB CI+ Content Label Descriptor */
+ { &hf_mpeg_descr_ciplus_cl_cb_min, {
+ "Content byte minimum value", "mpeg_descr.ciplus_content_label.content_byte_min",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ciplus_cl_cb_max, {
+ "Content byte maximum value", "mpeg_descr.ciplus_content_label.content_byte_max",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ciplus_cl_lang, {
+ "ISO 639 language code", "mpeg_descr.ciplus_content_label.lang_code",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ciplus_cl_label, {
+ "Content label", "mpeg_descr.ciplus_content_label.label",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ /* 0xCC CI+ Service Descriptor */
+ { &hf_mpeg_descr_ciplus_svc_id, {
+ "Service ID", "mpeg_descr.ciplus_svc.id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ciplus_svc_type, {
+ "Service type", "mpeg_descr.ciplus_svc.type",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_descr_service_type_vals_ext, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ciplus_svc_visible, {
+ "Visible Service Flag", "mpeg_descr.ciplus_svc.visible",
+ FT_UINT16, BASE_HEX, NULL, 0x8000, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ciplus_svc_selectable, {
+ "Selectable Service Flag", "mpeg_descr.ciplus_svc.selectable",
+ FT_UINT16, BASE_HEX, NULL, 0x4000, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ciplus_svc_lcn, {
+ "Logical Channel Number", "mpeg_descr.ciplus_svc.lcn",
+ FT_UINT16, BASE_HEX, NULL, 0x3FFF, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ciplus_svc_prov_name, {
+ "Service Provider Name", "mpeg_descr.ciplus_svc.provider_name",
+ FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_descr_ciplus_svc_name, {
+ "Service Name", "mpeg_descr.ciplus_svc.name",
+ FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } }
+ };
+
+ static gint *ett[] = {
+ &ett_mpeg_descriptor,
+ &ett_mpeg_descriptor_extended_event_item,
+ &ett_mpeg_descriptor_component_content_type,
+ &ett_mpeg_descriptor_content_nibble,
+ &ett_mpeg_descriptor_vbi_data_service,
+ &ett_mpeg_descriptor_content_identifier_crid,
+ &ett_mpeg_descriptor_service_list,
+ &ett_mpeg_descriptor_ac3_component_type,
+ &ett_mpeg_descriptor_linkage_population_id
+ };
+
+ proto_mpeg_descriptor = proto_register_protocol("MPEG2 Descriptors", "MPEG Descriptor", "mpeg_descr");
+ proto_register_field_array(proto_mpeg_descriptor, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
+
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/
diff --git a/epan/dissectors/packet-mpeg-dsmcc.c b/epan/dissectors/packet-mpeg-dsmcc.c
index 4a86c7746e..dc275dc51e 100644
--- a/epan/dissectors/packet-mpeg-dsmcc.c
+++ b/epan/dissectors/packet-mpeg-dsmcc.c
@@ -165,897 +165,897 @@ static gint ett_dsmcc_compat = -1;
static gint ett_dsmcc_compat_sub_desc = -1;
static gint ett_dsmcc_dii_module = -1;
-#define DSMCC_TID_LLCSNAP 0x3a
-#define DSMCC_TID_UN_MSG 0x3b
-#define DSMCC_TID_DD_MSG 0x3c
-#define DSMCC_TID_DESC_LIST 0x3d
-#define DSMCC_TID_PRIVATE 0x3e
+#define DSMCC_TID_LLCSNAP 0x3a
+#define DSMCC_TID_UN_MSG 0x3b
+#define DSMCC_TID_DD_MSG 0x3c
+#define DSMCC_TID_DESC_LIST 0x3d
+#define DSMCC_TID_PRIVATE 0x3e
-#define DSMCC_SSI_MASK 0x8000
-#define DSMCC_PRIVATE_MASK 0x4000
-#define DSMCC_RESERVED_MASK 0x3000
-#define DSMCC_LENGTH_MASK 0x0fff
+#define DSMCC_SSI_MASK 0x8000
+#define DSMCC_PRIVATE_MASK 0x4000
+#define DSMCC_RESERVED_MASK 0x3000
+#define DSMCC_LENGTH_MASK 0x0fff
-#define DSMCC_RESERVED2_MASK 0xc0
-#define DSMCC_VERSION_NUMBER_MASK 0x3e
-#define DSMCC_CURRENT_NEXT_INDICATOR_MASK 0x01
+#define DSMCC_RESERVED2_MASK 0xc0
+#define DSMCC_VERSION_NUMBER_MASK 0x3e
+#define DSMCC_CURRENT_NEXT_INDICATOR_MASK 0x01
static const range_string dsmcc_header_type_vals[] = {
- { 0, 0, "ISO/IEC 13818-6 Reserved" },
- { 0x01, 0x01, "ISO/IEC 13818-6 User-to-Network Configuration Message" },
- { 0x02, 0x02, "ISO/IEC 13818-6 User-to-Network Session Message" },
- { 0x03, 0x03, "ISO/IEC 13818-6 Download Message" },
- { 0x04, 0x04, "ISO/IEC 13818-6 SDB Channel Change Protocol Message" },
- { 0x05, 0x05, "ISO/IEC 13818-6 User-to-Network Pass-Thru Message" },
- { 0x06, 0x7f, "ISO/IEC 13818-6 Reserved" },
- { 0x80, 0xff, "User Defined Message Type" },
- { 0, 0, NULL }
+ { 0, 0, "ISO/IEC 13818-6 Reserved" },
+ { 0x01, 0x01, "ISO/IEC 13818-6 User-to-Network Configuration Message" },
+ { 0x02, 0x02, "ISO/IEC 13818-6 User-to-Network Session Message" },
+ { 0x03, 0x03, "ISO/IEC 13818-6 Download Message" },
+ { 0x04, 0x04, "ISO/IEC 13818-6 SDB Channel Change Protocol Message" },
+ { 0x05, 0x05, "ISO/IEC 13818-6 User-to-Network Pass-Thru Message" },
+ { 0x06, 0x7f, "ISO/IEC 13818-6 Reserved" },
+ { 0x80, 0xff, "User Defined Message Type" },
+ { 0, 0, NULL }
};
static const range_string dsmcc_adaptation_header_vals[] = {
- { 0, 0, "ISO/IEC 13818-6 Reserved" },
- { 0x01, 0x01, "DSM-CC Conditional Access Adaptation Format" },
- { 0x02, 0x02, "DSM-CC User ID Adaptation Format" },
- { 0x03, 0x7f, "ISO/IEC 13818-6 Reserved" },
- { 0x80, 0xff, "User Defined Adaptation Type" },
- { 0, 0, NULL }
+ { 0, 0, "ISO/IEC 13818-6 Reserved" },
+ { 0x01, 0x01, "DSM-CC Conditional Access Adaptation Format" },
+ { 0x02, 0x02, "DSM-CC User ID Adaptation Format" },
+ { 0x03, 0x7f, "ISO/IEC 13818-6 Reserved" },
+ { 0x80, 0xff, "User Defined Adaptation Type" },
+ { 0, 0, NULL }
};
static const value_string dsmcc_payload_name_vals[] = {
- { DSMCC_TID_LLCSNAP, "LLCSNAP" },
- { DSMCC_TID_UN_MSG, "User Network Message" },
- { DSMCC_TID_DD_MSG, "Download Data Message" },
- { DSMCC_TID_DESC_LIST, "Descriptor List" },
- { DSMCC_TID_PRIVATE, "Private" },
- { 0, NULL }
+ { DSMCC_TID_LLCSNAP, "LLCSNAP" },
+ { DSMCC_TID_UN_MSG, "User Network Message" },
+ { DSMCC_TID_DD_MSG, "Download Data Message" },
+ { DSMCC_TID_DESC_LIST, "Descriptor List" },
+ { DSMCC_TID_PRIVATE, "Private" },
+ { 0, NULL }
};
static const value_string dsmcc_dd_message_id_vals[] = {
- { 0x1001, "Download Info Request" },
- { 0x1002, "Download Info Indication" },
- { 0x1003, "Download Data Block" },
- { 0x1004, "Download Data Request" },
- { 0x1005, "Download Data Cancel" },
- { 0x1006, "Download Server Initiate" },
- { 0, NULL }
+ { 0x1001, "Download Info Request" },
+ { 0x1002, "Download Info Indication" },
+ { 0x1003, "Download Data Block" },
+ { 0x1004, "Download Data Request" },
+ { 0x1005, "Download Data Cancel" },
+ { 0x1006, "Download Server Initiate" },
+ { 0, NULL }
};
static void
dissect_dsmcc_adaptation_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- tvbuff_t *sub_tvb;
- guint offset = 0;
- proto_item *pi;
- proto_tree *sub_tree;
- guint8 type, tmp;
- guint16 ca_len;
-
- type = tvb_get_guint8(tvb, offset);
-
- if (1 == type) {
- pi = proto_tree_add_text(tree, tvb, offset, -1, "Adaptation Header");
- sub_tree = proto_item_add_subtree(pi, ett_dsmcc_adaptation_header);
- proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_type, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- offset++;
- tmp = tvb_get_guint8(tvb, offset);
- pi = proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_ca_reserved, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- if (0xff != tmp) {
- PROTO_ITEM_SET_GENERATED(pi);
- expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
- "Invalid value - should be 0xff");
- }
- offset++;
- proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_ca_system_id, tvb,
- offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- ca_len = tvb_get_ntohs(tvb, offset);
- proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_ca_length, tvb,
- offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- sub_tvb = tvb_new_subset(tvb, offset, ca_len, ca_len);
- call_dissector(data_handle, sub_tvb, pinfo, tree);
- } else if (2 == type) {
- pi = proto_tree_add_text(tree, tvb, offset, -1, "Adaptation Header");
- sub_tree = proto_item_add_subtree(pi, ett_dsmcc_adaptation_header);
- proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_type, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- offset++;
- tmp = tvb_get_guint8(tvb, offset);
- pi = proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_user_id_reserved, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- if (0xff != tmp) {
- PROTO_ITEM_SET_GENERATED(pi);
- expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
- "Invalid value - should be 0xff");
- }
- offset++;
- /* TODO: handle the userId */
- } else {
- pi = proto_tree_add_text(tree, tvb, offset, -1, "Unknown Adaptation Header");
- sub_tree = proto_item_add_subtree(pi, ett_dsmcc_adaptation_header);
- proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_type, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- }
+ tvbuff_t *sub_tvb;
+ guint offset = 0;
+ proto_item *pi;
+ proto_tree *sub_tree;
+ guint8 type, tmp;
+ guint16 ca_len;
+
+ type = tvb_get_guint8(tvb, offset);
+
+ if (1 == type) {
+ pi = proto_tree_add_text(tree, tvb, offset, -1, "Adaptation Header");
+ sub_tree = proto_item_add_subtree(pi, ett_dsmcc_adaptation_header);
+ proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_type, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ tmp = tvb_get_guint8(tvb, offset);
+ pi = proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_ca_reserved, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ if (0xff != tmp) {
+ PROTO_ITEM_SET_GENERATED(pi);
+ expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
+ "Invalid value - should be 0xff");
+ }
+ offset +=1;
+ proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_ca_system_id, tvb,
+ offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ ca_len = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_ca_length, tvb,
+ offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ sub_tvb = tvb_new_subset(tvb, offset, ca_len, ca_len);
+ call_dissector(data_handle, sub_tvb, pinfo, tree);
+ } else if (2 == type) {
+ pi = proto_tree_add_text(tree, tvb, offset, -1, "Adaptation Header");
+ sub_tree = proto_item_add_subtree(pi, ett_dsmcc_adaptation_header);
+ proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_type, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ tmp = tvb_get_guint8(tvb, offset);
+ pi = proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_user_id_reserved, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ if (0xff != tmp) {
+ PROTO_ITEM_SET_GENERATED(pi);
+ expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
+ "Invalid value - should be 0xff");
+ }
+ offset +=1;
+ /* TODO: handle the userId */
+ } else {
+ pi = proto_tree_add_text(tree, tvb, offset, -1, "Unknown Adaptation Header");
+ sub_tree = proto_item_add_subtree(pi, ett_dsmcc_adaptation_header);
+ proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_type, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ }
}
static guint
dissect_dsmcc_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset,
- gboolean download_header)
+ gboolean download_header)
{
- tvbuff_t *sub_tvb;
- proto_item *pi;
- proto_tree *sub_tree;
- guint8 prot_disc;
- guint reserved;
- guint8 adaptation_len;
- guint len = 0;
- int msg_id, tx_id;
-
- prot_disc = tvb_get_guint8(tvb, offset);
- reserved = tvb_get_guint8(tvb, 8+offset);
- adaptation_len = tvb_get_guint8(tvb, 9+offset);
-
- pi = proto_tree_add_text(tree, tvb, offset, 12+adaptation_len, "DSM-CC Header");
- sub_tree = proto_item_add_subtree(pi, ett_dsmcc_header);
- pi = proto_tree_add_item(sub_tree, hf_dsmcc_protocol_discriminator, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- if (0x11 != prot_disc) {
- PROTO_ITEM_SET_GENERATED(pi);
- expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
- "Invalid value - should be 0x11");
- }
- offset++;
- proto_tree_add_item(sub_tree, hf_dsmcc_type, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- offset++;
- if (TRUE == download_header) {
- msg_id = hf_dsmcc_dd_message_id;
- tx_id = hf_dsmcc_dd_download_id;
- } else {
- msg_id = hf_dsmcc_message_id;
- tx_id = hf_dsmcc_transaction_id;
- }
- proto_tree_add_item(sub_tree, msg_id, tvb,
- offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(sub_tree, tx_id, tvb,
- offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
- pi = proto_tree_add_item(sub_tree, hf_dsmcc_header_reserved, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- if (0xff != reserved) {
- PROTO_ITEM_SET_GENERATED(pi);
- expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
- "Invalid value - should be 0xff");
- }
- offset++;
-
- proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_length, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- offset++;
- proto_tree_add_item(sub_tree, hf_dsmcc_message_length, tvb,
- offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- len = 12;
- if (0 < adaptation_len) {
- sub_tvb = tvb_new_subset(tvb, offset, adaptation_len, adaptation_len);
- dissect_dsmcc_adaptation_header(sub_tvb, pinfo, sub_tree);
- offset += adaptation_len;
- }
-
- return len;
+ tvbuff_t *sub_tvb;
+ proto_item *pi;
+ proto_tree *sub_tree;
+ guint8 prot_disc;
+ guint reserved;
+ guint8 adaptation_len;
+ guint len = 0;
+ int msg_id, tx_id;
+
+ prot_disc = tvb_get_guint8(tvb, offset);
+ reserved = tvb_get_guint8(tvb, 8+offset);
+ adaptation_len = tvb_get_guint8(tvb, 9+offset);
+
+ pi = proto_tree_add_text(tree, tvb, offset, 12+adaptation_len, "DSM-CC Header");
+ sub_tree = proto_item_add_subtree(pi, ett_dsmcc_header);
+ pi = proto_tree_add_item(sub_tree, hf_dsmcc_protocol_discriminator, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ if (0x11 != prot_disc) {
+ PROTO_ITEM_SET_GENERATED(pi);
+ expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
+ "Invalid value - should be 0x11");
+ }
+ offset +=1;
+ proto_tree_add_item(sub_tree, hf_dsmcc_type, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ if (TRUE == download_header) {
+ msg_id = hf_dsmcc_dd_message_id;
+ tx_id = hf_dsmcc_dd_download_id;
+ } else {
+ msg_id = hf_dsmcc_message_id;
+ tx_id = hf_dsmcc_transaction_id;
+ }
+ proto_tree_add_item(sub_tree, msg_id, tvb,
+ offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(sub_tree, tx_id, tvb,
+ offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ pi = proto_tree_add_item(sub_tree, hf_dsmcc_header_reserved, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ if (0xff != reserved) {
+ PROTO_ITEM_SET_GENERATED(pi);
+ expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
+ "Invalid value - should be 0xff");
+ }
+ offset +=1;
+
+ proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_length, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ proto_tree_add_item(sub_tree, hf_dsmcc_message_length, tvb,
+ offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ len = 12;
+ if (0 < adaptation_len) {
+ sub_tvb = tvb_new_subset(tvb, offset, adaptation_len, adaptation_len);
+ dissect_dsmcc_adaptation_header(sub_tvb, pinfo, sub_tree);
+ offset += adaptation_len;
+ }
+
+ return len;
}
static guint
dissect_dsmcc_dii_compat_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- guint offset)
+ guint offset)
{
- gint i, j;
- guint8 sub_count, sub_len;
- guint16 len, count;
- proto_item *pi;
- proto_tree *compat_tree;
- proto_tree *desc_sub_tree;
-
- len = tvb_get_ntohs(tvb, offset);
- proto_tree_add_item(tree, hf_compat_desc_length, tvb, offset,
- 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- if (0 < len) {
- count = tvb_get_ntohs(tvb, offset);
- proto_tree_add_item(tree, hf_compat_desc_count, tvb, offset,
- 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- for (i = 0; i < count; i++) {
- pi = proto_tree_add_text(tree, tvb, offset, len, "Compatibility Descriptor");
- compat_tree = proto_item_add_subtree(pi, ett_dsmcc_compat);
- proto_tree_add_item(compat_tree, hf_desc_type, tvb, offset,
- 1, ENC_BIG_ENDIAN);
- offset++;
- proto_tree_add_item(compat_tree, hf_desc_length, tvb, offset,
- 1, ENC_BIG_ENDIAN);
- offset++;
- proto_tree_add_item(compat_tree, hf_desc_spec_type, tvb, offset,
- 1, ENC_BIG_ENDIAN);
- offset++;
- proto_tree_add_item(compat_tree, hf_desc_spec_data, tvb, offset,
- 3, ENC_BIG_ENDIAN);
- offset += 3;
- proto_tree_add_item(compat_tree, hf_desc_model, tvb, offset,
- 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(compat_tree, hf_desc_version, tvb, offset,
- 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- sub_count = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(compat_tree, hf_desc_sub_desc_count, tvb, offset,
- 1, ENC_BIG_ENDIAN);
- offset++;
-
- for (j = 0; j < sub_count; j++) {
- sub_len = tvb_get_guint8(tvb, offset+1);
-
- pi = proto_tree_add_text(compat_tree, tvb, offset, sub_len+2, "Sub Descriptor");
- desc_sub_tree = proto_item_add_subtree(pi, ett_dsmcc_compat_sub_desc);
- proto_tree_add_item(desc_sub_tree, hf_desc_sub_desc_type, tvb, offset,
- 1, ENC_BIG_ENDIAN);
- offset++;
- proto_tree_add_item(desc_sub_tree, hf_desc_sub_desc_len, tvb, offset,
- 1, ENC_BIG_ENDIAN);
- offset++;
-
- offset += sub_len;
- }
- }
-
- if( 1000 == offset ) {
- expert_add_info_format( pinfo, NULL, PI_MALFORMED,
- PI_ERROR, "Invalid CRC" );
- }
- }
-
- return 2 + len;
+ gint i, j;
+ guint8 sub_count, sub_len;
+ guint16 len, count;
+ proto_item *pi;
+ proto_tree *compat_tree;
+ proto_tree *desc_sub_tree;
+
+ len = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_item(tree, hf_compat_desc_length, tvb, offset,
+ 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ if (0 < len) {
+ count = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_item(tree, hf_compat_desc_count, tvb, offset,
+ 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ for (i = 0; i < count; i++) {
+ pi = proto_tree_add_text(tree, tvb, offset, len, "Compatibility Descriptor");
+ compat_tree = proto_item_add_subtree(pi, ett_dsmcc_compat);
+ proto_tree_add_item(compat_tree, hf_desc_type, tvb, offset,
+ 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ proto_tree_add_item(compat_tree, hf_desc_length, tvb, offset,
+ 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ proto_tree_add_item(compat_tree, hf_desc_spec_type, tvb, offset,
+ 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ proto_tree_add_item(compat_tree, hf_desc_spec_data, tvb, offset,
+ 3, ENC_BIG_ENDIAN);
+ offset += 3;
+ proto_tree_add_item(compat_tree, hf_desc_model, tvb, offset,
+ 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(compat_tree, hf_desc_version, tvb, offset,
+ 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ sub_count = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(compat_tree, hf_desc_sub_desc_count, tvb, offset,
+ 1, ENC_BIG_ENDIAN);
+ offset +=1;
+
+ for (j = 0; j < sub_count; j++) {
+ sub_len = tvb_get_guint8(tvb, offset+1);
+
+ pi = proto_tree_add_text(compat_tree, tvb, offset, sub_len+2, "Sub Descriptor");
+ desc_sub_tree = proto_item_add_subtree(pi, ett_dsmcc_compat_sub_desc);
+ proto_tree_add_item(desc_sub_tree, hf_desc_sub_desc_type, tvb, offset,
+ 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ proto_tree_add_item(desc_sub_tree, hf_desc_sub_desc_len, tvb, offset,
+ 1, ENC_BIG_ENDIAN);
+ offset +=1;
+
+ offset += sub_len;
+ }
+ }
+
+ if( 1000 == offset ) {
+ expert_add_info_format( pinfo, NULL, PI_MALFORMED,
+ PI_ERROR, "Invalid CRC" );
+ }
+ }
+
+ return 2 + len;
}
static void
dissect_dsmcc_dii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- guint offset)
+ guint offset)
{
- guint8 module_info_len;
- guint16 modules, private_data_len;
- guint16 module_id;
- guint8 module_version;
- guint module_size;
- guint i;
- proto_item *pi;
- proto_tree *mod_tree;
-
- proto_tree_add_item(tree, hf_dsmcc_dii_download_id, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
- proto_tree_add_item(tree, hf_dsmcc_dii_block_size, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(tree, hf_dsmcc_dii_window_size, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- proto_tree_add_item(tree, hf_dsmcc_dii_ack_period, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- proto_tree_add_item(tree, hf_dsmcc_dii_t_c_download_window, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
- proto_tree_add_item(tree, hf_dsmcc_dii_t_c_download_scenario, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
- offset += dissect_dsmcc_dii_compat_desc(tvb, pinfo, tree, offset);
- proto_tree_add_item(tree, hf_dsmcc_dii_number_of_modules, tvb, offset, 2, ENC_BIG_ENDIAN);
- modules = tvb_get_ntohs(tvb, offset);
- offset += 2;
-
- for (i = 0; i < modules; i++ ) {
- module_id = tvb_get_ntohs(tvb, offset);
- module_size = tvb_get_ntohl(tvb, 2+offset);
- module_version = tvb_get_guint8(tvb, 6+offset);
-
- pi = proto_tree_add_text(tree, tvb, offset, -1,
- "Module Id: 0x%x, Version: %u, Size: %u",
- module_id, module_version, module_size);
- mod_tree = proto_item_add_subtree(pi, ett_dsmcc_dii_module);
- proto_tree_add_item(mod_tree, hf_dsmcc_dii_module_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(mod_tree, hf_dsmcc_dii_module_size, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
- proto_tree_add_item(mod_tree, hf_dsmcc_dii_module_version, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- module_info_len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(mod_tree, hf_dsmcc_dii_module_info_length, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- if (0 < module_info_len) {
- proto_tree_add_item(mod_tree, hf_etv_module_abs_path, tvb, offset, 1,
- ENC_ASCII|ENC_NA);
- offset += module_info_len;
- }
- }
-
- private_data_len = tvb_get_ntohs(tvb, offset);
- proto_tree_add_item(tree, hf_dsmcc_dii_private_data_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- if (0 < private_data_len) {
- proto_tree_add_item(tree, hf_etv_dii_authority, tvb, offset, 1,
- ENC_ASCII|ENC_NA);
- offset += private_data_len;
- }
+ guint8 module_info_len;
+ guint16 modules, private_data_len;
+ guint16 module_id;
+ guint8 module_version;
+ guint module_size;
+ guint i;
+ proto_item *pi;
+ proto_tree *mod_tree;
+
+ proto_tree_add_item(tree, hf_dsmcc_dii_download_id, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ proto_tree_add_item(tree, hf_dsmcc_dii_block_size, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tree, hf_dsmcc_dii_window_size, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ proto_tree_add_item(tree, hf_dsmcc_dii_ack_period, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ proto_tree_add_item(tree, hf_dsmcc_dii_t_c_download_window, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ proto_tree_add_item(tree, hf_dsmcc_dii_t_c_download_scenario, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ offset += dissect_dsmcc_dii_compat_desc(tvb, pinfo, tree, offset);
+ proto_tree_add_item(tree, hf_dsmcc_dii_number_of_modules, tvb, offset, 2, ENC_BIG_ENDIAN);
+ modules = tvb_get_ntohs(tvb, offset);
+ offset += 2;
+
+ for (i = 0; i < modules; i++ ) {
+ module_id = tvb_get_ntohs(tvb, offset);
+ module_size = tvb_get_ntohl(tvb, 2+offset);
+ module_version = tvb_get_guint8(tvb, 6+offset);
+
+ pi = proto_tree_add_text(tree, tvb, offset, -1,
+ "Module Id: 0x%x, Version: %u, Size: %u",
+ module_id, module_version, module_size);
+ mod_tree = proto_item_add_subtree(pi, ett_dsmcc_dii_module);
+ proto_tree_add_item(mod_tree, hf_dsmcc_dii_module_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(mod_tree, hf_dsmcc_dii_module_size, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ proto_tree_add_item(mod_tree, hf_dsmcc_dii_module_version, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+
+ module_info_len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(mod_tree, hf_dsmcc_dii_module_info_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ if (0 < module_info_len) {
+ proto_tree_add_item(mod_tree, hf_etv_module_abs_path, tvb, offset, 1,
+ ENC_ASCII|ENC_NA);
+ offset += module_info_len;
+ }
+ }
+
+ private_data_len = tvb_get_ntohs(tvb, offset);
+ proto_tree_add_item(tree, hf_dsmcc_dii_private_data_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ if (0 < private_data_len) {
+ proto_tree_add_item(tree, hf_etv_dii_authority, tvb, offset, 1,
+ ENC_ASCII|ENC_NA);
+ offset += private_data_len;
+ }
}
static void
dissect_dsmcc_ddb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- proto_tree *top_tree, guint offset)
+ proto_tree *top_tree, guint offset)
{
- tvbuff_t *sub_tvb;
- proto_item *pi;
- guint8 reserved;
-
- proto_tree_add_item(tree, hf_dsmcc_ddb_module_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(tree, hf_dsmcc_ddb_version, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- reserved = tvb_get_guint8(tvb, offset);
- pi = proto_tree_add_item(tree, hf_dsmcc_ddb_reserved, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- if (0xff != reserved) {
- PROTO_ITEM_SET_GENERATED(pi);
- expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
- "Invalid value - should be 0xff");
- }
- offset++;
- proto_tree_add_item(tree, hf_dsmcc_ddb_block_number, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
-
- sub_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, sub_tvb, pinfo, top_tree);
+ tvbuff_t *sub_tvb;
+ proto_item *pi;
+ guint8 reserved;
+
+ proto_tree_add_item(tree, hf_dsmcc_ddb_module_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tree, hf_dsmcc_ddb_version, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ reserved = tvb_get_guint8(tvb, offset);
+ pi = proto_tree_add_item(tree, hf_dsmcc_ddb_reserved, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ if (0xff != reserved) {
+ PROTO_ITEM_SET_GENERATED(pi);
+ expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
+ "Invalid value - should be 0xff");
+ }
+ offset +=1;
+ proto_tree_add_item(tree, hf_dsmcc_ddb_block_number, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+
+ sub_tvb = tvb_new_subset_remaining(tvb, offset);
+ call_dissector(data_handle, sub_tvb, pinfo, top_tree);
}
static void
dissect_dsmcc_un_download(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- proto_tree *top_tree)
+ proto_tree *top_tree)
{
- proto_item *pi;
- proto_tree *sub_tree;
- guint16 msg_id;
- guint offset = 0;
-
- msg_id = tvb_get_ntohs(tvb, offset+2);
-
- pi = proto_tree_add_text(tree, tvb, 0, -1, "User Network Message - %s",
- val_to_str(msg_id, dsmcc_dd_message_id_vals, "%s"));
- sub_tree = proto_item_add_subtree(pi, ett_dsmcc_payload);
-
- switch (msg_id) {
- case 0x1001:
- case 0x1002:
- offset += dissect_dsmcc_header(tvb, pinfo, sub_tree, offset, FALSE);
- dissect_dsmcc_dii(tvb, pinfo, sub_tree, offset);
- break;
- case 0x1003:
- offset += dissect_dsmcc_header(tvb, pinfo, sub_tree, offset, TRUE);
- dissect_dsmcc_ddb(tvb, pinfo, sub_tree, top_tree, offset);
- break;
- case 0x1004:
- /* TODO: Add support */
- break;
- case 0x1005:
- /* TODO: Add support */
- break;
- case 0x1006:
- /* TODO: Add support */
- break;
- default:
- break;
- }
+ proto_item *pi;
+ proto_tree *sub_tree;
+ guint16 msg_id;
+ guint offset = 0;
+
+ msg_id = tvb_get_ntohs(tvb, offset+2);
+
+ pi = proto_tree_add_text(tree, tvb, 0, -1, "User Network Message - %s",
+ val_to_str(msg_id, dsmcc_dd_message_id_vals, "%s"));
+ sub_tree = proto_item_add_subtree(pi, ett_dsmcc_payload);
+
+ switch (msg_id) {
+ case 0x1001:
+ case 0x1002:
+ offset += dissect_dsmcc_header(tvb, pinfo, sub_tree, offset, FALSE);
+ dissect_dsmcc_dii(tvb, pinfo, sub_tree, offset);
+ break;
+ case 0x1003:
+ offset += dissect_dsmcc_header(tvb, pinfo, sub_tree, offset, TRUE);
+ dissect_dsmcc_ddb(tvb, pinfo, sub_tree, top_tree, offset);
+ break;
+ case 0x1004:
+ /* TODO: Add support */
+ break;
+ case 0x1005:
+ /* TODO: Add support */
+ break;
+ case 0x1006:
+ /* TODO: Add support */
+ break;
+ default:
+ break;
+ }
}
static void
dissect_dsmcc_un(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- proto_tree *top_tree)
+ proto_tree *top_tree)
{
- guint8 type;
-
- /* dsmccMessageHeader.dsmccType */
- type = tvb_get_guint8(tvb, 1);
-
- switch (type) {
- case 1: /* user-to-network configuration */
- /* TODO: Add support */
- break;
- case 2: /* user-to-network session */
- /* TODO: Add support */
- break;
- case 3: /* user-to-network download */
- dissect_dsmcc_un_download(tvb, pinfo, tree, top_tree);
- break;
- case 4: /* sdb channel change protocol */
- /* TODO: Add support */
- break;
- case 5: /* user-to-network pass-thru */
- /* TODO: Add support */
- break;
- default:
- break;
- }
+ guint8 type;
+
+ /* dsmccMessageHeader.dsmccType */
+ type = tvb_get_guint8(tvb, 1);
+
+ switch (type) {
+ case 1: /* user-to-network configuration */
+ /* TODO: Add support */
+ break;
+ case 2: /* user-to-network session */
+ /* TODO: Add support */
+ break;
+ case 3: /* user-to-network download */
+ dissect_dsmcc_un_download(tvb, pinfo, tree, top_tree);
+ break;
+ case 4: /* sdb channel change protocol */
+ /* TODO: Add support */
+ break;
+ case 5: /* user-to-network pass-thru */
+ /* TODO: Add support */
+ break;
+ default:
+ break;
+ }
}
static gboolean
dissect_dsmcc_ts(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree_in, void *data _U_)
{
- proto_item *pi;
- proto_tree *tree;
- guint crc_len;
- guint8 tid;
- guint16 sect_len;
- guint32 crc, calculated_crc;
- const char *label;
- tvbuff_t *sub_tvb;
- guint16 ssi;
- guint offset = 0;
-
- pi = proto_tree_add_item(tree_in, proto_dsmcc, tvb, 0, -1, ENC_NA);
- tree = proto_item_add_subtree(pi, ett_dsmcc);
-
- tid = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_dsmcc_table_id, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- offset++;
- ssi = tvb_get_ntohs(tvb, offset);
- ssi &= DSMCC_SSI_MASK;
- proto_tree_add_item(tree, hf_dsmcc_section_syntax_indicator, tvb,
- offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_dsmcc_private_indicator, tvb,
- offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_dsmcc_reserved, tvb,
- offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_dsmcc_section_length, tvb,
- offset, 2, ENC_BIG_ENDIAN);
- sect_len = tvb_get_ntohs(tvb, offset);
- sect_len &= DSMCC_LENGTH_MASK;
- offset += 2;
-
- proto_tree_add_item(tree, hf_dsmcc_table_id_extension, tvb,
- offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(tree, hf_dsmcc_reserved2, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_dsmcc_version_number, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(tree, hf_dsmcc_current_next_indicator, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- offset++;
- proto_tree_add_item(tree, hf_dsmcc_section_number, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- offset++;
- proto_tree_add_item(tree, hf_dsmcc_last_section_number, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- sub_tvb = tvb_new_subset(tvb, offset, sect_len-9, sect_len-9);
- switch (tid) {
- case DSMCC_TID_LLCSNAP:
- /* TODO: Add support */
- break;
- case DSMCC_TID_UN_MSG:
- case DSMCC_TID_DD_MSG:
- dissect_dsmcc_un(sub_tvb, pinfo, tree, tree_in);
- break;
- case DSMCC_TID_DESC_LIST:
- /* TODO: Add support */
- break;
- case DSMCC_TID_PRIVATE:
- /* TODO: Add support */
- break;
- default:
- break;
- }
-
- crc_len = 3 + sect_len - 4; /* Add the header, remove the crc */
- if (ssi) {
- crc = tvb_get_ntohl(tvb, crc_len);
-
- calculated_crc = crc;
- label = "Unverified";
- if (dsmcc_sect_check_crc) {
- label = "Verified";
- calculated_crc = crc32_mpeg2_tvb_offset(tvb, 0, crc_len);
- }
-
- if (calculated_crc == crc) {
- proto_tree_add_uint_format( tree, hf_dsmcc_crc, tvb,
- crc_len, 4, crc, "CRC: 0x%08x [%s]", crc, label);
- } else {
- proto_item *msg_error = NULL;
-
- msg_error = proto_tree_add_uint_format( tree, hf_dsmcc_crc, tvb,
- crc_len, 4, crc,
- "CRC: 0x%08x [Failed Verification (Calculated: 0x%08x)]",
- crc, calculated_crc );
- PROTO_ITEM_SET_GENERATED(msg_error);
- expert_add_info_format( pinfo, msg_error, PI_MALFORMED,
- PI_ERROR, "Invalid CRC" );
- }
- } else {
- /* TODO: actually check the checksum */
- proto_tree_add_item(tree, hf_dsmcc_checksum, tvb,
- crc_len, 4, ENC_BIG_ENDIAN);
- }
-
- return TRUE;
+ proto_item *pi;
+ proto_tree *tree;
+ guint crc_len;
+ guint8 tid;
+ guint16 sect_len;
+ guint32 crc, calculated_crc;
+ const char *label;
+ tvbuff_t *sub_tvb;
+ guint16 ssi;
+ guint offset = 0;
+
+ pi = proto_tree_add_item(tree_in, proto_dsmcc, tvb, 0, -1, ENC_NA);
+ tree = proto_item_add_subtree(pi, ett_dsmcc);
+
+ tid = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_dsmcc_table_id, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ ssi = tvb_get_ntohs(tvb, offset);
+ ssi &= DSMCC_SSI_MASK;
+ proto_tree_add_item(tree, hf_dsmcc_section_syntax_indicator, tvb,
+ offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_dsmcc_private_indicator, tvb,
+ offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_dsmcc_reserved, tvb,
+ offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_dsmcc_section_length, tvb,
+ offset, 2, ENC_BIG_ENDIAN);
+ sect_len = tvb_get_ntohs(tvb, offset);
+ sect_len &= DSMCC_LENGTH_MASK;
+ offset += 2;
+
+ proto_tree_add_item(tree, hf_dsmcc_table_id_extension, tvb,
+ offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(tree, hf_dsmcc_reserved2, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_dsmcc_version_number, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_dsmcc_current_next_indicator, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ proto_tree_add_item(tree, hf_dsmcc_section_number, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+ proto_tree_add_item(tree, hf_dsmcc_last_section_number, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ offset +=1;
+
+ sub_tvb = tvb_new_subset(tvb, offset, sect_len-9, sect_len-9);
+ switch (tid) {
+ case DSMCC_TID_LLCSNAP:
+ /* TODO: Add support */
+ break;
+ case DSMCC_TID_UN_MSG:
+ case DSMCC_TID_DD_MSG:
+ dissect_dsmcc_un(sub_tvb, pinfo, tree, tree_in);
+ break;
+ case DSMCC_TID_DESC_LIST:
+ /* TODO: Add support */
+ break;
+ case DSMCC_TID_PRIVATE:
+ /* TODO: Add support */
+ break;
+ default:
+ break;
+ }
+
+ crc_len = 3 + sect_len - 4; /* Add the header, remove the crc */
+ if (ssi) {
+ crc = tvb_get_ntohl(tvb, crc_len);
+
+ calculated_crc = crc;
+ label = "Unverified";
+ if (dsmcc_sect_check_crc) {
+ label = "Verified";
+ calculated_crc = crc32_mpeg2_tvb_offset(tvb, 0, crc_len);
+ }
+
+ if (calculated_crc == crc) {
+ proto_tree_add_uint_format( tree, hf_dsmcc_crc, tvb,
+ crc_len, 4, crc, "CRC: 0x%08x [%s]", crc, label);
+ } else {
+ proto_item *msg_error = NULL;
+
+ msg_error = proto_tree_add_uint_format( tree, hf_dsmcc_crc, tvb,
+ crc_len, 4, crc,
+ "CRC: 0x%08x [Failed Verification (Calculated: 0x%08x)]",
+ crc, calculated_crc );
+ PROTO_ITEM_SET_GENERATED(msg_error);
+ expert_add_info_format( pinfo, msg_error, PI_MALFORMED,
+ PI_ERROR, "Invalid CRC" );
+ }
+ } else {
+ /* TODO: actually check the checksum */
+ proto_tree_add_item(tree, hf_dsmcc_checksum, tvb,
+ crc_len, 4, ENC_BIG_ENDIAN);
+ }
+
+ return TRUE;
}
static void
dissect_dsmcc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "DSM-CC");
- dissect_dsmcc_ts(tvb, pinfo, tree, NULL);
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "DSM-CC");
+ dissect_dsmcc_ts(tvb, pinfo, tree, NULL);
}
void
proto_register_dsmcc(void)
{
- /* NOTE: Please add tables numerically according to 13818-6 so it is
- * easier to keep track of what parameters/tables are associated with
- * each other.
- */
- static hf_register_info hf[] = {
- /* table 2-1 dsmccMessageHeader - start */
- { &hf_dsmcc_protocol_discriminator, {
- "Protocol Discriminator", "mpeg_dsmcc.protocol",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_type, {
- "Type", "mpeg_dsmcc.type",
- FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(dsmcc_header_type_vals), 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_message_id, {
- "Message ID", "mpeg_dsmcc.message_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_transaction_id, {
- "Transaction ID", "mpeg_dsmcc.transaction_id",
- FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_header_reserved, {
- "Reserved", "mpeg_dsmcc.header_reserved",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_adaptation_length, {
- "Adaptation Length", "mpeg_dsmcc.adaptation_length",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_message_length, {
- "Message Length", "mpeg_dsmcc.message_length",
- FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
- } },
- /* table 2-1 dsmccMessageHeader - end */
-
-
- /* table 2-4 dsmccAdaptationHeader - start */
- { &hf_dsmcc_adaptation_type, {
- "Adaptation Type", "mpeg_dsmcc.adaptation_header.type",
- FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(dsmcc_adaptation_header_vals), 0, NULL, HFILL
- } },
- /* table 2-4 dsmccAdaptationHeader - end */
-
-
- /* table 2-6 dsmccConditionalAccess - start */
- { &hf_dsmcc_adaptation_ca_reserved, {
- "Reserved", "mpeg_dsmcc.adaptation_header.ca.reserved",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_adaptation_ca_system_id, {
- "System ID", "mpeg_dsmcc.adaptation_header.ca.system_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_adaptation_ca_length, {
- "System ID", "mpeg_dsmcc.adaptation_header.ca.length",
- FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
- } },
- /* table 2-6 dsmccConditionalAccess - end */
-
-
- /* table 2-7 dsmccUserId - start */
- { &hf_dsmcc_adaptation_user_id_reserved, {
- "Reserved", "mpeg_dsmcc.adaptation_header.uid.reserved",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
- /* table 2-7 dsmccUserId - start */
-
-
- /* table 6-1 compatabilityDescriptor - start */
- { &hf_compat_desc_length, {
- "Compatibility Descriptor Length", "mpeg_dsmcc.dii.compat_desc_len",
- FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_compat_desc_count, {
- "Descriptor Length", "mpeg_dsmcc.dii.compat_desc_count",
- FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_desc_type, {
- "Descriptor Type", "mpeg_dsmcc.dii.compat.type",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_desc_length, {
- "Descriptor Length", "mpeg_dsmcc.dii.compat.length",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_desc_spec_type, {
- "Specifier Type", "mpeg_dsmcc.dii.compat.spec_type",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_desc_spec_data, {
- "Specifier Data", "mpeg_dsmcc.dii.compat.spec_data",
- FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_desc_model, {
- "Model", "mpeg_dsmcc.dii.compat.model",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_desc_version, {
- "Version", "mpeg_dsmcc.dii.compat.version",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_desc_sub_desc_count, {
- "Version", "mpeg_dsmcc.dii.compat.sub_count",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_desc_sub_desc_type, {
- "Type", "mpeg_dsmcc.dii.compat.sub_type",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_desc_sub_desc_len, {
- "Length", "mpeg_dsmcc.dii.compat.sub_len",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
- /* table 6-1 compatabilityDescriptor - end */
-
-
- /* table 7-3 dsmccDownloadDataHeader - start */
- { &hf_dsmcc_dd_download_id, {
- "Download ID", "mpeg_dsmcc.download_id",
- FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_dd_message_id, {
- "Message ID", "mpeg_dsmcc.message_id",
- FT_UINT16, BASE_HEX, VALS(dsmcc_dd_message_id_vals), 0, NULL, HFILL
- } },
- /* table 7-3 dsmccDownloadDataHeader - end */
-
-
- /* table 7-6 downloadInfoIndication - start */
- { &hf_dsmcc_dii_download_id, {
- "Download ID", "mpeg_dsmcc.dii.download_id",
- FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_dii_block_size, {
- "Block Size", "mpeg_dsmcc.dii.block_size",
- FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_dii_window_size, {
- "Window Size", "mpeg_dsmcc.dii.window_size",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_dii_ack_period, {
- "ACK Period", "mpeg_dsmcc.dii.ack_period",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_dii_t_c_download_window, {
- "Carousel Download Window", "mpeg_dsmcc.dii.carousel_download_window",
- FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_dii_t_c_download_scenario, {
- "Carousel Download Scenario", "mpeg_dsmcc.dii.carousel_download_scenario",
- FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_dii_number_of_modules, {
- "Number of Modules", "mpeg_dsmcc.dii.module_count",
- FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_dii_module_id, {
- "Module ID", "mpeg_dsmcc.dii.module_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_dii_module_size, {
- "Module Size", "mpeg_dsmcc.dii.module_size",
- FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_dii_module_version, {
- "Module Version", "mpeg_dsmcc.dii.module_version",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_dii_module_info_length, {
- "Module Info Length", "mpeg_dsmcc.dii.module_info_length",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_dii_private_data_length, {
- "Private Data Length", "mpeg_dsmcc.dii.private_data_length",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
- /* table 7-6 downloadInfoIndication - end */
-
-
- /* table 7-7 dsmccDownloadDataBlock - start */
- { &hf_dsmcc_ddb_module_id, {
- "Module ID", "mpeg_dsmcc.ddb.module_id",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_ddb_version, {
- "Version", "mpeg_dsmcc.ddb.version",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_ddb_reserved, {
- "Reserved", "mpeg_dsmcc.ddb.reserved",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_ddb_block_number, {
- "Block Number", "mpeg_dsmcc.ddb.block_num",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
- /* table 7-7 dsmccDownloadDataBlock - end */
-
-
- /* table 9-2 - start */
- { &hf_dsmcc_table_id, {
- "Table ID", "mpeg_sect.table_id",
- FT_UINT8, BASE_HEX, VALS(dsmcc_payload_name_vals), 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_section_syntax_indicator, {
- "Session Syntax Indicator", "mpeg_sect.ssi",
- FT_UINT16, BASE_DEC, NULL, DSMCC_SSI_MASK, NULL, HFILL
- } },
-
- { &hf_dsmcc_private_indicator, {
- "Private Indicator", "mpeg_dsmcc.private_indicator",
- FT_UINT16, BASE_DEC, NULL, DSMCC_PRIVATE_MASK, NULL, HFILL
- } },
-
- { &hf_dsmcc_reserved, {
- "Reserved", "mpeg_sect.reserved",
- FT_UINT16, BASE_HEX, NULL, DSMCC_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_dsmcc_section_length, {
- "Length", "mpeg_sect.section_length",
- FT_UINT16, BASE_DEC, NULL, DSMCC_LENGTH_MASK, NULL, HFILL
- } },
-
- { &hf_dsmcc_table_id_extension, {
- "Table ID Extension", "mpeg_dsmcc.table_id_extension",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_reserved2, {
- "Reserved", "mpeg_dsmcc.reserved2",
- FT_UINT8, BASE_HEX, NULL, DSMCC_RESERVED2_MASK, NULL, HFILL
- } },
-
- { &hf_dsmcc_version_number, {
- "Version Number", "mpeg_dsmcc.version_number",
- FT_UINT8, BASE_DEC, NULL, DSMCC_VERSION_NUMBER_MASK, NULL, HFILL
- } },
-
- { &hf_dsmcc_current_next_indicator, {
- "Current Next Indicator", "mpeg_dsmcc.current_next_indicator",
- FT_UINT8, BASE_DEC, NULL, DSMCC_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
- } },
-
- { &hf_dsmcc_section_number, {
- "Section Number", "mpeg_dsmcc.section_number",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_last_section_number, {
- "Last Section Number", "mpeg_dsmcc.last_section_number",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_crc, {
- "CRC 32", "mpeg_sect.crc",
- FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_dsmcc_checksum, {
- "Checksum", "mpeg_dsmcc.checksum",
- FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
- } },
- /* table 9-2 - end */
-
-
- { &hf_etv_module_abs_path, {
- "Module Absolute Path", "etv.dsmcc.dii.module_abs_path",
- FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } },
-
- { &hf_etv_dii_authority, {
- "Authority", "etv.dsmcc.dii.authority",
- FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
- } }
- };
-
- static gint *ett[] = {
- &ett_dsmcc,
- &ett_dsmcc_payload,
- &ett_dsmcc_adaptation_header,
- &ett_dsmcc_header,
- &ett_dsmcc_compat,
- &ett_dsmcc_compat_sub_desc,
- &ett_dsmcc_dii_module
- };
- module_t *dsmcc_module;
-
- proto_dsmcc = proto_register_protocol("MPEG DSM-CC", "MPEG DSM-CC", "mpeg_dsmcc");
-
- proto_register_field_array(proto_dsmcc, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
- new_register_dissector("mp2t-dsmcc", dissect_dsmcc_ts, proto_dsmcc);
-
- dsmcc_module = prefs_register_protocol(proto_dsmcc, NULL);
-
- prefs_register_bool_preference(dsmcc_module, "verify_crc",
- "Verify the section CRC or checksum",
- "Whether the section dissector should verify the CRC or checksum",
- &dsmcc_sect_check_crc);
+ /* NOTE: Please add tables numerically according to 13818-6 so it is
+ * easier to keep track of what parameters/tables are associated with
+ * each other.
+ */
+ static hf_register_info hf[] = {
+ /* table 2-1 dsmccMessageHeader - start */
+ { &hf_dsmcc_protocol_discriminator, {
+ "Protocol Discriminator", "mpeg_dsmcc.protocol",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_type, {
+ "Type", "mpeg_dsmcc.type",
+ FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(dsmcc_header_type_vals), 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_message_id, {
+ "Message ID", "mpeg_dsmcc.message_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_transaction_id, {
+ "Transaction ID", "mpeg_dsmcc.transaction_id",
+ FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_header_reserved, {
+ "Reserved", "mpeg_dsmcc.header_reserved",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_adaptation_length, {
+ "Adaptation Length", "mpeg_dsmcc.adaptation_length",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_message_length, {
+ "Message Length", "mpeg_dsmcc.message_length",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+ /* table 2-1 dsmccMessageHeader - end */
+
+
+ /* table 2-4 dsmccAdaptationHeader - start */
+ { &hf_dsmcc_adaptation_type, {
+ "Adaptation Type", "mpeg_dsmcc.adaptation_header.type",
+ FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(dsmcc_adaptation_header_vals), 0, NULL, HFILL
+ } },
+ /* table 2-4 dsmccAdaptationHeader - end */
+
+
+ /* table 2-6 dsmccConditionalAccess - start */
+ { &hf_dsmcc_adaptation_ca_reserved, {
+ "Reserved", "mpeg_dsmcc.adaptation_header.ca.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_adaptation_ca_system_id, {
+ "System ID", "mpeg_dsmcc.adaptation_header.ca.system_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_adaptation_ca_length, {
+ "System ID", "mpeg_dsmcc.adaptation_header.ca.length",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+ /* table 2-6 dsmccConditionalAccess - end */
+
+
+ /* table 2-7 dsmccUserId - start */
+ { &hf_dsmcc_adaptation_user_id_reserved, {
+ "Reserved", "mpeg_dsmcc.adaptation_header.uid.reserved",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+ /* table 2-7 dsmccUserId - start */
+
+
+ /* table 6-1 compatabilityDescriptor - start */
+ { &hf_compat_desc_length, {
+ "Compatibility Descriptor Length", "mpeg_dsmcc.dii.compat_desc_len",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_compat_desc_count, {
+ "Descriptor Length", "mpeg_dsmcc.dii.compat_desc_count",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_desc_type, {
+ "Descriptor Type", "mpeg_dsmcc.dii.compat.type",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_desc_length, {
+ "Descriptor Length", "mpeg_dsmcc.dii.compat.length",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_desc_spec_type, {
+ "Specifier Type", "mpeg_dsmcc.dii.compat.spec_type",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_desc_spec_data, {
+ "Specifier Data", "mpeg_dsmcc.dii.compat.spec_data",
+ FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_desc_model, {
+ "Model", "mpeg_dsmcc.dii.compat.model",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_desc_version, {
+ "Version", "mpeg_dsmcc.dii.compat.version",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_desc_sub_desc_count, {
+ "Version", "mpeg_dsmcc.dii.compat.sub_count",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_desc_sub_desc_type, {
+ "Type", "mpeg_dsmcc.dii.compat.sub_type",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_desc_sub_desc_len, {
+ "Length", "mpeg_dsmcc.dii.compat.sub_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+ /* table 6-1 compatabilityDescriptor - end */
+
+
+ /* table 7-3 dsmccDownloadDataHeader - start */
+ { &hf_dsmcc_dd_download_id, {
+ "Download ID", "mpeg_dsmcc.download_id",
+ FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_dd_message_id, {
+ "Message ID", "mpeg_dsmcc.message_id",
+ FT_UINT16, BASE_HEX, VALS(dsmcc_dd_message_id_vals), 0, NULL, HFILL
+ } },
+ /* table 7-3 dsmccDownloadDataHeader - end */
+
+
+ /* table 7-6 downloadInfoIndication - start */
+ { &hf_dsmcc_dii_download_id, {
+ "Download ID", "mpeg_dsmcc.dii.download_id",
+ FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_dii_block_size, {
+ "Block Size", "mpeg_dsmcc.dii.block_size",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_dii_window_size, {
+ "Window Size", "mpeg_dsmcc.dii.window_size",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_dii_ack_period, {
+ "ACK Period", "mpeg_dsmcc.dii.ack_period",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_dii_t_c_download_window, {
+ "Carousel Download Window", "mpeg_dsmcc.dii.carousel_download_window",
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_dii_t_c_download_scenario, {
+ "Carousel Download Scenario", "mpeg_dsmcc.dii.carousel_download_scenario",
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_dii_number_of_modules, {
+ "Number of Modules", "mpeg_dsmcc.dii.module_count",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_dii_module_id, {
+ "Module ID", "mpeg_dsmcc.dii.module_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_dii_module_size, {
+ "Module Size", "mpeg_dsmcc.dii.module_size",
+ FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_dii_module_version, {
+ "Module Version", "mpeg_dsmcc.dii.module_version",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_dii_module_info_length, {
+ "Module Info Length", "mpeg_dsmcc.dii.module_info_length",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_dii_private_data_length, {
+ "Private Data Length", "mpeg_dsmcc.dii.private_data_length",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+ /* table 7-6 downloadInfoIndication - end */
+
+
+ /* table 7-7 dsmccDownloadDataBlock - start */
+ { &hf_dsmcc_ddb_module_id, {
+ "Module ID", "mpeg_dsmcc.ddb.module_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_ddb_version, {
+ "Version", "mpeg_dsmcc.ddb.version",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_ddb_reserved, {
+ "Reserved", "mpeg_dsmcc.ddb.reserved",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_ddb_block_number, {
+ "Block Number", "mpeg_dsmcc.ddb.block_num",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+ /* table 7-7 dsmccDownloadDataBlock - end */
+
+
+ /* table 9-2 - start */
+ { &hf_dsmcc_table_id, {
+ "Table ID", "mpeg_sect.table_id",
+ FT_UINT8, BASE_HEX, VALS(dsmcc_payload_name_vals), 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_section_syntax_indicator, {
+ "Session Syntax Indicator", "mpeg_sect.ssi",
+ FT_UINT16, BASE_DEC, NULL, DSMCC_SSI_MASK, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_private_indicator, {
+ "Private Indicator", "mpeg_dsmcc.private_indicator",
+ FT_UINT16, BASE_DEC, NULL, DSMCC_PRIVATE_MASK, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_reserved, {
+ "Reserved", "mpeg_sect.reserved",
+ FT_UINT16, BASE_HEX, NULL, DSMCC_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_section_length, {
+ "Length", "mpeg_sect.section_length",
+ FT_UINT16, BASE_DEC, NULL, DSMCC_LENGTH_MASK, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_table_id_extension, {
+ "Table ID Extension", "mpeg_dsmcc.table_id_extension",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_reserved2, {
+ "Reserved", "mpeg_dsmcc.reserved2",
+ FT_UINT8, BASE_HEX, NULL, DSMCC_RESERVED2_MASK, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_version_number, {
+ "Version Number", "mpeg_dsmcc.version_number",
+ FT_UINT8, BASE_DEC, NULL, DSMCC_VERSION_NUMBER_MASK, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_current_next_indicator, {
+ "Current Next Indicator", "mpeg_dsmcc.current_next_indicator",
+ FT_UINT8, BASE_DEC, NULL, DSMCC_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_section_number, {
+ "Section Number", "mpeg_dsmcc.section_number",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_last_section_number, {
+ "Last Section Number", "mpeg_dsmcc.last_section_number",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_crc, {
+ "CRC 32", "mpeg_sect.crc",
+ FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_dsmcc_checksum, {
+ "Checksum", "mpeg_dsmcc.checksum",
+ FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+ /* table 9-2 - end */
+
+
+ { &hf_etv_module_abs_path, {
+ "Module Absolute Path", "etv.dsmcc.dii.module_abs_path",
+ FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_etv_dii_authority, {
+ "Authority", "etv.dsmcc.dii.authority",
+ FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
+ } }
+ };
+
+ static gint *ett[] = {
+ &ett_dsmcc,
+ &ett_dsmcc_payload,
+ &ett_dsmcc_adaptation_header,
+ &ett_dsmcc_header,
+ &ett_dsmcc_compat,
+ &ett_dsmcc_compat_sub_desc,
+ &ett_dsmcc_dii_module
+ };
+ module_t *dsmcc_module;
+
+ proto_dsmcc = proto_register_protocol("MPEG DSM-CC", "MPEG DSM-CC", "mpeg_dsmcc");
+
+ proto_register_field_array(proto_dsmcc, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+ new_register_dissector("mp2t-dsmcc", dissect_dsmcc_ts, proto_dsmcc);
+
+ dsmcc_module = prefs_register_protocol(proto_dsmcc, NULL);
+
+ prefs_register_bool_preference(dsmcc_module, "verify_crc",
+ "Verify the section CRC or checksum",
+ "Whether the section dissector should verify the CRC or checksum",
+ &dsmcc_sect_check_crc);
}
void
proto_reg_handoff_dsmcc(void)
{
- dissector_handle_t dsmcc_handle;
-
- dsmcc_handle = create_dissector_handle(dissect_dsmcc, proto_dsmcc);
- dissector_add_uint("mpeg_sect.tid", DSMCC_TID_LLCSNAP, dsmcc_handle);
- dissector_add_uint("mpeg_sect.tid", DSMCC_TID_UN_MSG, dsmcc_handle);
- dissector_add_uint("mpeg_sect.tid", DSMCC_TID_DD_MSG, dsmcc_handle);
- dissector_add_uint("mpeg_sect.tid", DSMCC_TID_DESC_LIST, dsmcc_handle);
- dissector_add_uint("mpeg_sect.tid", DSMCC_TID_PRIVATE, dsmcc_handle);
- data_handle = find_dissector("data");
+ dissector_handle_t dsmcc_handle;
+
+ dsmcc_handle = create_dissector_handle(dissect_dsmcc, proto_dsmcc);
+ dissector_add_uint("mpeg_sect.tid", DSMCC_TID_LLCSNAP, dsmcc_handle);
+ dissector_add_uint("mpeg_sect.tid", DSMCC_TID_UN_MSG, dsmcc_handle);
+ dissector_add_uint("mpeg_sect.tid", DSMCC_TID_DD_MSG, dsmcc_handle);
+ dissector_add_uint("mpeg_sect.tid", DSMCC_TID_DESC_LIST, dsmcc_handle);
+ dissector_add_uint("mpeg_sect.tid", DSMCC_TID_PRIVATE, dsmcc_handle);
+ data_handle = find_dissector("data");
}
/*
@@ -1063,10 +1063,10 @@ proto_reg_handoff_dsmcc(void)
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/
diff --git a/epan/dissectors/packet-mpeg-pat.c b/epan/dissectors/packet-mpeg-pat.c
index c8f66f8ae3..80cfa48275 100644
--- a/epan/dissectors/packet-mpeg-pat.c
+++ b/epan/dissectors/packet-mpeg-pat.c
@@ -47,18 +47,18 @@ static int hf_mpeg_pat_program_map_pid = -1;
static gint ett_mpeg_pat = -1;
static gint ett_mpeg_pat_prog = -1;
-#define MPEG_PAT_TID 0x00
+#define MPEG_PAT_TID 0x00
-#define MPEG_PAT_RESERVED_MASK 0xC0
-#define MPEG_PAT_VERSION_NUMBER_MASK 0x3E
-#define MPEG_PAT_CURRENT_NEXT_INDICATOR_MASK 0x01
+#define MPEG_PAT_RESERVED_MASK 0xC0
+#define MPEG_PAT_VERSION_NUMBER_MASK 0x3E
+#define MPEG_PAT_CURRENT_NEXT_INDICATOR_MASK 0x01
-#define MPEG_PAT_PROGRAM_RESERVED_MASK 0xE000
-#define MPEG_PAT_PROGRAM_MAP_PID_MASK 0x1FFF
+#define MPEG_PAT_PROGRAM_RESERVED_MASK 0xE000
+#define MPEG_PAT_PROGRAM_MAP_PID_MASK 0x1FFF
static const true_false_string mpeg_pat_cur_next_vals = {
- "Currently applicable", "Not yet applicable"
+ "Currently applicable", "Not yet applicable"
};
@@ -66,63 +66,62 @@ static void
dissect_mpeg_pat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset = 0, length = 0;
- guint16 prog_num = 0, prog_pid;
+ guint offset = 0, length = 0;
+ guint16 prog_num, prog_pid;
- proto_item *ti;
- proto_tree *mpeg_pat_tree;
- proto_item *pi;
- proto_tree *mpeg_pat_prog_tree;
+ proto_item *ti;
+ proto_tree *mpeg_pat_tree;
+ proto_item *pi;
+ proto_tree *mpeg_pat_prog_tree;
- /* The TVB should start right after the section_length in the Section packet */
+ /* The TVB should start right after the section_length in the Section packet */
- col_clear(pinfo->cinfo, COL_INFO);
- col_set_str(pinfo->cinfo, COL_INFO, "Program Association Table (PAT)");
+ col_set_str(pinfo->cinfo, COL_INFO, "Program Association Table (PAT)");
- ti = proto_tree_add_item(tree, proto_mpeg_pat, tvb, offset, -1, ENC_NA);
- mpeg_pat_tree = proto_item_add_subtree(ti, ett_mpeg_pat);
+ ti = proto_tree_add_item(tree, proto_mpeg_pat, tvb, offset, -1, ENC_NA);
+ mpeg_pat_tree = proto_item_add_subtree(ti, ett_mpeg_pat);
- offset += packet_mpeg_sect_header(tvb, offset, mpeg_pat_tree, &length, NULL);
- length -= 4;
+ offset += packet_mpeg_sect_header(tvb, offset, mpeg_pat_tree, &length, NULL);
+ length -= 4;
- proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_transport_stream_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(mpeg_pat_tree, hf_mpeg_pat_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- if (offset >= length)
- return;
+ if (offset >= length)
+ return;
- /* Parse all the programs */
- while (offset < length) {
+ /* Parse all the programs */
+ while (offset < length) {
- prog_num = tvb_get_ntohs(tvb, offset);
- prog_pid = tvb_get_ntohs(tvb, offset + 2) & MPEG_PAT_PROGRAM_MAP_PID_MASK;
+ prog_num = tvb_get_ntohs(tvb, offset);
+ prog_pid = tvb_get_ntohs(tvb, offset + 2) & MPEG_PAT_PROGRAM_MAP_PID_MASK;
- pi = proto_tree_add_text(mpeg_pat_tree, tvb, offset, 4, "Program 0x%04hx -> PID 0x%04hx", prog_num, prog_pid);
- mpeg_pat_prog_tree = proto_item_add_subtree(pi, ett_mpeg_pat_prog);
+ pi = proto_tree_add_text(mpeg_pat_tree, tvb, offset, 4, "Program 0x%04hx -> PID 0x%04hx", prog_num, prog_pid);
+ mpeg_pat_prog_tree = proto_item_add_subtree(pi, ett_mpeg_pat_prog);
- proto_tree_add_item(mpeg_pat_prog_tree, hf_mpeg_pat_program_number, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(mpeg_pat_prog_tree, hf_mpeg_pat_program_number, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(mpeg_pat_prog_tree, hf_mpeg_pat_program_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(mpeg_pat_prog_tree, hf_mpeg_pat_program_map_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(mpeg_pat_prog_tree, hf_mpeg_pat_program_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mpeg_pat_prog_tree, hf_mpeg_pat_program_map_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- }
+ }
- offset += packet_mpeg_sect_crc(tvb, pinfo, mpeg_pat_tree, 0, offset);
- proto_item_set_len(ti, offset);
+ offset += packet_mpeg_sect_crc(tvb, pinfo, mpeg_pat_tree, 0, offset);
+ proto_item_set_len(ti, offset);
}
@@ -130,74 +129,74 @@ void
proto_register_mpeg_pat(void)
{
- static hf_register_info hf[] = {
+ static hf_register_info hf[] = {
- { &hf_mpeg_pat_transport_stream_id, {
- "Transport Stream ID", "mpeg_pat.tsid",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
+ { &hf_mpeg_pat_transport_stream_id, {
+ "Transport Stream ID", "mpeg_pat.tsid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
- { &hf_mpeg_pat_reserved, {
- "Reserved", "mpeg_pat.reserved",
- FT_UINT8, BASE_HEX, NULL, MPEG_PAT_RESERVED_MASK, NULL, HFILL
- } },
+ { &hf_mpeg_pat_reserved, {
+ "Reserved", "mpeg_pat.reserved",
+ FT_UINT8, BASE_HEX, NULL, MPEG_PAT_RESERVED_MASK, NULL, HFILL
+ } },
- { &hf_mpeg_pat_version_number, {
- "Version Number", "mpeg_pat.version",
- FT_UINT8, BASE_HEX, NULL, MPEG_PAT_VERSION_NUMBER_MASK, NULL, HFILL
- } },
+ { &hf_mpeg_pat_version_number, {
+ "Version Number", "mpeg_pat.version",
+ FT_UINT8, BASE_HEX, NULL, MPEG_PAT_VERSION_NUMBER_MASK, NULL, HFILL
+ } },
- { &hf_mpeg_pat_current_next_indicator, {
- "Current/Next Indicator", "mpeg_pat.cur_next_ind",
- FT_BOOLEAN, 8, TFS(&mpeg_pat_cur_next_vals), MPEG_PAT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
- } },
+ { &hf_mpeg_pat_current_next_indicator, {
+ "Current/Next Indicator", "mpeg_pat.cur_next_ind",
+ FT_BOOLEAN, 8, TFS(&mpeg_pat_cur_next_vals), MPEG_PAT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
+ } },
- { &hf_mpeg_pat_section_number, {
- "Section Number", "mpeg_pat.sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
+ { &hf_mpeg_pat_section_number, {
+ "Section Number", "mpeg_pat.sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
- { &hf_mpeg_pat_last_section_number, {
- "Last Section Number", "mpeg_pat.last_sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
+ { &hf_mpeg_pat_last_section_number, {
+ "Last Section Number", "mpeg_pat.last_sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
- { &hf_mpeg_pat_program_number, {
- "Program Number", "mpeg_pat.prog_num",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
+ { &hf_mpeg_pat_program_number, {
+ "Program Number", "mpeg_pat.prog_num",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
- { &hf_mpeg_pat_program_reserved, {
- "Reserved", "mpeg_pat.prog_reserved",
- FT_UINT16, BASE_HEX, NULL, MPEG_PAT_PROGRAM_RESERVED_MASK, NULL, HFILL
- } },
+ { &hf_mpeg_pat_program_reserved, {
+ "Reserved", "mpeg_pat.prog_reserved",
+ FT_UINT16, BASE_HEX, NULL, MPEG_PAT_PROGRAM_RESERVED_MASK, NULL, HFILL
+ } },
- { &hf_mpeg_pat_program_map_pid, {
- "Program Map PID", "mpeg_pat.prog_map_pid",
- FT_UINT16, BASE_HEX, NULL, MPEG_PAT_PROGRAM_MAP_PID_MASK, NULL, HFILL
- } },
+ { &hf_mpeg_pat_program_map_pid, {
+ "Program Map PID", "mpeg_pat.prog_map_pid",
+ FT_UINT16, BASE_HEX, NULL, MPEG_PAT_PROGRAM_MAP_PID_MASK, NULL, HFILL
+ } },
- };
+ };
- static gint *ett[] = {
- &ett_mpeg_pat,
- &ett_mpeg_pat_prog
- };
+ static gint *ett[] = {
+ &ett_mpeg_pat,
+ &ett_mpeg_pat_prog
+ };
- proto_mpeg_pat = proto_register_protocol("MPEG2 Program Association Table", "MPEG PAT", "mpeg_pat");
+ proto_mpeg_pat = proto_register_protocol("MPEG2 Program Association Table", "MPEG PAT", "mpeg_pat");
- proto_register_field_array(proto_mpeg_pat, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_register_field_array(proto_mpeg_pat, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
void proto_reg_handoff_mpeg_pat(void)
{
- dissector_handle_t mpeg_pat_handle;
+ dissector_handle_t mpeg_pat_handle;
- mpeg_pat_handle = create_dissector_handle(dissect_mpeg_pat, proto_mpeg_pat);
- dissector_add_uint("mpeg_sect.tid", MPEG_PAT_TID, mpeg_pat_handle);
+ mpeg_pat_handle = create_dissector_handle(dissect_mpeg_pat, proto_mpeg_pat);
+ dissector_add_uint("mpeg_sect.tid", MPEG_PAT_TID, mpeg_pat_handle);
}
/*
@@ -205,10 +204,10 @@ void proto_reg_handoff_mpeg_pat(void)
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/
diff --git a/epan/dissectors/packet-mpeg-pmt.c b/epan/dissectors/packet-mpeg-pmt.c
index 011f8977e7..67af65cbf3 100644
--- a/epan/dissectors/packet-mpeg-pmt.c
+++ b/epan/dissectors/packet-mpeg-pmt.c
@@ -54,66 +54,66 @@ static int hf_mpeg_pmt_stream_es_info_length = -1;
static gint ett_mpeg_pmt = -1;
static gint ett_mpeg_pmt_stream = -1;
-#define MPEG_PMT_TID 0x02
+#define MPEG_PMT_TID 0x02
-#define MPEG_PMT_RESERVED1_MASK 0xC0
-#define MPEG_PMT_VERSION_NUMBER_MASK 0x3E
-#define MPEG_PMT_CURRENT_NEXT_INDICATOR_MASK 0x01
+#define MPEG_PMT_RESERVED1_MASK 0xC0
+#define MPEG_PMT_VERSION_NUMBER_MASK 0x3E
+#define MPEG_PMT_CURRENT_NEXT_INDICATOR_MASK 0x01
-#define MPEG_PMT_RESERVED2_MASK 0xE000
-#define MPEG_PMT_PCR_PID_MASK 0x1FFF
-#define MPEG_PMT_RESERVED3_MASK 0xF000
-#define MPEG_PMT_PROGRAM_INFO_LENGTH_MASK 0x0FFF
+#define MPEG_PMT_RESERVED2_MASK 0xE000
+#define MPEG_PMT_PCR_PID_MASK 0x1FFF
+#define MPEG_PMT_RESERVED3_MASK 0xF000
+#define MPEG_PMT_PROGRAM_INFO_LENGTH_MASK 0x0FFF
-#define MPEG_PMT_STREAM_RESERVED1_MASK 0xE000
-#define MPEG_PMT_STREAM_ELEMENTARY_PID_MASK 0x1FFF
+#define MPEG_PMT_STREAM_RESERVED1_MASK 0xE000
+#define MPEG_PMT_STREAM_ELEMENTARY_PID_MASK 0x1FFF
-#define MPEG_PMT_STREAM_RESERVED2_MASK 0xF000
-#define MPEG_PMT_STREAM_ES_INFO_LENGTH_MASK 0x0FFF
+#define MPEG_PMT_STREAM_RESERVED2_MASK 0xF000
+#define MPEG_PMT_STREAM_ES_INFO_LENGTH_MASK 0x0FFF
static const value_string mpeg_pmt_cur_next_vals[] = {
- { 0x0, "Not yet applicable" },
- { 0x1, "Currently applicable" },
+ { 0x0, "Not yet applicable" },
+ { 0x1, "Currently applicable" },
- { 0x0, NULL }
+ { 0x0, NULL }
};
static const value_string mpeg_pmt_stream_type_vals[] = {
- { 0x00, "ITU-T | ISO/IEC Reserved" },
- { 0x01, "ISO/IEC 11172 Video" },
- { 0x02, "ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream" },
- { 0x03, "ISO/IEC 11172 Audio" },
- { 0x04, "ISO/IEC 13818-3 Audio" },
- { 0x05, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections" },
- { 0x06, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data" },
- { 0x07, "ISO/IEC 13522 MHEG" },
- { 0x08, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Annex A DSM-CC" },
- { 0x09, "ITU-T Rec. H.222.1" },
- { 0x0A, "ISO/IEC 13818-6 type A" },
- { 0x0B, "ISO/IEC 13818-6 type B" },
- { 0x0C, "ISO/IEC 13818-6 type C" },
- { 0x0D, "ISO/IEC 13818-6 type D" },
- { 0x0E, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 auxiliary" },
- { 0x0F, "ISO/IEC 13818-7 Audio with ADTS transport syntax" },
- { 0x10, "ISO/IEC 14496-2 Visual" },
- { 0x11, "ISO/IEC 14496-3 Audio with the LATM transport syntax as defined in ISO/IEC 14496-3 / AMD 1" },
- { 0x12, "ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in PES packets" },
- { 0x13, "ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in ISO/IEC14496_sections" },
- { 0x14, "ISO/IEC 13818-6 Synchronized Download Protocol" },
- { 0x15, "Metadata carried in PES packets" },
- { 0x16, "Metadata carried in metadata sections" },
- { 0x17, "Metadata carried in ISO/IEC 13818-6 Data Carousel" },
- { 0x18, "Metadata carried in ISO/IEC 13818-6 Object Carousel" },
- { 0x19, "Metadata carried in ISO/IEC 13818-6 Synchronized Download Protocol" },
- { 0x1A, "IPMP stream (defined in ISO/IEC 13818-11, MPEG-2 IPMP)" },
- { 0x1B, "AVC video stream as defined in ITU-T Rec. H.264 | ISO/IEC 14496-10 Video" },
- { 0x7F, "IPMP stream" },
- { 0xA1, "ETV-AM BIF Data Stream" },
- { 0xC0, "ETV-AM EISS Signaling" },
- { 0x00, NULL }
+ { 0x00, "ITU-T | ISO/IEC Reserved" },
+ { 0x01, "ISO/IEC 11172 Video" },
+ { 0x02, "ITU-T Rec. H.262 | ISO/IEC 13818-2 Video or ISO/IEC 11172-2 constrained parameter video stream" },
+ { 0x03, "ISO/IEC 11172 Audio" },
+ { 0x04, "ISO/IEC 13818-3 Audio" },
+ { 0x05, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections" },
+ { 0x06, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data" },
+ { 0x07, "ISO/IEC 13522 MHEG" },
+ { 0x08, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Annex A DSM-CC" },
+ { 0x09, "ITU-T Rec. H.222.1" },
+ { 0x0A, "ISO/IEC 13818-6 type A" },
+ { 0x0B, "ISO/IEC 13818-6 type B" },
+ { 0x0C, "ISO/IEC 13818-6 type C" },
+ { 0x0D, "ISO/IEC 13818-6 type D" },
+ { 0x0E, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 auxiliary" },
+ { 0x0F, "ISO/IEC 13818-7 Audio with ADTS transport syntax" },
+ { 0x10, "ISO/IEC 14496-2 Visual" },
+ { 0x11, "ISO/IEC 14496-3 Audio with the LATM transport syntax as defined in ISO/IEC 14496-3 / AMD 1" },
+ { 0x12, "ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in PES packets" },
+ { 0x13, "ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in ISO/IEC14496_sections" },
+ { 0x14, "ISO/IEC 13818-6 Synchronized Download Protocol" },
+ { 0x15, "Metadata carried in PES packets" },
+ { 0x16, "Metadata carried in metadata sections" },
+ { 0x17, "Metadata carried in ISO/IEC 13818-6 Data Carousel" },
+ { 0x18, "Metadata carried in ISO/IEC 13818-6 Object Carousel" },
+ { 0x19, "Metadata carried in ISO/IEC 13818-6 Synchronized Download Protocol" },
+ { 0x1A, "IPMP stream (defined in ISO/IEC 13818-11, MPEG-2 IPMP)" },
+ { 0x1B, "AVC video stream as defined in ITU-T Rec. H.264 | ISO/IEC 14496-10 Video" },
+ { 0x7F, "IPMP stream" },
+ { 0xA1, "ETV-AM BIF Data Stream" },
+ { 0xC0, "ETV-AM EISS Signaling" },
+ { 0x00, NULL }
};
static value_string_ext mpeg_pmt_stream_type_vals_ext = VALUE_STRING_EXT_INIT(mpeg_pmt_stream_type_vals);
@@ -121,81 +121,81 @@ static int
dissect_mpeg_pmt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
- guint offset = 0, length = 0;
- guint descriptor_end, prog_info_len, es_info_len;
- guint16 pid;
+ guint offset = 0, length = 0;
+ guint descriptor_end, prog_info_len, es_info_len;
+ guint16 pid;
- proto_item *ti;
- proto_tree *mpeg_pmt_tree;
- proto_item *si;
- proto_tree *mpeg_pmt_stream_tree;
+ proto_item *ti;
+ proto_tree *mpeg_pmt_tree;
+ proto_item *si;
+ proto_tree *mpeg_pmt_stream_tree;
- /* The TVB should start right after the section_length in the Section packet */
+ /* The TVB should start right after the section_length in the Section packet */
- col_set_str(pinfo->cinfo, COL_INFO, "Program Map Table (PMT)");
+ col_set_str(pinfo->cinfo, COL_INFO, "Program Map Table (PMT)");
- ti = proto_tree_add_item(tree, proto_mpeg_pmt, tvb, offset, -1, ENC_NA);
- mpeg_pmt_tree = proto_item_add_subtree(ti, ett_mpeg_pmt);
+ ti = proto_tree_add_item(tree, proto_mpeg_pmt, tvb, offset, -1, ENC_NA);
+ mpeg_pmt_tree = proto_item_add_subtree(ti, ett_mpeg_pmt);
- offset += packet_mpeg_sect_header(tvb, offset, mpeg_pmt_tree, &length, NULL);
- length -= 4;
+ offset += packet_mpeg_sect_header(tvb, offset, mpeg_pmt_tree, &length, NULL);
+ length -= 4;
- proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_program_number, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_program_number, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_reserved1, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_version_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_current_next_indicator, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_reserved2, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_pcr_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_reserved2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_pcr_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- prog_info_len = tvb_get_ntohs(tvb, offset) & MPEG_PMT_PROGRAM_INFO_LENGTH_MASK;
- proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_reserved3, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_program_info_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ prog_info_len = tvb_get_ntohs(tvb, offset) & MPEG_PMT_PROGRAM_INFO_LENGTH_MASK;
+ proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_reserved3, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mpeg_pmt_tree, hf_mpeg_pmt_program_info_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- descriptor_end = offset + prog_info_len;
- while (offset < descriptor_end)
- offset += proto_mpeg_descriptor_dissect(tvb, offset, mpeg_pmt_tree);
+ descriptor_end = offset + prog_info_len;
+ while (offset < descriptor_end)
+ offset += proto_mpeg_descriptor_dissect(tvb, offset, mpeg_pmt_tree);
- while (offset < length) {
+ while (offset < length) {
- pid = tvb_get_ntohs(tvb, offset + 1) & MPEG_PMT_STREAM_ELEMENTARY_PID_MASK;
- es_info_len = tvb_get_ntohs(tvb, offset + 3) & MPEG_PMT_STREAM_ES_INFO_LENGTH_MASK;
+ pid = tvb_get_ntohs(tvb, offset + 1) & MPEG_PMT_STREAM_ELEMENTARY_PID_MASK;
+ es_info_len = tvb_get_ntohs(tvb, offset + 3) & MPEG_PMT_STREAM_ES_INFO_LENGTH_MASK;
- si = proto_tree_add_text(mpeg_pmt_tree, tvb, offset, 5 + es_info_len, "Stream PID=0x%04hx", pid);
- mpeg_pmt_stream_tree = proto_item_add_subtree(si, ett_mpeg_pmt_stream);
+ si = proto_tree_add_text(mpeg_pmt_tree, tvb, offset, 5 + es_info_len, "Stream PID=0x%04hx", pid);
+ mpeg_pmt_stream_tree = proto_item_add_subtree(si, ett_mpeg_pmt_stream);
- proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_type, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
+ proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_type, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
- proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_reserved1, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_elementary_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_reserved1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_elementary_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_reserved2, tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_es_info_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_reserved2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_es_info_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- descriptor_end = offset + es_info_len;
- while (offset < descriptor_end)
- offset += proto_mpeg_descriptor_dissect(tvb, offset, mpeg_pmt_stream_tree);
+ descriptor_end = offset + es_info_len;
+ while (offset < descriptor_end)
+ offset += proto_mpeg_descriptor_dissect(tvb, offset, mpeg_pmt_stream_tree);
- }
+ }
- offset += packet_mpeg_sect_crc(tvb, pinfo, mpeg_pmt_tree, 0, offset);
+ offset += packet_mpeg_sect_crc(tvb, pinfo, mpeg_pmt_tree, 0, offset);
- proto_item_set_len(ti, offset);
- return offset;
+ proto_item_set_len(ti, offset);
+ return offset;
}
@@ -203,107 +203,108 @@ void
proto_register_mpeg_pmt(void)
{
- static hf_register_info hf[] = {
-
- { &hf_mpeg_pmt_program_number, {
- "Program Number", "mpeg_pmt.pg_num",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_reserved1, {
- "Reserved", "mpeg_pmt.reserved1",
- FT_UINT8, BASE_HEX, NULL, MPEG_PMT_RESERVED1_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_version_number, {
- "Version Number", "mpeg_pmt.version",
- FT_UINT8, BASE_HEX, NULL, MPEG_PMT_VERSION_NUMBER_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_current_next_indicator, {
- "Current/Next Indicator", "mpeg_pmt.cur_next_ind",
- FT_UINT8, BASE_HEX, VALS(mpeg_pmt_cur_next_vals), MPEG_PMT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_section_number, {
- "Section Number", "mpeg_pmt.sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_last_section_number, {
- "Last Section Number", "mpeg_pmt.last_sect_num",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_reserved2, {
- "Reserved", "mpeg_pmt.reserved2",
- FT_UINT16, BASE_HEX, NULL, MPEG_PMT_RESERVED2_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_pcr_pid, {
- "PCR PID", "mpeg_pmt.pcr_pid",
- FT_UINT16, BASE_HEX, NULL, MPEG_PMT_PCR_PID_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_reserved3, {
- "Reserved", "mpeg_pmt.reserved3",
- FT_UINT16, BASE_HEX, NULL, MPEG_PMT_RESERVED3_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_program_info_length, {
- "Program Info Length", "mpeg_pmt.prog_info_len",
- FT_UINT16, BASE_HEX, NULL, MPEG_PMT_PROGRAM_INFO_LENGTH_MASK, NULL, HFILL
- } },
-
-
- { &hf_mpeg_pmt_stream_type, {
- "Stream type", "mpeg_pmt.stream.type",
- FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_pmt_stream_type_vals_ext, 0, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_stream_reserved1, {
- "Reserved", "mpeg_pmt.stream.reserved1",
- FT_UINT16, BASE_HEX, NULL, MPEG_PMT_STREAM_RESERVED1_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_stream_elementary_pid, {
- "Elementary PID", "mpeg_pmt.stream.elementary_pid",
- FT_UINT16, BASE_HEX, NULL, MPEG_PMT_STREAM_ELEMENTARY_PID_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_stream_reserved2, {
- "Reserved", "mpeg_pmt.stream.reserved2",
- FT_UINT16, BASE_HEX, NULL, MPEG_PMT_STREAM_RESERVED2_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_pmt_stream_es_info_length, {
- "ES Info Length", "mpeg_pmt.stream.es_info_len",
- FT_UINT16, BASE_HEX, NULL, MPEG_PMT_STREAM_ES_INFO_LENGTH_MASK, NULL, HFILL
- } },
-
- };
-
- static gint *ett[] = {
- &ett_mpeg_pmt,
- &ett_mpeg_pmt_stream,
- };
-
- proto_mpeg_pmt = proto_register_protocol("MPEG2 Program Map Table", "MPEG PMT", "mpeg_pmt");
-
- proto_register_field_array(proto_mpeg_pmt, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
-
- new_register_dissector("mpeg_pmt", dissect_mpeg_pmt, proto_mpeg_pmt);
+ static hf_register_info hf[] = {
+
+ { &hf_mpeg_pmt_program_number, {
+ "Program Number", "mpeg_pmt.pg_num",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_reserved1, {
+ "Reserved", "mpeg_pmt.reserved1",
+ FT_UINT8, BASE_HEX, NULL, MPEG_PMT_RESERVED1_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_version_number, {
+ "Version Number", "mpeg_pmt.version",
+ FT_UINT8, BASE_HEX, NULL, MPEG_PMT_VERSION_NUMBER_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_current_next_indicator, {
+ "Current/Next Indicator", "mpeg_pmt.cur_next_ind",
+ FT_UINT8, BASE_HEX, VALS(mpeg_pmt_cur_next_vals), MPEG_PMT_CURRENT_NEXT_INDICATOR_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_section_number, {
+ "Section Number", "mpeg_pmt.sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_last_section_number, {
+ "Last Section Number", "mpeg_pmt.last_sect_num",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_reserved2, {
+ "Reserved", "mpeg_pmt.reserved2",
+ FT_UINT16, BASE_HEX, NULL, MPEG_PMT_RESERVED2_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_pcr_pid, {
+ "PCR PID", "mpeg_pmt.pcr_pid",
+ FT_UINT16, BASE_HEX, NULL, MPEG_PMT_PCR_PID_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_reserved3, {
+ "Reserved", "mpeg_pmt.reserved3",
+ FT_UINT16, BASE_HEX, NULL, MPEG_PMT_RESERVED3_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_program_info_length, {
+ "Program Info Length", "mpeg_pmt.prog_info_len",
+ FT_UINT16, BASE_HEX, NULL, MPEG_PMT_PROGRAM_INFO_LENGTH_MASK, NULL, HFILL
+ } },
+
+
+ { &hf_mpeg_pmt_stream_type, {
+ "Stream type", "mpeg_pmt.stream.type",
+ FT_UINT8, BASE_HEX | BASE_EXT_STRING, &mpeg_pmt_stream_type_vals_ext, 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_stream_reserved1, {
+ "Reserved", "mpeg_pmt.stream.reserved1",
+ FT_UINT16, BASE_HEX, NULL, MPEG_PMT_STREAM_RESERVED1_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_stream_elementary_pid, {
+ "Elementary PID", "mpeg_pmt.stream.elementary_pid",
+ FT_UINT16, BASE_HEX, NULL, MPEG_PMT_STREAM_ELEMENTARY_PID_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_stream_reserved2, {
+ "Reserved", "mpeg_pmt.stream.reserved2",
+ FT_UINT16, BASE_HEX, NULL, MPEG_PMT_STREAM_RESERVED2_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_pmt_stream_es_info_length, {
+ "ES Info Length", "mpeg_pmt.stream.es_info_len",
+ FT_UINT16, BASE_HEX, NULL, MPEG_PMT_STREAM_ES_INFO_LENGTH_MASK, NULL, HFILL
+ } },
+
+ };
+
+ static gint *ett[] = {
+ &ett_mpeg_pmt,
+ &ett_mpeg_pmt_stream,
+ };
+
+ proto_mpeg_pmt = proto_register_protocol("MPEG2 Program Map Table", "MPEG PMT", "mpeg_pmt");
+
+ proto_register_field_array(proto_mpeg_pmt, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ new_register_dissector("mpeg_pmt", dissect_mpeg_pmt, proto_mpeg_pmt);
}
void
proto_reg_handoff_mpeg_pmt(void)
{
- dissector_handle_t mpeg_pmt_handle;
+ dissector_handle_t mpeg_pmt_handle;
- mpeg_pmt_handle = new_create_dissector_handle(dissect_mpeg_pmt, proto_mpeg_pmt);
- dissector_add_uint("mpeg_sect.tid", MPEG_PMT_TID, mpeg_pmt_handle);
+ mpeg_pmt_handle = find_dissector("mpeg_pmt");
+
+ dissector_add_uint("mpeg_sect.tid", MPEG_PMT_TID, mpeg_pmt_handle);
}
/*
@@ -311,10 +312,10 @@ proto_reg_handoff_mpeg_pmt(void)
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/
diff --git a/epan/dissectors/packet-mpeg-sect.c b/epan/dissectors/packet-mpeg-sect.c
index 2788ea4886..a2424a06ad 100644
--- a/epan/dissectors/packet-mpeg-sect.c
+++ b/epan/dissectors/packet-mpeg-sect.c
@@ -46,100 +46,100 @@ static dissector_table_t mpeg_sect_tid_dissector_table;
static gboolean mpeg_sect_check_crc = FALSE;
-#define MPEG_SECT_SYNTAX_INDICATOR_MASK 0x8000
-#define MPEG_SECT_RESERVED_MASK 0x7000
-#define MPEG_SECT_LENGTH_MASK 0x0FFF
+#define MPEG_SECT_SYNTAX_INDICATOR_MASK 0x8000
+#define MPEG_SECT_RESERVED_MASK 0x7000
+#define MPEG_SECT_LENGTH_MASK 0x0FFF
/* From ISO/IEC 13818-1 */
enum {
- TID_PAT,
- TID_CA,
- TID_PMT,
- TID_TS_DESC,
- TID_SCENE_DESC,
- TID_OBJECT_DESC,
- TID_FORBIDEN = 0xFF
+ TID_PAT,
+ TID_CA,
+ TID_PMT,
+ TID_TS_DESC,
+ TID_SCENE_DESC,
+ TID_OBJECT_DESC,
+ TID_FORBIDEN = 0xFF
};
/* From ETSI EN 300 468 */
enum {
- TID_NIT = 0x40,
- TID_NIT_OTHER,
- TID_SDT,
- TID_SDT_OTHER = 0x46,
- TID_BAT = 0x4A,
- TID_EIT = 0x4E,
- TID_EIT_OTHER,
- TID_TDT = 0x70,
- TID_RST,
- TID_ST,
- TID_TOT
+ TID_NIT = 0x40,
+ TID_NIT_OTHER,
+ TID_SDT,
+ TID_SDT_OTHER = 0x46,
+ TID_BAT = 0x4A,
+ TID_EIT = 0x4E,
+ TID_EIT_OTHER,
+ TID_TDT = 0x70,
+ TID_RST,
+ TID_ST,
+ TID_TOT
};
/* From ETSI EN 301 790 */
enum {
- TID_RMT = 0x41, /* Conflict with TID_NIT_OTHER */
- TID_SCT = 0xA0,
- TID_FCT,
- TID_TCT,
- TID_SPT,
- TID_CMT,
- TID_TBTP,
- TID_PCR,
- TID_TIM = 0xB0
+ TID_RMT = 0x41, /* Conflict with TID_NIT_OTHER */
+ TID_SCT = 0xA0,
+ TID_FCT,
+ TID_TCT,
+ TID_SPT,
+ TID_CMT,
+ TID_TBTP,
+ TID_PCR,
+ TID_TIM = 0xB0
};
/* From ESTI EN 301 192 */
enum {
- TID_DVB_MPE = 0x3E
+ TID_DVB_MPE = 0x3E
};
/* From OC-SP-ETV-AM 1.0-IO5 */
enum {
- TID_ETV_EISS = 0xE0,
- TID_ETV_DII = 0xE3,
- TID_ETV_DDB = 0xE4
+ TID_ETV_EISS = 0xE0,
+ TID_ETV_DII = 0xE3,
+ TID_ETV_DDB = 0xE4
};
/* From ETSI TS 102 899 */
enum {
- TID_AIT = 0x74
+ TID_AIT = 0x74
};
static const value_string mpeg_sect_table_id_vals[] = {
- { TID_PAT, "Program Association Table (PAT)" },
- { TID_CA, "Conditional Access (CA)" },
- { TID_PMT, "Program Map Table (PMT)" },
- { TID_TS_DESC, "Transport Stream Description" },
- { TID_SCENE_DESC, "ISO/IEC 14496 Scene Description" },
- { TID_OBJECT_DESC, "ISO/IEC 14496 Object Description" },
- { TID_NIT, "Network Information Table (NIT), current network" },
- { TID_NIT_OTHER, "Network Information Table (NIT), other network" },
- { TID_SDT, "Service Description Table (SDT), current network" },
- { TID_SDT_OTHER, "Service Description (SDT), other network" },
- { TID_BAT, "Bouquet Associatoin Table (BAT)" },
- { TID_EIT, "Event Information Table (EIT), actual TS" },
- { TID_EIT_OTHER, "Event Information Table (EIT), other TS" },
- { TID_TDT, "Time and Date Table (TDT)" },
- { TID_RST, "Running Status Table (RST)" },
- { TID_ST, "Stuffing Table (ST)" },
- { TID_TOT, "Time Offset Table (TOT)" },
- { TID_AIT, "Application Information Table (AIT)" },
- { TID_SCT, "Superframe Composition Table (SCT)" },
- { TID_FCT, "Frame Composition Table (FCT)" },
- { TID_TCT, "Time-Slot Composition Table (TCT)" },
- { TID_SPT, "Satellite Position Table (SPT)" },
- { TID_CMT, "Correction Message Table (CMT)" },
- { TID_TBTP, "Terminal Burst Time Plan (TBTP)" },
- { TID_TIM, "Terminal Information Message (TIM)" },
- { TID_DVB_MPE, "DVB MultiProtocol Encapsulation (MPE)" },
- { TID_ETV_EISS, "ETV Integrated Signaling Stream (EISS)" },
- { TID_ETV_DII, "ETV Download Info Indication" },
- { TID_ETV_DDB, "ETV Download Data Block" },
- { TID_FORBIDEN, "Forbidden" },
- { 0, NULL }
+ { TID_PAT, "Program Association Table (PAT)" },
+ { TID_CA, "Conditional Access (CA)" },
+ { TID_PMT, "Program Map Table (PMT)" },
+ { TID_TS_DESC, "Transport Stream Description" },
+ { TID_SCENE_DESC, "ISO/IEC 14496 Scene Description" },
+ { TID_OBJECT_DESC, "ISO/IEC 14496 Object Description" },
+ { TID_NIT, "Network Information Table (NIT), current network" },
+ { TID_NIT_OTHER, "Network Information Table (NIT), other network" },
+ { TID_SDT, "Service Description Table (SDT), current network" },
+ { TID_SDT_OTHER, "Service Description (SDT), other network" },
+ { TID_BAT, "Bouquet Associatoin Table (BAT)" },
+ { TID_EIT, "Event Information Table (EIT), actual TS" },
+ { TID_EIT_OTHER, "Event Information Table (EIT), other TS" },
+ { TID_TDT, "Time and Date Table (TDT)" },
+ { TID_RST, "Running Status Table (RST)" },
+ { TID_ST, "Stuffing Table (ST)" },
+ { TID_TOT, "Time Offset Table (TOT)" },
+ { TID_AIT, "Application Information Table (AIT)" },
+ { TID_SCT, "Superframe Composition Table (SCT)" },
+ { TID_FCT, "Frame Composition Table (FCT)" },
+ { TID_TCT, "Time-Slot Composition Table (TCT)" },
+ { TID_SPT, "Satellite Position Table (SPT)" },
+ { TID_CMT, "Correction Message Table (CMT)" },
+ { TID_TBTP, "Terminal Burst Time Plan (TBTP)" },
+ { TID_TIM, "Terminal Information Message (TIM)" },
+ { TID_DVB_MPE, "DVB MultiProtocol Encapsulation (MPE)" },
+ { TID_ETV_EISS, "ETV Integrated Signaling Stream (EISS)" },
+ { TID_ETV_DII, "ETV Download Info Indication" },
+ { TID_ETV_DDB, "ETV Download Data Block" },
+ { TID_FORBIDEN, "Forbidden" },
+ { 0, NULL }
};
/* From packet-dvbci.c
@@ -150,213 +150,213 @@ static const value_string mpeg_sect_table_id_vals[] = {
gint
packet_mpeg_sect_mjd_to_utc_time(tvbuff_t *tvb, gint offset, nstime_t *utc_time)
{
- gint bcd_time_offset; /* start offset of the bcd time in the tvbuff */
- guint8 hour, min, sec;
-
- if (!utc_time)
- return -1;
-
- nstime_set_zero(utc_time);
- utc_time->secs = (tvb_get_ntohs(tvb, offset) - 40587) * 86400;
- bcd_time_offset = offset+2;
- hour = MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, bcd_time_offset));
- min = MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, bcd_time_offset+1));
- sec = MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, bcd_time_offset+2));
- if (hour>23 || min>59 || sec>59)
- return -1;
-
- utc_time->secs += hour*3600 + min*60 + sec;
- return 5;
+ gint bcd_time_offset; /* start offset of the bcd time in the tvbuff */
+ guint8 hour, min, sec;
+
+ if (!utc_time)
+ return -1;
+
+ nstime_set_zero(utc_time);
+ utc_time->secs = (tvb_get_ntohs(tvb, offset) - 40587) * 86400;
+ bcd_time_offset = offset+2;
+ hour = MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, bcd_time_offset));
+ min = MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, bcd_time_offset+1));
+ sec = MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, bcd_time_offset+2));
+ if (hour>23 || min>59 || sec>59)
+ return -1;
+
+ utc_time->secs += hour*3600 + min*60 + sec;
+ return 5;
}
guint
packet_mpeg_sect_header(tvbuff_t *tvb, guint offset,
- proto_tree *tree, guint *sect_len, gboolean *ssi)
+ proto_tree *tree, guint *sect_len, gboolean *ssi)
{
- return packet_mpeg_sect_header_extra(tvb, offset, tree, sect_len,
- NULL, ssi, NULL);
+ return packet_mpeg_sect_header_extra(tvb, offset, tree, sect_len,
+ NULL, ssi, NULL);
}
guint
packet_mpeg_sect_header_extra(tvbuff_t *tvb, guint offset, proto_tree *tree,
- guint *sect_len, guint *reserved, gboolean *ssi,
- proto_item **items)
+ guint *sect_len, guint *reserved, gboolean *ssi,
+ proto_item **items)
{
- guint tmp;
- guint len = 0;
- proto_item *pi[PACKET_MPEG_SECT_PI__SIZE];
- gint i;
+ guint tmp;
+ guint len = 0;
+ proto_item *pi[PACKET_MPEG_SECT_PI__SIZE];
+ gint i;
- for (i = 0; i < PACKET_MPEG_SECT_PI__SIZE; i++) {
- pi[i] = NULL;
- }
+ for (i = 0; i < PACKET_MPEG_SECT_PI__SIZE; i++) {
+ pi[i] = NULL;
+ }
- if (tree) {
- pi[PACKET_MPEG_SECT_PI__TABLE_ID] =
- proto_tree_add_item(tree, hf_mpeg_sect_table_id,
- tvb, offset + len, 1, ENC_BIG_ENDIAN);
- }
+ if (tree) {
+ pi[PACKET_MPEG_SECT_PI__TABLE_ID] =
+ proto_tree_add_item(tree, hf_mpeg_sect_table_id,
+ tvb, offset + len, 1, ENC_BIG_ENDIAN);
+ }
- len++;
+ len++;
- if (tree) {
- pi[PACKET_MPEG_SECT_PI__SSI] =
- proto_tree_add_item(tree, hf_mpeg_sect_syntax_indicator,
- tvb, offset + len, 2, ENC_BIG_ENDIAN);
+ if (tree) {
+ pi[PACKET_MPEG_SECT_PI__SSI] =
+ proto_tree_add_item(tree, hf_mpeg_sect_syntax_indicator,
+ tvb, offset + len, 2, ENC_BIG_ENDIAN);
- pi[PACKET_MPEG_SECT_PI__RESERVED] =
- proto_tree_add_item(tree, hf_mpeg_sect_reserved, tvb,
- offset + len, 2, ENC_BIG_ENDIAN);
+ pi[PACKET_MPEG_SECT_PI__RESERVED] =
+ proto_tree_add_item(tree, hf_mpeg_sect_reserved, tvb,
+ offset + len, 2, ENC_BIG_ENDIAN);
- pi[PACKET_MPEG_SECT_PI__LENGTH] =
- proto_tree_add_item(tree, hf_mpeg_sect_length, tvb,
- offset + len, 2, ENC_BIG_ENDIAN);
- }
+ pi[PACKET_MPEG_SECT_PI__LENGTH] =
+ proto_tree_add_item(tree, hf_mpeg_sect_length, tvb,
+ offset + len, 2, ENC_BIG_ENDIAN);
+ }
- tmp = tvb_get_ntohs(tvb, offset + len);
+ tmp = tvb_get_ntohs(tvb, offset + len);
- if (sect_len)
- *sect_len = MPEG_SECT_LENGTH_MASK & tmp;
+ if (sect_len)
+ *sect_len = MPEG_SECT_LENGTH_MASK & tmp;
- if (reserved)
- *reserved = (MPEG_SECT_RESERVED_MASK & tmp) >> 12;
+ if (reserved)
+ *reserved = (MPEG_SECT_RESERVED_MASK & tmp) >> 12;
- if (ssi)
- *ssi = (MPEG_SECT_SYNTAX_INDICATOR_MASK & tmp);
+ if (ssi)
+ *ssi = (MPEG_SECT_SYNTAX_INDICATOR_MASK & tmp);
- if (items) {
- for (i = 0; i < PACKET_MPEG_SECT_PI__SIZE; i++) {
- items[i] = pi[i];
- }
- }
+ if (items) {
+ for (i = 0; i < PACKET_MPEG_SECT_PI__SIZE; i++) {
+ items[i] = pi[i];
+ }
+ }
- len += 2;
+ len += 2;
- return len;
+ return len;
}
guint
packet_mpeg_sect_crc(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *tree, guint start, guint end)
+ proto_tree *tree, guint start, guint end)
{
- guint32 crc, calculated_crc;
- const char *label;
-
- crc = tvb_get_ntohl(tvb, end);
-
- calculated_crc = crc;
- label = "Unverified";
- if (mpeg_sect_check_crc) {
- label = "Verified";
- calculated_crc = crc32_mpeg2_tvb_offset(tvb, start, end);
- }
-
- if (calculated_crc == crc) {
- proto_tree_add_uint_format( tree, hf_mpeg_sect_crc, tvb,
- end, 4, crc, "CRC: 0x%08x [%s]", crc, label);
- } else {
- proto_item *msg_error = NULL;
-
- msg_error = proto_tree_add_uint_format( tree, hf_mpeg_sect_crc, tvb,
- end, 4, crc,
- "CRC: 0x%08x [Failed Verification (Calculated: 0x%08x)]",
- crc, calculated_crc );
- PROTO_ITEM_SET_GENERATED(msg_error);
- expert_add_info_format( pinfo, msg_error, PI_MALFORMED,
- PI_ERROR, "Invalid CRC" );
- }
-
- return 4;
+ guint32 crc, calculated_crc;
+ const char *label;
+
+ crc = tvb_get_ntohl(tvb, end);
+
+ calculated_crc = crc;
+ label = "Unverified";
+ if (mpeg_sect_check_crc) {
+ label = "Verified";
+ calculated_crc = crc32_mpeg2_tvb_offset(tvb, start, end);
+ }
+
+ if (calculated_crc == crc) {
+ proto_tree_add_uint_format( tree, hf_mpeg_sect_crc, tvb,
+ end, 4, crc, "CRC: 0x%08x [%s]", crc, label);
+ } else {
+ proto_item *msg_error = NULL;
+
+ msg_error = proto_tree_add_uint_format( tree, hf_mpeg_sect_crc, tvb,
+ end, 4, crc,
+ "CRC: 0x%08x [Failed Verification (Calculated: 0x%08x)]",
+ crc, calculated_crc );
+ PROTO_ITEM_SET_GENERATED(msg_error);
+ expert_add_info_format( pinfo, msg_error, PI_MALFORMED,
+ PI_ERROR, "Invalid CRC" );
+ }
+
+ return 4;
}
static void
dissect_mpeg_sect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- gint offset = 0;
- guint section_length = 0;
- gboolean syntax_indicator = FALSE;
- guint8 table_id;
+ gint offset = 0;
+ guint section_length = 0;
+ gboolean syntax_indicator = FALSE;
+ guint8 table_id;
- proto_item *ti;
- proto_tree *mpeg_sect_tree;
+ proto_item *ti;
+ proto_tree *mpeg_sect_tree;
- table_id = tvb_get_guint8(tvb, offset);
+ table_id = tvb_get_guint8(tvb, offset);
- /* Check if a dissector can parse the current table */
- if (dissector_try_uint(mpeg_sect_tid_dissector_table, table_id, tvb, pinfo, tree))
- return;
+ /* Check if a dissector can parse the current table */
+ if (dissector_try_uint(mpeg_sect_tid_dissector_table, table_id, tvb, pinfo, tree))
+ return;
- /* If no dissector is registered, use the common one */
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "MPEG SECT");
- col_add_fstr(pinfo->cinfo, COL_INFO, "Table ID 0x%02x", table_id);
+ /* If no dissector is registered, use the common one */
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MPEG SECT");
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Table ID 0x%02x", table_id);
- ti = proto_tree_add_item(tree, proto_mpeg_sect, tvb, offset, -1, ENC_NA);
- mpeg_sect_tree = proto_item_add_subtree(ti, ett_mpeg_sect);
+ ti = proto_tree_add_item(tree, proto_mpeg_sect, tvb, offset, -1, ENC_NA);
+ mpeg_sect_tree = proto_item_add_subtree(ti, ett_mpeg_sect);
- proto_item_append_text(ti, " Table_ID=0x%02x", table_id);
+ proto_item_append_text(ti, " Table_ID=0x%02x", table_id);
- packet_mpeg_sect_header(tvb, offset, mpeg_sect_tree,
- &section_length, &syntax_indicator);
+ packet_mpeg_sect_header(tvb, offset, mpeg_sect_tree,
+ &section_length, &syntax_indicator);
- if (syntax_indicator)
- packet_mpeg_sect_crc(tvb, pinfo, mpeg_sect_tree, 0, (section_length-1));
+ if (syntax_indicator)
+ packet_mpeg_sect_crc(tvb, pinfo, mpeg_sect_tree, 0, (section_length-1));
}
void
proto_register_mpeg_sect(void)
{
- static hf_register_info hf[] = {
- { &hf_mpeg_sect_table_id, {
- "Table ID", "mpeg_sect.tid",
- FT_UINT8, BASE_HEX, VALS(mpeg_sect_table_id_vals), 0, NULL, HFILL
- } },
-
- { &hf_mpeg_sect_syntax_indicator, {
- "Syntax indicator", "mpeg_sect.syntax_indicator",
- FT_UINT16, BASE_DEC, NULL, MPEG_SECT_SYNTAX_INDICATOR_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_sect_reserved, {
- "Reserved", "mpeg_sect.reserved",
- FT_UINT16, BASE_HEX, NULL, MPEG_SECT_RESERVED_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_sect_length, {
- "Length", "mpeg_sect.len",
- FT_UINT16, BASE_DEC, NULL, MPEG_SECT_LENGTH_MASK, NULL, HFILL
- } },
-
- { &hf_mpeg_sect_crc, {
- "CRC 32", "mpeg_sect.crc",
- FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
- } }
- };
-
- static gint *ett[] = {
- &ett_mpeg_sect
- };
- module_t *mpeg_sect_module;
-
- proto_mpeg_sect = proto_register_protocol("MPEG2 Section", "MPEG SECT", "mpeg_sect");
- register_dissector("mpeg_sect", dissect_mpeg_sect, proto_mpeg_sect);
-
- proto_register_field_array(proto_mpeg_sect, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
-
- mpeg_sect_module = prefs_register_protocol(proto_mpeg_sect, NULL);
-
- prefs_register_bool_preference(mpeg_sect_module,
- "verify_crc",
- "Verify the section CRC",
- "Whether the section dissector should verify the CRC",
- &mpeg_sect_check_crc);
-
- mpeg_sect_tid_dissector_table = register_dissector_table("mpeg_sect.tid",
- "MPEG SECT Table ID",
- FT_UINT8, BASE_HEX);
+ static hf_register_info hf[] = {
+ { &hf_mpeg_sect_table_id, {
+ "Table ID", "mpeg_sect.tid",
+ FT_UINT8, BASE_HEX, VALS(mpeg_sect_table_id_vals), 0, NULL, HFILL
+ } },
+
+ { &hf_mpeg_sect_syntax_indicator, {
+ "Syntax indicator", "mpeg_sect.syntax_indicator",
+ FT_UINT16, BASE_DEC, NULL, MPEG_SECT_SYNTAX_INDICATOR_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_sect_reserved, {
+ "Reserved", "mpeg_sect.reserved",
+ FT_UINT16, BASE_HEX, NULL, MPEG_SECT_RESERVED_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_sect_length, {
+ "Length", "mpeg_sect.len",
+ FT_UINT16, BASE_DEC, NULL, MPEG_SECT_LENGTH_MASK, NULL, HFILL
+ } },
+
+ { &hf_mpeg_sect_crc, {
+ "CRC 32", "mpeg_sect.crc",
+ FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
+ } }
+ };
+
+ static gint *ett[] = {
+ &ett_mpeg_sect
+ };
+ module_t *mpeg_sect_module;
+
+ proto_mpeg_sect = proto_register_protocol("MPEG2 Section", "MPEG SECT", "mpeg_sect");
+ register_dissector("mpeg_sect", dissect_mpeg_sect, proto_mpeg_sect);
+
+ proto_register_field_array(proto_mpeg_sect, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+ mpeg_sect_module = prefs_register_protocol(proto_mpeg_sect, NULL);
+
+ prefs_register_bool_preference(mpeg_sect_module,
+ "verify_crc",
+ "Verify the section CRC",
+ "Whether the section dissector should verify the CRC",
+ &mpeg_sect_check_crc);
+
+ mpeg_sect_tid_dissector_table = register_dissector_table("mpeg_sect.tid",
+ "MPEG SECT Table ID",
+ FT_UINT8, BASE_HEX);
}
@@ -365,10 +365,10 @@ proto_register_mpeg_sect(void)
*
* Local variables:
* c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: t
+ * tab-width: 8
+ * indent-tabs-mode: nil
* End:
*
- * vi: set shiftwidth=4 tabstop=4 noexpandtab:
- * :indentSize=4:tabSize=4:noTabs=false:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
*/