diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-09-13 00:50:43 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-09-13 00:50:43 +0000 |
commit | 973920e91da3dd479611c3a2e2d0b344bfae5a32 (patch) | |
tree | 24a54bbab51a5df486ba5b70c24385d471e92549 /epan/dissectors/packet-bootp.c | |
parent | 9e5a98abae465ef7ab5618738813574e9400e239 (diff) | |
download | wireshark-973920e91da3dd479611c3a2e2d0b344bfae5a32.tar.gz wireshark-973920e91da3dd479611c3a2e2d0b344bfae5a32.tar.bz2 wireshark-973920e91da3dd479611c3a2e2d0b344bfae5a32.zip |
Convert some more "tvb_memcpy()"s fetching IPv4 and IPv6 addresses to
calls to "tvb_get_ipv4()" and "tvb_get_ipv6()".
Fix a call in the BGP dissector to properly fetch an IEEE floating-point
number.
Update some I-D info.
svn path=/trunk/; revision=15774
Diffstat (limited to 'epan/dissectors/packet-bootp.c')
-rw-r--r-- | epan/dissectors/packet-bootp.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index a839da93e9..c2ed87f28e 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -2488,7 +2488,8 @@ dissect_packetcable_ietf_ccc(proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend, int revision) { int suboptoff = optoff; - guint8 subopt, subopt_len, ipv4_addr[4]; + guint8 subopt, subopt_len; + guint32 ipv4_addr; guint8 prov_type, fetch_tgt, timer_val; guint16 sec_tcm; proto_tree *pkt_s_tree; @@ -2520,9 +2521,9 @@ dissect_packetcable_ietf_ccc(proto_tree *v_tree, tvbuff_t *tvb, int optoff, "no room left in option for suboption value"); return (optend); } - tvb_memcpy(tvb, ipv4_addr, suboptoff, 4); - proto_item_append_text(vti, "%u.%u.%u.%u (%u byte%s%s)", - ipv4_addr[0], ipv4_addr[1], ipv4_addr[2], ipv4_addr[3], + ipv4_addr = tvb_get_ipv4(tvb, suboptoff); + proto_item_append_text(vti, "%s (%u byte%s%s)", + ip_to_str((guint8 *)&ipv4_addr), subopt_len, plurality(subopt_len, "", "s"), subopt_len != 4 ? " [Invalid]" : ""); @@ -2551,9 +2552,9 @@ dissect_packetcable_ietf_ccc(proto_tree *v_tree, tvbuff_t *tvb, int optoff, "no room left in option for suboption value"); return (optend); } - tvb_memcpy(tvb, ipv4_addr, suboptoff, 4); - proto_item_append_text(vti, "%u.%u.%u.%u (%u byte%s%s)", - ipv4_addr[0], ipv4_addr[1], ipv4_addr[2], ipv4_addr[3], + ipv4_addr = tvb_get_ipv4(tvb, suboptoff); + proto_item_append_text(vti, "%s (%u byte%s%s)", + ip_to_str((guint8 *)&ipv4_addr), subopt_len, plurality(subopt_len, "", "s"), subopt_len != 5 ? " [Invalid]" : ""); |