aboutsummaryrefslogtreecommitdiffstats
path: root/ui/traffic_table_ui.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/traffic_table_ui.h')
-rw-r--r--ui/traffic_table_ui.h38
1 files changed, 30 insertions, 8 deletions
diff --git a/ui/traffic_table_ui.h b/ui/traffic_table_ui.h
index f1f858fc12..6d50d9eeeb 100644
--- a/ui/traffic_table_ui.h
+++ b/ui/traffic_table_ui.h
@@ -1,6 +1,5 @@
/* traffic_table_ui.h
- * Copied from gtk/conversations_table.h 2003 Ronnie Sahlberg
- * Helper routines common to all conversations taps.
+ * Helper routines common to conversation/endpoint tables.
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
@@ -9,8 +8,15 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
-#ifndef __CONVERSATION_UI_H__
-#define __CONVERSATION_UI_H__
+#ifndef __TRAFFIC_TABLE_UI_H__
+#define __TRAFFIC_TABLE_UI_H__
+
+#ifdef HAVE_MAXMINDDB
+#include <stdio.h>
+
+#include "epan/maxmind_db.h"
+#include <epan/conversation_table.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -66,21 +72,37 @@ extern const char *endp_column_titles[ENDP_NUM_GEO_COLUMNS];
extern const char *endp_conn_title;
+#ifdef HAVE_MAXMINDDB
+/**
+ * Writes an HTML file containing a map showing the geographical locations
+ * of IPv4 and IPv6 addresses.
+ *
+ * @param [in] fp File handle for writing the HTML file.
+ * @param [in] json_only Write GeoJSON data only.
+ * @param [in] hosts A NULL-terminated array of 'hostlist_talker_t'. A MMDB
+ * lookup should have been completed before for these addresses.
+ * @param [in,out] err_str Set to error string on failure. Error string must
+ * be g_freed. May be NULL.
+ * @return Whether the map file was successfully written with non-empty data.
+ */
+gboolean write_endpoint_geoip_map(FILE *fp, gboolean json_only, hostlist_talker_t *const *hosts, gchar **err_str);
+#endif
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#endif /* __CONVERSATION_UI_H__ */
+#endif /* __TRAFFIC_TABLE_UI_H__ */
/*
- * Editor modelines
+ * Editor modelines - https://www.wireshark.org/tools/modelines.html
*
- * Local Variables:
+ * Local variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
- * ex: set shiftwidth=4 tabstop=8 expandtab:
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/