/* to_str.h
* Definitions for utilities to convert various other types to strings.
*
- * $Id: to_str.h,v 1.10 2002/12/08 02:32:36 gerald Exp $
+ * $Id$
*
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
#include <glib.h>
#include "nstime.h"
+#include <epan/packet_info.h>
+
+#define GUID_STR_LEN 37
+#define MAX_IP_STR_LEN 16
+#define MAX_ADDR_STR_LEN 256
/*
* Resolution of a time stamp.
*/
typedef enum {
+ SECS, /* seconds */
+ DSECS, /* deciseconds */
+ CSECS, /* centiseconds */
MSECS, /* milliseconds */
USECS, /* microseconds */
NSECS /* nanoseconds */
* but for which no more specific module applies.
*/
-gchar* ether_to_str(const guint8 *);
-gchar* ether_to_str_punct(const guint8 *, char, guint32);
-gchar* ip_to_str(const guint8 *);
-void ip_to_str_buf(const guint8 *, gchar *);
-
struct e_in6_addr;
-gchar* fc_to_str(const guint8 *);
-gchar* fc_to_str_buf(const guint8 *);
-gchar* fcwwn_to_str (const guint8 *);
-extern char* ip6_to_str(const struct e_in6_addr *);
+/* !!Deprecated!! - use ep_address_to_str() */
+#define address_to_str ep_address_to_str
+extern gchar* ep_address_to_str(const address *);
+extern gchar* se_address_to_str(const address *);
+extern void address_to_str_buf(const address *addr, gchar *buf, int buf_len);
+extern gchar* bytestring_to_str(const guint8 *, guint32, char);
+extern gchar* ether_to_str(const guint8 *);
+extern const gchar* ip_to_str(const guint8 *);
+extern void ip_to_str_buf(const guint8 *ad, gchar *buf, int buf_len);
+extern gchar* fc_to_str(const guint8 *);
+extern gchar* fcwwn_to_str (const guint8 *);
+extern gchar* ip6_to_str(const struct e_in6_addr *);
+extern void ip6_to_str_buf(const struct e_in6_addr *, gchar *);
extern gchar* ipx_addr_to_str(guint32, const guint8 *);
extern gchar* ipxnet_to_string(const guint8 *ad);
extern gchar* ipxnet_to_str_punct(const guint32 ad, char punct);
extern gchar* vines_addr_to_str(const guint8 *addrp);
-extern gchar* time_secs_to_str(guint32);
-extern gchar* time_msecs_to_str(guint32);
+extern void vines_addr_to_str_buf(const guint8 *addrp, gchar *buf, int buf_len);
+extern gchar* time_secs_to_str(gint32);
+extern gchar* time_secs_to_str_unsigned(guint32);
+extern gchar* time_msecs_to_str(gint32);
extern gchar* abs_time_to_str(nstime_t*);
+extern gchar* abs_time_secs_to_str(time_t);
extern void display_signed_time(gchar *, int, gint32, gint32, time_res_t);
+extern void display_epoch_time(gchar *, int, time_t, gint32, time_res_t);
+
extern gchar* rel_time_to_str(nstime_t*);
extern gchar* rel_time_to_secs_str(nstime_t*);
+extern gchar* guid_to_str(const e_guid_t*);
+extern gchar* guid_to_str_buf(const e_guid_t*, gchar*, int);
+void tipc_addr_to_str_buf( const guint8 *data, gchar *buf, int buf_len);
+extern char *decode_bits_in_field(gint bit_offset, gint no_of_bits, guint64 value);
+
+extern char *other_decode_bitfield_value(char *buf, guint32 val, guint32 mask,
+ int width);
extern char *decode_bitfield_value(char *buf, guint32 val, guint32 mask,
int width);
extern const char *decode_boolean_bitfield(guint32 val, guint32 mask, int width,