diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-08-23 13:56:40 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-08-23 13:56:40 +0000 |
commit | cb92d3284b02b4a251ba0f4cd426012c16a72a8b (patch) | |
tree | d7a1eb6658c61aed85df57f220a8456e71cea71a /epan | |
parent | 5cf0634041d08d1789f37cda8a1e991086ee2253 (diff) | |
download | wireshark-cb92d3284b02b4a251ba0f4cd426012c16a72a8b.tar.gz wireshark-cb92d3284b02b4a251ba0f4cd426012c16a72a8b.tar.bz2 wireshark-cb92d3284b02b4a251ba0f4cd426012c16a72a8b.zip |
Update the UDP and the TCP conversation list tool so that it can handle IPv6 as well.
Make no distinction between UDP/TCP over IPv4 and UDP/TCP over IPv6
and present them in the same list.
svn path=/trunk/; revision=8224
Diffstat (limited to 'epan')
-rw-r--r-- | epan/to_str.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/epan/to_str.c b/epan/to_str.c index da56c45a93..3588da8f7e 100644 --- a/epan/to_str.c +++ b/epan/to_str.c @@ -1,7 +1,7 @@ /* to_str.c * Routines for utilities to convert various other types to strings. * - * $Id: to_str.c,v 1.29 2003/08/23 13:35:06 sahlberg Exp $ + * $Id: to_str.c,v 1.30 2003/08/23 13:56:39 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -183,10 +183,17 @@ ip6_to_str(const struct e_in6_addr *ad) { #ifndef INET6_ADDRSTRLEN #define INET6_ADDRSTRLEN 46 #endif - static gchar buf[INET6_ADDRSTRLEN]; + static int i=0; + static gchar *strp, str[4][INET6_ADDRSTRLEN]; - inet_ntop(AF_INET6, (const guchar*)ad, (gchar*)buf, sizeof(buf)); - return buf; + i++; + if(i>=4){ + i=0; + } + strp=str[i]; + + inet_ntop(AF_INET6, (const guchar*)ad, (gchar*)strp, INET6_ADDRSTRLEN); + return strp; } gchar* |