On Fri, Jun 11, 1999 at 11:39:11PM -0500, Aaron Hillegass wrote:
>
>
> Let me send you the altered source for now. I'll check it out of CVS
> properly, then diffs will be easy.
>
Looks nice! I had to patch summary.c to work properly with wiretap.
Attached is the diff.
What is the difference between "Elapsed time" and "Between first and
last packet" ? Just the fact that the the capture could have continued
for a certain amount of time after the last packet without receiving
any new packets? (and vice-versa, it could have run for a certain
amount of time before receiving any packets?)
BTW, by testing the summary feature, I found out that I have two NetMon
traces whose last packet get a delta time of a negative # of seconds,
thereby making the Elapsed Time field in the summary very very large.
The two traces are attached, too.
--gilbert
Attachment:
nmontr1.cap
Description: Binary data
Attachment:
nmontr2.cap
Description: Binary data
--- ethereal-0.6.2/summary.c Sat Jun 12 03:23:33 1999
+++ ethereal-0.6.2-summary/summary.c Tue Jun 15 16:55:35 1999
@@ -83,6 +83,24 @@
char * string_for_format(guint16 cd_t){
switch (cd_t) {
+#ifdef WITH_WIRETAP
+ case WTAP_FILE_WTAP:
+ return "wiretap";
+ case WTAP_FILE_PCAP:
+ return "pcap";
+ case WTAP_FILE_LANALYZER:
+ return "LanAlyzer";
+ case WTAP_FILE_NGSNIFFER:
+ return "Sniffer";
+ case WTAP_FILE_SNOOP:
+ return "snoop";
+ case WTAP_FILE_IPTRACE:
+ return "iptrace";
+ case WTAP_FILE_NETMON:
+ return "Network Monitor";
+ case WTAP_FILE_NETXRAY:
+ return "NetXray/Sniffer Pro";
+#else
case CD_WIRE:
return "wiretap";
case CD_SNOOP:
@@ -93,6 +111,7 @@
return "pcap-le";
case CD_NA_UNCOMPR:
return "network-associates";
+#endif
default:
return "unknown";
}
@@ -243,17 +262,31 @@
gtk_container_add(GTK_CONTAINER(capture_fr), capture_box);
gtk_widget_show(capture_box);
-
/* interface */
- snprintf(string_buff, SUM_STR_MAX, "Interface: %s", cf.iface);
+ if (cf.iface) {
+ snprintf(string_buff, SUM_STR_MAX, "Interface: %s", cf.iface);
+ }
+ else {
+ sprintf(string_buff, "Interface: unknown");
+ }
add_string_to_box(string_buff, capture_box);
/* Display filter */
- snprintf(string_buff, SUM_STR_MAX, "Display filter: %s", cf.dfilter);
+ if (cf.dfilter) {
+ snprintf(string_buff, SUM_STR_MAX, "Display filter: %s", cf.dfilter);
+ }
+ else {
+ sprintf(string_buff, "Display filter: none");
+ }
add_string_to_box(string_buff, capture_box);
/* Capture filter */
- snprintf(string_buff, SUM_STR_MAX, "Capture filter: %s", cf.cfilter);
+ if (cf.cfilter) {
+ snprintf(string_buff, SUM_STR_MAX, "Capture filter: %s", cf.cfilter);
+ }
+ else {
+ sprintf(string_buff, "Capture filter: none");
+ }
add_string_to_box(string_buff, capture_box);
gtk_window_set_position(GTK_WINDOW(sum_open_w), GTK_WIN_POS_MOUSE);
gtk_widget_show(sum_open_w);