 |
Index for Section 3 |
|
 |
Alphabetical listing for T |
|
 |
Bottom of page |
|
t_look(3)
NAME
t_look - Look at the current event on a transport endpoint.
SYNOPSIS
#include <xti.h>
int t_look(
int fd );
LIBRARY
XTI Library (libxti.a)
STANDARDS
Interfaces documented on this reference page conform to industry standards
as follows:
t_look(): XNS4.0, XNS5.0
Refer to the standards(5) reference page for more information about
industry standards and associated tags.
PARAMETERS
The following table summarizes the relevance of the fd parameter when
t_look() is called:
____________________________________
Parameter Before Call After Call
____________________________________
fd y n
____________________________________
Notes to Table
y This is a meaningful parameter.
n This is not a meaningful parameter.
fd Specifies a file descriptor returned by the t_open() function that
identifies the local transport endpoint.
DESCRIPTION
The t_look() XTI function is used in connectionless and connection-oriented
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 determine which event
occurred.
________________________________________________________________
Event Event Description
Immediate T_LOOK
Functions
________________________________________________________________
T_LISTEN
t_accept(),
t_connect()*,
t_unbind()
Connection indication
received
T_DISCONNECT Disconnect received
t_accept(),
t_connect(),
t_listen()**, t_rcv(),
t_rcvconnect(),
t_rcvrel(), t_snd(),
t_sndrel()
T_UDERR
t_rcvudata(),
t_sndudata()
Datagram error
indication
T_ORDREL
t_rcvudata(),
t_sndudata()
Orderly release
indication
________________________________________________________________
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 notification
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:
______________________________________________________________
Event Cleared with T_LOOK?
Event Consuming
Functions
______________________________________________________________
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 column 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:
[T_LISTEN]
Connect indication received.
[T_CONNECT]
Connect confirmation received.
[T_DATA]
Normal data received.
[T_EXDATA]
Expedited data received.
[T_DISCONNECT]
Disconnect received.
[T_UDERR]
Datagram error indication.
[T_ORDREL]
Orderly release indication.
[T_GODATA]
Flow control restrictions on normal data flow have been lifted. Normal
data may be sent again.
[T_GOEXDATA]
Flow control restrictions on expedited data flow have been lifted.
Expedited 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:
[TBADF]
The specified file descriptor does not refer to a transport endpoint.
[TSYSERR]
A system error occurred during execution of this function.
[TPROTO]
This error indicates that a communication problem has been detected
between XTI and the transport provider for which there is no other
suitable XTI(t_errno).
VALID STATES
The t_look() function can be called in all transport provider states except
T_UNINIT.
SEE ALSO
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_rcvuderr(3),
t_snd(3), t_sndudata(3)
Standards: standards(5)
Network Programmer's Guide
 |
Index for Section 3 |
|
 |
Alphabetical listing for T |
|
 |
Top of page |
|