Manual Page Result
0
Command: t_look | Section: 3 | Source: Digital UNIX | File: t_look.3.gz
t_look(3) Library Functions Manual t_look(3)
NAME
t_look - Looks at the current event on a transport endpoint.
LIBRARY
XTI Library (libxti.a)
SYNOPSIS
#include <xti.h>
int t_look(
int fd);
STANDARDS
Interfaces documented on this reference page conform to industry stan-
dards as follows:
t_look: XPG4-UNIX
Refer to the standards(5) reference page for more information about in-
dustry standards and associated tags.
PARAMETERS
The following table summarizes the relevance of the fd parameter when
t_look() is called:
tab(@); lfHB lfHB lfHB c c c. Parameter@Before Call@After Call _
fd@y@n
Notes to Table This is a meaningful parameter. This is not a meaning-
ful parameter. Specifies a file descriptor returned by the t_open()
function that identifies the local transport endpoint.
VALID STATES
The t_look() function can be called in all transport provider states
except T_UNINIT.
DESCRIPTION
The t_look() XTI function is used in connectionless and connection-ori-
ented transport service to monitor the current event at the transport
endpoint specified by a file descriptor previously returned by the
t_open() function. The t_look() function permits a transport provider
to notify a transport user of any one of the nine asynchronous events
listed in the RETURN VALUE section when the transport user is calling
other XTI functions in synchronous mode.
During synchronous operation, all events at a transport endpoint are
saved by XTI so that any current event may be known to a transport
user. Each of the nine asynchronous events listed under the RETURN
VALUE section is defined by a symbolic name in the xti.h include file.
This symbolic name can be retrieved when the t_look() function is
called.
Some XTI functions fail unconditionally when they are called because
the current event at the transport endpoint does not permit them to
successfully execute. Four of the nine synchronous events listed in the
Event column of the following table cause unconditional failure when
any function listed in the Immediate T_LOOK Functions column is called.
Any of these four synchronous events requires that the transport user
be immediately notified. Unconditional failure returns a [T_LOOK] error
during execution of the currently called function or the next called
function when it is executed. This function can then be used to deter-
mine which event occurred.
tab(@); lfHB lfHB lfHB lfHB lfHB lfHB l l l. @Immediate T_LOOK@
Event@Functions@Event Description _
T_LISTEN@T{ t_accept(), t_connect()*, t_unbind() T}@T{ Connection indi-
cation received T}
T_DISCONNECT@T{ t_accept(), t_connect(), t_listen()**, t_rcv(), t_rcv-
connect(), t_rcvrel(), t_snd(), t_sndrel() T}@T{ Disconnect received T}
T_UDERR@T{ t_rcvudata(), t_sndudata() T}@T{ Datagram error indication
T}
T_ORDREL@T{ t_rcvudata(), t_sndudata() T}@T{ Orderly release indication
T}
_
Notes to Table Connection indication received at a transport endpoint
which has been bound with qlen > 0 (zero) and for which a connection
indication is pending (refer to the t_bind() function). Disconnect for
an outstanding connect indication.
When multiple events occur, the order in which their value is returned
is implementation dependent. All together, there are 11 XTI functions
that fail when a particular synchronous event requiring immediate noti-
fication is detected.
The following table lists transport endpoint events and corresponding
functions to which a [T_LOOK] error is immediately returned when the
event causes function failure:
tab(@); lfHB lfHB lfHB lfHB lfHB lfHB l l l. Event@Cleared
with@Event Consuming Functions @T_LOOK? _
T_LISTEN@No@t_listen()
T_CONNECT@No@t_rcvconnect()
T_DATA@No@t_rcv(), t_rcvudata()
T_EXDATA@No@t_rcv()
T_DISCONNECT@No@t_rcvdis()
T_UDERR@No@t_rcvuderr()
T_ORDREL@No@t_rcvrel()
T_GODATA@Yes@t_snd(), t_sndudata()
T_GOEXDATA@Yes@t_snd()
_
An event at a transport endpoint remains outstanding until a consuming
function clears it. Every event has an associated consuming function
that handles the event and clears it. The Event Consuming Function col-
umn of the preceding table lists these events and the function that
clears each one when successfully executed.
RETURN VALUES
Upon successful completion, the t_look() function returns a value that
indicates which of the allowable events has occurred, or returns zero
if no event exists. One of the following events is returned: Connect
indication received. Connect confirmation received. Normal data re-
ceived. Expedited data received. Disconnect received. Datagram error
indication. Orderly release indication. Flow control restrictions on
normal data flow have been lifted. Normal data may be sent again.
Flow control restrictions on expedited data flow have been lifted. Ex-
pedited data may be sent again.
Upon failure, the value -1 is returned and t_errno is set to indicate
the error.
ERRORS
If the t_look() function fails, t_errno is set to one of the following
values: The specified file descriptor does not refer to a transport
endpoint. A system error occurred during execution of this function.
This error indicates that a communication problem has been detected be-
tween XTI and the transport provider for which there is no other suit-
able XTI(t_errno).
RELATED INFORMATION
Functions: t_bind(3), t_connect(3), t_listen(3), t_open(3), t_rcv(3),
t_rcvconnect(3), t_rcvdis(3), t_rcvrel(3), t_rcvudata(3), t_rcvud-
err(3), t_snd(3), t_sndudata(3) delim off
t_look(3)