aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-vmlab.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-02-14 18:01:53 -0500
committerMichael Mann <mmann78@netscape.net>2015-02-22 02:53:48 +0000
commit8d5da72ff9255a3fd494fb2d842a7ecb9d2c7c14 (patch)
tree3e48036d26dedf29361132faec1682c9aa6fb24a /epan/dissectors/packet-vmlab.c
parentddafa7e381c188f0f282908003518be44130a3b6 (diff)
Add tvb_address_with_resolution_to_str.
Convert dissectors to using the API where appropriate. Change-Id: I059582f73a75635d4a0338d02d4c4b212162480b Reviewed-on: https://code.wireshark.org/review/7296 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-vmlab.c')
-rw-r--r--epan/dissectors/packet-vmlab.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/epan/dissectors/packet-vmlab.c b/epan/dissectors/packet-vmlab.c
index 823152f552..fe951a12c9 100644
--- a/epan/dissectors/packet-vmlab.c
+++ b/epan/dissectors/packet-vmlab.c
@@ -79,8 +79,6 @@ dissect_vmlab(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint32 offset=0;
- const guint8* src_addr;
- const guint8* dst_addr;
guint8 attributes;
guint8 portgroup;
ethertype_data_t ethertype_data;
@@ -117,17 +115,16 @@ dissect_vmlab(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(vmlab_tree, hf_vmlab_eth_addr, tvb, offset, 6, ENC_NA);
offset += 6;
- dst_addr=tvb_get_ptr(tvb, offset, 6);
proto_tree_add_item(vmlab_tree, hf_vmlab_eth_dst, tvb, offset, 6, ENC_NA);
offset += 6;
/* Source MAC*/
- src_addr=tvb_get_ptr(tvb, offset, 6);
proto_tree_add_item(vmlab_tree, hf_vmlab_eth_src, tvb, offset, 6, ENC_NA);
offset += 6;
- proto_item_append_text(ti, ", Src: %s (%s), Dst: %s (%s)",
- get_ether_name(src_addr), tvb_ether_to_str(tvb, offset-6), get_ether_name(dst_addr), tvb_ether_to_str(tvb, offset-12));
+ proto_item_append_text(ti, ", Src: %s, Dst: %s",
+ tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, offset-6),
+ tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, offset-12));
/* Encapsulated Ethertype is also part of the block*/
encap_proto = tvb_get_ntohs(tvb, offset);