public class ControllerConfig extends Object
The values (with defaults shown in square brackets) are:
null
(or the empty set) denotes listening on all
available interfaces. [null]
false
means that the controller
will send a SetConfig message to a datapath, soon after it
completes its handshake. A value of true
means this behavior
is suppressed (i.e. no SetConfig message is sent).
[false]
true
will
cause the MessageFactory
to employ strict parsing of
OpenFlow messages. [false]
true
will allow
controlled switch to decide primary packet flow. [true]
true
will
suppress datapath errors for certain performance test platforms that
cannot handle the setting of flow mods. [false]
This class uses the builder pattern. For example, to create an instance where we supply a security context and also set strict message parsing in the OpenFlow Message Library, the following code might be used:
ControllerConfig cfg = new ControllerConfig.Builder() .securityContext(secCtx).strictMessageParsing().build();Note that all other parameters will have default values.
Modifier and Type | Class and Description |
---|---|
static class |
ControllerConfig.Builder
Builds instances of ControllerConfig.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEF_ENFORCEMENT_LEVEL
Default flow mod enforcement level.
|
static boolean |
DEF_HYBRID_MODE
Default setting for hybrid mode.
|
static int |
DEF_IDLE_CHECK_MS
Default number of milliseconds between idle connection checks.
|
static int |
DEF_MAX_ECHO_ATTEMPTS
Default number of attempts to wake idle connection with echo requests.
|
static int |
DEF_MAX_ECHO_MS
Default number of milliseconds between idle connection echo requests.
|
static int |
DEF_MAX_IDLE_MS
Default number of milliseconds to consider connections idle.
|
static int |
DEF_PORT
The default OpenFlow listen port (6633).
|
static int |
DEF_RCV_BUF_SIZE
The default buffer size for TCP / TLS connections.
|
static boolean |
DEF_SUPPRESS_FLOW_FAILURES
Default setting for suppressFlowFailures.
|
static int |
DEF_TLS_PORT
The default OpenFlow TLS listen port (6634).
|
static int |
DEF_UDP_PORT
The default OpenFlow UDP port (6635).
|
static int |
DEF_UDP_RCV_BUF_SIZE
The default buffer size for UDP connections.
|
static int |
DEF_WORKER_COUNT
The default I/O loop worker count.
|
static String |
ENFORCEMENT_LEVEL_NONE
No flow mod enforcement level.
|
static String |
ENFORCEMENT_LEVEL_STRICT
Strict flow mod enforcement level.
|
Modifier and Type | Method and Description |
---|---|
Set<IpAddress> |
addresses()
Returns the set of addresses to listen on.
|
boolean |
bounceRequired(ControllerConfig old)
Predicate that returns true if the difference between this (newer)
controller configuration and the specified (older) configuration would
require the controller to be bounced for the configuration changes to
take effect.
|
FlowClassAdministrator.EnforcementLevel |
enforcementLevel()
Returns enforcement level for flow mod compliance against flow class
registrations.
|
boolean |
hybridMode()
Returns true if Hybrid Mode is enabled.
|
int |
idleCheckMs()
Returns the period of idle connection detection.
|
int |
listenPort()
Returns the OpenFlow listen port for non-secure connections.
|
int |
maxEchoAttempts()
Returns the number of tries to wake idle connections.
|
int |
maxEchoMs()
Returns the period of echo requests on idle connections.
|
int |
maxIdleMs()
Returns the milliseconds before connections are considered idle.
|
int |
rcvBufSize()
Returns the TCP or TLS receive buffer size.
|
SecurityContext |
securityContext()
Returns the security context for the secure (TLS) connection.
|
boolean |
strictMessageParsing()
Returns true if the message factory will use strict parsing of OpenFlow
messages.
|
boolean |
suppressFlowFailures()
Returns the value of suppressFlowFailures which needs to be tweaked
when running tools that can't handle flow mods.
|
boolean |
suppressSetConfig()
Returns the SetConfig behavior suppression flag.
|
int |
tlsListenPort()
Returns the OpenFlow listen port for secure (TLS) connections.
|
String |
toString() |
int |
udpPort()
Returns the OpenFlow UDP port.
|
int |
udpRcvBufSize()
Returns the UDP receive buffer size.
|
int |
workerCount()
Returns the I/O loop worker count.
|
public static final int DEF_PORT
public static final int DEF_TLS_PORT
public static final int DEF_UDP_PORT
public static final int DEF_RCV_BUF_SIZE
public static final int DEF_UDP_RCV_BUF_SIZE
public static final int DEF_WORKER_COUNT
public static final int DEF_IDLE_CHECK_MS
public static final int DEF_MAX_IDLE_MS
public static final int DEF_MAX_ECHO_ATTEMPTS
public static final int DEF_MAX_ECHO_MS
public static final String DEF_ENFORCEMENT_LEVEL
public static final String ENFORCEMENT_LEVEL_STRICT
public static final String ENFORCEMENT_LEVEL_NONE
public static final boolean DEF_HYBRID_MODE
public static final boolean DEF_SUPPRESS_FLOW_FAILURES
public Set<IpAddress> addresses()
public int listenPort()
public int tlsListenPort()
public int udpPort()
public SecurityContext securityContext()
public boolean suppressSetConfig()
A value of false
means that the controller will send
a SetConfig message to a datapath, soon after it completes
its handshake. A value of true
means this behavior is
suppressed (i.e. no SetConfig message is sent).
public int rcvBufSize()
public int udpRcvBufSize()
public int workerCount()
public int idleCheckMs()
public int maxIdleMs()
public int maxEchoMs()
public int maxEchoAttempts()
public boolean strictMessageParsing()
public FlowClassAdministrator.EnforcementLevel enforcementLevel()
public boolean hybridMode()
public boolean suppressFlowFailures()
public boolean bounceRequired(ControllerConfig old)
Currently, this will return true if:
old
- the old configuration to compare withCopyright © 2015. All Rights Reserved.