diff options
Diffstat (limited to 'contrib/tcpdump/print-sunrpc.c')
-rw-r--r-- | contrib/tcpdump/print-sunrpc.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/contrib/tcpdump/print-sunrpc.c b/contrib/tcpdump/print-sunrpc.c index 8fa733c..83e16f0 100644 --- a/contrib/tcpdump/print-sunrpc.c +++ b/contrib/tcpdump/print-sunrpc.c @@ -17,11 +17,13 @@ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * $FreeBSD$ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.46 2004/12/27 00:41:31 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.43.2.2 2003/11/16 08:51:47 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -30,12 +32,13 @@ static const char rcsid[] _U_ = #include <tcpdump-stdinc.h> -#ifdef HAVE_GETRPCBYNUMBER #include <rpc/rpc.h> #ifdef HAVE_RPC_RPCENT_H #include <rpc/rpcent.h> -#endif /* HAVE_RPC_RPCENT_H */ -#endif /* HAVE_GETRPCBYNUMBER */ +#endif +#ifndef WIN32 +#include <rpc/pmap_prot.h> +#endif /* WIN32 */ #include <stdio.h> #include <string.h> @@ -49,10 +52,6 @@ static const char rcsid[] _U_ = #include "ip6.h" #endif -#include "rpc_auth.h" -#include "rpc_msg.h" -#include "pmap_prot.h" - static struct tok proc2str[] = { { PMAPPROC_NULL, "null" }, { PMAPPROC_SET, "set" }, @@ -70,7 +69,7 @@ void sunrpcrequest_print(register const u_char *bp, register u_int length, register const u_char *bp2) { - register const struct sunrpc_msg *rp; + register const struct rpc_msg *rp; register const struct ip *ip; #ifdef INET6 register const struct ip6_hdr *ip6; @@ -78,7 +77,7 @@ sunrpcrequest_print(register const u_char *bp, register u_int length, u_int32_t x; char srcid[20], dstid[20]; /*fits 32bit*/ - rp = (struct sunrpc_msg *)bp; + rp = (struct rpc_msg *)bp; if (!nflag) { snprintf(srcid, sizeof(srcid), "0x%x", @@ -136,7 +135,7 @@ static char * progstr(prog) u_int32_t prog; { -#ifdef HAVE_GETRPCBYNUMBER +#ifndef WIN32 register struct rpcent *rp; #endif static char buf[32]; @@ -144,12 +143,12 @@ progstr(prog) if (lastprog != 0 && prog == lastprog) return (buf); -#ifdef HAVE_GETRPCBYNUMBER +#ifndef WIN32 rp = getrpcbynumber(prog); if (rp == NULL) -#endif +#endif /* WIN32 */ (void) snprintf(buf, sizeof(buf), "#%u", prog); -#ifdef HAVE_GETRPCBYNUMBER +#ifndef WIN32 else strlcpy(buf, rp->r_name, sizeof(buf)); #endif |