FreeBSD/contrib/netbsd-tests/fs/nfs/nfsservice/rpcbind/pmap_svc.c
/*
 * Called for all the version 2 inquiries.
 */
Called for all the version 2 inquiries.
Called for all the version 2 inquiries .
void
pmap_service(struct svc_req *rqstp, SVCXPRT *xprt)
{
	rpcbs_procinfo(RPCBVERS_2_STAT, rqstp->rq_proc);
	switch (rqstp->rq_proc) {
	case PMAPPROC_NULL:
#ifdef RPCBIND_DEBUG
		if (debugging)
			fprintf(stderr, "PMAPPROC_NULL\n");
#endif
		check_access(xprt, rqstp->rq_proc, NULL, PMAPVERS);
		if ((!svc_sendreply(xprt, (xdrproc_t) xdr_void, NULL)) &&
			debugging) {
			if (doabort) {
				rpcbind_abort();
			}
		}
		break;
	case PMAPPROC_SET:
		pmapproc_change(rqstp, xprt, rqstp->rq_proc);
		break;
	case PMAPPROC_UNSET:
		pmapproc_change(rqstp, xprt, rqstp->rq_proc);
		break;
	case PMAPPROC_GETPORT:
		pmapproc_getport(rqstp, xprt);
		break;
	case PMAPPROC_DUMP:
#ifdef RPCBIND_DEBUG
		if (debugging)
			fprintf(stderr, "PMAPPROC_DUMP\n");
#endif
		pmapproc_dump(rqstp, xprt);
		break;
	case PMAPPROC_CALLIT:
		rpcbproc_callit_com(rqstp, xprt, PMAPPROC_CALLIT, PMAPVERS);
		break;
	default:
		svcerr_noproc(xprt);
		break;
	}
}
void pmap_service ( struct svc_req * rqstp , SVCXPRT * xprt ) { rpcbs_procinfo ( RPCBVERS_2_STAT , rqstp -> rq_proc ) ; switch ( rqstp -> rq_proc ) { case PMAPPROC_NULL : #ifdef RPCBIND_DEBUG if ( debugging ) fprintf ( stderr , " \n " ) ; #endif check_access ( xprt , rqstp -> rq_proc , NULL , PMAPVERS ) ; if ( ( ! svc_sendreply ( xprt , ( xdrproc_t ) xdr_void , NULL ) ) && debugging ) { if ( doabort ) { rpcbind_abort ( ) ; } } break ; case PMAPPROC_SET : pmapproc_change ( rqstp , xprt , rqstp -> rq_proc ) ; break ; case PMAPPROC_UNSET : pmapproc_change ( rqstp , xprt , rqstp -> rq_proc ) ; break ; case PMAPPROC_GETPORT : pmapproc_getport ( rqstp , xprt ) ; break ; case PMAPPROC_DUMP : #ifdef RPCBIND_DEBUG if ( debugging ) fprintf ( stderr , " \n " ) ; #endif pmapproc_dump ( rqstp , xprt ) ; break ; case PMAPPROC_CALLIT : rpcbproc_callit_com ( rqstp , xprt , PMAPPROC_CALLIT , PMAPVERS ) ; break ; default : svcerr_noproc ( xprt ) ; break ; } }
Called for all the version 2 inquiries.
Called for all the version 2 inquiries .
/*
		 * Null proc call
		 */ /*
		 * Set a program, version to port mapping
		 */ /*
		 * Remove a program, version to port mapping.
		 */ /*
		 * Lookup the mapping for a program, version and return its
		 * port number.
		 */ /*
		 * Return the current set of mapped program, version
		 */ /*
		 * Calls a procedure on the local machine. If the requested
		 * procedure is not registered this procedure does not return
		 * error information!!
		 * This procedure is only supported on rpc/udp and calls via
		 * rpc/udp. It passes null authentication parameters.
		 */