client = INTUSE(clntudp_bufcreate) (address, PMAPPROG, PMAPVERS, timeout, &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
if (protocol == IPPROTO_TCP) client = INTUSE(clnttcp_create) (address, PMAPPROG, PMAPVERS, &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE); else client = INTUSE(clntudp_bufcreate) (address, PMAPPROG, PMAPVERS, timeout, &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
pmap_getport (address, program, version, protocol)     struct sockaddr_in *address;     u_long program;     u_long version;     u_int protocol;{  u_short port = 0;  int socket = -1;  CLIENT *client;  struct pmap parms;  address->sin_port = htons (PMAPPORT);  client = INTUSE(clntudp_bufcreate) (address, PMAPPROG, PMAPVERS, timeout,				      &socket, RPCSMALLMSGSIZE,				      RPCSMALLMSGSIZE);  if (client != (CLIENT *) NULL)    {      struct rpc_createerr *ce = &get_rpc_createerr ();      parms.pm_prog = program;      parms.pm_vers = version;      parms.pm_prot = protocol;      parms.pm_port = 0;	/* not needed or used */      if (CLNT_CALL (client, PMAPPROC_GETPORT, (xdrproc_t)INTUSE(xdr_pmap),		     (caddr_t)&parms, (xdrproc_t)INTUSE(xdr_u_short),		     (caddr_t)&port, tottimeout) != RPC_SUCCESS)	{	  ce->cf_stat = RPC_PMAPFAILURE;	  clnt_geterr (client, &ce->cf_error);	}      else if (port == 0)	{	  ce->cf_stat = RPC_PROGNOTREGISTERED;	}      CLNT_DESTROY (client);    }  /* (void)close(socket); CLNT_DESTROY already closed it */  address->sin_port = 0;  return port;}