summaryrefslogtreecommitdiff
path: root/proto.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-09-12 06:11:51 +0000
committerGuy Harris <guy@alum.mit.edu>1999-09-12 06:11:51 +0000
commit55dff94484c61dce121553db3e0b0a709b7fa89b (patch)
tree54d4019a09a818e5bb4040336fd2a36bd0e9a2f3 /proto.c
parent0041a76bfcd5098595c7991001b09665a36943cd (diff)
downloadwireshark-55dff94484c61dce121553db3e0b0a709b7fa89b.tar.gz
Add summary-vs-detail radio buttons to the print dialog box; detail
prints the protocol tree, and summary prints the fields in the summary clist, with a header line at the beginning of the printout. Print only packets selected by the current packet filter. Just have "ARP" and "RARP" in the "Protocol" field for ARP packets; whether it's a request or a reply can be seen in the "Info" field. Add to the "Frame" section of the protocol tree the time between the current packet and the previous displayed packet, and the packet number. Have FT_RELATIVE_TIME fields be a "struct timeval", and display them as seconds and fractional seconds (we didn't have any fields of that type, and that type of time fits the delta time above). Add an FT_DOUBLE field type (although we don't yet have anything using it). svn path=/trunk/; revision=666
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;