aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gtk/ethclist.h4
-rw-r--r--gtk/find_dlg.h44
-rw-r--r--gtk/follow_dlg.h17
-rw-r--r--gtk/gsm_map_stat.h8
-rw-r--r--gtk/gtk_stat_util.c10
-rw-r--r--gtk/gtk_stat_util.h26
-rw-r--r--gtk/gui_prefs.h37
-rw-r--r--gtk/hostlist_table.c6
-rw-r--r--gtk/hostlist_table.h92
-rw-r--r--gtk/keys.h6
-rw-r--r--gtk/layout_prefs.h33
-rw-r--r--gtk/menu.h49
12 files changed, 262 insertions, 70 deletions
diff --git a/gtk/ethclist.h b/gtk/ethclist.h
index 21432480ae..b90ba1e6b7 100644
--- a/gtk/ethclist.h
+++ b/gtk/ethclist.h
@@ -2,7 +2,7 @@
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball, Josh MacDonald
* Copyright (C) 1997-1998 Jay Painter <jpaint@serv.net><jpaint@gimp.org>
*
- * $Id: ethclist.h,v 1.3 2004/06/01 20:28:05 ulfl Exp $
+ * $Id: ethclist.h,v 1.4 2004/06/01 21:56:03 ulfl Exp $
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -28,7 +28,7 @@
*/
/** @file
- * GtkCList for GTK1.2 libs, copied from GTK sources.
+ * GtkCList for GTK1.2 lib versions, copied from GTK sources.
* @todo is this correct?
*/
diff --git a/gtk/find_dlg.h b/gtk/find_dlg.h
index 2df911e9b4..4d96a9a2ec 100644
--- a/gtk/find_dlg.h
+++ b/gtk/find_dlg.h
@@ -1,7 +1,7 @@
/* find_dlg.h
* Definitions for "find frame" window
*
- * $Id: find_dlg.h,v 1.6 2003/10/07 09:50:41 sahlberg Exp $
+ * $Id: find_dlg.h,v 1.7 2004/06/01 21:56:03 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -26,10 +26,42 @@
#ifndef __FIND_DLG_H__
#define __FIND_DLG_H__
-void find_frame_cb(GtkWidget *, gpointer);
-void find_next_cb(GtkWidget *, gpointer);
-void find_previous_cb(GtkWidget *, gpointer);
-void find_frame_with_filter(char *);
-void find_previous_next_frame_with_filter(char *filter, gboolean backwards);
+/** @file
+ * "Find" dialog box and related functions.
+ */
+
+/** User requested the "Find" dialog box by menu or toolbar.
+ *
+ * @param widget parent widget (unused)
+ * @param data unused
+ */
+extern void find_frame_cb(GtkWidget *widget, gpointer data);
+
+/** User requested the "Find Next" function.
+ *
+ * @param widget parent widget (unused)
+ * @param data unused
+ */
+extern void find_next_cb(GtkWidget *widget, gpointer data);
+
+/** User requested the "Find Previous" function.
+ *
+ * @param widget parent widget (unused)
+ * @param data unused
+ */
+extern void find_previous_cb(GtkWidget *widget, gpointer data);
+
+/** Find frame by filter.
+ *
+ * @param filter the filter string
+ */
+extern void find_frame_with_filter(char *filter);
+
+/** Find next/previous frame by filter.
+ *
+ * @param filter the filter string
+ * @param backwards TRUE, if searching should be done backwards
+ */
+extern void find_previous_next_frame_with_filter(char *filter, gboolean backwards);
#endif /* find_dlg.h */
diff --git a/gtk/follow_dlg.h b/gtk/follow_dlg.h
index c9555922bc..0adee73571 100644
--- a/gtk/follow_dlg.h
+++ b/gtk/follow_dlg.h
@@ -1,6 +1,6 @@
/* follow_dlg.c
*
- * $Id: follow_dlg.h,v 1.4 2002/08/28 21:03:47 jmayer Exp $
+ * $Id: follow_dlg.h,v 1.5 2004/06/01 21:56:04 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -25,9 +25,18 @@
#ifndef __FOLLOW_DLG_H__
#define __FOLLOW_DLG_H__
-void follow_stream_cb( GtkWidget *, gpointer);
+/** @file
+ * "Follow TCP Stream" dialog box.
+ */
+
+/** User requested the "Follow TCP Stream" dialog box by menu or toolbar.
+ *
+ * @param widget parent widget (unused)
+ * @param data unused
+ */
+extern void follow_stream_cb( GtkWidget *widget, gpointer data);
-/* Redraw the text in all "Follow TCP Stream" windows. */
-void follow_redraw_all(void);
+/** Redraw the text in all "Follow TCP Stream" windows. */
+extern void follow_redraw_all(void);
#endif
diff --git a/gtk/gsm_map_stat.h b/gtk/gsm_map_stat.h
index b55ad2be22..5338f84990 100644
--- a/gtk/gsm_map_stat.h
+++ b/gtk/gsm_map_stat.h
@@ -1,6 +1,6 @@
/* gsm_map_stat.h
*
- * $Id: gsm_map_stat.h,v 1.1 2004/04/21 17:57:31 guy Exp $
+ * $Id: gsm_map_stat.h,v 1.2 2004/06/01 21:56:04 ulfl Exp $
*
* Copyright 2004, Michael Lum <mlum [AT] telostech.com>,
* In association with Telos Technology Inc.
@@ -24,6 +24,11 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/** @file
+ * Statistics for GSM MAP Operations.
+ */
+
+/** @todo ??? */
typedef struct _gsm_map_stat_t {
int opr_code[GSM_MAP_MAX_NUM_OPR_CODES];
double size[GSM_MAP_MAX_NUM_OPR_CODES];
@@ -32,4 +37,5 @@ typedef struct _gsm_map_stat_t {
double size_rr[GSM_MAP_MAX_NUM_OPR_CODES];
} gsm_map_stat_t;
+/** @todo ??? */
extern gsm_map_stat_t gsm_map_stat;
diff --git a/gtk/gtk_stat_util.c b/gtk/gtk_stat_util.c
index 9706a268e7..9250a4eb65 100644
--- a/gtk/gtk_stat_util.c
+++ b/gtk/gtk_stat_util.c
@@ -2,7 +2,7 @@
* gui functions used by stats
* Copyright 2003 Lars Roland
*
- * $Id: gtk_stat_util.c,v 1.5 2004/03/13 15:15:24 ulfl Exp $
+ * $Id: gtk_stat_util.c,v 1.6 2004/06/01 21:56:04 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -42,6 +42,13 @@
#include "../globals.h"
/* insert a string into a GTK_TABLE at column x and row y*/
+#if 0
+/* Statistic table */
+typedef struct _gtk_table {
+ GtkWidget *widget; /**< the table widget */
+ int height; /**< the height */
+ int width; /**< the width */
+}gtk_table;
void
add_table_entry(gtk_table *tab, char *str, int x, int y)
@@ -62,6 +69,7 @@ add_table_entry(gtk_table *tab, char *str, int x, int y)
gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_LEFT);
gtk_widget_show(tmp);
}
+#endif
/* init a main windowfor stats, set title and display used filter in window */
diff --git a/gtk/gtk_stat_util.h b/gtk/gtk_stat_util.h
index f2e428023a..ee85295fa4 100644
--- a/gtk/gtk_stat_util.h
+++ b/gtk/gtk_stat_util.h
@@ -2,7 +2,7 @@
* gui functions used by stats
* Copyright 2003 Lars Roland
*
- * $Id: gtk_stat_util.h,v 1.3 2003/08/21 17:48:04 guy Exp $
+ * $Id: gtk_stat_util.h,v 1.4 2004/06/01 21:56:04 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,15 +29,27 @@
#include <gtk/gtk.h>
-typedef struct _gtk_table {
- GtkWidget *widget;
- int height;
- int width;
-}gtk_table;
+/** @file
+ * Utilities for statistics.
+ */
+
-extern void add_table_entry(gtk_table *tab, char *str, int x, int y);
+/** Init a window for stats, set title and display used filter in window.
+ *
+ * @param window the window
+ * @param mainbox the vbox for the window
+ * @param title the title for the window
+ * @param filter the filter string
+ */
extern void init_main_stat_window(GtkWidget *window, GtkWidget *mainbox, char *title, char *filter);
+/** Create a stats table, using a scrollable gtkclist.
+ *
+ * @param scrolled_window the scrolled window
+ * @param vbox the vbox for the window
+ * @param columns number of columns
+ * @param titles
+ */
extern GtkCList *create_stat_table(GtkWidget *scrolled_window, GtkWidget *vbox, int columns, char *titles[]);
#endif
diff --git a/gtk/gui_prefs.h b/gtk/gui_prefs.h
index e68d582b94..649c22b7e7 100644
--- a/gtk/gui_prefs.h
+++ b/gtk/gui_prefs.h
@@ -1,7 +1,7 @@
/* gui_prefs.h
* Definitions for GUI preferences window
*
- * $Id: gui_prefs.h,v 1.5 2004/01/17 00:26:22 ulfl Exp $
+ * $Id: gui_prefs.h,v 1.6 2004/06/01 21:56:04 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -26,11 +26,38 @@
#ifndef __GUI_PREFS_H__
#define __GUI_PREFS_H__
-GtkWidget *gui_prefs_show(void);
-void gui_prefs_fetch(GtkWidget *w);
-void gui_prefs_apply(GtkWidget *w);
-void gui_prefs_destroy(GtkWidget *w);
+/** @file
+ * User interface and font preferences pages.
+ */
+
+/** Build a User interface preferences page.
+ *
+ * @return the new preferences page
+ */
+extern GtkWidget *gui_prefs_show(void);
+/** Fetch preference values from page.
+ *
+ * @param widget widget from gui_prefs_show()
+ */
+extern void gui_prefs_fetch(GtkWidget *widget);
+
+/** Apply preference values from page.
+ *
+ * @param widget widget from gui_prefs_show()
+ */
+extern void gui_prefs_apply(GtkWidget *widget);
+
+/** Destroy preference values from page.
+ *
+ * @param widget widget from gui_prefs_show()
+ */
+void gui_prefs_destroy(GtkWidget *widget);
+
+/** Build a User interface font preferences page.
+ *
+ * @return the new preferences page
+ */
extern GtkWidget *gui_font_prefs_show(void);
#endif
diff --git a/gtk/hostlist_table.c b/gtk/hostlist_table.c
index 21791b441b..ddc3257b2f 100644
--- a/gtk/hostlist_table.c
+++ b/gtk/hostlist_table.c
@@ -2,7 +2,7 @@
* modified from endpoint_talkers_table.c 2003 Ronnie Sahlberg
* Helper routines common to all host list taps.
*
- * $Id: hostlist_table.c,v 1.12 2004/05/23 23:24:05 ulfl Exp $
+ * $Id: hostlist_table.c,v 1.13 2004/06/01 21:56:04 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -436,7 +436,9 @@ static GtkItemFactoryEntry hostlist_list_menu_items[] =
static void
hostlist_create_popup_menu(hostlist_table *hl)
{
- hl->item_factory = gtk_item_factory_new(GTK_TYPE_MENU, "<main>", NULL);
+ GtkItemFactory *item_factory;
+
+ hl->item_factory = gtk_item_factory_new(GTK_TYPE_MENU, "<main>", NULL);
gtk_item_factory_create_items_ac(hl->item_factory, sizeof(hostlist_list_menu_items)/sizeof(hostlist_list_menu_items[0]), hostlist_list_menu_items, hl, 2);
diff --git a/gtk/hostlist_table.h b/gtk/hostlist_table.h
index d77fc26196..ca4a6f05d4 100644
--- a/gtk/hostlist_table.h
+++ b/gtk/hostlist_table.h
@@ -2,7 +2,7 @@
* modified from endpoint_talkers_table 2003 Ronnie Sahlberg
* Helper routines common to all host talkers taps.
*
- * $Id: hostlist_table.h,v 1.3 2004/05/03 22:15:22 ulfl Exp $
+ * $Id: hostlist_table.h,v 1.4 2004/06/01 21:56:04 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -23,40 +23,76 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/** @file
+ * Hostlist definitions.
+ */
+
+/** Address type */
+typedef enum {
+ SAT_NONE, /**< no address type */
+ SAT_ETHER, /**< ethernet */
+ SAT_FDDI, /**< fddi */
+ SAT_TOKENRING /**< token ring */
+} SAT_E;
+
+/** Hostlist information */
typedef struct _hostlist_talker_t {
- address src_address;
- guint32 sat;
- guint32 port_type;
- guint32 src_port;
-
- guint32 rx_frames;
- guint32 tx_frames;
- guint32 rx_bytes;
- guint32 tx_bytes;
+ address src_address; /**< source address */
+ SAT_E sat; /**< address type */
+ guint32 port_type; /**< port_type (e.g. PT_TCP) */
+ guint32 src_port; /**< source port */
+
+ guint32 rx_frames; /**< number of received packets */
+ guint32 tx_frames; /**< number of transmitted packets */
+ guint32 rx_bytes; /**< number of received bytes */
+ guint32 tx_bytes; /**< number of transmitted bytes */
} hostlist_talker_t;
+/** Hostlist widget */
typedef struct _hostlist_table {
- char *name;
- GtkWidget *win;
- GtkWidget *page_lb;
- GtkWidget *scrolled_window;
- GtkCList *table;
- GtkItemFactory *item_factory;
- GtkWidget *menu;
- gboolean has_ports;
- guint32 num_hosts;
- hostlist_talker_t *hosts;
- gboolean resolve_names;
+ char *name; /**< the name of the table */
+ GtkWidget *win; /**< GTK window */
+ GtkWidget *page_lb; /**< label */
+ GtkWidget *scrolled_window; /**< the scrolled window */
+ GtkCList *table; /**< the GTK table */
+ GtkWidget *menu; /**< context menu */
+ gboolean has_ports; /**< table has ports */
+ guint32 num_hosts; /**< number of hosts (0 or 1) */
+ hostlist_talker_t *hosts; /**< array of host values */
+ gboolean resolve_names; /**< resolve address names? */
} hostlist_table;
+/** Register the hostlist table for the multiple hostlist window.
+ *
+ * @param hide_ports hide the port columns
+ * @param table_name the table name to be displayed
+ * @param tap_name the registered tap name
+ * @param filter the optional filter name or NULL
+ * @param packet_func the function to be called for each incoming packet
+ */
extern void register_hostlist_table(gboolean hide_ports, char *table_name, char *tap_name, char *filter, void *packet_func);
+/** Init the hostlist table for the single hostlist window.
+ *
+ * @param hide_ports hide the port columns
+ * @param table_name the table name to be displayed
+ * @param tap_name the registered tap name
+ * @param filter the optional filter name or NULL
+ * @param packet_func the function to be called for each incoming packet
+ * @todo get values from register_hostlist_table() instead of own parameters
+ */
extern void init_hostlist_table(gboolean hide_ports, char *table_name, char *tap_name, char *filter, void *packet_func);
-#define SAT_NONE 0
-#define SAT_ETHER 1
-#define SAT_FDDI 2
-#define SAT_TOKENRING 3
-
-
-void add_hostlist_table_data(hostlist_table *hl, address *src, guint32 src_port, gboolean sender, int num_frames, int num_bytes, int sat, int port_type);
+/** Add some data to the table.
+ *
+ * @param hl the table to add the data to
+ * @param src source address
+ * @param src_port source port
+ * @param sender TRUE, if this is a sender
+ * @param num_frames number of packets
+ * @param num_bytes number of bytes
+ * @param sat address type
+ * @param port_type the port type (e.g. PT_TCP)
+ */
+void add_hostlist_table_data(hostlist_table *hl, address *src,
+ guint32 src_port, gboolean sender, int num_frames, int num_bytes, SAT_E sat, int port_type);
diff --git a/gtk/keys.h b/gtk/keys.h
index 86d0e6fcce..5433915a11 100644
--- a/gtk/keys.h
+++ b/gtk/keys.h
@@ -1,7 +1,7 @@
/* keys.h
* Key definitions for various objects
*
- * $Id: keys.h,v 1.14 2002/08/28 21:03:48 jmayer Exp $
+ * $Id: keys.h,v 1.15 2004/06/01 21:56:04 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -25,7 +25,9 @@
#ifndef __KEYS_H__
#define __KEYS_H__
-/* Keys for gtk_object_set_data */
+/** @file
+ * Various keys for OBJECT_SET_DATA().
+ */
#define E_DFILTER_TE_KEY "display_filter_entry"
#define E_RFILTER_TE_KEY "read_filter_te"
diff --git a/gtk/layout_prefs.h b/gtk/layout_prefs.h
index 8d53c923f4..b1193c03f5 100644
--- a/gtk/layout_prefs.h
+++ b/gtk/layout_prefs.h
@@ -1,7 +1,7 @@
/* layout_prefs.h
* Definitions for layout preferences window
*
- * $Id: layout_prefs.h,v 1.2 2004/04/30 00:40:45 guy Exp $
+ * $Id: layout_prefs.h,v 1.3 2004/06/01 21:56:04 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -25,9 +25,32 @@
#ifndef __LAYOUT_PREFS_H__
#define __LAYOUT_PREFS_H__
-GtkWidget *layout_prefs_show(void);
-void layout_prefs_fetch(GtkWidget *w);
-void layout_prefs_apply(GtkWidget *w);
-void layout_prefs_destroy(GtkWidget *w);
+/** @file
+ * User interface layout preferences pages.
+ */
+
+/** Build a User interface layout preferences page.
+ *
+ * @return the new preferences page
+ */
+extern GtkWidget *layout_prefs_show(void);
+
+/** Fetch preference values from page.
+ *
+ * @param widget widget from layout_prefs_show()
+ */
+extern void layout_prefs_fetch(GtkWidget *widget);
+
+/** Apply preference values from page.
+ *
+ * @param widget widget from layout_prefs_show()
+ */
+extern void layout_prefs_apply(GtkWidget *widget);
+
+/** Destroy preference values from page.
+ *
+ * @param widget widget from layout_prefs_show()
+ */
+extern void layout_prefs_destroy(GtkWidget *widget);
#endif
diff --git a/gtk/menu.h b/gtk/menu.h
index 781574748d..ece8129e14 100644
--- a/gtk/menu.h
+++ b/gtk/menu.h
@@ -1,7 +1,7 @@
/* menu.h
* Menu definitions
*
- * $Id: menu.h,v 1.18 2004/05/20 10:37:40 ulfl Exp $
+ * $Id: menu.h,v 1.19 2004/06/01 21:56:04 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -29,16 +29,51 @@
extern "C" {
#endif /* __cplusplus */
-/* Write all recent capture filenames to the user's recent file */
-void menu_recent_file_write_all(FILE *rf);
-void menu_open_recent_file_cmd(GtkWidget *w);
+/** @file
+ * Various functions provided by menu.c
+ */
+
+/** Write all recent capture filenames to the user's recent file.
+ * @param rf recent file
+ */
+extern void menu_recent_file_write_all(FILE *rf);
+
+/** User pushed a recent file submenu item.
+ *
+ * @param widget parent widget
+ */
+extern void menu_open_recent_file_cmd(GtkWidget *widget);
+
+/** The recent file read has finished, update the menu corresponding. */
extern void menu_recent_read_finished(void);
+
+/** One of the name resolution menu items changed. */
extern void menu_name_resolution_changed(void);
-GtkWidget *main_menu_new(GtkAccelGroup **);
-void set_menu_object_data (gchar *path, gchar *key, gpointer data);
-gint popup_menu_handler(GtkWidget *widget, GdkEvent *event, gpointer data);
+/** Create a new menu.
+ *
+ * @param accel the created accelerator group
+ * @return the new menu
+ */
+extern GtkWidget *main_menu_new(GtkAccelGroup **accel);
+
+/** Set object data of menu, like OBJECT_SET_DATA().
+ *
+ * @param path the path of the menu item
+ * @param key the key to set
+ * @param data the data to set
+ */
+extern void set_menu_object_data(gchar *path, gchar *key, gpointer data);
+
+/** The popup menu handler.
+ *
+ * @param widget the parent widget
+ * @param event the GdkEvent
+ * @param data the corresponding menu
+ */
+extern gint popup_menu_handler(GtkWidget *widget, GdkEvent *event, gpointer data);
+/** The popup menu. */
extern GtkWidget *popup_menu_object;
#ifdef __cplusplus