aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornbertin <nicolas.bertin@al-enterprise.com>2019-02-01 16:54:08 +0100
committerAnders Broman <a.broman58@gmail.com>2019-02-04 21:09:41 +0000
commitbfceb99f9331d6a96db92b34c704ca41f83588ac (patch)
tree90976fc1c385570f0f12ca235d1724a7d4490a8e
parent6aaae113d5df1b0cecea0230536ab145c93c97f2 (diff)
ua3g: add support for decoding of set-appl-param (id, enable, url) message
Change-Id: I57e3b3e6048c5279875c35d772eb7e6f72c2ecbf Reviewed-on: https://code.wireshark.org/review/31850 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-ua3g.c65
1 files changed, 65 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ua3g.c b/epan/dissectors/packet-ua3g.c
index c18df7816a..bf396c1f61 100644
--- a/epan/dissectors/packet-ua3g.c
+++ b/epan/dissectors/packet-ua3g.c
@@ -277,6 +277,13 @@ static int hf_ua3g_ip_device_routing_freeseating_parameter_ipv6 = -1;
static int hf_ua3g_ip_device_routing_freeseating_parameter_do_reset = -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_ip_device_routing_appl_parameter = -1;
+static int hf_ua3g_ip_device_routing_appl_parameter_length = -1;
+static int hf_ua3g_ip_device_routing_appl_parameter_id = -1;
+static int hf_ua3g_ip_device_routing_appl_parameter_enable = -1;
+static int hf_ua3g_ip_device_routing_appl_parameter_url = -1;
+static int hf_ua3g_ip_device_routing_appl_parameter_uint = -1;
+static int hf_ua3g_ip_device_routing_appl_parameter_value = -1;
static int hf_ua3g_main_voice_mode_handset_level = -1;
static int hf_ua3g_main_voice_mode_headset_level = -1;
static int hf_ua3g_main_voice_mode_handsfree_level = -1;
@@ -859,6 +866,7 @@ static const value_string str_command_ip_device_routing[] = {
{0x0F, "Stop Record RTP"},
{0x10, "Set SIP Parameters"},
{0x11, "Free Seating"},
+ {0x14, "Application Parameters"},
{0, NULL}
};
@@ -1071,6 +1079,13 @@ static const value_string ip_device_routing_cmd_freeseating_vals[] = {
{0, NULL}
};
+static const value_string ip_device_routing_cmd_appl_vals[] = {
+ {0x00 , "Identifier"},
+ {0x01 , "Enable"},
+ {0x02 , "URL"},
+ {0, NULL}
+};
+
static const value_string ip_device_routing_tone_direction_vals[] = {
{0x00, "On The Phone"},
{0x01, "To The Network"},
@@ -1807,6 +1822,49 @@ decode_ip_device_routing(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
}
}
break;
+ case 0x14: /* Set Appl Param */
+ while (length > 0) {
+ parameter_id = tvb_get_guint8(tvb, offset);
+ parameter_length = tvb_get_guint8(tvb, offset + 1);
+
+ ua3g_param_item = proto_tree_add_uint_format(ua3g_body_tree, hf_ua3g_ip_device_routing_appl_parameter, tvb, offset,
+ parameter_length + 2, parameter_id, "%s", val_to_str_const(parameter_id, ip_device_routing_cmd_appl_vals, "Unknown"));
+ ua3g_param_tree = proto_item_add_subtree(ua3g_param_item, ett_ua3g_param);
+
+ proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_appl_parameter, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+ length--;
+
+ proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_appl_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+ length--;
+
+ if (parameter_length > 0) {
+ switch (parameter_id) {
+ case 0x00: /* Identifier */
+ proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_appl_parameter_id, tvb, offset, parameter_length, ENC_STRING);
+ break;
+ case 0x01: /* Enable */
+ proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_appl_parameter_enable, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
+ break;
+ case 0x02: /* URL */
+ {
+ proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_appl_parameter_url, tvb, offset, parameter_length, ENC_STRING);
+ break;
+ }
+ default:
+ if (parameter_length <= 8) {
+ proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_appl_parameter_uint, tvb, offset, parameter_length, ENC_BIG_ENDIAN);
+ } else {
+ proto_tree_add_item(ua3g_param_tree, hf_ua3g_ip_device_routing_appl_parameter_value, tvb, offset, parameter_length, ENC_NA);
+ }
+ break;
+ }
+ offset += parameter_length;
+ length -= parameter_length;
+ }
+ }
+ break;
case 0x06: /* STOP TONE */
default:
{
@@ -4680,6 +4738,13 @@ proto_register_ua3g(void)
{ &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_ip_device_routing_freeseating_parameter_do_reset, { "Value", "ua3g.ip.freeseating.parameter.do_reset", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_ua3g_ip_device_routing_appl_parameter, { "Parameter", "ua3g.ip.appl.parameter", FT_UINT8, BASE_HEX, VALS(ip_device_routing_cmd_appl_vals), 0x0, NULL, HFILL }},
+ { &hf_ua3g_ip_device_routing_appl_parameter_length, { "Length", "ua3g.ip.appl.parameter.length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_ua3g_ip_device_routing_appl_parameter_value, { "Value", "ua3g.ip.appl.parameter.value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_ua3g_ip_device_routing_appl_parameter_uint, { "Value", "ua3g.ip.appl.parameter.uint", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_ua3g_ip_device_routing_appl_parameter_id, { "Value", "ua3g.ip.appl.parameter.id", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_ua3g_ip_device_routing_appl_parameter_enable, { "Value", "ua3g.ip.appl.parameter.enable", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
+ { &hf_ua3g_ip_device_routing_appl_parameter_url, { "Value", "ua3g.ip.appl.parameter.url", FT_STRING, 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 }},