2 * Definitions for utilities to convert various other types to strings.
4 * $Id: to_str.h,v 1.13 2003/02/11 19:42:38 guy Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@ethereal.com>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33 * Resolution of a time stamp.
36 MSECS, /* milliseconds */
37 USECS, /* microseconds */
38 NSECS /* nanoseconds */
42 * These are utility functions which convert various types to strings,
43 * but for which no more specific module applies.
48 extern gchar* ether_to_str(const guint8 *);
49 extern gchar* ip_to_str(const guint8 *);
50 extern void ip_to_str_buf(const guint8 *, gchar *);
51 extern gchar* fc_to_str(const guint8 *);
52 extern gchar* fcwwn_to_str (const guint8 *);
53 extern char* ip6_to_str(const struct e_in6_addr *);
54 extern gchar* ipx_addr_to_str(guint32, const guint8 *);
55 extern gchar* ipxnet_to_string(const guint8 *ad);
56 extern gchar* ipxnet_to_str_punct(const guint32 ad, char punct);
57 extern gchar* vines_addr_to_str(const guint8 *addrp);
58 extern gchar* time_secs_to_str(guint32);
59 extern gchar* time_msecs_to_str(guint32);
60 extern gchar* abs_time_to_str(nstime_t*);
61 extern gchar* abs_time_secs_to_str(guint32);
62 extern void display_signed_time(gchar *, int, gint32, gint32, time_res_t);
63 extern gchar* rel_time_to_str(nstime_t*);
64 extern gchar* rel_time_to_secs_str(nstime_t*);
67 extern char *decode_bitfield_value(char *buf, guint32 val, guint32 mask,
69 extern const char *decode_boolean_bitfield(guint32 val, guint32 mask, int width,
70 const char *truedesc, const char *falsedesc);
71 extern const char *decode_numeric_bitfield(guint32 val, guint32 mask, int width,
74 #endif /* __TO_STR_H__ */