diff options
author | sam <sam@FreeBSD.org> | 2005-05-29 19:09:28 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-05-29 19:09:28 +0000 |
commit | 7dacff5dd0aeebda55a754dc5d25feab441b5d03 (patch) | |
tree | 71f0f8d5860cc5ba4d96abee0d8048a044b51cd3 /contrib/tcpdump/print-sunrpc.c | |
parent | d9db21b8bcec89e09ac680f84c6d7d0ca014d6df (diff) | |
download | FreeBSD-src-7dacff5dd0aeebda55a754dc5d25feab441b5d03.zip FreeBSD-src-7dacff5dd0aeebda55a754dc5d25feab441b5d03.tar.gz |
resolve merge conflicts and update for proper build; including:
o print-fr.c returned to code on vendor branch
o remove pmap_prot.h include from print-sunrprc.c
o remove gcc/i386-specific ntoh* write-arounds from tcpdump-stdinc.h
Reviewed by: bms
Diffstat (limited to 'contrib/tcpdump/print-sunrpc.c')
-rw-r--r-- | contrib/tcpdump/print-sunrpc.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/contrib/tcpdump/print-sunrpc.c b/contrib/tcpdump/print-sunrpc.c index 83e16f0..166ff94 100644 --- a/contrib/tcpdump/print-sunrpc.c +++ b/contrib/tcpdump/print-sunrpc.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.43.2.2 2003/11/16 08:51:47 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.46 2004/12/27 00:41:31 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -32,13 +32,12 @@ 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 -#ifndef WIN32 -#include <rpc/pmap_prot.h> -#endif /* WIN32 */ +#endif /* HAVE_RPC_RPCENT_H */ +#endif /* HAVE_GETRPCBYNUMBER */ #include <stdio.h> #include <string.h> @@ -52,6 +51,9 @@ static const char rcsid[] _U_ = #include "ip6.h" #endif +#include "rpc_auth.h" +#include "rpc_msg.h" + static struct tok proc2str[] = { { PMAPPROC_NULL, "null" }, { PMAPPROC_SET, "set" }, @@ -69,7 +71,7 @@ void sunrpcrequest_print(register const u_char *bp, register u_int length, register const u_char *bp2) { - register const struct rpc_msg *rp; + register const struct sunrpc_msg *rp; register const struct ip *ip; #ifdef INET6 register const struct ip6_hdr *ip6; @@ -77,7 +79,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 rpc_msg *)bp; + rp = (struct sunrpc_msg *)bp; if (!nflag) { snprintf(srcid, sizeof(srcid), "0x%x", @@ -135,7 +137,7 @@ static char * progstr(prog) u_int32_t prog; { -#ifndef WIN32 +#ifdef HAVE_GETRPCBYNUMBER register struct rpcent *rp; #endif static char buf[32]; @@ -143,12 +145,12 @@ progstr(prog) if (lastprog != 0 && prog == lastprog) return (buf); -#ifndef WIN32 +#ifdef HAVE_GETRPCBYNUMBER rp = getrpcbynumber(prog); if (rp == NULL) -#endif /* WIN32 */ +#endif (void) snprintf(buf, sizeof(buf), "#%u", prog); -#ifndef WIN32 +#ifdef HAVE_GETRPCBYNUMBER else strlcpy(buf, rp->r_name, sizeof(buf)); #endif |