2003-01-22 01:24:06 +00:00
|
|
|
/* tap-iousers.c
|
|
|
|
* iostat 2003 Ronnie Sahlberg
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2003-01-22 01:24:06 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2003-01-22 01:24:06 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2007-04-18 04:34:10 +00:00
|
|
|
*
|
2003-01-22 01:24:06 +00:00
|
|
|
* 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.
|
2007-04-18 04:34:10 +00:00
|
|
|
*
|
2003-01-22 01:24:06 +00:00
|
|
|
* 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.
|
2007-04-18 04:34:10 +00:00
|
|
|
*
|
2003-01-22 01:24:06 +00:00
|
|
|
* 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
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
# include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <string.h>
|
2003-01-22 07:28:29 +00:00
|
|
|
#include <epan/packet_info.h>
|
|
|
|
#include <epan/packet.h>
|
2004-08-06 19:57:49 +00:00
|
|
|
#include <epan/addr_resolv.h>
|
2004-09-29 00:06:36 +00:00
|
|
|
#include <epan/tap.h>
|
2006-04-21 11:08:24 +00:00
|
|
|
#include <epan/conversation.h>
|
2005-08-20 20:06:05 +00:00
|
|
|
#include <epan/stat_cmd_args.h>
|
2004-07-18 18:06:47 +00:00
|
|
|
#include <epan/dissectors/packet-ip.h>
|
2009-12-11 02:19:41 +00:00
|
|
|
#include <epan/dissectors/packet-ipv6.h>
|
2004-07-18 18:06:47 +00:00
|
|
|
#include <epan/dissectors/packet-ipx.h>
|
|
|
|
#include <epan/dissectors/packet-tcp.h>
|
|
|
|
#include <epan/dissectors/packet-udp.h>
|
|
|
|
#include <epan/dissectors/packet-eth.h>
|
2005-03-20 12:02:00 +00:00
|
|
|
#include <epan/dissectors/packet-sctp.h>
|
2004-07-18 18:06:47 +00:00
|
|
|
#include <epan/dissectors/packet-tr.h>
|
2006-10-11 10:38:59 +00:00
|
|
|
#include <epan/dissectors/packet-scsi.h>
|
2004-07-18 18:06:47 +00:00
|
|
|
#include <epan/dissectors/packet-fc.h>
|
|
|
|
#include <epan/dissectors/packet-fddi.h>
|
2003-01-22 01:24:06 +00:00
|
|
|
|
|
|
|
typedef struct _io_users_t {
|
2005-07-23 11:41:25 +00:00
|
|
|
const char *type;
|
2003-01-22 01:24:06 +00:00
|
|
|
char *filter;
|
|
|
|
struct _io_users_item_t *items;
|
|
|
|
} io_users_t;
|
|
|
|
|
|
|
|
typedef struct _io_users_item_t {
|
|
|
|
struct _io_users_item_t *next;
|
|
|
|
char *name1;
|
|
|
|
char *name2;
|
2003-08-23 09:09:35 +00:00
|
|
|
address addr1;
|
2007-04-18 04:34:10 +00:00
|
|
|
address addr2;
|
2003-01-22 01:24:06 +00:00
|
|
|
guint32 frames1;
|
|
|
|
guint32 frames2;
|
2007-04-18 04:34:10 +00:00
|
|
|
guint64 bytes1;
|
|
|
|
guint64 bytes2;
|
2003-01-22 01:24:06 +00:00
|
|
|
} io_users_item_t;
|
|
|
|
|
2003-03-03 23:20:59 +00:00
|
|
|
|
2003-03-03 23:46:50 +00:00
|
|
|
static int
|
2005-01-01 12:49:54 +00:00
|
|
|
iousers_udpip_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vudph)
|
2003-03-03 23:46:50 +00:00
|
|
|
{
|
2005-01-01 12:49:54 +00:00
|
|
|
io_users_t *iu=arg;
|
|
|
|
const e_udphdr *udph=vudph;
|
2003-03-03 23:46:50 +00:00
|
|
|
char name1[256],name2[256];
|
|
|
|
io_users_item_t *iui;
|
|
|
|
int direction=0;
|
|
|
|
|
2003-09-05 01:33:40 +00:00
|
|
|
if(udph->uh_sport>udph->uh_dport){
|
|
|
|
direction=0;
|
2009-09-06 14:25:47 +00:00
|
|
|
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_src),get_udp_port(udph->uh_sport));
|
|
|
|
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&udph->ip_dst),get_udp_port(udph->uh_dport));
|
2003-09-05 01:33:40 +00:00
|
|
|
} else if(udph->uh_sport<udph->uh_dport){
|
|
|
|
direction=1;
|
2009-09-06 14:25:47 +00:00
|
|
|
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&udph->ip_src),get_udp_port(udph->uh_sport));
|
|
|
|
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_dst),get_udp_port(udph->uh_dport));
|
2003-09-05 01:33:40 +00:00
|
|
|
} else if(CMP_ADDRESS(&udph->ip_src, &udph->ip_dst)>0){
|
|
|
|
direction=0;
|
2009-09-06 14:25:47 +00:00
|
|
|
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_src),get_udp_port(udph->uh_sport));
|
|
|
|
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&udph->ip_dst),get_udp_port(udph->uh_dport));
|
2003-08-24 03:31:54 +00:00
|
|
|
} else {
|
|
|
|
direction=1;
|
2009-09-06 14:25:47 +00:00
|
|
|
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&udph->ip_src),get_udp_port(udph->uh_sport));
|
|
|
|
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_dst),get_udp_port(udph->uh_dport));
|
2003-03-03 23:46:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for(iui=iu->items;iui;iui=iui->next){
|
|
|
|
if((!strcmp(iui->name1, name1))
|
|
|
|
&& (!strcmp(iui->name2, name2)) ){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!iui){
|
|
|
|
iui=g_malloc(sizeof(io_users_item_t));
|
|
|
|
iui->next=iu->items;
|
|
|
|
iu->items=iui;
|
2003-08-23 09:09:35 +00:00
|
|
|
/* iui->addr1=NULL;*/
|
2008-05-13 06:55:45 +00:00
|
|
|
iui->name1=g_strdup(name1);
|
2003-08-23 09:09:35 +00:00
|
|
|
/* iui->addr2=NULL;*/
|
2008-05-13 06:55:45 +00:00
|
|
|
iui->name2=g_strdup(name2);
|
2003-03-03 23:46:50 +00:00
|
|
|
iui->frames1=0;
|
|
|
|
iui->frames2=0;
|
|
|
|
iui->bytes1=0;
|
|
|
|
iui->bytes2=0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(direction){
|
|
|
|
iui->frames1++;
|
|
|
|
iui->bytes1+=pinfo->fd->pkt_len;
|
|
|
|
} else {
|
|
|
|
iui->frames2++;
|
|
|
|
iui->bytes2+=pinfo->fd->pkt_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2003-08-23 09:09:35 +00:00
|
|
|
|
2005-03-20 12:02:00 +00:00
|
|
|
static int
|
|
|
|
iousers_sctp_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vsctp)
|
|
|
|
{
|
|
|
|
io_users_t *iu=arg;
|
|
|
|
const struct _sctp_info* sctph = vsctp;
|
|
|
|
char name1[256],name2[256], s_sport[10], s_dport[10];
|
|
|
|
io_users_item_t *iui;
|
|
|
|
int direction=0;
|
|
|
|
|
2005-08-08 18:50:39 +00:00
|
|
|
g_snprintf(s_sport, sizeof s_sport, "%d",sctph->sport);
|
|
|
|
g_snprintf(s_dport, sizeof s_dport, "%d",sctph->dport);
|
2007-04-18 04:34:10 +00:00
|
|
|
|
2005-03-20 12:02:00 +00:00
|
|
|
if(sctph->sport > sctph->dport) {
|
|
|
|
direction=0;
|
2009-09-06 14:25:47 +00:00
|
|
|
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&sctph->ip_src),s_sport);
|
|
|
|
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&sctph->ip_dst),s_dport);
|
2005-03-20 12:02:00 +00:00
|
|
|
} else if(sctph->sport < sctph->dport) {
|
|
|
|
direction=1;
|
2009-09-06 14:25:47 +00:00
|
|
|
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&sctph->ip_src),s_sport);
|
|
|
|
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&sctph->ip_dst),s_dport);
|
2005-03-20 12:02:00 +00:00
|
|
|
} else {
|
|
|
|
direction=0;
|
2009-09-06 14:25:47 +00:00
|
|
|
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&sctph->ip_src),s_sport);
|
|
|
|
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&sctph->ip_dst),s_dport);
|
2005-03-20 12:02:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for(iui=iu->items;iui;iui=iui->next){
|
|
|
|
if((!strcmp(iui->name1, name1))
|
|
|
|
&& (!strcmp(iui->name2, name2)) ){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!iui){
|
|
|
|
iui=g_malloc(sizeof(io_users_item_t));
|
|
|
|
iui->next=iu->items;
|
|
|
|
iu->items=iui;
|
|
|
|
/* iui->addr1=NULL;*/
|
2008-05-13 06:55:45 +00:00
|
|
|
iui->name1=g_strdup(name1);
|
2005-03-20 12:02:00 +00:00
|
|
|
/* iui->addr2=NULL;*/
|
2008-05-13 06:55:45 +00:00
|
|
|
iui->name2=g_strdup(name2);
|
2005-03-20 12:02:00 +00:00
|
|
|
iui->frames1=0;
|
|
|
|
iui->frames2=0;
|
|
|
|
iui->bytes1=0;
|
|
|
|
iui->bytes2=0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(direction){
|
|
|
|
iui->frames1++;
|
|
|
|
iui->bytes1+=pinfo->fd->pkt_len;
|
|
|
|
} else {
|
|
|
|
iui->frames2++;
|
|
|
|
iui->bytes2+=pinfo->fd->pkt_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-03-03 23:20:59 +00:00
|
|
|
static int
|
2005-01-01 12:49:54 +00:00
|
|
|
iousers_tcpip_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vtcph)
|
2003-03-03 23:20:59 +00:00
|
|
|
{
|
2005-01-01 12:49:54 +00:00
|
|
|
io_users_t *iu=arg;
|
|
|
|
const struct tcpheader *tcph=vtcph;
|
2003-03-03 23:20:59 +00:00
|
|
|
char name1[256],name2[256];
|
|
|
|
io_users_item_t *iui;
|
|
|
|
int direction=0;
|
|
|
|
|
2003-09-05 01:33:40 +00:00
|
|
|
if(tcph->th_sport>tcph->th_dport){
|
|
|
|
direction=0;
|
2009-09-06 14:25:47 +00:00
|
|
|
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_src),get_tcp_port(tcph->th_sport));
|
|
|
|
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),get_tcp_port(tcph->th_dport));
|
2003-09-05 01:33:40 +00:00
|
|
|
} else if(tcph->th_sport<tcph->th_dport){
|
|
|
|
direction=1;
|
2009-09-06 14:25:47 +00:00
|
|
|
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&tcph->ip_src),get_tcp_port(tcph->th_sport));
|
|
|
|
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),get_tcp_port(tcph->th_dport));
|
2003-09-05 01:33:40 +00:00
|
|
|
} else if(CMP_ADDRESS(&tcph->ip_src, &tcph->ip_dst)>0){
|
|
|
|
direction=0;
|
2009-09-06 14:25:47 +00:00
|
|
|
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_src),get_tcp_port(tcph->th_sport));
|
|
|
|
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),get_tcp_port(tcph->th_dport));
|
2003-08-24 03:31:54 +00:00
|
|
|
} else {
|
|
|
|
direction=1;
|
2009-09-06 14:25:47 +00:00
|
|
|
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&tcph->ip_src),get_tcp_port(tcph->th_sport));
|
|
|
|
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),get_tcp_port(tcph->th_dport));
|
2003-03-03 23:20:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for(iui=iu->items;iui;iui=iui->next){
|
|
|
|
if((!strcmp(iui->name1, name1))
|
|
|
|
&& (!strcmp(iui->name2, name2)) ){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!iui){
|
|
|
|
iui=g_malloc(sizeof(io_users_item_t));
|
|
|
|
iui->next=iu->items;
|
|
|
|
iu->items=iui;
|
2003-08-23 09:09:35 +00:00
|
|
|
/* iui->addr1=NULL;*/
|
2008-05-13 06:55:45 +00:00
|
|
|
iui->name1=g_strdup(name1);
|
2003-08-23 09:09:35 +00:00
|
|
|
/* iui->addr2=NULL;*/
|
2008-05-13 06:55:45 +00:00
|
|
|
iui->name2=g_strdup(name2);
|
2003-03-03 23:20:59 +00:00
|
|
|
iui->frames1=0;
|
|
|
|
iui->frames2=0;
|
|
|
|
iui->bytes1=0;
|
|
|
|
iui->bytes2=0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(direction){
|
|
|
|
iui->frames1++;
|
|
|
|
iui->bytes1+=pinfo->fd->pkt_len;
|
|
|
|
} else {
|
|
|
|
iui->frames2++;
|
|
|
|
iui->bytes2+=pinfo->fd->pkt_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-01-22 01:24:06 +00:00
|
|
|
static int
|
2005-01-01 12:49:54 +00:00
|
|
|
iousers_ip_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
2003-01-22 01:24:06 +00:00
|
|
|
{
|
2005-01-01 12:49:54 +00:00
|
|
|
io_users_t *iu=arg;
|
2009-05-20 15:50:40 +00:00
|
|
|
const ws_ip *iph=vip;
|
2005-01-01 12:49:54 +00:00
|
|
|
const address *addr1, *addr2;
|
2003-01-22 01:24:06 +00:00
|
|
|
io_users_item_t *iui;
|
|
|
|
|
2003-08-23 09:09:35 +00:00
|
|
|
if(CMP_ADDRESS(&iph->ip_src, &iph->ip_dst)>0){
|
|
|
|
addr1=&iph->ip_src;
|
|
|
|
addr2=&iph->ip_dst;
|
2003-01-22 01:24:06 +00:00
|
|
|
} else {
|
2003-08-23 09:09:35 +00:00
|
|
|
addr2=&iph->ip_src;
|
|
|
|
addr1=&iph->ip_dst;
|
2003-01-22 01:24:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for(iui=iu->items;iui;iui=iui->next){
|
2003-08-23 09:09:35 +00:00
|
|
|
if((!CMP_ADDRESS(&iui->addr1, addr1))
|
|
|
|
&&(!CMP_ADDRESS(&iui->addr2, addr2)) ){
|
2003-01-22 01:24:06 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!iui){
|
|
|
|
iui=g_malloc(sizeof(io_users_item_t));
|
|
|
|
iui->next=iu->items;
|
|
|
|
iu->items=iui;
|
2003-08-23 09:09:35 +00:00
|
|
|
COPY_ADDRESS(&iui->addr1, addr1);
|
2009-09-06 14:25:47 +00:00
|
|
|
iui->name1=g_strdup(ep_address_to_str(addr1));
|
2003-08-23 09:09:35 +00:00
|
|
|
COPY_ADDRESS(&iui->addr2, addr2);
|
2009-09-06 14:25:47 +00:00
|
|
|
iui->name2=g_strdup(ep_address_to_str(addr2));
|
2003-01-22 01:24:06 +00:00
|
|
|
iui->frames1=0;
|
|
|
|
iui->frames2=0;
|
|
|
|
iui->bytes1=0;
|
|
|
|
iui->bytes2=0;
|
|
|
|
}
|
|
|
|
|
2003-08-23 09:09:35 +00:00
|
|
|
if(!CMP_ADDRESS(&iph->ip_dst, &iui->addr1)){
|
2003-01-22 01:24:06 +00:00
|
|
|
iui->frames1++;
|
|
|
|
iui->bytes1+=pinfo->fd->pkt_len;
|
|
|
|
} else {
|
|
|
|
iui->frames2++;
|
|
|
|
iui->bytes2+=pinfo->fd->pkt_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2009-12-11 02:19:41 +00:00
|
|
|
static int
|
|
|
|
iousers_ipv6_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
|
|
|
|
{
|
|
|
|
io_users_t *iu=arg;
|
|
|
|
const struct ip6_hdr *ip6h=vip;
|
|
|
|
address src, dst;
|
|
|
|
const address *addr1, *addr2;
|
|
|
|
io_users_item_t *iui;
|
|
|
|
|
|
|
|
/* Addresses aren't implemented as 'address' type in struct ip6_hdr */
|
|
|
|
src.type = dst.type = AT_IPv6;
|
|
|
|
src.len = dst.len = sizeof(struct e_in6_addr);
|
|
|
|
src.data = &ip6h->ip6_src;
|
|
|
|
dst.data = &ip6h->ip6_dst;
|
|
|
|
|
|
|
|
if(CMP_ADDRESS(&src, &dst)>0){
|
|
|
|
addr1=&src;
|
|
|
|
addr2=&dst;
|
|
|
|
} else {
|
|
|
|
addr2=&src;
|
|
|
|
addr1=&dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
for(iui=iu->items;iui;iui=iui->next){
|
|
|
|
if((!CMP_ADDRESS(&iui->addr1, addr1))
|
|
|
|
&&(!CMP_ADDRESS(&iui->addr2, addr2)) ){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!iui){
|
|
|
|
iui=g_malloc(sizeof(io_users_item_t));
|
|
|
|
iui->next=iu->items;
|
|
|
|
iu->items=iui;
|
|
|
|
COPY_ADDRESS(&iui->addr1, addr1);
|
|
|
|
iui->name1=g_strdup(ep_address_to_str(addr1));
|
|
|
|
COPY_ADDRESS(&iui->addr2, addr2);
|
|
|
|
iui->name2=g_strdup(ep_address_to_str(addr2));
|
|
|
|
iui->frames1=0;
|
|
|
|
iui->frames2=0;
|
|
|
|
iui->bytes1=0;
|
|
|
|
iui->bytes2=0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!CMP_ADDRESS(&dst, &iui->addr1)){
|
|
|
|
iui->frames1++;
|
|
|
|
iui->bytes1+=pinfo->fd->pkt_len;
|
|
|
|
} else {
|
|
|
|
iui->frames2++;
|
|
|
|
iui->bytes2+=pinfo->fd->pkt_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2003-08-24 05:44:48 +00:00
|
|
|
static int
|
2005-01-01 12:49:54 +00:00
|
|
|
iousers_ipx_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vipx)
|
2003-08-24 05:44:48 +00:00
|
|
|
{
|
2005-01-01 12:49:54 +00:00
|
|
|
io_users_t *iu=arg;
|
|
|
|
const ipxhdr_t *ipxh=vipx;
|
|
|
|
const address *addr1, *addr2;
|
2003-08-24 05:44:48 +00:00
|
|
|
io_users_item_t *iui;
|
|
|
|
|
|
|
|
if(CMP_ADDRESS(&ipxh->ipx_src, &ipxh->ipx_dst)>0){
|
|
|
|
addr1=&ipxh->ipx_src;
|
|
|
|
addr2=&ipxh->ipx_dst;
|
|
|
|
} else {
|
|
|
|
addr2=&ipxh->ipx_src;
|
|
|
|
addr1=&ipxh->ipx_dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
for(iui=iu->items;iui;iui=iui->next){
|
|
|
|
if((!CMP_ADDRESS(&iui->addr1, addr1))
|
|
|
|
&&(!CMP_ADDRESS(&iui->addr2, addr2)) ){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!iui){
|
|
|
|
iui=g_malloc(sizeof(io_users_item_t));
|
|
|
|
iui->next=iu->items;
|
|
|
|
iu->items=iui;
|
|
|
|
COPY_ADDRESS(&iui->addr1, addr1);
|
2009-09-06 14:25:47 +00:00
|
|
|
iui->name1=g_strdup(ep_address_to_str(addr1));
|
2003-08-24 05:44:48 +00:00
|
|
|
COPY_ADDRESS(&iui->addr2, addr2);
|
2009-09-06 14:25:47 +00:00
|
|
|
iui->name2=g_strdup(ep_address_to_str(addr2));
|
2003-08-24 05:44:48 +00:00
|
|
|
iui->frames1=0;
|
|
|
|
iui->frames2=0;
|
|
|
|
iui->bytes1=0;
|
|
|
|
iui->bytes2=0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!CMP_ADDRESS(&ipxh->ipx_dst, &iui->addr1)){
|
|
|
|
iui->frames1++;
|
|
|
|
iui->bytes1+=pinfo->fd->pkt_len;
|
|
|
|
} else {
|
|
|
|
iui->frames2++;
|
|
|
|
iui->bytes2+=pinfo->fd->pkt_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2003-08-24 04:58:32 +00:00
|
|
|
static int
|
2005-01-01 12:49:54 +00:00
|
|
|
iousers_fc_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vfc)
|
2003-08-24 04:58:32 +00:00
|
|
|
{
|
2005-01-01 12:49:54 +00:00
|
|
|
io_users_t *iu=arg;
|
|
|
|
const fc_hdr *fchdr=vfc;
|
|
|
|
const address *addr1, *addr2;
|
2003-08-24 04:58:32 +00:00
|
|
|
io_users_item_t *iui;
|
|
|
|
|
|
|
|
if(CMP_ADDRESS(&fchdr->s_id, &fchdr->d_id)<0){
|
|
|
|
addr1=&fchdr->s_id;
|
|
|
|
addr2=&fchdr->d_id;
|
|
|
|
} else {
|
|
|
|
addr2=&fchdr->s_id;
|
|
|
|
addr1=&fchdr->d_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
for(iui=iu->items;iui;iui=iui->next){
|
|
|
|
if((!CMP_ADDRESS(&iui->addr1, addr1))
|
|
|
|
&&(!CMP_ADDRESS(&iui->addr2, addr2)) ){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!iui){
|
|
|
|
iui=g_malloc(sizeof(io_users_item_t));
|
|
|
|
iui->next=iu->items;
|
|
|
|
iu->items=iui;
|
|
|
|
COPY_ADDRESS(&iui->addr1, addr1);
|
2009-09-06 14:25:47 +00:00
|
|
|
iui->name1=g_strdup(ep_address_to_str(addr1));
|
2003-08-24 04:58:32 +00:00
|
|
|
COPY_ADDRESS(&iui->addr2, addr2);
|
2009-09-06 14:25:47 +00:00
|
|
|
iui->name2=g_strdup(ep_address_to_str(addr2));
|
2003-08-24 04:58:32 +00:00
|
|
|
iui->frames1=0;
|
|
|
|
iui->frames2=0;
|
|
|
|
iui->bytes1=0;
|
|
|
|
iui->bytes2=0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!CMP_ADDRESS(&fchdr->d_id,&iui->addr1)){
|
|
|
|
iui->frames1++;
|
|
|
|
iui->bytes1+=pinfo->fd->pkt_len;
|
|
|
|
} else {
|
|
|
|
iui->frames2++;
|
|
|
|
iui->bytes2+=pinfo->fd->pkt_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2003-01-22 01:24:06 +00:00
|
|
|
static int
|
2005-01-01 12:49:54 +00:00
|
|
|
iousers_eth_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *veth)
|
2003-01-22 01:24:06 +00:00
|
|
|
{
|
2005-01-01 12:49:54 +00:00
|
|
|
io_users_t *iu=arg;
|
|
|
|
const eth_hdr *ehdr=veth;
|
|
|
|
const address *addr1, *addr2;
|
2003-01-22 01:24:06 +00:00
|
|
|
io_users_item_t *iui;
|
|
|
|
|
2003-08-23 09:09:35 +00:00
|
|
|
if(CMP_ADDRESS(&ehdr->src, &ehdr->dst)<0){
|
|
|
|
addr1=&ehdr->src;
|
|
|
|
addr2=&ehdr->dst;
|
2003-01-22 01:24:06 +00:00
|
|
|
} else {
|
2003-08-23 09:09:35 +00:00
|
|
|
addr2=&ehdr->src;
|
|
|
|
addr1=&ehdr->dst;
|
2003-01-22 01:24:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for(iui=iu->items;iui;iui=iui->next){
|
2003-08-23 09:09:35 +00:00
|
|
|
if((!CMP_ADDRESS(&iui->addr1, addr1))
|
|
|
|
&&(!CMP_ADDRESS(&iui->addr2, addr2)) ){
|
2003-01-22 01:24:06 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!iui){
|
|
|
|
iui=g_malloc(sizeof(io_users_item_t));
|
|
|
|
iui->next=iu->items;
|
|
|
|
iu->items=iui;
|
2003-08-23 09:09:35 +00:00
|
|
|
COPY_ADDRESS(&iui->addr1, addr1);
|
2009-09-06 14:25:47 +00:00
|
|
|
iui->name1=g_strdup(ep_address_to_str(addr1));
|
2003-08-23 09:09:35 +00:00
|
|
|
COPY_ADDRESS(&iui->addr2, addr2);
|
2009-09-06 14:25:47 +00:00
|
|
|
iui->name2=g_strdup(ep_address_to_str(addr2));
|
2003-01-22 01:24:06 +00:00
|
|
|
iui->frames1=0;
|
|
|
|
iui->frames2=0;
|
|
|
|
iui->bytes1=0;
|
|
|
|
iui->bytes2=0;
|
|
|
|
}
|
|
|
|
|
2003-08-23 09:09:35 +00:00
|
|
|
if(!CMP_ADDRESS(&ehdr->dst,&iui->addr1)){
|
2003-01-22 01:24:06 +00:00
|
|
|
iui->frames1++;
|
|
|
|
iui->bytes1+=pinfo->fd->pkt_len;
|
|
|
|
} else {
|
|
|
|
iui->frames2++;
|
|
|
|
iui->bytes2+=pinfo->fd->pkt_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2003-08-29 10:59:12 +00:00
|
|
|
static int
|
2005-01-01 12:49:54 +00:00
|
|
|
iousers_fddi_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *veth)
|
2003-08-29 10:59:12 +00:00
|
|
|
{
|
2005-01-01 12:49:54 +00:00
|
|
|
io_users_t *iu=arg;
|
|
|
|
const fddi_hdr *ehdr=veth;
|
|
|
|
const address *addr1, *addr2;
|
2003-08-29 10:59:12 +00:00
|
|
|
io_users_item_t *iui;
|
|
|
|
|
|
|
|
if(CMP_ADDRESS(&ehdr->src, &ehdr->dst)<0){
|
|
|
|
addr1=&ehdr->src;
|
|
|
|
addr2=&ehdr->dst;
|
|
|
|
} else {
|
|
|
|
addr2=&ehdr->src;
|
|
|
|
addr1=&ehdr->dst;
|
|
|
|
}
|
|
|
|
|
|
|
|
for(iui=iu->items;iui;iui=iui->next){
|
|
|
|
if((!CMP_ADDRESS(&iui->addr1, addr1))
|
|
|
|
&&(!CMP_ADDRESS(&iui->addr2, addr2)) ){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!iui){
|
|
|
|
iui=g_malloc(sizeof(io_users_item_t));
|
|
|
|
iui->next=iu->items;
|
|
|
|
iu->items=iui;
|
|
|
|
COPY_ADDRESS(&iui->addr1, addr1);
|
2009-09-06 14:25:47 +00:00
|
|
|
iui->name1=g_strdup(ep_address_to_str(addr1));
|
2003-08-29 10:59:12 +00:00
|
|
|
COPY_ADDRESS(&iui->addr2, addr2);
|
2009-09-06 14:25:47 +00:00
|
|
|
iui->name2=g_strdup(ep_address_to_str(addr2));
|
2003-08-29 10:59:12 +00:00
|
|
|
iui->frames1=0;
|
|
|
|
iui->frames2=0;
|
|
|
|
iui->bytes1=0;
|
|
|
|
iui->bytes2=0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!CMP_ADDRESS(&ehdr->dst,&iui->addr1)){
|
|
|
|
iui->frames1++;
|
|
|
|
iui->bytes1+=pinfo->fd->pkt_len;
|
|
|
|
} else {
|
|
|
|
iui->frames2++;
|
|
|
|
iui->bytes2+=pinfo->fd->pkt_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2003-01-22 01:24:06 +00:00
|
|
|
static int
|
2005-01-01 12:49:54 +00:00
|
|
|
iousers_tr_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vtr)
|
2003-01-22 01:24:06 +00:00
|
|
|
{
|
2005-01-01 12:49:54 +00:00
|
|
|
io_users_t *iu=arg;
|
|
|
|
const tr_hdr *trhdr=vtr;
|
|
|
|
const address *addr1, *addr2;
|
2003-01-22 01:24:06 +00:00
|
|
|
io_users_item_t *iui;
|
|
|
|
|
2003-08-23 09:09:35 +00:00
|
|
|
if(CMP_ADDRESS(&trhdr->src, &trhdr->dst)<0){
|
|
|
|
addr1=&trhdr->src;
|
|
|
|
addr2=&trhdr->dst;
|
2003-01-22 01:24:06 +00:00
|
|
|
} else {
|
2003-08-23 09:09:35 +00:00
|
|
|
addr2=&trhdr->src;
|
|
|
|
addr1=&trhdr->dst;
|
2003-01-22 01:24:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for(iui=iu->items;iui;iui=iui->next){
|
2003-08-23 09:09:35 +00:00
|
|
|
if((!CMP_ADDRESS(&iui->addr1, addr1))
|
|
|
|
&&(!CMP_ADDRESS(&iui->addr2, addr2)) ){
|
2003-01-22 01:24:06 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!iui){
|
|
|
|
iui=g_malloc(sizeof(io_users_item_t));
|
|
|
|
iui->next=iu->items;
|
|
|
|
iu->items=iui;
|
2003-08-23 09:09:35 +00:00
|
|
|
COPY_ADDRESS(&iui->addr1, addr1);
|
2009-09-06 14:25:47 +00:00
|
|
|
iui->name1=g_strdup(ep_address_to_str(addr1));
|
2003-08-23 09:09:35 +00:00
|
|
|
COPY_ADDRESS(&iui->addr2, addr2);
|
2009-09-06 14:25:47 +00:00
|
|
|
iui->name2=g_strdup(ep_address_to_str(addr2));
|
2003-01-22 01:24:06 +00:00
|
|
|
iui->frames1=0;
|
|
|
|
iui->frames2=0;
|
|
|
|
iui->bytes1=0;
|
|
|
|
iui->bytes2=0;
|
|
|
|
}
|
|
|
|
|
2003-08-23 09:09:35 +00:00
|
|
|
if(!CMP_ADDRESS(&trhdr->dst,&iui->addr1)){
|
2003-01-22 01:24:06 +00:00
|
|
|
iui->frames1++;
|
|
|
|
iui->bytes1+=pinfo->fd->pkt_len;
|
|
|
|
} else {
|
|
|
|
iui->frames2++;
|
|
|
|
iui->bytes2+=pinfo->fd->pkt_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2005-01-01 12:49:54 +00:00
|
|
|
iousers_draw(void *arg)
|
2003-01-22 01:24:06 +00:00
|
|
|
{
|
2005-01-01 12:49:54 +00:00
|
|
|
io_users_t *iu = arg;
|
2003-01-22 01:24:06 +00:00
|
|
|
io_users_item_t *iui;
|
|
|
|
guint32 last_frames, max_frames;
|
|
|
|
|
|
|
|
printf("================================================================================\n");
|
2003-09-04 23:37:45 +00:00
|
|
|
printf("%s Conversations\n",iu->type);
|
2003-01-22 01:24:06 +00:00
|
|
|
printf("Filter:%s\n",iu->filter?iu->filter:"<No Filter>");
|
|
|
|
printf(" | <- | | -> | | Total |\n");
|
|
|
|
printf(" | Frames Bytes | | Frames Bytes | | Frames Bytes |\n");
|
|
|
|
max_frames=0xffffffff;
|
|
|
|
do {
|
|
|
|
last_frames=0;
|
|
|
|
for(iui=iu->items;iui;iui=iui->next){
|
|
|
|
guint32 tot_frames;
|
|
|
|
tot_frames=iui->frames1+iui->frames2;
|
|
|
|
|
|
|
|
if((tot_frames>last_frames)
|
|
|
|
&&(tot_frames<max_frames)){
|
|
|
|
last_frames=tot_frames;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for(iui=iu->items;iui;iui=iui->next){
|
|
|
|
guint32 tot_frames;
|
|
|
|
tot_frames=iui->frames1+iui->frames2;
|
|
|
|
|
|
|
|
if(tot_frames==last_frames){
|
2007-12-05 10:34:01 +00:00
|
|
|
printf("%-20s <-> %-20s %6d %9" G_GINT64_MODIFIER "d %6d %9" G_GINT64_MODIFIER "d %6d %9" G_GINT64_MODIFIER "d\n",
|
2003-01-22 01:24:06 +00:00
|
|
|
iui->name1, iui->name2,
|
|
|
|
iui->frames1, iui->bytes1,
|
|
|
|
iui->frames2, iui->bytes2,
|
|
|
|
iui->frames1+iui->frames2,
|
|
|
|
iui->bytes1+iui->bytes2
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
max_frames=last_frames;
|
|
|
|
} while(last_frames);
|
|
|
|
printf("================================================================================\n");
|
|
|
|
}
|
|
|
|
|
2009-06-05 22:42:47 +00:00
|
|
|
static void
|
2006-02-11 13:05:24 +00:00
|
|
|
iousers_init(const char *optarg, void* userdata _U_)
|
2003-01-22 01:24:06 +00:00
|
|
|
{
|
2005-08-06 03:44:55 +00:00
|
|
|
const char *filter=NULL;
|
2005-07-23 11:41:25 +00:00
|
|
|
const char *tap_type, *tap_type_name;
|
2005-01-01 12:49:54 +00:00
|
|
|
tap_packet_cb packet_func;
|
2003-01-22 01:24:06 +00:00
|
|
|
io_users_t *iu=NULL;
|
2003-04-23 08:20:06 +00:00
|
|
|
GString *error_string;
|
2003-01-22 01:24:06 +00:00
|
|
|
|
2003-09-04 23:37:45 +00:00
|
|
|
if(!strncmp(optarg,"conv,eth",8)){
|
|
|
|
if(optarg[8]==','){
|
|
|
|
filter=optarg+9;
|
2003-01-22 01:24:06 +00:00
|
|
|
} else {
|
|
|
|
filter=NULL;
|
|
|
|
}
|
|
|
|
tap_type="eth";
|
2003-08-25 00:44:20 +00:00
|
|
|
tap_type_name="Ethernet";
|
2003-01-22 01:24:06 +00:00
|
|
|
packet_func=iousers_eth_packet;
|
2003-09-04 23:37:45 +00:00
|
|
|
} else if(!strncmp(optarg,"conv,fc",7)){
|
|
|
|
if(optarg[7]==','){
|
|
|
|
filter=optarg+8;
|
2003-08-24 04:58:32 +00:00
|
|
|
} else {
|
|
|
|
filter=NULL;
|
|
|
|
}
|
|
|
|
tap_type="fc";
|
2003-08-25 00:44:20 +00:00
|
|
|
tap_type_name="Fibre Channel";
|
2003-08-24 04:58:32 +00:00
|
|
|
packet_func=iousers_fc_packet;
|
2003-09-04 23:37:45 +00:00
|
|
|
} else if(!strncmp(optarg,"conv,fddi",9)){
|
|
|
|
if(optarg[9]==','){
|
|
|
|
filter=optarg+10;
|
2003-08-29 10:59:12 +00:00
|
|
|
} else {
|
|
|
|
filter=NULL;
|
|
|
|
}
|
|
|
|
tap_type="fddi";
|
|
|
|
tap_type_name="FDDI";
|
|
|
|
packet_func=iousers_fddi_packet;
|
2003-09-04 23:37:45 +00:00
|
|
|
} else if(!strncmp(optarg,"conv,tcp",8)){
|
|
|
|
if(optarg[8]==','){
|
|
|
|
filter=optarg+9;
|
2003-03-03 23:20:59 +00:00
|
|
|
} else {
|
|
|
|
filter=NULL;
|
|
|
|
}
|
|
|
|
tap_type="tcp";
|
2003-08-25 00:44:20 +00:00
|
|
|
tap_type_name="TCP";
|
2003-03-03 23:20:59 +00:00
|
|
|
packet_func=iousers_tcpip_packet;
|
2003-09-04 23:37:45 +00:00
|
|
|
} else if(!strncmp(optarg,"conv,udp",8)){
|
|
|
|
if(optarg[8]==','){
|
|
|
|
filter=optarg+9;
|
2003-03-03 23:46:50 +00:00
|
|
|
} else {
|
|
|
|
filter=NULL;
|
|
|
|
}
|
|
|
|
tap_type="udp";
|
2003-08-25 00:44:20 +00:00
|
|
|
tap_type_name="UDP";
|
2003-03-03 23:46:50 +00:00
|
|
|
packet_func=iousers_udpip_packet;
|
2003-09-04 23:37:45 +00:00
|
|
|
} else if(!strncmp(optarg,"conv,tr",7)){
|
|
|
|
if(optarg[7]==','){
|
|
|
|
filter=optarg+8;
|
2003-01-22 01:24:06 +00:00
|
|
|
} else {
|
|
|
|
filter=NULL;
|
|
|
|
}
|
|
|
|
tap_type="tr";
|
2003-08-25 00:44:20 +00:00
|
|
|
tap_type_name="Token Ring";
|
2003-01-22 01:24:06 +00:00
|
|
|
packet_func=iousers_tr_packet;
|
2003-09-04 23:37:45 +00:00
|
|
|
} else if(!strncmp(optarg,"conv,ipx",8)){
|
|
|
|
if(optarg[8]==','){
|
|
|
|
filter=optarg+9;
|
2003-08-24 05:44:48 +00:00
|
|
|
} else {
|
|
|
|
filter=NULL;
|
|
|
|
}
|
|
|
|
tap_type="ipx";
|
2003-08-25 00:44:20 +00:00
|
|
|
tap_type_name="IPX";
|
2003-08-24 05:44:48 +00:00
|
|
|
packet_func=iousers_ipx_packet;
|
2003-09-04 23:37:45 +00:00
|
|
|
} else if(!strncmp(optarg,"conv,ip",7)){
|
|
|
|
if(optarg[7]==','){
|
|
|
|
filter=optarg+8;
|
2003-01-22 01:24:06 +00:00
|
|
|
} else {
|
|
|
|
filter=NULL;
|
|
|
|
}
|
|
|
|
tap_type="ip";
|
2003-08-25 00:44:20 +00:00
|
|
|
tap_type_name="IPv4";
|
2003-01-22 01:24:06 +00:00
|
|
|
packet_func=iousers_ip_packet;
|
2009-12-11 02:19:41 +00:00
|
|
|
} else if(!strncmp(optarg,"conv,ipv6",7)){
|
|
|
|
if(optarg[7]==','){
|
|
|
|
filter=optarg+10;
|
|
|
|
} else {
|
|
|
|
filter=NULL;
|
|
|
|
}
|
|
|
|
tap_type="ipv6";
|
|
|
|
tap_type_name="IPv6";
|
|
|
|
packet_func=iousers_ipv6_packet;
|
2005-03-20 12:02:00 +00:00
|
|
|
} else if(!strncmp(optarg,"conv,sctp",9)) {
|
|
|
|
if(optarg[9]==','){
|
|
|
|
filter=optarg+10;
|
|
|
|
} else {
|
|
|
|
filter=NULL;
|
|
|
|
}
|
|
|
|
tap_type="sctp";
|
|
|
|
tap_type_name="SCTP";
|
|
|
|
packet_func=iousers_sctp_packet;
|
2003-01-22 01:24:06 +00:00
|
|
|
} else {
|
2006-05-31 17:38:42 +00:00
|
|
|
fprintf(stderr, "tshark: invalid \"-z conv,<type>[,<filter>]\" argument\n");
|
2003-01-22 01:24:06 +00:00
|
|
|
fprintf(stderr," <type> must be one of\n");
|
|
|
|
fprintf(stderr," \"eth\"\n");
|
2003-08-24 04:58:32 +00:00
|
|
|
fprintf(stderr," \"fc\"\n");
|
2003-08-29 10:59:12 +00:00
|
|
|
fprintf(stderr," \"fddi\"\n");
|
2003-01-22 01:24:06 +00:00
|
|
|
fprintf(stderr," \"ip\"\n");
|
2003-08-24 05:44:48 +00:00
|
|
|
fprintf(stderr," \"ipx\"\n");
|
2005-03-20 12:02:00 +00:00
|
|
|
fprintf(stderr," \"sctp\"\n");
|
2003-08-24 03:31:54 +00:00
|
|
|
fprintf(stderr," \"tcp\"\n");
|
2003-01-22 01:24:06 +00:00
|
|
|
fprintf(stderr," \"tr\"\n");
|
2003-08-24 03:31:54 +00:00
|
|
|
fprintf(stderr," \"udp\"\n");
|
2003-01-22 01:24:06 +00:00
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
iu=g_malloc(sizeof(io_users_t));
|
|
|
|
iu->items=NULL;
|
2003-08-25 00:44:20 +00:00
|
|
|
iu->type=tap_type_name;
|
2003-01-22 01:24:06 +00:00
|
|
|
if(filter){
|
2008-05-13 06:55:45 +00:00
|
|
|
iu->filter=g_strdup(filter);
|
2003-01-22 01:24:06 +00:00
|
|
|
} else {
|
|
|
|
iu->filter=NULL;
|
|
|
|
}
|
|
|
|
|
2009-06-05 22:42:47 +00:00
|
|
|
error_string=register_tap_listener(tap_type, iu, filter, 0, NULL, packet_func, iousers_draw);
|
2003-04-23 08:20:06 +00:00
|
|
|
if(error_string){
|
2003-01-22 01:24:06 +00:00
|
|
|
if(iu->items){
|
|
|
|
g_free(iu->items);
|
|
|
|
}
|
|
|
|
g_free(iu);
|
2006-05-31 17:38:42 +00:00
|
|
|
fprintf(stderr, "tshark: Couldn't register conversations tap: %s\n",
|
2003-04-23 08:20:06 +00:00
|
|
|
error_string->str);
|
|
|
|
g_string_free(error_string, TRUE);
|
2003-01-22 01:24:06 +00:00
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
register_tap_listener_iousers(void)
|
|
|
|
{
|
2006-02-11 13:05:24 +00:00
|
|
|
register_stat_cmd_arg("conv,", iousers_init, NULL);
|
2003-01-22 01:24:06 +00:00
|
|
|
}
|