Get the protocol addresses.
X/Open Transport Interface Library (libxti.a)
#include <xti.h>
int t_getprotaddr (fd, boundaddr, peeraddr)
int fd;
struct t_bind *boundaddr;
struct t_bind *peeraddr;
The t_getproaddr subroutine returns local and remote protocol addresses currently associated with the transport endpoint specified by the fd parameter.
| Item | Description |
|---|---|
| fd | Specifies the transport endpoint. |
| boundaddr | Specifies the local address to which the transport endpoint
is to be bound. The boundaddr parameter has the following fields:
|
| peeraddr | Specifies the remote protocol address associated with the
transport endpoint.
|
ALL - apart from T_UNINIT.
| Item | Description |
|---|---|
| 0 | Successful completion. |
| -1 | t_errno is set to indicate an error. |
On failure, t_errno is set to one of the following:
| Value | Description |
|---|---|
| TBADF | The specified file descriptor does not refer to a transport endpoint. |
| TBUFOVIEW | The number of bytes allocated for an incoming parameter (maxlen) is greater than 0 but not sufficient to store the value of that parameter. |
| TSYSERR | A system error has occurred during execution of this subroutine. |
| TPROTO | This error indicates that a communication problem has been detected between the X/Open Transport Interface and the transport provider for which there is no other suitable X/Open Transport Interface (t_errno). |