RPC_SVC_CREATE(3) | Library Functions Manual | RPC_SVC_CREATE(3) |
bool_t
svc_control(SVCXPRT *svc, const u_int req, void *info);
int
svc_create(const void (*dispatch)(struct svc_req *, SVCXPRT *), const rpcprog_t prognum, const rpcvers_t versnum, const char *nettype);
SVCXPRT *"
svc_dg_create(const int fildes, const u_int sendsz, const u_int recvsz);
void
svc_destroy(SVCXPRT *xprt);
SVCXPRT *
svc_fd_create(const int fildes, const u_int sendsz, const u_int recvsz);
SVCXPRT *
svc_raw_create(void);
SVCXPRT *
svc_tli_create(const int fildes, const struct netconfig *netconf, const struct t_bind *bindaddr, const u_int sendsz, const u_int recvsz);
SVCXPRT *
svc_tp_create(const void (*dispatch)(const struct svc_reg *, const SVCXPRT *), const rpcprog_t prognum, const rpcvers_t versnum, const struct netconfig *netconf);
SVCXPRT *
svc_vc_create(const int fildes, const u_int sendsz, const u_int recvsz);
svc_create() registers itself with the rpcbind service (see rpcbind(8)). dispatch is called when there is a remote procedure call for the given prognum and versnum; this requires calling svc_run() (see svc_run() in rpc_svc_reg(3)). If svc_create() succeeds, it returns the number of server handles it created, otherwise it returns 0 and an error message is logged.
Note: the t_bind structure comes from the TLI/XTI SysV interface, which NetBSD does not use. The structure is defined in <rpc/types.h> for compatibility as:
struct t_bind { struct netbuf addr; /* network address, see rpc(3) */ unsigned int qlen; /* queue length (for listen(2)) */ };
In the case where the default address is chosen, the number of outstanding connect requests is set to 8 for connection-oriented transports. The user may specify the size of the send and receive buffers with the parameters sendsz and recvsz; values of 0 choose suitable defaults. This routine returns NULL if it fails, and an error message is logged. The server is not registered with the rpcbind(8) service.
May 3, 1993 | NetBSD 6.1 |