DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

t_look(3xti)


t_look -- check for asynchronous event on a transport endpoint

Synopsis

cc [options] file -lnsl
#include <xti.h>

int t_look(int fd);

Description

This function is an TLI/XTI local management routine used to return the current asynchronous event on the transport endpoint specified by fd. The event indicated reflects the service type of the transport provider. t_look enables a transport provider to notify a transport user, when the user is issuing functions in synchronous mode, if an asynchronous event has occurred on the specified endpoint.

Certain events require immediate notification of the user and are indicated by a specific error, TLOOK, on the current or next function to be executed.

This function also enables a transport user to poll a transport endpoint periodically for asynchronous events.

Values returned by t_look include the following:


T_LISTEN
A connect indication has arrived at the transport endpoint.

T_CONNECT
A connect confirmation has arrived at the transport endpoint. (When the server accepts a connect request, the confirmation is generated.)

T_DATA
User data has arrived at the transport endpoint.

T_EXDATA
Expedited user data has arrived at the transport endpoint.

T_DISCONNECT
A notification that the connection was aborted or that the server did not accept a connect request (disconnect indication) has arrived at the transport endpoint.

T_UDERR
Notification that a datagram error occurred (unitdata error indication) has arrived at the transport endpoint.

T_ORDREL
A request for the orderly release of a connection (orderly release indication) has arrived at the transport endpoint.

T_GODATA
Notification that it is again possible to send user data has arrived at the transport endpoint.

T_GOEXDATA
Notification that it is again possible to send expedited user data has arrived at the transport endpoint.

Parameters


fd
the file descriptor for the local transport endpoint associated with the current event.

State transitions

t_look may be issued from any valid state except T_UNINIT and has no effect on the state.

Files


/usr/lib/libxti.so
X/Open® Transport Interface Library (shared object)

/usr/lib/libnsl.so
Network Services Library (shared object)

Return values

On success, t_look returns 0 if no event exists or the value that indicates which event exists. On failure, -1 is returned and t_errno is set to indicate the error.

Errors

On failure, t_errno may be set to one of the following:

TBADF
The specified file descriptor does not refer to a transport endpoint.

TSYSERR
A system error has occurred during execution of this function.

TPROTO
A communication problem has been detected with the transport provider and there is no other value of t_errno to describe the error condition.

References

t_open(3xti), t_snd(3xti), t_sndudata(3xti)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004