aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-netflow.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2012-12-02 04:49:13 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2012-12-02 04:49:13 +0000
commit49466f95bc1fe3cc139f3750fcc934ffc210faef (patch)
tree14c72b7db9d4fe0af875d373d6023c92bae0463a /epan/dissectors/packet-netflow.c
parentda4442d6384b15530fd740295080a8ad3a145ca6 (diff)
Introduce, and start using, TVB_SET_ADDRESS() and TVB_SET_ADDRESS_HF(). They
are like the non-TVB versions except that they take a TVB and an offset instead of (frequently) a pointer into the TVB. Calling tvb_get_ptr() before modifying the rest of the fields should help fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7960 (though I can't reproduce that problem). Replace a bunch of calls like: SET_ADDRESS(..., AT_XXX, length, tvb_get_ptr(tvb, offset, length)); with: TVB_SET_ADDRESS(..., AT_XXX, tvb, offset, length); svn path=/trunk/; revision=46324
Diffstat (limited to 'epan/dissectors/packet-netflow.c')
-rw-r--r--epan/dissectors/packet-netflow.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-netflow.c b/epan/dissectors/packet-netflow.c
index 9d98515a56..70ac1172c3 100644
--- a/epan/dissectors/packet-netflow.c
+++ b/epan/dissectors/packet-netflow.c
@@ -4521,28 +4521,28 @@ dissect_v9_v10_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdutree,
case VENDOR_CACE << 16 | 0: /* caceLocalIPv4Address */
ti = proto_tree_add_item(pdutree, hf_pie_cace_local_ipv4_address,
tvb, offset, length, ENC_NA);
- SET_ADDRESS(&local_addr, AT_IPv4, 4, tvb_get_ptr(tvb, offset, 4));
+ TVB_SET_ADDRESS(&local_addr, AT_IPv4, tvb, offset, 4);
got_flags |= GOT_LOCAL_ADDR;
break;
case VENDOR_CACE << 16 | 1: /* caceRemoteIPv4Address */
ti = proto_tree_add_item(pdutree, hf_pie_cace_remote_ipv4_address,
tvb, offset, length, ENC_NA);
- SET_ADDRESS(&remote_addr, AT_IPv4, 4, tvb_get_ptr(tvb, offset, 4));
+ TVB_SET_ADDRESS(&remote_addr, AT_IPv4, tvb, offset, 4);
got_flags |= GOT_REMOTE_ADDR;
break;
case VENDOR_CACE << 16 | 2: /* caceLocalIPv6Address */
ti = proto_tree_add_item(pdutree, hf_pie_cace_local_ipv6_address,
tvb, offset, length, ENC_NA);
- SET_ADDRESS(&local_addr, AT_IPv6, 16, tvb_get_ptr(tvb, offset, 16));
+ TVB_SET_ADDRESS(&local_addr, AT_IPv6, tvb, offset, 16);
got_flags |= GOT_LOCAL_ADDR;
break;
case VENDOR_CACE << 16 | 3: /* caceRemoteIPv6Address */
ti = proto_tree_add_item(pdutree, hf_pie_cace_remote_ipv6_address,
tvb, offset, length, ENC_NA);
- SET_ADDRESS(&remote_addr, AT_IPv6, 16, tvb_get_ptr(tvb, offset, 16));
+ TVB_SET_ADDRESS(&remote_addr, AT_IPv6, tvb, offset, 16);
got_flags |= GOT_REMOTE_ADDR;
break;