From 7dacff5dd0aeebda55a754dc5d25feab441b5d03 Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 29 May 2005 19:09:28 +0000 Subject: 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 --- contrib/tcpdump/print-sunrpc.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'contrib/tcpdump/print-sunrpc.c') 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 +#ifdef HAVE_GETRPCBYNUMBER #include #ifdef HAVE_RPC_RPCENT_H #include -#endif -#ifndef WIN32 -#include -#endif /* WIN32 */ +#endif /* HAVE_RPC_RPCENT_H */ +#endif /* HAVE_GETRPCBYNUMBER */ #include #include @@ -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 -- cgit v1.1