From Jakub Zawadzki via bug #4289: (Fix for) Frame arrival times (pcap)
[obnox/wireshark/wip.git] / epan / to_str.h
index e2db7f4d8c17b5413c2847c3bdfe598e0c03e950..69d02a357c51bee27176bb488673ea579dec2aa3 100644 (file)
@@ -3,8 +3,8 @@
  *
  * $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"
+#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 */
@@ -46,11 +53,15 @@ typedef enum {
 
 struct     e_in6_addr;
 
-extern gchar*  address_to_str(const address *);
-extern void     address_to_str_buf(const address *, gchar *);
+/* !!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 gchar*  ip_to_str(const guint8 *);
-extern void    ip_to_str_buf(const guint8 *, gchar *);
+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 *);
@@ -59,15 +70,23 @@ 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 void    vines_addr_to_str_buf(const guint8 *addrp, gchar *buf);
+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);