aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/hostlist_table.h
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2008-10-27 04:50:57 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2008-10-27 04:50:57 +0000
commit3c150b6f339433d432648499ccfdc6d9c216aab3 (patch)
treeb4ba1971ac1b9ea228540dd609718d57fd5b7b62 /gtk/hostlist_table.h
parent92ced39898f8980ddc52a4f0aacb432c5d9258fa (diff)
Add support for the GeoIP library. Using different database files,
GeoIP can map IP addresses to Countries, Cities, AS numbers, ISPs, etc. If any library paths are defined AND any database files are found, corresponding columns are added to the endpoint tables in the GUI. To do: - Add columns to the conversation list - Add GeoIP info to "-z conv,..." - Create a default UAT file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26571 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/hostlist_table.h')
-rw-r--r--gtk/hostlist_table.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/gtk/hostlist_table.h b/gtk/hostlist_table.h
index 561445548f..1a0e4ca644 100644
--- a/gtk/hostlist_table.h
+++ b/gtk/hostlist_table.h
@@ -7,17 +7,17 @@
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* 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.
@@ -42,6 +42,14 @@ typedef struct _hostlist_talker_t {
guint64 tx_bytes; /**< number of transmitted bytes */
} hostlist_talker_t;
+#define NUM_BUILTIN_COLS 8
+#ifdef HAVE_GEOIP
+# define NUM_GEOIP_COLS 8
+#else
+# define NUM_GEOIP_COLS 0
+#endif
+#define NUM_HOSTLIST_COLS (NUM_BUILTIN_COLS + NUM_GEOIP_COLS)
+
/** Hostlist widget */
typedef struct _hostlist_table {
const char *name; /**< the name of the table */
@@ -53,7 +61,7 @@ typedef struct _hostlist_table {
GtkWidget *scrolled_window; /**< the scrolled window */
GtkCList *table; /**< the GTK table */
guint32 num_columns; /**< number of columns in the above table */
- const char *default_titles[8]; /**< Column headers */
+ const char *default_titles[NUM_HOSTLIST_COLS]; /**< Column headers */
GtkWidget *menu; /**< context menu */
gboolean has_ports; /**< table has ports */
guint32 num_hosts; /**< number of hosts (0 or 1) */