Open Kilda Java Documentation
org.openkilda.floodlight.switchmanager.ISwitchManager Interface Reference
Inheritance diagram for org.openkilda.floodlight.switchmanager.ISwitchManager:
org.openkilda.floodlight.switchmanager.SwitchManager

Public Member Functions

ConnectModeRequest.Mode connectMode (final ConnectModeRequest.Mode mode)
 
void installDefaultRules (final DatapathId dpid) throws SwitchOperationException
 
void installVerificationRule (final DatapathId dpid, final boolean isBroadcast) throws SwitchOperationException
 
void installDropFlow (final DatapathId dpid) throws SwitchOperationException
 
void installDropFlowCustom (final DatapathId dpid, String dstMac, String dstMask, final long cookie, final int priority) throws SwitchOperationException
 
long installIngressFlow (final DatapathId dpid, final String flowId, final Long cookie, final int inputPort, final int outputPort, final int inputVlanId, final int transitVlanId, final OutputVlanType outputVlanType, final long meterId) throws SwitchOperationException
 
long installEgressFlow (final DatapathId dpid, final String flowId, final Long cookie, final int inputPort, final int outputPort, final int transitVlanId, final int outputVlanId, final OutputVlanType outputVlanType) throws SwitchOperationException
 
long installTransitFlow (final DatapathId dpid, final String flowId, final Long cookie, final int inputPort, final int outputPort, final int transitVlanId) throws SwitchOperationException
 
long installOneSwitchFlow (final DatapathId dpid, final String flowId, final Long cookie, final int inputPort, final int outputPort, int inputVlanId, int outputVlanId, final OutputVlanType outputVlanType, final long meterId) throws SwitchOperationException
 
List< OFFlowStatsEntry > dumpFlowTable (final DatapathId dpid)
 
OFMeterConfigStatsReply dumpMeters (final DatapathId dpid) throws SwitchOperationException
 
long installMeter (final DatapathId dpid, final long bandwidth, final long burstSize, final long meterId) throws SwitchOperationException
 
long deleteMeter (final DatapathId dpid, final long meterId) throws SwitchOperationException
 
Map< DatapathId, IOFSwitch > getAllSwitchMap ()
 
List< Long > deleteAllNonDefaultRules (DatapathId dpid) throws SwitchOperationException
 
List< Long > deleteDefaultRules (DatapathId dpid) throws SwitchOperationException
 
List< Long > deleteRulesByCriteria (DatapathId dpid, DeleteRulesCriteria... criteria) throws SwitchOperationException
 
void startSafeMode (final DatapathId dpid) throws SwitchOperationException
 
void stopSafeMode (final DatapathId dpid)
 
void safeModeTick ()
 
void sendSwitchActivate (final IOFSwitch sw) throws SwitchOperationException
 
void sendPortUpEvents (final IOFSwitch sw) throws SwitchOperationException
 
void configurePort (DatapathId dpId, int portNumber, Boolean portAdminDown) throws SwitchOperationException
 

Public Attributes

String OVS_MANUFACTURER = "Nicira, Inc."
 
long DROP_RULE_COOKIE = 0x8000000000000001L
 
long VERIFICATION_BROADCAST_RULE_COOKIE = 0x8000000000000002L
 
long VERIFICATION_UNICAST_RULE_COOKIE = 0x8000000000000003L
 

Detailed Description

Definition at line 32 of file ISwitchManager.java.

Member Function Documentation

◆ configurePort()

void org.openkilda.floodlight.switchmanager.ISwitchManager.configurePort ( DatapathId  dpId,
int  portNumber,
Boolean  portAdminDown 
) throws SwitchOperationException

Configure switch port.
Configurations

  • UP/DOWN port
  • Change port speed
Parameters
dpIddatapath ID of the switch.
portNumberthe port to configure.
portAdminDownthe port status to be applied.
Exceptions
SwitchOperationExceptionSwitch not found or Port not found

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ connectMode()

ConnectModeRequest.Mode org.openkilda.floodlight.switchmanager.ISwitchManager.connectMode ( final ConnectModeRequest.Mode  mode)

Set connection mode.

Parameters
modethe mode to use, if not null
Returns
the connection mode after the set operation (if not null)

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ deleteAllNonDefaultRules()

List<Long> org.openkilda.floodlight.switchmanager.ISwitchManager.deleteAllNonDefaultRules ( DatapathId  dpid) throws SwitchOperationException

Deletes all non-default rules from the switch.

Parameters
dpiddatapath ID of the switch
Returns
the list of cookies for removed rules
Exceptions
SwitchOperationExceptionSwitch not found

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ deleteDefaultRules()

