(void) gettimeofday (&now, (struct timezone *) 0);
(void) __gettimeofday (&now, (struct timezone *) 0);
clntudp_bufcreate (raddr, program, version, wait, sockp, sendsz, recvsz)     struct sockaddr_in *raddr;     u_long program;     u_long version;     struct timeval wait;     int *sockp;     u_int sendsz;     u_int recvsz;{  CLIENT *cl;  struct cu_data *cu = NULL;  struct timeval now;  struct rpc_msg call_msg;  cl = (CLIENT *) mem_alloc (sizeof (CLIENT));  if (cl == NULL)    {      (void) fprintf (stderr, _("clntudp_create: out of memory\n"));      rpc_createerr.cf_stat = RPC_SYSTEMERROR;      rpc_createerr.cf_error.re_errno = errno;      goto fooy;    }  sendsz = ((sendsz + 3) / 4) * 4;  recvsz = ((recvsz + 3) / 4) * 4;  cu = (struct cu_data *) mem_alloc (sizeof (*cu) + sendsz + recvsz);  if (cu == NULL)    {      (void) fprintf (stderr, _("clntudp_create: out of memory\n"));      rpc_createerr.cf_stat = RPC_SYSTEMERROR;      rpc_createerr.cf_error.re_errno = errno;      goto fooy;    }  cu->cu_outbuf = &cu->cu_inbuf[recvsz];  (void) gettimeofday (&now, (struct timezone *) 0);  if (raddr->sin_port == 0)    {      u_short port;      if ((port =	   pmap_getport (raddr, program, version, IPPROTO_UDP)) == 0)	{	  goto fooy;	}      raddr->sin_port = htons (port);    }  cl->cl_ops = &udp_ops;  cl->cl_private = (caddr_t) cu;  cu->cu_raddr = *raddr;  cu->cu_rlen = sizeof (cu->cu_raddr);  cu->cu_wait = wait;  cu->cu_total.tv_sec = -1;  cu->cu_total.tv_usec = -1;  cu->cu_sendsz = sendsz;  cu->cu_recvsz = recvsz;  call_msg.rm_xid = getpid () ^ now.tv_sec ^ now.tv_usec;  call_msg.rm_direction = CALL;  call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;  call_msg.rm_call.cb_prog = program;  call_msg.rm_call.cb_vers = version;  xdrmem_create (&(cu->cu_outxdrs), cu->cu_outbuf,		 sendsz, XDR_ENCODE);  if (!xdr_callhdr (&(cu->cu_outxdrs), &call_msg))    {      goto fooy;    }  cu->cu_xdrpos = XDR_GETPOS (&(cu->cu_outxdrs));  if (*sockp < 0)    {      int dontblock = 1;      *sockp = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP);      if (*sockp < 0)	{	  rpc_createerr.cf_stat = RPC_SYSTEMERROR;	  rpc_createerr.cf_error.re_errno = errno;	  goto fooy;	}      /* attempt to bind to prov port */      (void) bindresvport (*sockp, (struct sockaddr_in *) 0);      /* the sockets rpc controls are non-blocking */      (void) ioctl (*sockp, FIONBIO, (char *) &dontblock);      cu->cu_closeit = TRUE;    }  else    {      cu->cu_closeit = FALSE;    }  cu->cu_sock = *sockp;  cl->cl_auth = authnone_create ();  return cl;fooy:  if (cu)    mem_free ((caddr_t) cu, sizeof (*cu) + sendsz + recvsz);  if (cl)    mem_free ((caddr_t) cl, sizeof (CLIENT));  return (CLIENT *) NULL;}