aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-08-24 03:31:54 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-08-24 03:31:54 +0000
commit628e8108dc7682d2b1a5e1c6a14048ee4a4ba5a4 (patch)
tree8799fa7e8623c4d6388e6eb8c166567799c0198a
parentbcfc2719b9f9feffc6f644260981e75b54c26c46 (diff)
downloadwireshark-628e8108dc7682d2b1a5e1c6a14048ee4a4ba5a4.tar.gz
wireshark-628e8108dc7682d2b1a5e1c6a14048ee4a4ba5a4.tar.bz2
wireshark-628e8108dc7682d2b1a5e1c6a14048ee4a4ba5a4.zip
Update manpage for ethereal.
Update the talkers tap for tethereal (iousers) and change the command line to invoke the tethereal version from -z io,users, to -z talkers, to be the same as for ethereal. Sorry if it breaks some scripts but io,users was a very nonintuitive name for this option. talkers is not much better but at least a little bit more descriptive/intuitive. Anyone with a better name for this are welcome to provide a patch. The tethereal version is now agnostic to wether v4 or v6 are transporting UDP/TCP svn path=/trunk/; revision=8236
-rw-r--r--doc/ethereal.pod.template33
-rw-r--r--doc/tethereal.pod.template6
-rw-r--r--tap-iousers.c101
3 files changed, 77 insertions, 63 deletions
diff --git a/doc/ethereal.pod.template b/doc/ethereal.pod.template
index fe2651b2e3..b8ff1bffcb 100644
--- a/doc/ethereal.pod.template
+++ b/doc/ethereal.pod.template
@@ -379,6 +379,29 @@ on those calls that match that filter.
Example: use B<-z "mgcp,srt,ip.addr==1.2.3.4"> to only collect stats for
MGCP packets exchanged by the host at IP address 1.2.3.4 .
+B<-z> talkers,I<type>[,I<filter>]
+
+Create a table that lists all conversations that could be seen in the capture.
+I<type> specifies which type of conversation we want to generate the
+statistics for, currently the supported ones are
+ "eth" Ethernet
+ "ip" IP addresses
+ "tcp" TCP/IP socketpairs Both IPv4 and IPv6 are supported
+ "tr" TokenRing
+ "udp" UDP/IP socketpairs Both IPv4 and IPv6 are supported
+ "fc" Fibre Channel addresses
+
+If the optional filter string is specified, only those packets that match the
+filter will be used in the calculations.
+
+The table is presented with one line for each conversation and displays
+number of frames/bytes in each direction as well as total number of
+frames/bytes.
+By default table is sorted according to total number of frames.
+
+These tables can also be generated at runtime by selecting the appropriate
+conversation type from the menu "Tools/Statistics/EndpointTalkers/"
+
=back
=head1 INTERFACE
@@ -792,6 +815,16 @@ the calculation. The stats will only be calculated
on those calls matching that filter.
+=item Tools:Statistics:Endpoint Talkers
+This option will open a new window that displays a list of all conversations
+between two endpoints.
+The list has one row for each unique conversation and displays total number of frames/bytes seen as well as number of frames/bytes in each direction.
+
+By default the list is sorted according to the number of frames but by clicking on the column header it is possible to resort the list in ascending or descending order by any column.
+
+These statistics windows can also be invoked from the ethereal command line using the -z talkers, argument.
+
+
=item Tools:Statistics:Traffic:IO-Stat
Open a window where up to 5 graphs in different colors can be displayed
diff --git a/doc/tethereal.pod.template b/doc/tethereal.pod.template
index cef55deb78..6775fa2457 100644
--- a/doc/tethereal.pod.template
+++ b/doc/tethereal.pod.template
@@ -445,16 +445,16 @@ time and average response time.
-B<-z> io,users,I<type>[,I<filter>]
+B<-z> talkers,I<type>[,I<filter>]
Create a table that lists all conversations that could be seen in the capture.
I<type> specifies which type of conversation we want to generate the
statistics for, currently the supported ones are
"eth" Ethernet
"ip" IP addresses
- "tcpip" TCP/IP socketpairs
+ "tcp" TCP/IP socketpairs Both IPv4 and IPv6 are supported
"tr" TokenRing
- "udpip" UDP/IP socketpairs
+ "udp" UDP/IP socketpairs Both IPv4 and IPv6 are supported
If the optional filter string is specified, only those packets that match the
filter will be used in the calculations.
diff --git a/tap-iousers.c b/tap-iousers.c
index 313f5447da..8969530b1c 100644
--- a/tap-iousers.c
+++ b/tap-iousers.c
@@ -1,8 +1,7 @@
-/* should be almost trivial to fix tcp and udp to also handle ipv6 */
/* tap-iousers.c
* iostat 2003 Ronnie Sahlberg
*
- * $Id: tap-iousers.c,v 1.8 2003/08/23 09:09:34 sahlberg Exp $
+ * $Id: tap-iousers.c,v 1.9 2003/08/24 03:31:53 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -65,9 +64,6 @@ typedef struct _io_users_item_t {
} io_users_item_t;
-/* XXX for now we only handle ipv4 as transport for udp.
- should extend in the future to also handle ipv6
-*/
static int
iousers_udpip_packet(io_users_t *iu, packet_info *pinfo, epan_dissect_t *edt _U_, void *vudph)
{
@@ -76,19 +72,13 @@ iousers_udpip_packet(io_users_t *iu, packet_info *pinfo, epan_dissect_t *edt _U_
io_users_item_t *iui;
int direction=0;
- switch(udph->ip_src.type){
- case AT_IPv4:
- if(CMP_ADDRESS(&udph->ip_src, &udph->ip_dst)>0){
- snprintf(name1,256,"%s:%s",get_hostname((guint)(*((guint *)udph->ip_src.data))),get_udp_port(udph->uh_sport));
- snprintf(name2,256,"%s:%s",get_hostname((guint)(*((guint *)udph->ip_dst.data))),get_udp_port(udph->uh_dport));
- } else {
- direction=1;
- snprintf(name2,256,"%s:%s",get_hostname((guint)(*((guint *)udph->ip_src.data))),get_udp_port(udph->uh_sport));
- snprintf(name1,256,"%s:%s",get_hostname((guint)(*((guint *)udph->ip_dst.data))),get_udp_port(udph->uh_dport));
- }
- break;
- default:
- return 0;
+ if(CMP_ADDRESS(&udph->ip_src, &udph->ip_dst)>0){
+ snprintf(name1,256,"%s:%s",address_to_str(&udph->ip_src),get_udp_port(udph->uh_sport));
+ snprintf(name2,256,"%s:%s",address_to_str(&udph->ip_dst),get_udp_port(udph->uh_dport));
+ } else {
+ direction=1;
+ snprintf(name2,256,"%s:%s",address_to_str(&udph->ip_src),get_udp_port(udph->uh_sport));
+ snprintf(name1,256,"%s:%s",address_to_str(&udph->ip_dst),get_udp_port(udph->uh_dport));
}
for(iui=iu->items;iui;iui=iui->next){
@@ -124,9 +114,6 @@ iousers_udpip_packet(io_users_t *iu, packet_info *pinfo, epan_dissect_t *edt _U_
}
-/* XXX for now we only handle ipv4 as transport for tcp.
- should extend in the future to also handle ipv6
-*/
static int
iousers_tcpip_packet(io_users_t *iu, packet_info *pinfo, epan_dissect_t *edt _U_, void *vtcph)
{
@@ -135,19 +122,13 @@ iousers_tcpip_packet(io_users_t *iu, packet_info *pinfo, epan_dissect_t *edt _U_
io_users_item_t *iui;
int direction=0;
- switch(tcph->ip_src.type){
- case AT_IPv4:
- if(CMP_ADDRESS(&tcph->ip_src, &tcph->ip_dst)>0){
- snprintf(name1,256,"%s:%s",get_hostname((guint)(*((guint *)tcph->ip_src.data))),get_tcp_port(tcph->th_sport));
- snprintf(name2,256,"%s:%s",get_hostname((guint)(*((guint *)tcph->ip_dst.data))),get_tcp_port(tcph->th_dport));
- } else {
- direction=1;
- snprintf(name2,256,"%s:%s",get_hostname((guint)(*((guint *)tcph->ip_src.data))),get_tcp_port(tcph->th_sport));
- snprintf(name1,256,"%s:%s",get_hostname((guint)(*((guint *)tcph->ip_dst.data))),get_tcp_port(tcph->th_dport));
- }
- break;
- default:
- return 0;
+ if(CMP_ADDRESS(&tcph->ip_src, &tcph->ip_dst)>0){
+ snprintf(name1,256,"%s:%s",address_to_str(&tcph->ip_src),get_tcp_port(tcph->th_sport));
+ snprintf(name2,256,"%s:%s",address_to_str(&tcph->ip_dst),get_tcp_port(tcph->th_dport));
+ } else {
+ direction=1;
+ snprintf(name2,256,"%s:%s",address_to_str(&tcph->ip_src),get_tcp_port(tcph->th_sport));
+ snprintf(name1,256,"%s:%s",address_to_str(&tcph->ip_dst),get_tcp_port(tcph->th_dport));
}
for(iui=iu->items;iui;iui=iui->next){
@@ -210,9 +191,9 @@ iousers_ip_packet(io_users_t *iu, packet_info *pinfo, epan_dissect_t *edt _U_, v
iui->next=iu->items;
iu->items=iui;
COPY_ADDRESS(&iui->addr1, addr1);
- iui->name1=strdup(get_hostname((guint)(*((guint *)addr1->data))));
+ iui->name1=strdup(address_to_str(addr1));
COPY_ADDRESS(&iui->addr2, addr2);
- iui->name2=strdup(get_hostname((guint)(*((guint *)addr2->data))));
+ iui->name2=strdup(address_to_str(addr2));
iui->frames1=0;
iui->frames2=0;
iui->bytes1=0;
@@ -257,9 +238,9 @@ iousers_eth_packet(io_users_t *iu, packet_info *pinfo, epan_dissect_t *edt _U_,
iui->next=iu->items;
iu->items=iui;
COPY_ADDRESS(&iui->addr1, addr1);
- iui->name1=strdup(ether_to_str(addr1->data));
+ iui->name1=strdup(address_to_str(addr1));
COPY_ADDRESS(&iui->addr2, addr2);
- iui->name2=strdup(ether_to_str(addr2->data));
+ iui->name2=strdup(address_to_str(addr2));
iui->frames1=0;
iui->frames2=0;
iui->bytes1=0;
@@ -304,9 +285,9 @@ iousers_tr_packet(io_users_t *iu, packet_info *pinfo, epan_dissect_t *edt _U_, v
iui->next=iu->items;
iu->items=iui;
COPY_ADDRESS(&iui->addr1, addr1);
- iui->name1=strdup(ether_to_str(addr1->data));
+ iui->name1=strdup(address_to_str(addr1));
COPY_ADDRESS(&iui->addr2, addr2);
- iui->name2=strdup(ether_to_str(addr2->data));
+ iui->name2=strdup(address_to_str(addr2));
iui->frames1=0;
iui->frames2=0;
iui->bytes1=0;
@@ -376,54 +357,54 @@ iousers_init(char *optarg)
io_users_t *iu=NULL;
GString *error_string;
- if(!strncmp(optarg,"io,users,eth",12)){
- if(optarg[12]==','){
- filter=optarg+13;
+ if(!strncmp(optarg,"talkers,eth",11)){
+ if(optarg[11]==','){
+ filter=optarg+12;
} else {
filter=NULL;
}
tap_type="eth";
packet_func=iousers_eth_packet;
- } else if(!strncmp(optarg,"io,users,tcpip",14)){
- if(optarg[14]==','){
- filter=optarg+15;
+ } else if(!strncmp(optarg,"talkers,tcp",11)){
+ if(optarg[11]==','){
+ filter=optarg+12;
} else {
filter=NULL;
}
tap_type="tcp";
packet_func=iousers_tcpip_packet;
- } else if(!strncmp(optarg,"io,users,udpip",14)){
- if(optarg[14]==','){
- filter=optarg+15;
+ } else if(!strncmp(optarg,"talkers,udp",11)){
+ if(optarg[11]==','){
+ filter=optarg+12;
} else {
filter=NULL;
}
tap_type="udp";
packet_func=iousers_udpip_packet;
- } else if(!strncmp(optarg,"io,users,tr",11)){
- if(optarg[11]==','){
- filter=optarg+12;
+ } else if(!strncmp(optarg,"talkers,tr",10)){
+ if(optarg[10]==','){
+ filter=optarg+11;
} else {
filter=NULL;
}
tap_type="tr";
packet_func=iousers_tr_packet;
- } else if(!strncmp(optarg,"io,users,ip",11)){
- if(optarg[11]==','){
- filter=optarg+12;
+ } else if(!strncmp(optarg,"talkers,ip",10)){
+ if(optarg[10]==','){
+ filter=optarg+11;
} else {
filter=NULL;
}
tap_type="ip";
packet_func=iousers_ip_packet;
} else {
- fprintf(stderr, "tethereal: invalid \"-z io,users,<type>[,<filter>]\" argument\n");
+ fprintf(stderr, "tethereal: invalid \"-z talkers,<type>[,<filter>]\" argument\n");
fprintf(stderr," <type> must be one of\n");
fprintf(stderr," \"eth\"\n");
fprintf(stderr," \"ip\"\n");
- fprintf(stderr," \"tcpip\"\n");
+ fprintf(stderr," \"tcp\"\n");
fprintf(stderr," \"tr\"\n");
- fprintf(stderr," \"udpip\"\n");
+ fprintf(stderr," \"udp\"\n");
exit(1);
}
@@ -443,7 +424,7 @@ iousers_init(char *optarg)
g_free(iu->items);
}
g_free(iu);
- fprintf(stderr, "tethereal: Couldn't register io,users tap: %s\n",
+ fprintf(stderr, "tethereal: Couldn't register talkers tap: %s\n",
error_string->str);
g_string_free(error_string, TRUE);
exit(1);
@@ -454,6 +435,6 @@ iousers_init(char *optarg)
void
register_tap_listener_iousers(void)
{
- register_ethereal_tap("io,users,", iousers_init);
+ register_ethereal_tap("talkers,", iousers_init);
}