aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wifi-p2p.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-12-19 21:42:14 -0500
committerMichael Mann <mmann78@netscape.net>2014-12-21 15:13:30 +0000
commitf002332d88a8253cb823cffe82bcedcf4ac196a4 (patch)
tree188434acdbcb2d7f1843e19ebc69bc1af94b7e18 /epan/dissectors/packet-wifi-p2p.c
parentcdaa6698297a9e14ae9b321f0c6ee536afa917b6 (diff)
Replace ether_to_str with either address_to_str or tvb_ether_to_str.
Change-Id: I8cce9fddbfe950e27e96ea8a5a6d2e0921ff4260 Reviewed-on: https://code.wireshark.org/review/5933 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-wifi-p2p.c')
-rw-r--r--epan/dissectors/packet-wifi-p2p.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/epan/dissectors/packet-wifi-p2p.c b/epan/dissectors/packet-wifi-p2p.c
index 7d9bbea8e5..d89deee730 100644
--- a/epan/dissectors/packet-wifi-p2p.c
+++ b/epan/dissectors/packet-wifi-p2p.c
@@ -421,11 +421,9 @@ static void dissect_wifi_p2p_capability(proto_item *tlv_root,
static void dissect_device_id(proto_item *tlv_root, proto_item *tlv_item,
tvbuff_t *tvb, int offset)
{
- guint8 addr[6];
proto_tree_add_item(tlv_root, hf_p2p_attr_device_id, tvb,
offset + 3, 6, ENC_NA);
- tvb_memcpy(tvb, addr, offset + 3, 6);
- proto_item_append_text(tlv_item, ": %s", ether_to_str(addr));
+ proto_item_append_text(tlv_item, ": %s", tvb_ether_to_str(tvb, offset+3));
}
static void dissect_group_owner_intent(proto_item *tlv_root,
@@ -622,11 +620,9 @@ static void dissect_intended_interface_addr(proto_item *tlv_root,
proto_item *tlv_item,
tvbuff_t *tvb, int offset)
{
- guint8 addr[6];
proto_tree_add_item(tlv_root, hf_p2p_attr_intended_interface_addr, tvb,
offset + 3, 6, ENC_NA);
- tvb_memcpy(tvb, addr, offset + 3, 6);
- proto_item_append_text(tlv_item, ": %s", ether_to_str(addr));
+ proto_item_append_text(tlv_item, ": %s", tvb_ether_to_str(tvb, offset + 3));
}
static void dissect_extended_listen_timing(proto_item *tlv_root,
@@ -649,13 +645,11 @@ static void dissect_wifi_p2p_group_id(proto_item *tlv_root,
int offset, guint16 slen)
{
int s_offset;
- guint8 addr[6];
s_offset = offset + 3;
proto_tree_add_item(tlv_root, hf_p2p_attr_p2p_group_id_dev_addr, tvb,
s_offset, 6, ENC_NA);
- tvb_memcpy(tvb, addr, offset + 3, 6);
- proto_item_append_text(tlv_item, ": %s", ether_to_str(addr));
+ proto_item_append_text(tlv_item, ": %s", tvb_ether_to_str(tvb, offset + 3));
s_offset += 6;
proto_tree_add_item(tlv_root, hf_p2p_attr_p2p_group_id_ssid, tvb,
s_offset, offset + 3 + slen - s_offset, ENC_ASCII|ENC_NA);
@@ -667,7 +661,6 @@ static void dissect_wifi_p2p_group_bssid(packet_info *pinfo,
int offset, guint16 slen)
{
int s_offset;
- guint8 addr[6];
if (slen != 6) {
expert_add_info_format(pinfo, tlv_item, &ei_wifi_p2p_attr_len, "Invalid ethernet address");
@@ -677,8 +670,7 @@ static void dissect_wifi_p2p_group_bssid(packet_info *pinfo,
s_offset = offset + 3;
proto_tree_add_item(tlv_root, hf_p2p_attr_p2p_group_bssid, tvb,
s_offset, 6, ENC_NA);
- tvb_memcpy(tvb, addr, offset + 3, 6);
- proto_item_append_text(tlv_item, ": %s", ether_to_str(addr));
+ proto_item_append_text(tlv_item, ": %s", tvb_ether_to_str(tvb, offset + 3));
}
static void dissect_notice_of_absence(packet_info *pinfo, proto_item *tlv_root,