aboutsummaryrefslogtreecommitdiffstats
path: root/proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto.c')
-rw-r--r--proto.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/proto.c b/proto.c
index 4e5e967252..d57fa0b8c4 100644
--- a/proto.c
+++ b/proto.c
@@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.23 1999/09/11 22:36:30 gerald Exp $
+ * $Id: proto.c,v 1.24 1999/09/12 06:11:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -412,18 +412,22 @@ NOTES
case FT_UINT32:
case FT_VALS_UINT24:
case FT_VALS_UINT32:
- case FT_RELATIVE_TIME:
case FT_IPv4:
case FT_IPXNET:
fi->value.numeric = va_arg(ap, unsigned int);
break;
+ case FT_DOUBLE:
+ fi->value.floating = va_arg(ap, double);
+ break;
+
case FT_ETHER:
memcpy(fi->value.ether, va_arg(ap, guint8*), 6);
break;
case FT_ABSOLUTE_TIME:
- memcpy(&fi->value.abs_time, va_arg(ap, struct timeval*),
+ case FT_RELATIVE_TIME:
+ memcpy(&fi->value.time, va_arg(ap, struct timeval*),
sizeof(struct timeval));
break;
@@ -556,10 +560,22 @@ proto_item_fill_label(field_info *fi, gchar *label_str)
fi->value.numeric);
break;
+ case FT_DOUBLE:
+ snprintf(label_str, ITEM_LABEL_LENGTH,
+ "%s: %g", fi->hfinfo->name,
+ fi->value.floating);
+ break;
+
case FT_ABSOLUTE_TIME:
snprintf(label_str, ITEM_LABEL_LENGTH,
"%s: %s", fi->hfinfo->name,
- abs_time_to_str(&fi->value.abs_time));
+ abs_time_to_str(&fi->value.time));
+ break;
+
+ case FT_RELATIVE_TIME:
+ snprintf(label_str, ITEM_LABEL_LENGTH,
+ "%s: %s seconds", fi->hfinfo->name,
+ rel_time_to_str(&fi->value.time));
break;
case FT_VALS_UINT8:
@@ -823,6 +839,9 @@ proto_registrar_dump(void)
case FT_UINT32:
enum_name = "FT_UINT32";
break;
+ case FT_DOUBLE:
+ enum_name = "FT_DOUBLE";
+ break;
case FT_ABSOLUTE_TIME:
enum_name = "FT_ABSOLUTE_TIME";
break;