FloodlightProvider (Dev)

Description

The FloodlightProvider provides two main pieces of functionality. It handles the connections to switches and turns OpenFlow messages into events that other modules can listen for. The second big function that it provides is decides the order in which specific OpenFlow messages (i.e. PacketIn, FlowRemoved, PortStatus, etc) are dispatched to the modules that listen for the messages. Modules can then decide to allow the processing of the message to go onto the next listener or to stop processing the message.

Services Provided

  • IFloodlightProviderService

Service Dependencies

  • IStorageSourceService
  • IPktinProcessingTimeService
  • IRestApiService
  • IDebugCounterService
  • IDebugEventService
  • IThreadPoolService
  • ISyncService
  • IOFSwitchService

Java File

The module is implemented in net.floodlightcontroller.core.internal.FloodlightProvider.java.

How it works

The FloodlightProvider handles module listener registrations and dispatches events to registered modules. Other modules can register for specific events like switches connecting or disconnecting and port status notifications. The FloodlightProvider will turn these wire protocol notifications into java based messages that other modules can handle. In order for modules to register for OpenFlow messages they must implement the IOFMessageListener interface.

Limitations

  • None.

Configuration

The module is enabled by default, no change to the configuration is required to load the module.

Configuration Options

Name

Type

Default

Description

openflowport

Int

6633

The TCP port to listen on for OpenFlow connections from devices that support OpenFlow. 

workerthreads

Int

0 (2 * # of CPUs)

The number of Netty threads to spawn. If this number is 0 it will default to twice the number of CPUs available on the machine.

controllerid

String

localhost

The ID of the controller.

role

String

master

Values can either be: master, slave, equal. Slave controllers will not accept connections from switches and will be on "cold" standby.

REST API

URI

Description

Arguments

/wm/core/switch/all/<statType>/json 

Retrieve aggregate stats across all switches.

statType: port, queue, flow, aggregate, desc, table, features, host 

/wm/core/switch/<switchId>/<statType>/json 

Retrieve per switch stats.

switchId: Valid Switch DPID (XX:XX:XX:XX:XX:XX:XX:XX) 
statType: port, queue, flow, aggregate, desc, table, features, host 

/wm/core/controller/switches/json

List of all switch DPIDs connected to the controller.

none

/wm/core/role/json

Gets the current controller role.

None.

/wm/core/counter/<moduleName>/<counterTitle>/json

List of global traffic counters in the controller per module.

moduleName: The name of the specific module for which to fetch counters. "OFSwitchManager" should be used for switch counters. 
counterTitle: "all" or the name of the counter as defined in the module. Counters are defined in a hierarchical fashion and can be queried in groups by their common parent path in the counter hierarchy.  
For example, switch counters are defined at the root as "<dpid>:0x<aux-id>" or "00:00:00:00:00:00:00:01:0x01" where <dpid> is the switch DPID in hex-string form and <aux-id> is the OpenFlow connection ID in hexadecimal. 
Among many counters in the hierarchy, all switches have specific "read" and "write" counters, which can be added to the counterTitle e.g. "00:00:00:00:00:00:00:01:0x01/read".

/wm/core/memory/json 

Current controller memory usage.

none

/wm/core/storage/tables/json

Tables present in Storage.

none

/wm/core/module/<all>/json

Returns information about modules and their dependencies.

all: "all" or "loaded".