diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-08-24 03:00:11 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-08-24 03:00:11 +0000 |
commit | bcfc2719b9f9feffc6f644260981e75b54c26c46 (patch) | |
tree | 6eccb747036f25bd76d86cff4ab792c031a3c461 /epan | |
parent | 521db7b61f23abc4bad8fb5003d477dcdd3fcab6 (diff) | |
download | wireshark-bcfc2719b9f9feffc6f644260981e75b54c26c46.tar.gz wireshark-bcfc2719b9f9feffc6f644260981e75b54c26c46.tar.bz2 wireshark-bcfc2719b9f9feffc6f644260981e75b54c26c46.zip |
Update address_to_str to handle FC and ETH addresses as well.
Update the fc and eth and tr endpoint talker list to use the new api
svn path=/trunk/; revision=8235
Diffstat (limited to 'epan')
-rw-r--r-- | epan/to_str.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/epan/to_str.c b/epan/to_str.c index 6ef139b69e..10cbf5177d 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.32 2003/08/24 02:50:31 sahlberg Exp $ + * $Id: to_str.c,v 1.33 2003/08/24 03:00:10 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -120,7 +120,9 @@ bytestring_to_str(const guint8 *ad, guint32 len, char punct) { /* Wrapper for the most common case of asking * for a string using a colon as the hex-digit separator. */ - +/* XXX FIXME +remove this one later when every call has been converted to address_to_str() +*/ gchar * ether_to_str(const guint8 *ad) { @@ -590,6 +592,9 @@ rel_time_to_secs_str(nstime_t *rel_time) } +/* XXX FIXME +remove this one later when every call has been converted to address_to_str() +*/ gchar * fc_to_str(const guint8 *ad) { @@ -740,6 +745,12 @@ address_to_str(address *addr) strp=str[i]; switch(addr->type){ + case AT_ETHER: + sprintf(strp, "%02x:%02x:%02x:%02x:%02x:%02x", addr->data[0], addr->data[1], addr->data[2], addr->data[3], addr->data[4], addr->data[5]); + return strp; + case AT_FC: + sprintf(strp, "%02x.%02x.%02x", addr->data[0], addr->data[1], addr->data[2]); + return strp; case AT_IPv4: ip_to_str_buf(addr->data, strp); return strp; |