These tables describe all state transitions associated with XTI/TLI. First, however, the states and events are described.
Table 3-8 defines the states used in XTI/TLI state transitions, along with the service types.
Table 3-8 XTI/TLI State Transitions and Service Types
State |
Description |
Service Type |
---|---|---|
T_UNINIT |
Uninitialized - initial and final state of interface |
|
T_UNBND |
Initialized but not bound |
|
T_IDLE |
No connection established |
|
T_OUTCON |
Outgoing connection pending for client |
|
T_INCON |
Incoming connection pending for server |
|
T_DATAXFER |
Data transfer |
|
T_OUTREL |
Outgoing orderly release (waiting for orderly release request |
|
T_INREL |
Incoming orderly release (waiting to send orderly release request) |
|
The outgoing events described in Table 3-9 correspond to the status returned from the specified transport routines, where these routines send a request or response to the transport provider. In the table, some events, such as accept(), are distinguished by the context in which they occur. The context is based on the values of the following variables:
ocnt - Count of outstanding connect requests
fd - File descriptor of the current transport endpoint
resfd - File descriptor of the transport endpoint where a connection is accepted
Event |
Description |
Service Type |
---|---|---|
opened |
Successful return of t_open() |
|
bind |
Successful return of t_bind() |
|
Successful return of t_optmgmt() |
|
|
unbind |
Successful return of t_unbind() |
|
closed |
Successful return of t_close() |
|
connect1 |
Successful return of t_connect() in synchronous mode |
|
connect2 |
TNODATA error on t_connect() in asynchronous mode, or TLOOK error due to a disconnect request arriving on the transport endpoint |
|
accept1 |
Successful return of t_accept() with ocnt == 1, fd == resfd |
|
accept2 |
Successful return of t_accept() with ocnt== 1, fd!= resfd |
|
accept3 |
Successful return of t_accept() with ocnt > 1 |
|
snd |
Successful return of t_snd() |
|
snddis1 |
Successful return of t_snddis() with ocnt <= 1 |
|
snddis2 |
Successful return of t_snddis() with ocnt > 1 |
|
sndrel |
Successful return of t_sndrel() |
|
sndudata |
Successful return of t_sndudata() |
|
The incoming events correspond to the successful return of the specified routines. These routines return data or event information from the transport provider. The only incoming event not associated directly with the return of a routine is pass_conn, which occurs when a connection is transferred to another endpoint. The event occurs on the endpoint that is being passed the connection, although no XTI/TLI routine is called on the endpoint.
In Table 3-10, the rcvdis events are distinguished by the value of ocnt, the count of outstanding connect requests on the endpoint.
Table 3-10 Incoming Events
Event |
Description |
Service Type |
---|---|---|
listen |
Successful return of t_listen() |
|
rcvconnect |
Successful return of t_rcvconnect() |
|
rcv |
Successful return of t_rcv() |
|
rcvdis1 |
Successful return of rcvdis1t_rcvdis(), onct <= 0 |
|
rcvdis2 |
Successful return of t_rcvdis(), ocnt == 1 |
|
rcvdis3 |
Successful return of t_rcvdis() with ocnt > 1 |
|
rcvrel |
Successful return of t_rcvrel() |
|
rcvudata |
Successful return of t_rcvudata() |
|
rcvuderr |
Successful return of t_rcvuderr() |
|
pass_conn |
Receive a passed connection |
|
Some state transitions (below) have a list of actions the transport user must take. Each action is represented by a digit from the list below:
Set the count of outstanding connect requests to zero.
Increment the count of outstanding connect requests.
Decrement the count of outstanding connect requests.
Pass a connection to another transport endpoint, as indicated in t_accept().
The tables describe the XTI/TLI state transitions. Each box contains the next state, given the current state (column) and the current event (row). An empty box is an invalid state/event combination. Each box can also have an action list. Actions must be done in the order specified in the box.
The following should be understood when studying the state tables:
t_close() causes an established connection to be terminated for a connection-oriented transport provider. The connection termination will be orderly or abortive, depending on the service type supported by the transport provider. See t_getinfo(3N).
If a transport user issues a function out of sequence, the function fails and t_errno is set to TOUTSTATE. The state does not change.
The error codes TLOOK or TNODATA after t_connect() can result in state changes described in "Event Handling". The state tables assume correct use of XTI/TLI.
Any other transport error does not change the state, unless the manual page for the function says otherwise.
The support functions t_getinfo(), t_getstate(), t_alloc(), t_free(), t_sync(), t_look(), and t_error() are excluded from the state tables because they do not affect the state.
Table 3-11, Table 3-12, Table 3-13, and Table 3-14 show endpoint establishment, data transfer in connectionless mode, and connection establishment/connection release/data transfer in connection mode.
Table 3-11 Connection Establishment State
Event/State |
T_UNINIT |
T_UNBND |
T_IDLE |
---|---|---|---|
opened |
T_UNBND |
|
|
bind |
|
T_IDLE[1] |
|
|
|
T_IDLE |
|
unbind |
|
|
T_UNBND |
closed |
|
T_UNINIT |
|
Table 3-12 Connection Mode State--Part 1
Event/State |
T_IDLE |
T_OUTCON |
T_INCON |
T_DATAXFER |
---|---|---|---|---|
connect1 |
T_DATAXFER |
|
|
|
connect2 |
T_OUTCON |
|
|
|
rcvconnect |
|
T_DATAXFER |
|
|
listen |
T_INCON [2] |
|
T_INCON [2] |
|
accept1 |
|
|
T_DATAXFER [3] |
|
accept2 |
|
|
T_IDLE [3] [4] |
|
accept3 |
|
|
T_INCON [3] [4] |
|
snd |
|
|
|
T_DATAXFER |
rcv |
|
|
|
T_DATAXFER |
snddis1 |
|
T_IDLE |
T_IDLE [3] |
T_IDLE |
snddis2 |
|
|
T_INCON [3] |
|
rcvdis1 |
|
T_IDLE |
|
T_IDLE |
rcvdis2 |
|
|
T_IDLE [3] |
|
rcvdis3 |
|
|
T_INCON [3] |
|
sndrel |
|
|
|
T_OUTREL |
rcvrel |
|
|
|
T_INREL |
pass_conn |
T_DATAXFER |
|
|
|
T_IDLE |
T_OUTCON |
T_INCON |
T_DATAXFER |
|
closed |
T_UNINIT |
T_UNINIT |
T_UNINIT |
T_UNINIT |
Table 3-13 Connection Mode State--Part 2
Event/State |
T_OUTREL |
T_INREL |
T_UNBND |
---|---|---|---|
connect1 |
|
|
|
connect2 |
|
|
|
rcvconnect |
|
|
|
listen |
|
|
|
accept1 |
|
|
|
accept2 |
|
|
|
accept3 |
|
|
|
snd |
|
T_INREL |
|
rcv |
T_OUTREL |
|
|
snddis1 |
T_IDLE |
T_IDLE |
|
snddis2 |
|
|
|
rcvdis1 |
T_IDLE |
T_IDLE |
|
rcvdis2 |
|
|
|
rcvdis3 |
|
|
|
sndrel |
|
T_IDLE |
|
rcvrel |
T_IDLE |
|
|
pass_conn |
|
| |
optmgmt |
T_OUTREL |
T_INREL |
T_UNBND |
closed |
T_UNINIT |
T_UNINIT |
|
Table 3-14 Connectionless Mode State
Event/State |
T_IDLE |
---|---|
snudata |
T_IDLE |
rcvdata |
T_IDLE |
rcvuderr |
T_IDLE |