2004-07-20 06:06:41 +00:00
|
|
|
/* conversations_ipx.c
|
|
|
|
* conversations_ipx 2003 Ronnie Sahlberg
|
2003-08-24 05:39:05 +00:00
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2003-08-24 05:39:05 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2003-08-24 05:39:05 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
# include <sys/types.h>
|
|
|
|
#endif
|
2008-04-13 00:55:59 +00:00
|
|
|
#include <string.h>
|
2003-08-24 05:39:05 +00:00
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
2008-04-13 00:55:59 +00:00
|
|
|
|
|
|
|
#include <epan/packet.h>
|
2005-08-20 20:06:05 +00:00
|
|
|
#include <epan/stat_cmd_args.h>
|
2004-09-29 00:06:36 +00:00
|
|
|
#include <epan/tap.h>
|
2004-07-18 18:06:47 +00:00
|
|
|
#include <epan/dissectors/packet-ipx.h>
|
2003-08-24 05:39:05 +00:00
|
|
|
|
2008-04-13 00:55:59 +00:00
|
|
|
#include "../stat_menu.h"
|
|
|
|
#include "../register.h"
|
|
|
|
|
|
|
|
#include "gtk/gui_stat_menu.h"
|
|
|
|
#include "gtk/conversations_table.h"
|
|
|
|
|
2003-08-24 05:39:05 +00:00
|
|
|
|
|
|
|
static int
|
2005-01-01 12:49:54 +00:00
|
|
|
ipx_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
2003-08-24 05:39:05 +00:00
|
|
|
{
|
2005-01-01 12:49:54 +00:00
|
|
|
const ipxhdr_t *ipxh=vip;
|
2003-08-24 05:39:05 +00:00
|
|
|
|
2007-11-20 18:35:41 +00:00
|
|
|
add_conversation_table_data((conversations_table *)pct, &ipxh->ipx_src, &ipxh->ipx_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_NONE);
|
2003-08-24 05:39:05 +00:00
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2006-02-11 13:05:24 +00:00
|
|
|
ipx_conversation_init(const char *optarg, void* userdata _U_)
|
2003-08-24 05:39:05 +00:00
|
|
|
{
|
2005-08-05 20:59:08 +00:00
|
|
|
const char *filter=NULL;
|
2003-08-24 05:39:05 +00:00
|
|
|
|
2003-09-04 23:37:45 +00:00
|
|
|
if(!strncmp(optarg,"conv,ipx,",9)){
|
|
|
|
filter=optarg+9;
|
2003-08-24 05:39:05 +00:00
|
|
|
} else {
|
|
|
|
filter=NULL;
|
|
|
|
}
|
|
|
|
|
2005-01-01 12:49:54 +00:00
|
|
|
init_conversation_table(TRUE, "IPX", "ipx", filter, ipx_conversation_packet);
|
2003-08-24 05:39:05 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2004-07-20 20:56:53 +00:00
|
|
|
ipx_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
|
2003-08-24 05:39:05 +00:00
|
|
|
{
|
2006-02-11 13:05:24 +00:00
|
|
|
ipx_conversation_init("conv,ipx",NULL);
|
2003-08-24 05:39:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2004-07-20 20:56:53 +00:00
|
|
|
register_tap_listener_ipx_conversation(void)
|
2003-08-24 05:39:05 +00:00
|
|
|
{
|
2006-02-11 13:05:24 +00:00
|
|
|
register_stat_cmd_arg("conv,ipx", ipx_conversation_init,NULL);
|
2004-02-22 18:47:04 +00:00
|
|
|
|
2005-08-19 09:29:41 +00:00
|
|
|
register_stat_menu_item("IPX", REGISTER_STAT_GROUP_CONVERSATION_LIST,
|
2004-07-20 20:56:53 +00:00
|
|
|
ipx_endpoints_cb, NULL, NULL, NULL);
|
2004-05-02 17:25:10 +00:00
|
|
|
|
2005-01-01 12:49:54 +00:00
|
|
|
register_conversation_table(TRUE, "IPX", "ipx", NULL /*filter*/, ipx_conversation_packet);
|
2003-08-24 05:39:05 +00:00
|
|
|
}
|