FreeBSD/contrib/netbsd-tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c
/*
 * returns the item with the given program, version number. If that version
 * number is not found, it returns the item with that program number, so that
 * the port number is now returned to the caller. The caller when makes a
 * call to this program, version number, the call will fail and it will
 * return with PROGVERS_MISMATCH. The user can then determine the highest
 * and the lowest version number for this program using clnt_geterr() and
 * use those program version numbers.
 */
returns the item with the given program, version number. If that version
number is not found, it returns the item with that program number, so that
the port number is now returned to the caller. The caller when makes a
call to this program, version number, the call will fail and it will
return with PROGVERS_MISMATCH. The user can then determine the highest
and the lowest version number for this program using clnt_geterr() and
use those program version numbers.
returns the item with the given program version number . If that version number is not found it returns the item with that program number so that the port number is now returned to the caller . The caller when makes a call to this program version number the call will fail and it will return with PROGVERS_MISMATCH . The user can then determine the highest and the lowest version number for this program using clnt_geterr () and use those program version numbers .
static struct pmaplist *
find_service_pmap(rpcprog_t prog, rpcvers_t vers, rpcprot_t prot)
{
	register struct pmaplist *hit = NULL;
	register struct pmaplist *pml;
	for (pml = list_pml; pml != NULL; pml = pml->pml_next) {
		if ((pml->pml_map.pm_prog != prog) ||
			(pml->pml_map.pm_prot != prot))
			continue;
		hit = pml;
		if (pml->pml_map.pm_vers == vers)
			break;
	}
	return (hit);
}
static struct pmaplist * find_service_pmap ( rpcprog_t prog , rpcvers_t vers , rpcprot_t prot ) { register struct pmaplist * hit = NULL ; register struct pmaplist * pml ; for ( pml = list_pml ; pml != NULL ; pml = pml -> pml_next ) { if ( ( pml -> pml_map . pm_prog != prog ) || ( pml -> pml_map . pm_prot != prot ) ) continue ; hit = pml ; if ( pml -> pml_map . pm_vers == vers ) break ; } return ( hit ) ; }
returns the item with the given program, version number.
returns the item with the given program version number .