rpc_svc_create.3n (2010 09)

r
rpc_svc_create(3N) rpc_svc_create(3N)
are chosen. This routine returns NULL if it fails, and an error message is logged.
SVCXPRT *svc_raw_create(void)
This routine creates an RPC service handle and returns a pointer to it. The transport is really a
buffer within the process’s address space, so the corresponding RPC client should live in the same
address space; (see clnt_raw_create()
in rpc_clnt_create(3N)). This routine allows simulation
of RPC and acquisition of RPC overheads (such as round trip times), without any kernel and net-
working interference. This routine returns NULL if it fails, and an error message is logged.
Note:
svc_run() should not be called when the raw interface is being used.
SVCXPRT *svc_tli_create()
This routine creates an RPC server handle, and returns a pointer to it. fildes is the file descriptor
on which the service is listening. If fildes is
RPC_ANYFD, it opens a file descriptor on the transport
specified by netconf . If the file descriptor is unbound and bindaddr is non-null, fildes is bound to
the address specified by bindaddr , otherwise fildes is bound to a default address chosen by the tran-
sport. 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 (1M) service.
SVCXPRT *svc_tp_create()
svc_tp_create() creates a server handle for the network specified by netconf , and registers
itself with the
rpcbind service. dispatch is called when there is a remote procedure call for the
given prognum and versnum ; this requires calling svc_run(). svc_tp_create()
returns the
service handle if it succeeds, otherwise a NULL is returned and an error message is logged.
SVCXPRT *svc_vc_create()
This routine creates a connection-oriented RPC service and returns a pointer to it. This routine
returns NULL if it fails, and an error message is logged. The users may specify the size of the send
and receive buffers with the parameters sendsz and recvsz ; values of
0 choose suitable defaults. The
file descriptor fildes should be open and bound. The server is not registered with the rpcbind (1M)
service.
MULTITHREAD USAGE
Thread Safe: Yes
Cancel Safe: Yes
Fork Safe: No
Async-cancel Safe: No
Async-signal Safe: No
These functions can be called safely in a multithreaded environment. They may be cancellation points in
that they call functions that are cancel points.
In a multithreaded environment, these functions are not safe to be called by a child process after
fork()
and before exec(). These functions should not be called by a multithreaded application that supports
asynchronous cancellation or asynchronous signals.
SEE ALSO
rpcbind(1M), rpc(3N), rpc_svc_calls(3N), rpc_svc_err(3N), rpc_svc_reg(3N).
HP-UX 11i Version 3: September 2010 3 Hewlett-Packard Company 3