# Makefile.am
# Automake file for Ethereal
#
-# $Id: Makefile.am,v 1.330 2001/06/02 06:21:12 guy Exp $
+# $Id: Makefile.am,v 1.331 2001/06/05 07:39:31 guy Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@ethereal.com>
proto_hier_stats.h \
proto_hier_stats.c \
simple_dialog.h \
+ statusbar.h \
summary.c \
summary.h \
ui_util.h
/* capture.c
* Routines for packet capture windows
*
- * $Id: capture.c,v 1.150 2001/06/02 06:26:52 guy Exp $
+ * $Id: capture.c,v 1.151 2001/06/05 07:38:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
}
return;
}
- close_cap_file(&cfile, info_bar);
+ close_cap_file(&cfile);
g_assert(cfile.save_file == NULL);
cfile.save_file = capfile_name;
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.28 2001/05/31 07:15:23 guy Exp $
+ * $Id: proto.c,v 1.29 2001/06/05 07:38:35 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
return format;
}
+/*
+ * Returns TRUE if we can do a "match selected" on the field, FALSE
+ * otherwise.
+ */
+gboolean
+proto_can_match_selected(field_info *finfo)
+{
+ header_field_info *hfinfo;
+
+ hfinfo = finfo->hfinfo;
+ g_assert(hfinfo);
+
+ switch(hfinfo->type) {
+
+ case FT_BOOLEAN:
+ case FT_UINT8:
+ case FT_UINT16:
+ case FT_UINT24:
+ case FT_UINT32:
+ case FT_INT8:
+ case FT_INT16:
+ case FT_INT24:
+ case FT_INT32:
+ case FT_IPv4:
+ case FT_IPXNET:
+ case FT_IPv6:
+ case FT_DOUBLE:
+ case FT_ETHER:
+ case FT_ABSOLUTE_TIME:
+ case FT_RELATIVE_TIME:
+ case FT_STRING:
+ case FT_BYTES:
+ /*
+ * These all have values, so we can match.
+ */
+ return TRUE;
+
+ default:
+ /*
+ * This doesn't have a value, so we'd match
+ * on the raw bytes at this address;
+ * however, if the length is 0, there's nothing
+ * to match, so we can't match.
+ */
+ return (finfo->length != 0);
+ }
+}
+
char*
proto_alloc_dfilter_string(field_info *finfo, guint8 *pd)
{
/* proto.h
* Definitions for protocol display
*
- * $Id: proto.h,v 1.11 2001/04/02 00:38:34 hagbard Exp $
+ * $Id: proto.h,v 1.12 2001/06/05 07:38:35 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
int
hfinfo_bitwidth(header_field_info *hfinfo);
+/*
+ * Returns TRUE if we can do a "match selected" on the field, FALSE
+ * otherwise.
+ */
+gboolean
+proto_can_match_selected(field_info *finfo);
+
char*
proto_alloc_dfilter_string(field_info *finfo, guint8 *pd);
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.237 2001/05/27 21:33:16 guy Exp $
+ * $Id: file.c,v 1.238 2001/06/05 07:38:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
#include "simple_dialog.h"
#include "progress_dlg.h"
#include "ui_util.h"
+#include "statusbar.h"
#include "prefs.h"
#include "gtk/proto_draw.h"
#include "gtk/packet_win.h"
#include "globals.h"
#include "gtk/colors.h"
-extern GtkWidget *packet_list, *info_bar, *byte_nb_ptr, *tree_view;
-extern guint file_ctx;
+extern GtkWidget *packet_list, *byte_nb_ptr, *tree_view;
static guint32 firstsec, firstusec;
static guint32 prevsec, prevusec;
/* The open succeeded. Close whatever capture file we had open,
and fill in the information for this file. */
- close_cap_file(cf, info_bar);
+ close_cap_file(cf);
/* Initialize the table of conversations. */
epan_conversation_init();
/* Reset everything to a pristine state */
void
-close_cap_file(capture_file *cf, void *w)
+close_cap_file(capture_file *cf)
{
/* Die if we're in the middle of reading a file. */
g_assert(cf->state != FILE_READ_IN_PROGRESS);
/* Clear any file-related status bar messages.
XXX - should be "clear *ALL* file-related status bar messages;
will there ever be more than one on the stack? */
- gtk_statusbar_pop(GTK_STATUSBAR(w), file_ctx);
+ statusbar_pop_file_msg();
/* Restore the standard title bar message. */
set_main_window_name("The Ethereal Network Analyzer");
done_msg = g_malloc(msg_len);
snprintf(done_msg, msg_len, done_fmt_nodrops, name_ptr);
}
- gtk_statusbar_push(GTK_STATUSBAR(info_bar), file_ctx, done_msg);
+ statusbar_push_file_msg(done_msg);
g_free(done_msg);
msg_len = strlen(name_ptr) + strlen(win_name_fmt) + 1;
msg_len = strlen(name_ptr) + strlen(load_fmt) + 2;
load_msg = g_malloc(msg_len);
snprintf(load_msg, msg_len, load_fmt, name_ptr);
- gtk_statusbar_push(GTK_STATUSBAR(info_bar), file_ctx, load_msg);
+ statusbar_push_file_msg(load_msg);
/* Update the progress bar when it gets to this value. */
cf->progbar_nextstep = 0;
destroy_progress_dlg(progbar);
cf->state = FILE_READ_ABORTED; /* so that we're allowed to close it */
gtk_clist_thaw(GTK_CLIST(packet_list)); /* undo our freeze */
- close_cap_file(cf, info_bar);
+ close_cap_file(cf);
return (READ_ABORTED);
}
read_packet(cf, data_offset);
cf->current_frame = cf->first_displayed;
thaw_clist(cf);
- gtk_statusbar_pop(GTK_STATUSBAR(info_bar), file_ctx);
+ statusbar_pop_file_msg();
set_display_filename(cf);
/* Enable menu items that make sense if you have a capture file you've
}
}
- gtk_statusbar_push(GTK_STATUSBAR(info_bar), file_ctx,
- " <live capture in progress>");
+ statusbar_push_file_msg(" <live capture in progress>");
}
return err;
}
it's probably exited), so we can just close the capture
file; we return READ_ABORTED so our caller can do whatever
is appropriate when that happens. */
- close_cap_file(cf, info_bar);
+ close_cap_file(cf);
return READ_ABORTED;
}
cf->lnk_t = wtap_file_encap(cf->wth);
/* Pop the "<live capture in progress>" message off the status bar. */
- gtk_statusbar_pop(GTK_STATUSBAR(info_bar), file_ctx);
+ statusbar_pop_file_msg();
set_display_filename(cf);
thaw_clist(cf);
}
-static void
-clear_tree_and_hex_views(void)
-{
- /* Clear the hex dump. */
-
- GtkWidget *byte_view;
- int i;
-
-/* Get the current tab scroll window, then get the text widget */
-/* from the E_BYTE_VIEW_TEXT_INFO_KEY data field */
-
- i = gtk_notebook_get_current_page( GTK_NOTEBOOK(byte_nb_ptr));
-
- if ( i >= 0){
- byte_view = gtk_notebook_get_nth_page( GTK_NOTEBOOK(byte_nb_ptr), i);
- byte_view = gtk_object_get_data(GTK_OBJECT(byte_view), E_BYTE_VIEW_TEXT_INFO_KEY);
-
- gtk_text_freeze(GTK_TEXT(byte_view));
- gtk_text_set_point(GTK_TEXT(byte_view), 0);
- gtk_text_forward_delete(GTK_TEXT(byte_view),
- gtk_text_get_length(GTK_TEXT(byte_view)));
- gtk_text_thaw(GTK_TEXT(byte_view));
- }
- /* Remove all nodes in ctree. This is how it's done in testgtk.c in GTK+ */
- gtk_clist_clear ( GTK_CLIST(tree_view) );
-
-}
-
gboolean
find_packet(capture_file *cf, dfilter_t *sfcode)
{
cf->edt = NULL;
}
- finfo_selected = NULL;
-
/* Clear out the display of that packet. */
clear_tree_and_hex_views();
/* No packet is selected. */
set_menus_for_selected_packet(FALSE);
+
+ /* No protocol tree means no selected field. */
+ unselect_field();
}
/* Set the selected row and the focus row of the packet list to the specified
gtk_clist_select_row(GTK_CLIST(packet_list), row, -1);
}
+/* Unset the selected protocol tree field, if any. */
+void
+unselect_field(void)
+{
+ statusbar_pop_field_msg();
+ finfo_selected = NULL;
+ set_menus_for_selected_tree_row(FALSE);
+}
+
static void
freeze_clist(capture_file *cf)
{
msg_len = strlen(name_ptr) + strlen(save_fmt) + 2;
save_msg = g_malloc(msg_len);
snprintf(save_msg, msg_len, save_fmt, name_ptr);
- gtk_statusbar_push(GTK_STATUSBAR(info_bar), file_ctx, save_msg);
+ statusbar_push_file_msg(save_msg);
g_free(save_msg);
if (!save_filtered && !save_marked && save_format == cf->cd_t) {
done:
/* Pop the "Saving:" message off the status bar. */
- gtk_statusbar_pop(GTK_STATUSBAR(info_bar), file_ctx);
+ statusbar_pop_file_msg();
if (err == 0) {
if (!save_filtered && !save_marked) {
/* We saved the entire capture, not just some packets from it.
/* file.h
* Definitions for file structures and routines
*
- * $Id: file.h,v 1.82 2001/04/18 05:45:57 guy Exp $
+ * $Id: file.h,v 1.83 2001/06/05 07:38:33 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
} read_status_t;
int open_cap_file(char *, gboolean, capture_file *);
-void close_cap_file(capture_file *, void *);
+void close_cap_file(capture_file *);
read_status_t read_cap_file(capture_file *, int *);
int start_tail_cap_file(char *, gboolean, capture_file *);
read_status_t continue_tail_cap_file(capture_file *, int, int *);
void select_packet(capture_file *, int);
void unselect_packet(capture_file *);
+void unselect_field(void);
+
/* Moves or copies a file. Returns 0 on failure, 1 on success */
int file_mv(char *from, char *to);
/* globals.h
* Global defines, etc.
*
- * $Id: globals.h,v 1.25 2001/05/01 00:18:46 guy Exp $
+ * $Id: globals.h,v 1.26 2001/06/05 07:38:33 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
#define MIN_PACKET_SIZE 68 /* minimum amount of packet data we can read */
extern capture_file cfile;
-extern guint main_ctx, file_ctx;
extern gchar *ethereal_path;
extern gchar *last_open_dir;
extern field_info *finfo_selected;
/* file_dlg.c
* Dialog boxes for handling files
*
- * $Id: file_dlg.c,v 1.39 2001/05/31 08:36:46 guy Exp $
+ * $Id: file_dlg.c,v 1.40 2001/06/05 07:38:37 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
/* Close a file */
void
file_close_cmd_cb(GtkWidget *widget, gpointer data) {
- close_cap_file(&cfile, info_bar);
+ close_cap_file(&cfile);
}
void
/* gtkglobals.h
* GTK-related Global defines, etc.
*
- * $Id: gtkglobals.h,v 1.15 2001/04/25 06:33:41 guy Exp $
+ * $Id: gtkglobals.h,v 1.16 2001/06/05 07:38:37 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
#include <gtk/gtk.h>
#endif
-extern GtkWidget *top_level, *packet_list, *tree_view,
- *byte_nb_ptr, *info_bar;
+extern GtkWidget *top_level, *packet_list, *tree_view, *byte_nb_ptr;
extern GdkFont *m_r_font, *m_b_font;
extern guint m_font_height, m_font_width;
/* main.c
*
- * $Id: main.c,v 1.199 2001/05/31 08:36:46 guy Exp $
+ * $Id: main.c,v 1.200 2001/06/05 07:38:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
#include "print.h"
#include "resolv.h"
#include "util.h"
+#include "statusbar.h"
#include "simple_dialog.h"
#include "proto_draw.h"
#include "dfilter/dfilter.h"
packet_info pi;
capture_file cfile;
GtkWidget *top_level, *packet_list, *tree_view, *byte_nb_ptr,
- *info_bar, *tv_scrollw, *pkt_scrollw;
-static GtkWidget *bv_scrollw;
+ *tv_scrollw, *pkt_scrollw;
+static GtkWidget *info_bar, *bv_scrollw;
GdkFont *m_r_font, *m_b_font;
guint m_font_height, m_font_width;
-guint main_ctx, file_ctx, help_ctx;
+static guint main_ctx, file_ctx, help_ctx;
static GString *comp_info_str;
gchar *ethereal_path = NULL;
gchar *last_open_dir = NULL;
filter_te = gtk_object_get_data(GTK_OBJECT(w), E_DFILTER_TE_KEY);
- if (!finfo_selected) {
- simple_dialog(ESD_TYPE_CRIT, NULL,
- "Error determining selected bytes. Please make\n"
- "sure you have selected a field within the tree\n"
- "view to be matched.");
- return;
- }
-
buf = proto_alloc_dfilter_string(finfo_selected, cfile.pd);
/* create a new one and set the display filter entry accordingly */
g_assert(byte_data);
finfo_selected = finfo;
-
set_menus_for_selected_tree_row(TRUE);
if (finfo->hfinfo) {
} else {
length = strlen(finfo->hfinfo->name);
}
+ statusbar_pop_field_msg(); /* get rid of current help msg */
if (length) {
length += strlen(finfo->hfinfo->abbrev) + 10;
help_str = g_malloc(sizeof(gchar) * length);
sprintf(help_str, "%s (%s)",
(has_blurb) ? finfo->hfinfo->blurb : finfo->hfinfo->name,
finfo->hfinfo->abbrev);
- gtk_statusbar_push(GTK_STATUSBAR(info_bar), help_ctx, help_str);
+ statusbar_push_field_msg(help_str);
g_free(help_str);
} else {
/*
* a field, and we don't want "Text (text)" showing up
* on the status line if you've selected such a field.
*
+ * XXX - there are zero-length fields for which we *do*
+ * want to show the field name.
+ *
* XXX - perhaps the name and abbrev field should be null
* pointers rather than null strings for that pseudo-field,
* but we'd have to add checks for null pointers in some
* with no pseudo-field being used, but that might also
* require special checks for -1 to be added.
*/
- gtk_statusbar_push(GTK_STATUSBAR(info_bar), help_ctx, "");
+ statusbar_push_field_msg("");
}
}
GtkWidget *byte_view;
guint8 *data;
gint len;
- field_info* fi;
-
- fi = (field_info*)user_data;
+ /*
+ * Which byte view is displaying the current protocol tree
+ * row's data?
+ */
len = get_byte_view_and_data( byte_nb_ptr, &byte_view, &data);
+ if ( len < 0)
+ return; /* none */
- if ( len < 0) return;
- gtk_statusbar_pop(GTK_STATUSBAR(info_bar), help_ctx);
- finfo_selected = NULL;
- set_menus_for_selected_tree_row(FALSE);
+ unselect_field();
packet_hex_print(GTK_TEXT(byte_view), data, cfile.current_frame,
NULL, len);
}
}
}
+/*
+ * Push a message referring to file access onto the statusbar.
+ */
+void
+statusbar_push_file_msg(gchar *msg)
+{
+ gtk_statusbar_push(GTK_STATUSBAR(info_bar), file_ctx, msg);
+}
+
+/*
+ * Pop a message referring to file access off the statusbar.
+ */
+void
+statusbar_pop_file_msg(void)
+{
+ gtk_statusbar_pop(GTK_STATUSBAR(info_bar), file_ctx);
+}
+
+/*
+ * XXX - do we need multiple statusbar contexts?
+ */
+
+/*
+ * Push a message referring to the currently-selected field onto the statusbar.
+ */
+void
+statusbar_push_field_msg(gchar *msg)
+{
+ gtk_statusbar_push(GTK_STATUSBAR(info_bar), help_ctx, msg);
+}
+
+/*
+ * Pop a message referring to the currently-selected field off the statusbar.
+ */
+void
+statusbar_pop_field_msg(void)
+{
+ gtk_statusbar_pop(GTK_STATUSBAR(info_bar), help_ctx);
+}
+
static gboolean
main_window_delete_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
{
which we'd call here, and another routine that
calls that routine and also cleans up the UI, which
we'd call elsewhere? */
- close_cap_file(&cfile, info_bar);
+ close_cap_file(&cfile);
/* Exit by leaving the main loop, so that any quit functions
we registered get called. */
/* menu.c
* Menu routines
*
- * $Id: menu.c,v 1.52 2001/04/15 03:37:16 guy Exp $
+ * $Id: menu.c,v 1.53 2001/06/05 07:38:37 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
set_menu_sensitivity("/File/Print...", have_captured_packets);
set_menu_sensitivity("/Edit/Find Frame...", have_captured_packets);
set_menu_sensitivity("/Edit/Go To Frame...", have_captured_packets);
- set_menu_sensitivity("/Display/Match Selected", have_captured_packets);
set_menu_sensitivity("/Display/Colorize Display...", have_captured_packets);
set_menu_sensitivity("/Tools/Summary", have_captured_packets);
set_menu_sensitivity("/Tools/Protocol Hierarchy Statistics", have_captured_packets);
have_selected_packet && !prefs.name_resolve);
}
-/* Enable or disable menu items based on whether a tree row is selected. */
+/* Enable or disable menu items based on whether a tree row is selected
+ and and on whether a "Match Selected" can be done. */
void
set_menus_for_selected_tree_row(gboolean have_selected_tree)
{
gboolean properties = FALSE;
+
if (finfo_selected) {
header_field_info *hfinfo = finfo_selected->hfinfo;
if (hfinfo->parent == -1) {
} else {
properties = prefs_is_registered_protocol(proto_registrar_get_abbrev(hfinfo->parent));
}
- }
+ set_menu_sensitivity("/Display/Match Selected",
+ proto_can_match_selected(finfo_selected));
+ } else
+ set_menu_sensitivity("/Display/Match Selected", FALSE);
+
set_menu_sensitivity("/Protocol Properties...", have_selected_tree && properties);
}
/* proto_draw.c
* Routines for GTK+ packet display
*
- * $Id: proto_draw.c,v 1.34 2001/05/27 07:50:28 guy Exp $
+ * $Id: proto_draw.c,v 1.35 2001/06/05 07:38:37 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* Jeff Foster, 2001/03/12, added support for displaying named
proto_tree_draw_node, &info);
}
}
+
+/*
+ * Clear the hex dump and protocol tree panes.
+ */
+void
+clear_tree_and_hex_views(void)
+{
+ /* Clear the hex dump. */
+
+ GtkWidget *byte_view;
+ int i;
+
+/* Get the current tab scroll window, then get the text widget */
+/* from the E_BYTE_VIEW_TEXT_INFO_KEY data field */
+
+ i = gtk_notebook_get_current_page( GTK_NOTEBOOK(byte_nb_ptr));
+
+ if ( i >= 0){
+ byte_view = gtk_notebook_get_nth_page( GTK_NOTEBOOK(byte_nb_ptr), i);
+ byte_view = gtk_object_get_data(GTK_OBJECT(byte_view), E_BYTE_VIEW_TEXT_INFO_KEY);
+
+ gtk_text_freeze(GTK_TEXT(byte_view));
+ gtk_text_set_point(GTK_TEXT(byte_view), 0);
+ gtk_text_forward_delete(GTK_TEXT(byte_view),
+ gtk_text_get_length(GTK_TEXT(byte_view)));
+ gtk_text_thaw(GTK_TEXT(byte_view));
+ }
+ /* Remove all nodes in ctree. This is how it's done in testgtk.c in GTK+ */
+ gtk_clist_clear ( GTK_CLIST(tree_view) );
+
+}
-/* gtkpacket.h
+/* proto_draw.h
* Definitions for GTK+ packet display structures and routines
*
- * $Id: proto_draw.h,v 1.11 2001/03/23 14:44:04 jfoster Exp $
+ * $Id: proto_draw.h,v 1.12 2001/06/05 07:38:37 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
void set_ptree_expander_style_all(gint style);
void set_ptree_font_all(GdkFont *font);
+void clear_tree_and_hex_views(void);
+
#endif
* Definitions for menu routines with toolkit-independent APIs but
* toolkit-dependent implementations.
*
- * $Id: menu.h,v 1.8 2000/08/15 20:42:09 deniel Exp $
+ * $Id: menu.h,v 1.9 2001/06/05 07:38:33 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
/* Enable or disable menu items based on whether a packet is selected. */
void set_menus_for_selected_packet(gboolean);
-/* Enable or disable menu items based on whether a tree row is selected. */
+/* Enable or disable menu items based on whether a tree row is selected
+ and and on whether a "Match Selected" can be done. */
void set_menus_for_selected_tree_row(gboolean);
#ifdef __cplusplus
--- /dev/null
+/* statusbar.h
+ * Definitions for status bar UI routines
+ *
+ * $Id: statusbar.h,v 1.1 2001/06/05 07:39:31 guy Exp $
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __STATUSBAR_H__
+#define __STATUSBAR_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*
+ * Push a message referring to file access onto the statusbar.
+ */
+void statusbar_push_file_msg(gchar *msg);
+
+/*
+ * Pop a message referring to file access off the statusbar.
+ */
+void statusbar_pop_file_msg(void);
+
+/*
+ * Push a message referring to the currently-selected field onto the statusbar.
+ */
+void statusbar_push_field_msg(gchar *msg);
+
+/*
+ * Pop a message referring to the currently-selected field off the statusbar.
+ */
+void statusbar_pop_field_msg(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __STATUSBAR_H__ */
/* tethereal.c
*
- * $Id: tethereal.c,v 1.83 2001/05/31 08:36:41 guy Exp $
+ * $Id: tethereal.c,v 1.84 2001/06/05 07:38:33 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* Text-mode variant, by Gilbert Ramirez <gram@xiexie.org>.
packet_info pi;
capture_file cfile;
FILE *data_out_file = NULL;
-guint main_ctx, file_ctx;
ts_type timestamp_type = RELATIVE;
#ifdef HAVE_LIBPCAP
static int promisc_mode = TRUE;