Cleanup header file define guards.
[obnox/wireshark/wip.git] / gtk / hostlist_ipx.c
index 32b079cd0204814f027240462474f4d85cb64427..60bf09e97907557178042d85cff14e1c3596b701 100644 (file)
@@ -1,10 +1,10 @@
 /* hostlist_ipx.c   2004 Ian Schorr
  * modified from endpoint_talkers_ipx.c   2003 Ronnie Sahlberg
  *
- * $Id: hostlist_ipx.c,v 1.5 2004/02/23 20:28:30 ulfl Exp $
+ * $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
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
+#include <string.h>
 
 #include <gtk/gtk.h>
-#include <string.h>
+
 #include "epan/packet.h"
-#include "tap_menu.h"
-#include "../tap.h"
+#include <epan/stat_cmd_args.h>
+#include <epan/tap.h>
+#include <epan/dissectors/packet-ipx.h>
+
+#include "../stat_menu.h"
 #include "../register.h"
-#include "hostlist_table.h"
-#include "packet-ipx.h"
+
+#include "gtk/gui_stat_menu.h"
+#include "gtk/hostlist_table.h"
 
 
 static int
-ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, void *vip)
+ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
 {
        hostlist_table *hosts=(hostlist_table *)pit;
-       ipxhdr_t *ipxh=vip;
+       const ipxhdr_t *ipxh=vip;
 
        /* Take two "add" passes per packet, adding for each direction, ensures that all
        packets are counted properly (even if address is sending to itself) 
@@ -58,9 +63,9 @@ ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, void
 
 
 static void
-gtk_ipx_hostlist_init(char *optarg)
+gtk_ipx_hostlist_init(const char *optarg, void* userdata _U_)
 {
-       char *filter=NULL;
+       const char *filter=NULL;
 
        if(!strncmp(optarg,"hosts,ipx,",10)){
                filter=optarg+10;
@@ -68,7 +73,7 @@ gtk_ipx_hostlist_init(char *optarg)
                filter=NULL;
        }
 
-       init_hostlist_table(TRUE, "IPX Hosts", "ipx", filter, (void *)ipx_hostlist_packet);
+       init_hostlist_table(TRUE, "IPX", "ipx", filter, ipx_hostlist_packet);
 
 }
 
@@ -76,16 +81,17 @@ gtk_ipx_hostlist_init(char *optarg)
 static void
 gtk_ipx_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
 {
-       gtk_ipx_hostlist_init("hosts,ipx");
+       gtk_ipx_hostlist_init("hosts,ipx",NULL);
 }
 
 
 void
 register_tap_listener_ipx_hostlist(void)
 {
-       register_ethereal_tap("hosts,ipx", gtk_ipx_hostlist_init);
+       register_stat_cmd_arg("hosts,ipx", gtk_ipx_hostlist_init,NULL);
 
-       register_tap_menu_item("IPX", REGISTER_TAP_GROUP_ENDPOINT_LIST,
+       register_stat_menu_item("IPX", REGISTER_STAT_GROUP_ENDPOINT_LIST,
            gtk_ipx_hostlist_cb, NULL, NULL, NULL);
-}
 
+       register_hostlist_table(TRUE, "IPX", "ipx", NULL /*filter*/, ipx_hostlist_packet);
+}