aboutsummaryrefslogtreecommitdiffstats
path: root/epan/to_str.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-02-27 19:01:27 +0000
committerGuy Harris <guy@alum.mit.edu>2010-02-27 19:01:27 +0000
commit500eb99cd9ae9503344998b811e4856a2bb6bfb2 (patch)
treef1ed4387361e37904198aac2f5e80833d74011b0 /epan/to_str.h
parent9dd11bb90eb4bca3f03f0f547da9be901a56f996 (diff)
Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with the
date as YYYY/DDD, where DDD is a 1-origin day of year. Move the formats to a "time_fmt.h" file, included by the headers that use it. Have abs_time_to_str() and abs_time_secs_to_str() take the date format value, rather than a Boolean "show this as UTC" flag, as an argument. Document the ABSOLUTE_TIME_ formats a bit better. Use that format in the CCSDS and VCDU dissectors, rather than having those dissectors do the formatting themselves. svn path=/trunk/; revision=32034
Diffstat (limited to 'epan/to_str.h')
-rw-r--r--epan/to_str.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/epan/to_str.h b/epan/to_str.h
index 86e487b036..7f139f46c1 100644
--- a/epan/to_str.h
+++ b/epan/to_str.h
@@ -28,6 +28,7 @@
#include <glib.h>
#include "nstime.h"
+#include "time_fmt.h"
#include <epan/packet_info.h>
#define GUID_STR_LEN 37
@@ -35,18 +36,6 @@
#define MAX_ADDR_STR_LEN 256
/*
- * Resolution of a time stamp.
- */
-typedef enum {
- TO_STR_TIME_RES_T_SECS, /* seconds */
- TO_STR_TIME_RES_T_DSECS, /* deciseconds */
- TO_STR_TIME_RES_T_CSECS, /* centiseconds */
- TO_STR_TIME_RES_T_MSECS, /* milliseconds */
- TO_STR_TIME_RES_T_USECS, /* microseconds */
- TO_STR_TIME_RES_T_NSECS /* nanoseconds */
-} to_str_time_res_t;
-
-/*
* These are utility functions which convert various types to strings,
* but for which no more specific module applies.
*/
@@ -73,8 +62,8 @@ extern gchar* vines_addr_to_str(const guint8 *addrp);
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*, gboolean);
-extern gchar* abs_time_secs_to_str(time_t, gboolean);
+extern gchar* abs_time_to_str(nstime_t*, absolute_time_display_e fmt);
+extern gchar* abs_time_secs_to_str(time_t, absolute_time_display_e fmt);
extern void display_signed_time(gchar *, int, gint32, gint32, to_str_time_res_t);
extern void display_epoch_time(gchar *, int, time_t, gint32, to_str_time_res_t);