List<Long> org.openkilda.floodlight.switchmanager.ISwitchManager.deleteDefaultRules ( DatapathId  dpid) throws SwitchOperationException

Deletes the default rules (drop + verification) from the switch.

Parameters
dpiddatapath ID of the switch
Returns
the list of cookies for removed rules
Exceptions
SwitchOperationExceptionSwitch not found

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ deleteMeter()

long org.openkilda.floodlight.switchmanager.ISwitchManager.deleteMeter ( final DatapathId  dpid,
final long  meterId 
) throws SwitchOperationException

Deletes the meter from the switch OF_13.

Parameters
dpiddatapath ID of the switch
meterIdmeter identifier
Returns
transaction id
Exceptions
SwitchOperationExceptionSwitch not found

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ deleteRulesByCriteria()

List<Long> org.openkilda.floodlight.switchmanager.ISwitchManager.deleteRulesByCriteria ( DatapathId  dpid,
DeleteRulesCriteria...  criteria 
) throws SwitchOperationException

Delete rules that match the criteria.

Parameters
dpiddatapath ID of the switch
criteriathe list of delete criteria
Returns
the list of removed cookies
Exceptions
SwitchOperationExceptionSwitch not found

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ dumpFlowTable()

List<OFFlowStatsEntry> org.openkilda.floodlight.switchmanager.ISwitchManager.dumpFlowTable ( final DatapathId  dpid)

Returns list of installed flows.

Parameters
dpidswitch id
Returns
OF flow stats entries

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ dumpMeters()

OFMeterConfigStatsReply org.openkilda.floodlight.switchmanager.ISwitchManager.dumpMeters ( final DatapathId  dpid) throws SwitchOperationException

Returns list of installed meters.

Parameters
dpidswitch id
Returns
OF meter config stats entries
Exceptions
SwitchOperationExceptionSwitch not found

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ getAllSwitchMap()

Map<DatapathId, IOFSwitch> org.openkilda.floodlight.switchmanager.ISwitchManager.getAllSwitchMap ( )

◆ installDefaultRules()

void org.openkilda.floodlight.switchmanager.ISwitchManager.installDefaultRules ( final DatapathId  dpid) throws SwitchOperationException

Adds default rules to install verification rules and final drop rule. Essentially, it calls installDropFlow and installVerificationRule twice (ie isBroadcast)

Parameters
dpiddatapathId of switch
Exceptions
SwitchOperationExceptionin case of errors

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ installDropFlow()

void org.openkilda.floodlight.switchmanager.ISwitchManager.installDropFlow ( final DatapathId  dpid) throws SwitchOperationException

Installs the default drop rule.

Parameters
dpiddatapathId of switch
Exceptions
SwitchOperationExceptionin case of errors

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ installDropFlowCustom()

void org.openkilda.floodlight.switchmanager.ISwitchManager.installDropFlowCustom ( final DatapathId  dpid,
String  dstMac,
String  dstMask,
final long  cookie,
final int  priority 
) throws SwitchOperationException

Installs custom drop rule .. ie cookie, priority, match

Parameters
dpiddatapathId of switch
dstMacDestination Mac address to match on
dstMaskDestination Mask to match on
cookieCookie to use for this rule
priorityPriority of the rule

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ installEgressFlow()

long org.openkilda.floodlight.switchmanager.ISwitchManager.installEgressFlow ( final DatapathId  dpid,
final String  flowId,
final Long  cookie,
final int  inputPort,
final int  outputPort,
final int  transitVlanId,
final int  outputVlanId,
final OutputVlanType  outputVlanType 
) throws SwitchOperationException

Installs flow on egress swtich.

Parameters
dpiddatapathId of the switch
flowIdflow id
inputPortport to expect the packet on
outputPortport to forward the packet out
transitVlanIdvlan to match on the ingressPort
outputVlanIdset vlan on packet before forwarding via outputPort; 0 means not to set
outputVlanTypetype of action to apply to the outputVlanId if greater than 0
Returns
transaction id
Exceptions
SwitchOperationExceptionSwitch not found

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ installIngressFlow()

long org.openkilda.floodlight.switchmanager.ISwitchManager.installIngressFlow ( final DatapathId  dpid,
final String  flowId,
final Long  cookie,
final int  inputPort,
final int  outputPort,
final int  inputVlanId,
final int  transitVlanId,
final OutputVlanType  outputVlanType,
final long  meterId 
) throws SwitchOperationException

Installs an flow on ingress switch.

