diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-09-10 19:43:41 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-09-10 19:43:41 +0000 |
commit | 266e1a3491de1ff790c326bbffe0d4827af0f24b (patch) | |
tree | 0f7a094370b39116b39a12fcc5d0329738769398 /doc/README.developer | |
parent | c4b2c971fc559ff346c81b782364ff7985110c45 (diff) |
Add "tvb_get_ipv4()" and "tvb_get_ipv6()" addresses, to fetch IPv4 and
IPv6 addresses. Use "tvb_get_ipv4()" in the WINS Replication dissector,
so that it gets the right answer on little-endian *AND* big-endian
machines.
svn path=/trunk/; revision=15753
Diffstat (limited to 'doc/README.developer')
-rw-r--r-- | doc/README.developer | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/README.developer b/doc/README.developer index b1f1fcf61f..c5a06a5689 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -878,8 +878,13 @@ double-precision IEEE floating-point numbers: gfloat tvb_get_letohieee_float(tvbuff_t*, gint offset); gdouble tvb_get_letohieee_double(tvbuff_t*, gint offset); +Accessors for IPv4 and IPv6 addresses: + +guint32 tvb_get_ipv4(tvbuff_t*, gint offset); +void tvb_get_ipv6(tvbuff_t*, gint offset, struct e_in6_addr *addr); + NOTE: IPv4 addresses are not to be converted to host byte order before -being passed to "proto_tree_add_ipv4()". You should use "tvb_memcpy()" +being passed to "proto_tree_add_ipv4()". You should use "tvb_get_ipv4()" to fetch them, not "tvb_get_ntohl()" *OR* "tvb_get_letohl()" - don't, for example, try to use "tvb_get_ntohl()", find that it gives you the wrong answer on the PC on which you're doing development, and try |