Dynamics
Foreign Agent state machine $Revision: 1.2 $ State approved
Date 07-Dec-1998 Author Tom Weckström
Review date 09-Dec-1998 Reviewed by Jouni Malinen
Approval date 10-Dec-1998 Approved by Jouni Malinen
$Id: FA_machine.html,v 1.2 1998/12/09 23:40:31 jkmaline Exp $

Foreign Agent state machine

This is the Foreign Agent state machine document that describes the operation of a Foreign Agent mainly from signaling point of view, but also some other details have been added. The modeling of Foreign Agent daemon follows loosely the definitions of a finite state machine. However, the states are rather temporary places for the executed daemon. At the end of information processing cycles the machine always returns to the basic state or halts.

The modeling of one plain signaling machine is relatively easy, since each binding that constitutes one signaling machine, only can be essentially in two states: confirmed or unconfirmed. Thus we chose this combination model of state machine and data flow chart to depict the functionality of the Foreign Agent.
 
Below is a list of states and transitions. Each transition has input data which affects the output data. Sometimes only a specific input data value is accepted for the transition, sometimes there is logic inside the transition and the output varies depending on the input. All the transitions also have the Variables & processing field to inform what variables are affected by the transition and what kind of processing the transition does. The return values of all the transitions are fully imaginary and will be defined in the code and later definitions.

This state machine is depicted in a separate FA state machine picture.

The picture of a single FA binding state machine illustrates the functionality of one single binding from signaling  point of view. There is no textual state machine definition for the single binding state machine, but the functionality is embedded into the FA state machine.
 
 

State: STARTING
FA state machine initial state when the daemon is started.

Transitions

Transition:     read_config

 

State: CONF INIT
Configuration has been read and the FA proceeds according to the read_config transition return value.

Transitions

Transition:     config_error

Transition:     init_sockets  

State: SOCKET INIT
Now the interfaces have been initialized. There is an success or error value available from init_sockets.

Transitions

Transition:     sock_init_error

Transition:     init_data  

State:  INIT END
This state ends the initialization steps.
We either start the work or exit because of previous errors.

Transitions

Transition: gen_init error

Transition:     init_complete  

State: INIT ERROR
Daemon initialization has failed and the error has been logged.
This is an unsatisfactory machine stop state.
The daemon has exited.
 

State: FA_READY
This is the basic state of the FA daemon.
From this state all the actions start.
In this state the incoming signaling messages are initially
recognized and forwarded for further processing.

Transitions

Transition:     advertisement_timer_expiration

Transition:     receive_request
Validates the UDP request messages Transition: receive_reply
FA receives a registration request reply coming from upper FAs and initially from the HA. Transition:     incoming_api_call Transition:     binding_expiration  

State: PROCESSING API CALL
A simplistic state showing actions in the API call situation.

Transitions

Transition:     reply_to_api_call

 

State:    HANDLING REQUEST
This state leads to the main operations of an FA. States from this state on handle the mobility and bindings.

Transitions

Transition:    validate_solicitation
The FA has received a request which has been validated to be an Mobility Agent Solicitation message.

Transition:    new_binding_request
FA has received a request from a previously unknown MN. Transition:    update_request.
Tunnel update request has been received. State:    HANDLING UPDATE REQUEST
When the machine comes to this state, the complete validation and resource checking has been done.
From this point on the machine can either accept or reject the update message.

Transitions

Transition:    reject_update

Transition:    handle_address_match  Transition:    handle_address_mismatch
This transition happens when the mobile has been moving from one access point to another.
The first common FA of the old and new tunnels will trigger this transition.  Transition:    accept_update  
 

State:    CONFIRMING NEW REQUEST
In this state the new binding request is either accepted or rejected.

Transitions

Transition: accept_new_binding

Transition: deny_new_binding State: HANDLING REPLY
In this state FA handles the registration request reply according to the validation value.

Transitions

Transition: Manage binding
FA has validated the message and shall act according to the result.

 

State: BROADCAST ADVERTISING
In this state FA is about to broadcast a Mobility Agent Advertisement message.

Transitions

Transition:     Broadcast Advertisement

State:    HANDLING SOLICITATION
In this state FA answers to or rejects the Mobility Agent Solicitation message.

Transitions

Transition:     answer_solicitation

Transition:     reject_solicitation