rpc_$inq_binding Library Routine (NCS)

Purpose

Returns the socket address represented by a Remote Procedure Call (RPC) handle.

Syntax

void rpc_$inq_binding ( handle,  sockaddr,  slength,  status)
handle_t handle;
socket_$addr_t *sockaddr;
unsigned long *slength;
status_$t *status;

Description

The rpc_$inq_binding routine enables a client to determine the socket address, and therefore the server, identified by an RPC handle. It can be used to determine which server is responding to a remote procedure call when a client uses an unbound handle in the call.

Note: This routine is used by clients only.

Parameters

Input

Item Description
handle Specifies an RPC handle.

Output

Item Description
sockaddr Points to the socket address represented by the handle parameter.
slength Points to the length, in bytes, of the socket address (sockaddr).
status Points to the completion status.

Return Values

The rpc_$inq_binding routine fails if the following is true:

Value Description
rpc_$unbound_handle The handle is not bound and does not represent a specific host address.

Examples

The Location Broker administrative tool, lb_admin, uses the following statement to determine the particular GLB that responded to a lookup request:

rpc_$inq_binding(glb_$handle, &global_broker_addr,
   &global_broker_addr_len, &status);