Make the signatures of functions passed to "register_tap_listener()"
[obnox/wireshark/wip.git] / gtk / hostlist_ipx.c
index a1674084338e9e977b187155433ceed3be9124fb..a266796fcdbeb62c85d1d7180d60b86283837605 100644 (file)
@@ -1,7 +1,7 @@
 /* hostlist_ipx.c   2004 Ian Schorr
  * modified from endpoint_talkers_ipx.c   2003 Ronnie Sahlberg
  *
- * $Id: hostlist_ipx.c,v 1.1 2004/02/20 09:09:11 guy Exp $
+ * $Id$
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 #include <string.h>
 #include "epan/packet.h"
 #include "tap_menu.h"
-#include "../tap.h"
+#include <epan/tap.h>
 #include "../register.h"
 #include "hostlist_table.h"
-#include "packet-ipx.h"
+#include <epan/dissectors/packet-ipx.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) 
@@ -62,13 +62,13 @@ gtk_ipx_hostlist_init(char *optarg)
 {
        char *filter=NULL;
 
-       if(!strncmp(optarg,"conv,ipx,",9)){
-               filter=optarg+9;
+       if(!strncmp(optarg,"hosts,ipx,",10)){
+               filter=optarg+10;
        } else {
                filter=NULL;
        }
 
-       init_hostlist_table(TRUE, "IPX", "ipx", filter, (void *)ipx_hostlist_packet);
+       init_hostlist_table(TRUE, "IPX Hosts", "ipx", filter, ipx_hostlist_packet);
 
 }
 
@@ -76,23 +76,17 @@ gtk_ipx_hostlist_init(char *optarg)
 static void
 gtk_ipx_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
 {
-       gtk_ipx_hostlist_init("conv,ipx");
+       gtk_ipx_hostlist_init("hosts,ipx");
 }
 
 
 void
-register_tap_menu_ipx_hostlist(void)
+register_tap_listener_ipx_hostlist(void)
 {
-       register_tap_menu_item("_Statistics/Host List/IPX",
-           gtk_ipx_hostlist_cb, NULL, NULL, NULL);
-}
-
-
+       register_ethereal_tap("hosts,ipx", gtk_ipx_hostlist_init);
 
+       register_tap_menu_item("IPX", REGISTER_TAP_GROUP_ENDPOINT_LIST,
+           gtk_ipx_hostlist_cb, NULL, NULL, NULL);
 
-void
-register_tap_listener_ipx_hostlist(void)
-{
-       register_ethereal_tap("conv,ipx", gtk_ipx_hostlist_init);
+       register_hostlist_table(TRUE, "IPX", "ipx", NULL /*filter*/, ipx_hostlist_packet);
 }
-