aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nbns.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-nbns.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-nbns.c')
-rw-r--r--epan/dissectors/packet-nbns.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-nbns.c b/epan/dissectors/packet-nbns.c
index c54bcca67c..0c7993f843 100644
--- a/epan/dissectors/packet-nbns.c
+++ b/epan/dissectors/packet-nbns.c
@@ -661,7 +661,7 @@ dissect_nbns_answer(tvbuff_t *tvb, int offset, int nbns_data_offset,
if (opcode != OPCODE_WACK) {
col_append_fstr(cinfo, COL_INFO, " %s %s",
type_name,
- ip_to_str(tvb_get_ptr(tvb, data_offset+2, 4)));
+ tvb_ip_to_str(tvb, data_offset+2));
}
}
if (nbns_tree == NULL)
@@ -709,7 +709,7 @@ dissect_nbns_answer(tvbuff_t *tvb, int offset, int nbns_data_offset,
}
proto_tree_add_text(rr_tree, tvb, cur_offset, 4,
"Addr: %s",
- ip_to_str(tvb_get_ptr(tvb, cur_offset, 4)));
+ tvb_ip_to_str(tvb, cur_offset));
cur_offset += 4;
data_len -= 4;
}
@@ -1564,7 +1564,7 @@ dissect_nbss_packet(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (tree)
proto_tree_add_text(nbss_tree, tvb, offset, 4,
"Retarget IP address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;