A Discrete-Event Network Simulator
API
OpenFlow module tests

A net device that switches multiple LAN segments via an OpenFlow-compatible flow table. More...

+ Collaboration diagram for OpenFlow module tests:

Classes

class  SwitchFlowTableTestCase
 OpenFlow Test. More...
 
class  SwitchTestSuite
 OpenFlow TestSuite. More...
 

Detailed Description

A net device that switches multiple LAN segments via an OpenFlow-compatible flow table.

The OpenFlowSwitchNetDevice object aggregates multiple netdevices as ports and acts like a switch. It implements OpenFlow-compatibility, according to the OpenFlow Switch Specification v0.8.9 <www.openflowswitch.org/documents/openflow-spec-v0.8.9.pdf>. It implements a flow table that all received packets are run through. It implements a connection to a controller via a subclass of the Controller class, which can send messages to manipulate the flow table, thereby manipulating how the OpenFlow switch behaves.

There are two controllers available in the original package. DropController builds a flow for each received packet to drop all packets it matches (this demonstrates the flow table's basic implementation), and the LearningController implements a "learning switch" algorithm (see 802.1D), where incoming unicast frames from one port may occasionally be forwarded throughout all other ports, but usually they are forwarded only to a single correct output port.

Attention
The Spanning Tree Protocol part of 802.1D is not implemented. Therefore, you have to be careful not to create bridging loops, or else the network will collapse.
Each NetDevice used must only be assigned a Mac Address, adding it to an Ipv4 or Ipv6 layer will cause an error. It also must support a SendFrom call.