Parameters
dpiddatapathId of the switch
flowIdflow id
inputPortport to expect the packet on
outputPortport to forward the packet out
inputVlanIdinput vlan to match on, 0 means not to match on vlan
transitVlanIdvlan to add before outputing on outputPort
Returns
transaction id
Exceptions
SwitchOperationExceptionSwitch not found

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ installMeter()

long org.openkilda.floodlight.switchmanager.ISwitchManager.installMeter ( final DatapathId  dpid,
final long  bandwidth,
final long  burstSize,
final long  meterId 
) throws SwitchOperationException

Installs a meter on ingress switch OF_13. TODO: describe params meaning in accordance with OF

Parameters
dpiddatapath ID of the switch
bandwidththe bandwidth limit value
burstSizethe size of the burst
meterIdthe meter ID
Returns
transaction id
Exceptions
SwitchOperationExceptionSwitch not found

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ installOneSwitchFlow()

long org.openkilda.floodlight.switchmanager.ISwitchManager.installOneSwitchFlow ( final DatapathId  dpid,
final String  flowId,
final Long  cookie,
final int  inputPort,
final int  outputPort,
int  inputVlanId,
int  outputVlanId,
final OutputVlanType  outputVlanType,
final long  meterId 
) throws SwitchOperationException

Installs flow through one switch.

Parameters
dpiddatapathId of the switch
flowIdflow id
inputPortport to expect packet on
outputPortport to forward packet out
inputVlanIdvlan to match on inputPort
outputVlanIdset vlan on packet before forwarding via outputPort; 0 means not to set
outputVlanTypetype of action to apply to the outputVlanId if greater than 0
Returns
transaction id
Exceptions
SwitchOperationExceptionSwitch not found

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ installTransitFlow()

long org.openkilda.floodlight.switchmanager.ISwitchManager.installTransitFlow ( final DatapathId  dpid,
final String  flowId,
final Long  cookie,
final int  inputPort,
final int  outputPort,
final int  transitVlanId 
) throws SwitchOperationException

Installs flow on a transit switch.

Parameters
dpiddatapathId of the switch
flowIdflow id
inputPortport to expect packet on
outputPortport to forward packet out
transitVlanIdvlan to match on inputPort
Returns
transaction id
Exceptions
SwitchOperationExceptionSwitch not found

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ installVerificationRule()

void org.openkilda.floodlight.switchmanager.ISwitchManager.installVerificationRule ( final DatapathId  dpid,
final boolean  isBroadcast 
) throws SwitchOperationException

Installs the default verification rule, if it is allowed. One case where it isn't - if the switch is an OpenFlow 1.2 switch and isBroadcast = false. In that scenario, nothing happens.

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ safeModeTick()

void org.openkilda.floodlight.switchmanager.ISwitchManager.safeModeTick ( )

◆ sendPortUpEvents()

void org.openkilda.floodlight.switchmanager.ISwitchManager.sendPortUpEvents ( final IOFSwitch  sw) throws SwitchOperationException

◆ sendSwitchActivate()

void org.openkilda.floodlight.switchmanager.ISwitchManager.sendSwitchActivate ( final IOFSwitch  sw) throws SwitchOperationException

◆ startSafeMode()

void org.openkilda.floodlight.switchmanager.ISwitchManager.startSafeMode ( final DatapathId  dpid) throws SwitchOperationException

Safely install default rules - ie monitor traffic.

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

◆ stopSafeMode()

void org.openkilda.floodlight.switchmanager.ISwitchManager.stopSafeMode ( final DatapathId  dpid)

Stop the safe install .. switch is deactivated or removed.

Implemented in org.openkilda.floodlight.switchmanager.SwitchManager.

Member Data Documentation

◆ DROP_RULE_COOKIE

long org.openkilda.floodlight.switchmanager.ISwitchManager.DROP_RULE_COOKIE = 0x8000000000000001L

Definition at line 35 of file ISwitchManager.java.

◆ OVS_MANUFACTURER

String org.openkilda.floodlight.switchmanager.ISwitchManager.OVS_MANUFACTURER = "Nicira, Inc."

OVS software switch manufacturer constant value.

Definition at line 34 of file ISwitchManager.java.

◆ VERIFICATION_BROADCAST_RULE_COOKIE

long org.openkilda.floodlight.switchmanager.ISwitchManager.VERIFICATION_BROADCAST_RULE_COOKIE = 0x8000000000000002L

Definition at line 36 of file ISwitchManager.java.

◆ VERIFICATION_UNICAST_RULE_COOKIE

long org.openkilda.floodlight.switchmanager.ISwitchManager.VERIFICATION_UNICAST_RULE_COOKIE = 0x8000000000000003L

Definition at line 37 of file ISwitchManager.java.


The documentation for this interface was generated from the following file: