From 3d932490b826facb568937a1290910a1265267f5 Mon Sep 17 00:00:00 2001 From: risso Date: Thu, 1 Aug 2002 08:52:55 +0000 Subject: Added support for Win32, based on WinPcap. --- print-sunrpc.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'print-sunrpc.c') diff --git a/print-sunrpc.c b/print-sunrpc.c index 5a7e45ca..3b3aaa3a 100644 --- a/print-sunrpc.c +++ b/print-sunrpc.c @@ -21,27 +21,23 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.40 2002-06-01 23:50:33 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.41 2002-08-01 08:53:31 risso Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include -#include -#include - -#include +#include #include #ifdef HAVE_RPC_RPCENT_H #include #endif +#ifndef WIN32 #include +#endif /* WIN32 */ -#include -#include #include #include @@ -136,16 +132,22 @@ static char * progstr(prog) u_int32_t prog; { +#ifndef WIN32 register struct rpcent *rp; +#endif static char buf[32]; static int lastprog = 0; if (lastprog != 0 && prog == lastprog) return (buf); +#ifndef WIN32 rp = getrpcbynumber(prog); if (rp == NULL) +#endif /* WIN32 */ (void) snprintf(buf, sizeof(buf), "#%u", prog); +#ifndef WIN32 else strlcpy(buf, rp->r_name, sizeof(buf)); +#endif return (buf); } -- cgit v1.2.1