t_getprotaddr - Gets the protocol address
XTI Library (libxti.a)
struct t_bind *boundaddr,
struct t_bind *peeraddr) ;
Interfaces documented on this reference page conform to industry standards as follows:
Refer to the standards(5) reference page for more information about industry standards and associated tags.
The following table summarizes the relevance of input and output parameters before and after t_getprotaddr() is called:
|Parameters||Before Call||After Call|
The t_getprotaddr() function can be called in all the transport provider states, except T_UNINIT.
The t_getprotaddr() function returns local and remote protocol addresses currently associated with the transport endpoint specified by fd.
Upon successful completion, a value of zero is returned. If the transport endpoint is in the T_UNBND state, zero is returned in the len field of boundaddr (boundaddr->addr.len).
If the transport endpoint is not in the T_DATAXFER state, then zero is returned in the len field of peeraddr (peeraddr->addr.len = 0). On failure, a value of -1 is returned and t_errno is set to indicate the error.
If the t_getprotaddr() function fails, t_errno may be set to one of the following values: The specified file descriptor does note refer to a transport endpoint. The number of bytes allocated for an incoming argument (maxlen) is greater than zero but not sufficient to store the value of that argument. A system error has occurred during execution of this function. This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no other suitable XTI(t_errno).
Functions: t_bind delim off