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 /epan/tvbuff.h | |
parent | c4b2c971fc559ff346c81b782364ff7985110c45 (diff) | |
download | wireshark-266e1a3491de1ff790c326bbffe0d4827af0f24b.tar.gz |
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 'epan/tvbuff.h')
-rw-r--r-- | epan/tvbuff.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/tvbuff.h b/epan/tvbuff.h index d7a64db654..f13a39ccd9 100644 --- a/epan/tvbuff.h +++ b/epan/tvbuff.h @@ -320,6 +320,15 @@ extern guint64 tvb_get_letoh64(tvbuff_t*, gint offset); extern gfloat tvb_get_letohieee_float(tvbuff_t*, gint offset); extern gdouble tvb_get_letohieee_double(tvbuff_t*, gint offset); +/** + * Fetch an IPv4 address, in network byte order. + * We do *not* convert it to host byte order; we leave it in + * network byte order, as that's what its callers expect. */ +extern guint32 tvb_get_ipv4(tvbuff_t*, gint offset); + +/* Fetch an IPv6 address. */ +extern void tvb_get_ipv6(tvbuff_t*, gint offset, struct e_in6_addr *addr); + /** Returns target for convenience. Does not suffer from possible * expense of tvb_get_ptr(), since this routine is smart enough * to copy data in chunks if the request range actually exists in |