aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-icp.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2011-01-14 03:44:58 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2011-01-14 03:44:58 +0000
commit6cfdeed2800a7b9bb8ddb1b1d40b2a4b6ddc23b9 (patch)
tree083d5704c0b3ba29be7a9fb4093e5116ca8f826c /epan/dissectors/packet-icp.c
parentc24fd241c203646e545de548ba798841c274e73c (diff)
Replace ip_to_str((tvb_get_ptr(...)) with tvb_ip_to_str().
Replace ip6_to_str((tvb_get_ptr(...)) with tvb_ip6_to_str(). There's no need to pass the result of tvb_get_ptr() as the 'value' in proto_tree_add_*(): just use proto_tree_add_item(). Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s. Replace some memcpy()+tvb_get_ptr() with tvb_memcpy(). svn path=/trunk/; revision=35529
Diffstat (limited to 'epan/dissectors/packet-icp.c')
-rw-r--r--epan/dissectors/packet-icp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-icp.c b/epan/dissectors/packet-icp.c
index fb6c3af06e..8ee58571d4 100644
--- a/epan/dissectors/packet-icp.c
+++ b/epan/dissectors/packet-icp.c
@@ -93,13 +93,13 @@ static void dissect_icp_payload(tvbuff_t *tvb, int offset,
/* 4 byte requester host address */
proto_tree_add_text(pload_tree, tvb,offset,4,
"Requester Host Address %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;
/* null terminated URL */
stringlength = tvb_strsize(tvb, offset);
proto_tree_add_text(pload_tree, tvb, offset, stringlength,
- "URL: %s", tvb_get_ptr(tvb, offset, stringlength));
+ "URL: %s", tvb_get_ephemeral_string(tvb, offset, stringlength));
break;
case CODE_ICP_OP_SECHO:
@@ -111,14 +111,14 @@ static void dissect_icp_payload(tvbuff_t *tvb, int offset,
case CODE_ICP_OP_DENIED:
stringlength = tvb_strsize(tvb, offset);
proto_tree_add_text(pload_tree, tvb, offset, stringlength,
- "URL: %s", tvb_get_ptr(tvb, offset, stringlength));
+ "URL: %s", tvb_get_ephemeral_string(tvb, offset, stringlength));
break;
case CODE_ICP_OP_HIT_OBJ:
/* null terminated URL */
stringlength = tvb_strsize(tvb, offset);
proto_tree_add_text(pload_tree, tvb, offset, stringlength,
- "URL: %s", tvb_get_ptr(tvb, offset, stringlength));
+ "URL: %s", tvb_get_ephemeral_string(tvb, offset, stringlength));
offset += stringlength;
/* 2 byte object size */
@@ -200,7 +200,7 @@ static void dissect_icp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_text(icp_tree, tvb, 16, 4,
"Sender Host IP address %s",
- ip_to_str(tvb_get_ptr(tvb, 16, 4)));
+ tvb_ip_to_str(tvb, 16));
payloadtf = proto_tree_add_text(icp_tree, tvb,
20, message_length - 20,