aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ua3g.c
diff options
context:
space:
mode:
authorNicolas Bertin <nicolas.bertin@al-enterprise.com>2018-06-06 12:37:01 +0200
committerAnders Broman <a.broman58@gmail.com>2018-06-08 03:52:09 +0000
commit0d25e3d11fc20ffc897df5b95bc1ec6d584dc213 (patch)
tree56746a4284fd51f350e671aee59d2f075658f66c /epan/dissectors/packet-ua3g.c
parentf8092f96b373f851eb91ae2ff94581bcba8d0279 (diff)
ua3g: updated freeseating message decoding to support ipv6 address in maincpu0 and maincpu1 parameters.
Change-Id: Ia0731906e7daaabd9e159aa95db76f54345a927a Reviewed-on: https://code.wireshark.org/review/28058 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ua3g.c')
-rw-r--r--epan/dissectors/packet-ua3g.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ua3g.c b/epan/dissectors/packet-ua3g.c
index 842284a89d..a4aced9369 100644
--- a/epan/dissectors/packet-ua3g.c
+++ b/epan/dissectors/packet-ua3g.c
@@ -273,6 +273,7 @@ static int hf_ua3g_ip_device_routing_freeseating_parameter = -1;
static int hf_ua3g_ip_device_routing_freeseating_parameter_length = -1;
static int hf_ua3g_ip_device_routing_freeseating_parameter_mac = -1;
static int hf_ua3g_ip_device_routing_freeseating_parameter_ip = -1;
+static int hf_ua3g_ip_device_routing_freeseating_parameter_ipv6 = -1;
static int hf_ua3g_ip_device_routing_freeseating_parameter_uint = -1;
static int hf_ua3g_ip_device_routing_freeseating_parameter_value = -1;
static int hf_ua3g_main_voice_mode_handset_level = -1;
@@ -1771,8 +1772,21 @@ decode_ip_device_routing(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
break;
case 0x01: /* Maincpu1 */
case 0x02: /* Maincpu2 */
- proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_freeseating_parameter_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
+ {
+ int hf = -1;
+
+ if (parameter_length == FT_IPv4_LEN)
+ hf = hf_ua3g_ip_device_routing_freeseating_parameter_ip;
+ else
+ if (parameter_length == FT_IPv6_LEN)
+ hf = hf_ua3g_ip_device_routing_freeseating_parameter_ipv6;
+
+ if (hf != -1)
+ proto_tree_add_item(ua3g_param_tree, hf, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
+ else
+ proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_freeseating_parameter_value, tvb, offset, parameter_length, ENC_NA);
break;
+ }
default:
if (parameter_length <= 8) {
proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_freeseating_parameter_uint, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
@@ -4657,6 +4671,7 @@ proto_register_ua3g(void)
{ &hf_ua3g_ip_device_routing_freeseating_parameter_uint, { "Value", "ua3g.ip.freeseating.parameter.uint", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_ua3g_ip_device_routing_freeseating_parameter_mac, { "Value", "ua3g.ip.freeseating.parameter.mac", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_ua3g_ip_device_routing_freeseating_parameter_ip, { "Value", "ua3g.ip.freeseating.parameter.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_ua3g_ip_device_routing_freeseating_parameter_ipv6, { "Value", "ua3g.ip.freeseating.parameter.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_ua3g_audio_config_dpi_chan_ua_tx1, { "UA Channel UA-TX1", "ua3g.command.audio_config.dpi_chan.ua_tx1", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_ua3g_audio_config_dpi_chan_ua_tx2, { "UA Channel UA-TX2", "ua3g.command.audio_config.dpi_chan.ua_tx2", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_ua3g_audio_config_dpi_chan_gci_tx1, { "GCI Channel GCI-TX1", "ua3g.command.audio_config.dpi_chan.gci_tx1", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},