XTI/TLI States
The following table defines the states used in XTI/TLI state transitions, along with the service types.
Table 7-1 XTI/TLI State Transitions and Service Types
State | Description | Service Type |
---|---|---|
T_UNINIT | Uninitialized-initial and final state of interface | T_COTS, T_COTS_ORD, T_CLTS |
T_UNBND | Initialized but not bound | T_COTS, T_COTS_ORD, T_CLTS |
T_IDLE | No connection established | T_COTS, T_COTS_ORD, T_CLTS |
T_OUTCON | Outgoing connection pending for client | T_COTS, T_COTS_ORD |
T_INCON | Incoming connection pending for server | T_COTS, T_COTS_ORD |
T_DATAXFER | Data transfer | T_COTS, T_COTS_ORD |
T_OUTREL | Outgoing orderly release (waiting for orderly release request) | T_COTS_ORD |
T_INREL | Incoming orderly release (waiting to send orderly release request) | T_COTS_ORD |
Outgoing Events
The outgoing events described in the following table 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
Table 7-2 Outgoing Events
Event | Description | Service Type |
---|---|---|
opened | Successful return of t_open(3NSL) | T_COTS, T_COTS_ORD, T_CLTS |
bind | Successful return of t_bind(3NSL) | T_COTS, T_COTS_ORD, T_CLTS |
Successful return of t_optmgmt(3NSL) | T_COTS, T_COTS_ORD, T_CLTS | |
unbind | Successful return of t_unbind(3NSL) | T_COTS, T_COTS_ORD, T_CLTS |
closed | Successful return of t_close(3NSL) | T_COTS, T_COTS_ORD, T_CLT |
connect1 | Successful return of t_connect(3NSL) in synchronous mode | T_COTS, T_COTS_ORD |
connect2 | TNODATA error on t_connect(3NSL) in asynchronous mode, or TLOOK error due to a disconnect request arriving on the transport endpoint | T_COTS, T_COTS_ORD |
accept1 | Successful return of t_accept(3NSL) with ocnt == 1, fd == resfd | T_COTS, T_COTS_ORD |
accept2 | Successful return of t_accept(3NSL) with ocnt== 1, fd!= resfd | T_COTS, T_COTS_ORD |
accept3 | Successful return of t_accept(3NSL) with ocnt > 1 | T_COTS, T_COTS_ORD |
snd | Successful return of t_snd(3NSL) | T_COTS, T_COTS_ORD |
snddis1 | Successful return of t_snddis(3NSL) with ocnt <= 1 | T_COTS, T_COTS_ORD |
snddis2 | Successful return of t_snddis(3NSL) with ocnt > 1 | T_COTS, T_COTS_ORD |
sndrel | Successful return of t_sndrel(3NSL) | T_COTS_ORD |
sndudata | Successful return of t_sndudata(3NSL) | T_CLTS |
Incoming Events
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 the following table, the rcvdis events are distinguished by the value of ocnt, the count of outstanding connect requests on the endpoint.
Table 7-3 Incoming Events
Event | Description | Service Type |
---|---|---|
listen | Successful return of t_listen(3NSL) | T_COTS, T_COTS_ORD |
rcvconnect | Successful return of t_rcvconnect(3NSL) | T_COTS, T_COTS_ORD |
rcv | Successful return of t_rcv(3NSL) | T_COTS, T_COTS_ORD |
rcvdis1 | Successful return of t_rcvdis(3NSL) rcvdis1t_rcvdis(), onct <= 0 | T_COTS, T_COTS_ORD |
rcvdis2 | Successful return of t_rcvdis(3NSL), ocnt == 1 | T_COTS, T_COTS_ORD |
rcvdis3 | Successful return of t_rcvdis(3NSL) with ocnt > 1 | T_COTS, T_COTS_ORD |
rcvrel | Successful return of t_rcvrel(3NSL) | T_COTS_ORD |
rcvudata | Successful return of t_rcvudata(3NSL) | T_CLTS |
rcvuderr | Successful return of t_rcvuderr(3NSL) | T_CLTS |
pass_conn | Receive a passed connection | T_COTS, T_COTS_ORD |
State Tables
The state 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.
You should understand the following when studying the state tables:
t_close(3NSL) terminates an established connection for a connection-oriented transport provider. The connection termination will be either orderly or abortive, depending on the service type supported by the transport provider. See the t_getinfo(3NSL) man page.
If a transport user issues a interface call out of sequence, the interface fails and t_errno is set to TOUTSTATE. The state does not change.
The error codes TLOOK or TNODATA after t_connect(3NSL) can result in state changes. The state tables assume correct use of XTI/TLI.
Any other transport error does not change the state, unless the man page for the interface says otherwise.
The support interfaces t_getinfo(3NSL), t_getstate(3NSL), t_alloc(3NSL), t_free(3NSL), t_sync(3NSL), t_look(3NSL), and t_error(3NSL) are excluded from the state tables because they do not affect the state.
Some of the state transitions listed in the tables below offer actions the transport user must take. Each action is represented by a digit derived 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 thet_accept(3NSL) man page
The following table shows endpoint establishment states.
Table 7-4 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 |
|
The following table shows data transfer in connectionless mode.
Table 7-5 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 |