svc_register

Name

svc_register -- Register Remote Procedure Call Interface

Synopsis

#include <rpc/rpc.h>

void svc_register(SVCXPRT *xprt, u_long prognum, u_long versnum, void (*dispatch)(), u_long protocol);

Description

The svc_register function shall associate the program identified by prognum at version versnum with the service dispatch procedure, dispatch. If protocol is zero, the service is not registered with the portmap service. If protocol is non-zero, then a mapping of the triple [prognum, versnum, protocol] to xprt->xp_port is established with the local portmap service. The procedure dispatch has the following form:

int dispatch(struct svc_req * request, SVCXPRT * xprt);

Return Value

svc_register returns 1 if it succeeds, and zero otherwise.