XTI Library (libxti.a)
Interfaces documented on this reference page conform to industry standards as follows:
Refer to the standards(5) reference page for more information about industry standards and associated tags.
The following table summarizes the relevance of the fd parameter when t_look() is called:
|Parameter||Before Call||After Call|
The t_look() function can be called in all transport provider states except T_UNINIT.
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.
|T_LISTEN||t_accept(), t_connect()*, t_unbind()||
Connection indication received
|T_DISCONNECT||t_accept(), t_connect(), t_listen()**, t_rcv(), t_rcvconnect(), t_rcvrel(), t_snd(), t_sndrel()||
Datagram error indication
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||Event Consuming Functions|
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.
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 received. 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. Expedited data may be sent again.
Upon failure, the value -1 is returned and t_errno is set to indicate the error.
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 between XTI and the transport provider for which there is no other suitable XTI(t_errno).
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) delim off