1 /* conversations_jxta.c
2 * conversations_jxta copyright (c) 2005 Mike Duigou <bondolo@jxta.org>
3 * copied from conversations_sctp.c
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@ethereal.com>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 #ifdef HAVE_SYS_TYPES_H
31 # include <sys/types.h>
36 #include "epan/packet.h"
37 #include <epan/stat_cmd_args.h>
38 #include "../stat_menu.h"
39 #include "gui_stat_menu.h"
41 #include "../register.h"
42 #include "conversations_table.h"
43 #include <epan/dissectors/packet-jxta.h>
47 jxta_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
49 const jxta_tap_header *jxtahdr = (const jxta_tap_header *) vip;
51 add_conversation_table_data((conversations_table *)pct,
52 &jxtahdr->src_address,
53 &jxtahdr->dest_address,
66 jxta_conversation_init(const char *optarg)
68 const char *filter=NULL;
70 if(!strncmp(optarg,"conv,jxta,",10)){
76 init_conversation_table(TRUE, "JXTA", "jxta", filter, jxta_conversation_packet);
82 jxta_conversation_cb(GtkWidget *w _U_, gpointer d _U_)
84 jxta_conversation_init("conv,jxta");
89 register_tap_listener_jxta_conversation(void)
91 register_stat_cmd_arg("conv,jxta", jxta_conversation_init);
93 register_stat_menu_item("JXTA", REGISTER_STAT_GROUP_CONVERSATION_LIST,
94 jxta_conversation_cb, NULL, NULL, NULL);
96 register_conversation_table(TRUE, "JXTA", "jxta", NULL /*filter*/, jxta_conversation_packet);