From 25c4bc9379996f934e7648f2ab8b8db3857439f6 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 11 Sep 2005 21:25:37 +0000 Subject: Replace tvb_memcpy() calls that extract IPv4 addresses into a guint32, and that extract IPv6 addresses into a "struct e_in6_addr", with tvb_get_ipv4() and tvb_get_ipv6() calls - except for some that we remove, by using proto_tree_add_item(), rather than replacing. Have epan/tvbuff.h include epan/ipv6-utils.h, to define "struct e_in6_addr" (not necessary to declare the tvbuff routines, but including it there means "struct e_in6_addr" is guaranteed to be defined before those declarations, so we don't get compiler complaints if we define it *after* those declarations). svn path=/trunk/; revision=15758 --- epan/dissectors/packet-msproxy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-msproxy.c') diff --git a/epan/dissectors/packet-msproxy.c b/epan/dissectors/packet-msproxy.c index c843fbf486..6522592ae9 100644 --- a/epan/dissectors/packet-msproxy.c +++ b/epan/dissectors/packet-msproxy.c @@ -503,7 +503,7 @@ static void dissect_request_connect(tvbuff_t *tvb, int offset, proto_tree_add_item( tree, hf_msproxy_dstaddr, tvb, offset, 4, FALSE); - tvb_memcpy( tvb, (guint8 *)&conv_info->dst_addr, offset, sizeof( guint32)); + conv_info->dst_addr = tvb_get_ipv4( tvb, offset); offset += 12; @@ -908,7 +908,7 @@ static void dissect_bind_info( tvbuff_t *tvb, int offset, packet_info *pinfo, conv_info->dst_port); offset += 2; - tvb_memcpy( tvb, (guint8 *)&conv_info->dst_addr, offset, sizeof( guint32)); + conv_info->dst_addr = tvb_get_ipv4( tvb, offset); if ( tree) proto_tree_add_item( tree, hf_msproxy_dstaddr, tvb, offset, 4, FALSE); -- cgit v1.2.3