Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 | both |
#define _XOPEN_SOURCE_EXTENDED 1
#include <xti.h>
int t_open(char *name, int oflag, struct t_info *info);
The argument name points to a transport provider identifier. The only supported transport provider is "/dev/tcp", indicating a TCP transport provider. No device by that name actually exists in the file system. It is purely used to follow historical convention. The argument oflag identifies any open flags (as in open() ). It is constructed from O_RDWR optionally bitwise inclusive-OR'ed with O_NONBLOCK. These flags are defined by the header <fcntl.h>. The file descriptor returned by t_open() will be used by all subsequent functions to identify the particular local transport endpoint.
long addr; /* max size of the transport protocol address */
long options; /* max number of bytes of */
/* protocol-specific options */
long tsdu; /* max size of a transport service data */
/* unit (TSDU) */
long etsdu; /* max size of an expedited transport */
/* service data unit (ETSDU) */
long connect; /* max amount of data allowed on */
/* connection establishment functions */
long discon; /* max amount of data allowed on */
/* t_snddis() and t_rcvdis() functions */
long servtype; /* service type supported by the */
/* transport provider */
long flags; /* other info about the transport provider */
If info is set to a NULL pointer by the transport user, no protocol information is returned by t_open().
Valid states: T_UNINIT
If successful, t_open() returns a valid file descriptor.