The rest of the Follow UDP Stream check-in
[obnox/wireshark/wip.git] / gtk / hostlist_table.h
index 4fbb77e960649c0ad5f38320588d56d0fc79722b..523f042f035b39ace4136f5da4e7f85d871decf0 100644 (file)
@@ -4,8 +4,8 @@
  *
  * $Id$
  *
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * 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
@@ -36,19 +36,21 @@ typedef struct _hostlist_talker_t {
        guint32 port_type;      /**< port_type (e.g. PT_TCP) */
        guint32 port;           /**< 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 */
+       guint64 rx_frames;      /**< number of received packets */
+       guint64 tx_frames;      /**< number of transmitted packets */
+       guint64 rx_bytes;       /**< number of received bytes */
+       guint64 tx_bytes;       /**< number of transmitted bytes */
 } hostlist_talker_t;
 
 /** Hostlist widget */
 typedef struct _hostlist_table {
-       char                *name;              /**< the name of the table */
+       const 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 */
+       guint32             num_columns;        /**< number of columns in the above table */
+       const char          *default_titles[8]; /**< Column headers */
        GtkWidget           *menu;              /**< context menu */
        gboolean            has_ports;          /**< table has ports */
        guint32             num_hosts;          /**< number of hosts (0 or 1) */
@@ -64,7 +66,7 @@ typedef struct _hostlist_table {
  * @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);
+extern void register_hostlist_table(gboolean hide_ports, const char *table_name, const char *tap_name, const char *filter, tap_packet_cb packet_func);
 
 /** Init the hostlist table for the single hostlist window.
  *
@@ -74,7 +76,7 @@ extern void register_hostlist_table(gboolean hide_ports, char *table_name, char
  * @param filter the optional filter name or NULL
  * @param packet_func the function to be called for each incoming packet
  */
-extern void init_hostlist_table(gboolean hide_ports, char *table_name, char *tap_name, char *filter, void *packet_func);
+extern void init_hostlist_table(gboolean hide_ports, const char *table_name, const char *tap_name, const char *filter, tap_packet_cb packet_func);
 
 /** Callback for "Endpoints" statistics item.
  *
@@ -94,5 +96,5 @@ extern void init_hostlist_notebook_cb(GtkWidget *w, gpointer d);
  * @param sat address type
  * @param port_type the port type (e.g. PT_TCP)
  */
-void add_hostlist_table_data(hostlist_table *hl, address *addr,
+void add_hostlist_table_data(hostlist_table *hl, const address *addr,
                              guint32 port, gboolean sender, int num_frames, int num_bytes, SAT_E sat, int port_type);