diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-10-23 03:49:13 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-10-23 03:49:13 +0000 |
commit | a71d1d910e21a9dbec9caef3d404b1626ee5ad0c (patch) | |
tree | 9988bb31bedf5fe12f8168ae54c0da9f8c908f31 /tethereal.c | |
parent | c65515848941a8a4e42a4f48b13bdd78312e5985 (diff) | |
download | wireshark-a71d1d910e21a9dbec9caef3d404b1626ee5ad0c.tar.gz wireshark-a71d1d910e21a9dbec9caef3d404b1626ee5ad0c.tar.bz2 wireshark-a71d1d910e21a9dbec9caef3d404b1626ee5ad0c.zip |
From Ronnie Sahlberg: add a tap for statistics for DCERPC interfaces.
svn path=/trunk/; revision=6479
Diffstat (limited to 'tethereal.c')
-rw-r--r-- | tethereal.c | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/tethereal.c b/tethereal.c index 3d7e9fa3e4..c842a277f2 100644 --- a/tethereal.c +++ b/tethereal.c @@ -1,6 +1,6 @@ /* tethereal.c * - * $Id: tethereal.c,v 1.161 2002/10/17 02:11:20 guy Exp $ + * $Id: tethereal.c,v 1.162 2002/10/23 03:49:10 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -98,6 +98,8 @@ #include "tap.h" #include "tap-rpcstat.h" #include "tap-rpcprogs.h" +#include "packet-dcerpc.h" +#include "tap-dcerpcstat.h" #ifdef HAVE_LIBPCAP #include <wiretap/wtap-capture.h> @@ -658,9 +660,42 @@ main(int argc, char *argv[]) fprintf(stderr, " \"-z rpc,programs\"\n"); exit(1); } + } else if(!strncmp(optarg,"dcerpc,",7)){ + if(!strncmp(optarg,"dcerpc,rtt,",11)){ + e_uuid_t uuid; + int d1,d2,d3,d40,d41,d42,d43,d44,d45,d46,d47; + int major, minor; + int pos=0; + if(sscanf(optarg,"dcerpc,rtt,%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x,%d.%d%n", &d1,&d2,&d3,&d40,&d41,&d42,&d43,&d44,&d45,&d46,&d47,&major,&minor,&pos)==13){ + uuid.Data1=d1; + uuid.Data2=d2; + uuid.Data3=d3; + uuid.Data4[0]=d40; + uuid.Data4[1]=d41; + uuid.Data4[2]=d42; + uuid.Data4[3]=d43; + uuid.Data4[4]=d44; + uuid.Data4[5]=d45; + uuid.Data4[6]=d46; + uuid.Data4[7]=d47; + if(pos){ + dcerpcstat_init(&uuid,major,minor,optarg+pos); + } else { + dcerpcstat_init(&uuid,major,minor,NULL); + } + } else { + fprintf(stderr, "tethereal: invalid \"-z dcerpc,rtt,<uuid>,<major version>.<minor version>[,<filter>]\" argument\n"); + exit(1); + } + } else { + fprintf(stderr, "tethereal: invalid -z argument. Argument must be one of:\n"); + fprintf(stderr, " \"-z dcerpc,rtt,<uuid>,<major version>.<minor version>[,<filter>]\"\n"); + exit(1); + } } else { - fprintf(stderr, "tethereal: invalid -z argument. Argument must be:\n"); + fprintf(stderr, "tethereal: invalid -z argument. Argument must be one of:\n"); fprintf(stderr, " \"-z rpc,...\"\n"); + fprintf(stderr, " \"-z dcerpc,...\"\n"); exit(1); } break; |