diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2014-05-30 19:20:11 +0200 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2014-05-30 17:21:32 +0000 |
commit | 419ea28960b54ceade6216b4b9b302b6d4de1e70 (patch) | |
tree | 1415c79cdc275769303cbc54c2f5ffc066c9d297 | |
parent | bc3ab61ddacab2ec6072c2709af3df405e18dfc3 (diff) |
make terrestrial centre frequency filterable
Change-Id: I007ff5215f52f80f25622cab6980128eabd39c5f
Reviewed-on: https://code.wireshark.org/review/1888
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
-rw-r--r-- | epan/dissectors/packet-mpeg-descriptor.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/epan/dissectors/packet-mpeg-descriptor.c b/epan/dissectors/packet-mpeg-descriptor.c index 828e0272f1..e20c0a2e40 100644 --- a/epan/dissectors/packet-mpeg-descriptor.c +++ b/epan/dissectors/packet-mpeg-descriptor.c @@ -1930,11 +1930,14 @@ static const value_string mpeg_descr_terrestrial_delivery_transmission_mode_vals static void proto_mpeg_descriptor_dissect_terrestrial_delivery(tvbuff_t *tvb, guint offset, proto_tree *tree) { - guint32 centre_freq; + guint64 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); + /* the descriptor stores the centre frequency in units of 10Hz (so + that they can get away with 32bits), we're using Hz here */ + centre_freq = tvb_get_ntohl(tvb, offset) * 10; + + proto_tree_add_uint64_format_value(tree, hf_mpeg_descr_terrestrial_delivery_centre_frequency, tvb, offset, 4, + centre_freq, "%d.%06d MHz", (guint)centre_freq/(1000*1000), (guint)centre_freq%(1000*1000)); offset += 4; proto_tree_add_item(tree, hf_mpeg_descr_terrestrial_delivery_bandwidth, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -3794,7 +3797,7 @@ proto_register_mpeg_descriptor(void) /* 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 + FT_UINT64, BASE_DEC, NULL, 0, NULL, HFILL } }, { &hf_mpeg_descr_terrestrial_delivery_bandwidth, { |