diff options
author | Ed Warnicke <hagbard@physics.rutgers.edu> | 2001-04-01 02:47:56 +0000 |
---|---|---|
committer | Ed Warnicke <hagbard@physics.rutgers.edu> | 2001-04-01 02:47:56 +0000 |
commit | c17e3b00c6396ec52a6ca39441dabcaa97a4365d (patch) | |
tree | aa445c8e30cfee75054eb46e14d58c1e7789ffd7 /epan/to_str.h | |
parent | 3b6554c069c6d607b343415f5e78794e2010d350 (diff) |
Moved various to_str files from packet.{c,h} to a separate
to_str.{c,h}. Resolved strange situation where ipx_addr_to_str was
declared in packet.h but defined in packet-ipx.c by moving
ipx_addr_to_str, ipxnet_to_str_punct, and ipxnet_to_str from packet-ipx.{c,h} to to_str.{c,h}
svn path=/trunk/; revision=3219
Diffstat (limited to 'epan/to_str.h')
-rw-r--r-- | epan/to_str.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/epan/to_str.h b/epan/to_str.h new file mode 100644 index 0000000000..a9fcbb8cf2 --- /dev/null +++ b/epan/to_str.h @@ -0,0 +1,65 @@ +/* to_str.h + * Definitions for utilities to convert various other types to strings. + * + * $Id: to_str.h,v 1.1 2001/04/01 02:47:56 hagbard Exp $ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs <gerald@zing.org> + * Copyright 1998 Gerald Combs + * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef __TO_STR_H__ +#define __TO_STR_H__ + +#include "glib.h" + +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif + +#ifdef HAVE_NETINET_IN_H +# include <netinet/in.h> +#endif + +/* + * These are utility functions which convert various types to strings, + * but for which no more specific module applies. + */ + +gchar* ether_to_str(const guint8 *); +gchar* ether_to_str_punct(const guint8 *, char); +gchar* ip_to_str(const guint8 *); +void ip_to_str_buf(const guint8 *, gchar *); +struct e_in6_addr; +gchar* ip6_to_str(struct e_in6_addr *); +gchar* ipx_addr_to_str(guint32, const guint8 *); +gchar* ipxnet_to_string(const guint8 *ad); +gchar* ipxnet_to_str_punct(const guint32 ad, char punct); +gchar* time_secs_to_str(guint32); +gchar* abs_time_to_str(struct timeval*); +void display_signed_time(gchar *, int, gint32, gint32); +gchar* rel_time_to_str(struct timeval*); + + +char * decode_bitfield_value(char *buf, guint32 val, guint32 mask, int width); +const char *decode_boolean_bitfield(guint32 val, guint32 mask, int width, + const char *truedesc, const char *falsedesc); +const char *decode_numeric_bitfield(guint32 val, guint32 mask, int width, + const char *fmt); + +#endif /* __TO_STR_H__ */ |