Skip to content

IperfStateMachine

Bruce A. Mah edited this page Feb 27, 2014 · 2 revisions

#summary Explaination of the Iperf state machine

= Introduction =

This document describes the flow of control of Iperf at a very high level.

== Client State Machine ==

{{{ TEST_START -> TEST_RUNNING -> TEST_END -> TEST_COMPLETE }}}

==== TEST_START ====

open control channel to the server

exchange parameters with the server

create and open test_streams

-> TEST_RUNNING

==== TEST_RUNNING ====

generate data on each stream (either n bytes or n seconds)

service the periodic callback

when all data has been sent close stream

when all streams closed -> TEST_END

==== TEST_END ====

request results from server

close control channel

-> TEST_COMPLETE

==== TEST_COMPLETE ====

all connections closed

structs are kept in tact for reporting and analysis

== Server State Machine ==

{{{ TEST_WAIT -> TEST_START -> TEST_RUNNING -> TEST_END -> TEST_WAIT }}}

==== TEST_WAIT ====

listen for a control channel connection

-> TEST_START

==== TEST_START ====

wait for parameter exchange

-> TEST_RUNNING

==== TEST_RUNNING ====

create new streams as the arrive

receive and discard data for each stream

service results requests

when no streams remain -> TEST_END

if no new data after timeout seconds, then close all streams and control channel -> TEST_WAIT

==== TEST_END ====

wait for results request or control channel closure

if nothing happens after timeout seconds -> TEST_WAIT

when control channel closed -> TEST_WAIT

Clone this wiki locally