/* hostlist_tr.c 2004 Ian Schorr
* modified from endpoint_talkers_tr.c 2003 Ronnie Sahlberg
*
- * $Id: hostlist_tr.c,v 1.2 2004/02/22 18:44:02 ulfl 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-tr.h"
+#include <epan/dissectors/packet-tr.h>
static int
-tr_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, void *vip)
+tr_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
hostlist_table *hosts=(hostlist_table *)pit;
- tr_hdr *trhdr=vip;
+ const tr_hdr *trhdr=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)
{
char *filter=NULL;
- if(!strncmp(optarg,"conv,tr,",8)){
- filter=optarg+8;
+ if(!strncmp(optarg,"hosts,tr,",9)){
+ filter=optarg+9;
} else {
filter=NULL;
}
- init_hostlist_table(TRUE, "Token Ring", "tr", filter, (void *)tr_hostlist_packet);
+ init_hostlist_table(TRUE, "Token Ring Hosts", "tr", filter, tr_hostlist_packet);
}
static void
gtk_tr_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
{
- gtk_tr_hostlist_init("conv,tr");
+ gtk_tr_hostlist_init("hosts,tr");
}
void
register_tap_listener_tr_hostlist(void)
{
- register_ethereal_tap("conv,tr", gtk_tr_hostlist_init);
+ register_ethereal_tap("hosts,tr", gtk_tr_hostlist_init);
- register_tap_menu_item("Token Ring/Host List", REGISTER_TAP_LAYER_DATA_LINK,
+ register_tap_menu_item("Token Ring", REGISTER_TAP_GROUP_ENDPOINT_LIST,
gtk_tr_hostlist_cb, NULL, NULL, NULL);
-}
+ register_hostlist_table(TRUE, "Token Ring", "tr", NULL /*filter*/, tr_hostlist_packet);
+}