rpc_bind(3ncs)
Name
rpc_bind − allocate an RPC handle and set its binding to a server (client only)
Syntax
#include <idl/c/rpc.h>
handle_t rpc_$bind(object, sockaddr, slength, status)
uuid_$t *object;
socket_$addr_t *sockaddr;
unsigned long slength;
status_$t *status;
Arguments
object The UUID of the object to be accessed. If there is no specific object, specify uuid_$nil.
sockaddr The socket address of the server.
slength The length, in bytes, of sockaddr.
status The completion status. If the completion status returned in status.all is equal to status_$ok , then the routine that supplied it was successful.
Description
The rpc_$bind routine creates a fully bound RPC handle that identifies a particular object and server. This routine is equivalent to an rpc_$alloc_handle routine followed by an rpc_$set_binding routine.
Examples
The following statement binds the binop client to the specified object and socket address. The loc parameter is the result of a previous call to rpc_$name_to_sockaddr which converted the host name and port number to a socket address.
rh = rpc_$bind (&uuid_$nil, &loc, llen, &status);
Diagnostics
This section lists status codes for errors returned by this rpc_$ routine in status.all.
rpc_$cant_bind_sock
The RPC runtime library created a socket but was unable to bind it to a socket address.
rpc_$not_in_call An internal error.
rpc_$proto_error An internal protocol error.
Files
/usr/include/idl/c/rpc.h
/usr/include/idl/rpc.idl
See Also
intro(3ncs), rpc_clear_binding(3ncs), rpc_clear_server_binding(3ncs), rpc_set_binding(3ncs)