[ Previous | Next | Table of Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Communications, Volume 2
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.
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:
- maxlen
- Specifies the maximum size of the address buffer.
- buf
- Points to the buffer where the address is to be placed. On return,
the buf field of boundaddr points to the address, if
any, currently bound to fd.
- len
- Specifies the length of the address. If the transport endpoint is
in the T_UNBND state, zero is returned in the len field
of boundaddr.
|
peeraddr
| Specifies the remote protocol address associated with the transport
endpoint.
- maxlen
- Specifies the maximum size of the address buffer.
- buf
- Points to the address, if any, currently connected to
fd.
- len
- Specifies the length of the address. If the transport endpoint is
not in the T_DATAXFER state, zero is returned in the len
field of peeraddr.
|
ALL - apart from T_UNINIT.
0
| Successful completion.
|
-1
| t_errno is set to indicate an error.
|
On failure, t_errno is
set to one of the following:
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).
|
The t_bind subroutine.
[ Previous | Next | Table of Contents | Index |
Library Home |
Legal |
Search ]