aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wifi-p2p.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2013-05-27 16:20:29 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2013-05-27 16:20:29 +0000
commit816ed3ce0d267636dc219d781c12cd3d1dfa1a10 (patch)
tree5ef8efe9d2de88d5f84389a7a9d675cbf72a4cc6 /epan/dissectors/packet-wifi-p2p.c
parent0e06d5ce58ecc4bec579d41a61b4157359d0e411 (diff)
From Jouni Malinen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8711 Wi-Fi Display dissector
The attached patch adds initial support for dissecting Wi-Fi Display information element svn path=/trunk/; revision=49593
Diffstat (limited to 'epan/dissectors/packet-wifi-p2p.c')
-rw-r--r--epan/dissectors/packet-wifi-p2p.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/dissectors/packet-wifi-p2p.c b/epan/dissectors/packet-wifi-p2p.c
index eb85b4bac4..de04505ffd 100644
--- a/epan/dissectors/packet-wifi-p2p.c
+++ b/epan/dissectors/packet-wifi-p2p.c
@@ -27,6 +27,7 @@
#include <epan/packet.h>
#include <epan/expert.h>
+#include "packet-ieee80211.h"
#include "packet-wifi-p2p.h"
enum {
@@ -212,6 +213,7 @@ static const value_string p2p_service_protocol_types[] = {
{ 1, "Bonjour" },
{ 2, "UPnP" },
{ 3, "WS-Discovery" },
+ { 4, "Wi-Fi Display" },
{ 0, NULL }
};
@@ -1013,7 +1015,7 @@ void dissect_wifi_p2p_anqp(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
while (tvb_length_remaining(tvb, offset) >= (request ? 4 : 5)) {
guint16 len;
proto_tree *tlv;
- guint8 type, id;
+ guint8 type, id, sd_proto;
len = tvb_get_letohs(tvb, offset);
if (len < 2) {
@@ -1037,6 +1039,7 @@ void dissect_wifi_p2p_anqp(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
proto_tree_add_item(tlv, hf_p2p_anqp_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
+ sd_proto = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tlv, hf_p2p_anqp_service_protocol_type, tvb,
offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv, hf_p2p_anqp_service_transaction_id, tvb,
@@ -1049,6 +1052,8 @@ void dissect_wifi_p2p_anqp(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
offset + 2, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv, hf_p2p_anqp_response_data, tvb,
offset + 3, len - 3, ENC_NA);
+ if (sd_proto == 4)
+ dissect_wifi_display_ie(pinfo, tlv, tvb, offset + 3, len - 3);
}
offset += len;
}