/* 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)
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;
filter=NULL;
}
- init_hostlist_table(TRUE, "IPX Hosts", "ipx", filter, (void *)ipx_hostlist_packet);
+ init_hostlist_table(TRUE, "IPX", "ipx", filter, ipx_hostlist_packet);
}
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);
+}