Responding-Node Routing State Machine: Detailed Processing Notes

Awaiting Confirm State

This state is entered if a tg_Query_Rcvd event occurs on creation of the R-Node state machine. In this case an MA is created or re-used if required and the ConfirmTimer is started.

No Routing state about the remote node is stored on entering this state. The R-Node state machine remains in this state until either a Confirm is received, or a to_No_Confirm timeout occurs. If a Confirm is received before the timeout then the Established state is entered, otherwise the routing state is destroyed.

Established State

This state is entered if a tg_Confirm_Rcvd event occurs either on creation of the state machine, or when in the Awaiting Confirm state. On entering this state the routing state for the remote node is stored and a suitable MA is created or re-used. While in this state the R-Node state machine may be used to send messages, though these may be queued on the MA while it connects to the remote node.

The state machine generally remains in the Established state, processing incoming and outgoing messages, until an expiry timeout (to_Expire_RNode) occurs. This timeout is generated by the ExpireRNode timer, which is reset each time a query is received from the remote node.

State Machine Destruction

There are 3 events which may lead to the destruction of an R-Node state machine: to_Expire_RNode, to_No_Confirm and er_MA_Destroyed. Any routing state stored by the state machine is deleted when the state machine is destroyed.

The ExpireRNode timer is reset whenever a Query is received from the remote node. The ExpireRNode timer should have the same period as that at the remote node to ensure that the Q-Node and R-Node state machines are expired at approximately the same time. If the ExpireRNode timer expires, a to_Expire_RNode event is generated and the state machine is destroyed.

The NoConfirm timer is set when the Awaiting Confirm state is entered. If no Confirm message is received before this timer expires a to_No_Confirm event is generated and the R-Node state machine is destroyed.

A er_MA_Destroyed event is generated when an MA is unexpectedly destroyed, usually due to a problem encountered by the local protocol stack the MA is using. If this happens any routing state stored by the state machine is likely to be invalid, so the R-Node state machine must be destroyed.