IEEE802.11: Added Hotspot 2.0 ANQP Connection Capability Info

Adding Hotspot 2.0 ANQP Connection Capability Information
so the IP protocol and port assignments show up in the GUI
based on the Hotspot 2.0 documentation and implementation details.

Bug: 16569
Change-Id: Ic3e26e04c5d48269d59b6604b125569328c82faf
Reviewed-on: https://code.wireshark.org/review/37246
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
Matthew Weant 2020-05-18 10:53:10 -07:00 committed by Alexis La Goutte
parent 9e52936b2b
commit 05c06d04cc
1 changed files with 27 additions and 6 deletions

View File

@ -8004,6 +8004,27 @@ dissect_hs20_anqp_wan_metrics(proto_tree *tree, tvbuff_t *tvb, int offset, gbool
tvb, offset, 2, ENC_LITTLE_ENDIAN);
}
static const value_string hs20_cc_proto_vals[] = {
{ 1, "ICMP" },
{ 6, "TCP" },
{ 17, "UDP" },
{ 50, "ESP" },
{ 0, NULL }
};
static const value_string hs20_cc_port_vals[] = {
{ 0, "[Supported]" }, /* Used to indicate ICMP, ESP for IPSec VPN, or IKEv2 for IPSec VPN */
{ 20, "FTP" },
{ 22, "SSH" },
{ 80, "HTTP" },
{ 443, "HTTPS" },
{ 500, "IKEv2 for IPSec VPN" },
{ 1723, "PPTP for IPSec VPN" },
{ 4500, "[Optional] IKEv2 for IPSec VPN" },
{ 5060, "VOIP" },
{ 0, NULL },
};
static const value_string hs20_cc_status_vals[] = {
{ 0, "Closed" },
{ 1, "Open" },
@ -8025,10 +8046,10 @@ dissect_hs20_anqp_connection_capability(proto_tree *tree, tvbuff_t *tvb,
status = tvb_get_guint8(tvb, offset + 3);
tuple = proto_tree_add_subtree_format(tree, tvb, offset, 4, ett_hs20_cc_proto_port_tuple, NULL,
"ProtoPort Tuple - ip_proto=%u port_num=%u status=%s",
ip_proto, port_num,
val_to_str(status, hs20_cc_status_vals,
"Reserved (%u)"));
"ProtoPort Tuple - ip_proto=%s port_num=%s status=%s",
val_to_str(ip_proto, hs20_cc_proto_vals, "Unknown (%u)"),
val_to_str(port_num, hs20_cc_port_vals, "Unknown (%u)"),
val_to_str(status, hs20_cc_status_vals, "Reserved (%u)"));
proto_tree_add_item(tuple, hf_ieee80211_hs20_anqp_cc_proto_ip_proto,
tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset++;
@ -31391,12 +31412,12 @@ proto_register_ieee80211(void)
{&hf_ieee80211_hs20_anqp_cc_proto_ip_proto,
{"IP Protocol", "wlan.hs20.anqp.cc.ip_proto",
FT_UINT8, BASE_DEC, NULL, 0,
FT_UINT8, BASE_DEC, VALS(hs20_cc_proto_vals), 0,
"ProtoPort Tuple - IP Protocol", HFILL }},
{&hf_ieee80211_hs20_anqp_cc_proto_port_num,
{"Port Number", "wlan.hs20.anqp.cc.port_num",
FT_UINT16, BASE_DEC, NULL, 0,
FT_UINT16, BASE_DEC, VALS(hs20_cc_port_vals), 0,
"ProtoPort Tuple - Port Number", HFILL }},
{&hf_ieee80211_hs20_anqp_cc_proto_status,