aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/hostlist_table.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-02-20 09:09:12 +0000
committerGuy Harris <guy@alum.mit.edu>2004-02-20 09:09:12 +0000
commit9c7c10744a85edf8183a170b52493ae37e8f4f0a (patch)
tree39ff360d198381ae8902dd565293f76c562b78df /gtk/hostlist_table.h
parent0f1b525563c8797aa9f5a32259c000ff0fd0226e (diff)
From Ian Schorr: taps to keep statistics of traffic by host.
svn path=/trunk/; revision=10120
Diffstat (limited to 'gtk/hostlist_table.h')
-rw-r--r--gtk/hostlist_table.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/gtk/hostlist_table.h b/gtk/hostlist_table.h
new file mode 100644
index 0000000000..db93bcb72e
--- /dev/null
+++ b/gtk/hostlist_table.h
@@ -0,0 +1,58 @@
+/* hostlist_table.h 2004 Ian Schorr
+ * modified from endpoint_talkers_table 2003 Ronnie Sahlberg
+ * Helper routines common to all host talkers taps.
+ *
+ * $Id: hostlist_table.h,v 1.1 2004/02/20 09:09:12 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.
+ */
+
+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;
+} hostlist_talker_t;
+
+typedef struct _hostlist_table {
+ char *name;
+ GtkWidget *win;
+ GtkWidget *scrolled_window;
+ GtkCList *table;
+ GtkItemFactory *item_factory;
+ GtkWidget *menu;
+ gboolean has_ports;
+ guint32 num_hosts;
+ hostlist_talker_t *hosts;
+} hostlist_table;
+
+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);