2004-02-20 09:09:12 +00:00
|
|
|
/* hostlist_table.h 2004 Ian Schorr
|
|
|
|
* modified from endpoint_talkers_table 2003 Ronnie Sahlberg
|
|
|
|
* Helper routines common to all host talkers taps.
|
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2004-02-20 09:09:12 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2008-10-27 04:50:57 +00:00
|
|
|
*
|
2004-02-20 09:09:12 +00:00
|
|
|
* 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.
|
2008-10-27 04:50:57 +00:00
|
|
|
*
|
2004-02-20 09:09:12 +00:00
|
|
|
* 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.
|
2008-10-27 04:50:57 +00:00
|
|
|
*
|
2004-02-20 09:09:12 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2004-02-20 09:09:12 +00:00
|
|
|
*/
|
|
|
|
|
2010-06-15 21:18:31 +00:00
|
|
|
#ifndef __HOSTLIST_TABLE_H__
|
|
|
|
#define __HOSTLIST_TABLE_H__
|
|
|
|
|
2014-07-25 15:34:51 +00:00
|
|
|
#include <epan/conversation_table.h>
|
2014-08-06 17:07:42 +00:00
|
|
|
#include <ui/traffic_table_ui.h>
|
2004-06-03 21:46:27 +00:00
|
|
|
|
2004-06-01 21:56:04 +00:00
|
|
|
/** @file
|
|
|
|
* Hostlist definitions.
|
|
|
|
*/
|
|
|
|
|
2014-07-25 15:34:51 +00:00
|
|
|
#ifdef HAVE_GEOIP
|
2014-08-06 17:07:42 +00:00
|
|
|
typedef enum {
|
|
|
|
ENDP_COLUMN_GEOIP1 = ENDP_NUM_COLUMNS,
|
|
|
|
ENDP_COLUMN_GEOIP2,
|
|
|
|
ENDP_COLUMN_GEOIP3,
|
|
|
|
ENDP_COLUMN_GEOIP4,
|
|
|
|
ENDP_COLUMN_GEOIP5,
|
|
|
|
ENDP_COLUMN_GEOIP6,
|
|
|
|
ENDP_COLUMN_GEOIP7,
|
|
|
|
ENDP_COLUMN_GEOIP8,
|
|
|
|
ENDP_COLUMN_GEOIP9,
|
|
|
|
ENDP_COLUMN_GEOIP10,
|
|
|
|
ENDP_COLUMN_GEOIP11,
|
|
|
|
ENDP_COLUMN_GEOIP12,
|
|
|
|
ENDP_COLUMN_GEOIP13,
|
|
|
|
} geoip_column_type_e;
|
|
|
|
#define ENDP_NUM_GEOIP_COLUMNS 13
|
2008-10-27 04:50:57 +00:00
|
|
|
#else
|
2014-08-06 17:07:42 +00:00
|
|
|
#define ENDP_NUM_GEOIP_COLUMNS 0
|
2008-10-27 04:50:57 +00:00
|
|
|
#endif
|
2014-08-06 17:07:42 +00:00
|
|
|
#define ENDP_INDEX_COLUMN (ENDP_NUM_COLUMNS+ENDP_NUM_GEOIP_COLUMNS)
|
2008-10-27 04:50:57 +00:00
|
|
|
|
2004-06-01 21:56:04 +00:00
|
|
|
/** Hostlist widget */
|
2004-02-20 09:09:12 +00:00
|
|
|
typedef struct _hostlist_table {
|
2005-08-06 03:44:55 +00:00
|
|
|
const char *name; /**< the name of the table */
|
2008-02-17 00:35:55 +00:00
|
|
|
const char *filter; /**< the filter used */
|
|
|
|
gboolean use_dfilter; /**< use display filter */
|
2004-06-01 21:56:04 +00:00
|
|
|
GtkWidget *win; /**< GTK window */
|
2008-02-17 00:35:55 +00:00
|
|
|
GtkWidget *page_lb; /**< page label */
|
|
|
|
GtkWidget *name_lb; /**< name label */
|
2004-06-01 23:00:24 +00:00
|
|
|
GtkWidget *scrolled_window; /**< the scrolled window */
|
2009-10-09 09:01:04 +00:00
|
|
|
GtkTreeView *table; /**< the GTK table */
|
2014-08-06 17:07:42 +00:00
|
|
|
const char *default_titles[ENDP_NUM_COLUMNS+ENDP_NUM_GEOIP_COLUMNS]; /**< Column headers */
|
2004-06-01 21:56:04 +00:00
|
|
|
GtkWidget *menu; /**< context menu */
|
|
|
|
gboolean has_ports; /**< table has ports */
|
2014-07-25 15:34:51 +00:00
|
|
|
conv_hash_t hash; /**< hostlist hash table */
|
|
|
|
gboolean fixed_col; /**< if switched to fixed column */
|
2004-06-01 21:56:04 +00:00
|
|
|
gboolean resolve_names; /**< resolve address names? */
|
2009-10-09 09:01:04 +00:00
|
|
|
gboolean geoip_visible; /**< if geoip columns are visible */
|
2004-02-20 09:09:12 +00:00
|
|
|
} hostlist_table;
|
|
|
|
|
2004-06-01 21:56:04 +00:00
|
|
|
/** Init the hostlist table for the single hostlist window.
|
|
|
|
*
|
2014-07-25 15:34:51 +00:00
|
|
|
* @param ct the registered hostlist (conversation)
|
2004-06-01 21:56:04 +00:00
|
|
|
* @param filter the optional filter name or NULL
|
|
|
|
*/
|
2014-07-25 15:34:51 +00:00
|
|
|
extern void init_hostlist_table(struct register_ct* ct, const char *filter);
|
2004-02-20 09:09:12 +00:00
|
|
|
|
2004-06-03 21:46:27 +00:00
|
|
|
/** Callback for "Endpoints" statistics item.
|
|
|
|
*
|
|
|
|
* @param w unused
|
|
|
|
* @param d unused
|
|
|
|
*/
|
|
|
|
extern void init_hostlist_notebook_cb(GtkWidget *w, gpointer d);
|
|
|
|
|
2014-07-25 15:34:51 +00:00
|
|
|
/** Function called to instantiate the "GTK hostlist display"
|
2004-06-01 21:56:04 +00:00
|
|
|
*
|
2014-07-25 15:34:51 +00:00
|
|
|
* @param table conversation table to be created
|
2004-06-01 21:56:04 +00:00
|
|
|
*/
|
2014-07-25 15:34:51 +00:00
|
|
|
extern void hostlist_endpoint_cb(register_ct_t* table);
|
2010-06-15 21:18:31 +00:00
|
|
|
|
|
|
|
#endif /* __HOSTLIST_TABLE_H__ */
|