rpc_inq_binding(3ncs)rpc_inq_binding(3ncs)Name
rpc_inq_binding - return the socket address represented by an RPC handle (client or server)
Syntax
#include <idl/c/rpc.h>
void rpc_$inq_binding(handle, sockaddr, slength, status)
handle_t handle;
socket_$addr_t *sockaddr;
unsigned long *slength;
status_$t *status;
Arguments
handle An RPC handle.
sockaddr The socket address represented by handle.
slength The length, in bytes, of sockaddr.
status The completion status. If the completion status returned in is equal to status_$ok , then the routine that supplied it
was successful.
Description
The routine enables a client to determine the socket address, and therefore the server, identified by an RPC handle. It is useful when a
client uses an unbound handle in a remote procedure call and wishes to determine the particular server that responded to the call.
Examples
The Location Broker administrative tool, uses the following statement to determine the GLB that last responded to a lookup request:
rpc_$inq_binding(lb_$handle, &global_broker_addr,
&global_broker_addr_len, &status);
Diagnostics
This section lists status codes for errors returned by this routine in
rpc_$not_in_call An internal error.
rpc_$proto_error An internal protocol error.
rpc_$unbound_handle The handle is not bound and does not represent a particular host address. Returned by
FilesSee Alsointro(3ncs), rpc_bind(3ncs), rpc_set_binding(3ncs)rpc_inq_binding(3ncs)
Check Out this Related Man Page
rpc_sockaddr_to_name(3ncs)rpc_sockaddr_to_name(3ncs)Name
rpc_sockaddr_to_name - convert a socket address to a host name and port number (client or server)
Syntax
#include <idl/c/rpc.h>
void rpc_$sockaddr_to_name(sockaddr, slength, name, nlength, port, status)
socket_$addr_t *sockaddr;
unsigned long slength;
unsigned char name;
unsigned long *nlength;
unsigned long *port;
status_$t *status;
Arguments
sockaddr A socket address.
slength The length, in bytes, of sockaddr.
name A string that contains the host name and the address family. The format is family:host [port] where family is ip.
nlength On input, nlength is the length of the name buffer. On output, nlength is the number of characters returned in the
name parameter.
port The socket port number.
status The completion status. If the completion status returned in is equal to status_$ok , then the routine that supplied it
was successful.
Description
The routine provides the address family, the host name, and the port number identified by the specified socket address.
Diagnostics
This section lists status codes for errors returned by this routine in
rpc_$not_in_call An internal error.
rpc_$proto_error An internal protocol error. This routine has been superseded by the routine.
FilesSee Alsointro(3ncs), rpc_name_to_sockaddr(3ncs), socket_to_name(3ncs)rpc_sockaddr_to_name(3ncs)
I am trying to write a C server code that will handle WWW request from client. i am very new to socket programming. i can very well setup the socket...but when an incomin request comes from a browser, the progrom exits with an error message "Bad address". the following is the code. please do help... (1 Reply)
Hello every one i am implementing client server program.To handle multiple fds of client in server i used poll function.But this poll not able to access socket fd from other process.How can i share socket fd between two process.
Please Help me,Thanks in advance. (1 Reply)
Hello every one i am implementing client server program.To handle multiple fds of client in server i used poll function.But this poll not able to access socket fd from other process.How can i share socket fd between two process.
Please Help me,Thanks in advance. (3 Replies)