![]() |
Open Kilda Java Documentation
|
Public Member Functions | |
Collection< Class<? extends IFloodlightService > > | getModuleServices () |
Map< Class<? extends IFloodlightService >, IFloodlightService > | getServiceImpls () |
Collection< Class<? extends IFloodlightService > > | getModuleDependencies () |
void | init (FloodlightModuleContext context) throws FloodlightModuleException |
void | startUp (FloodlightModuleContext context) throws FloodlightModuleException |
Command | receive (IOFSwitch sw, OFMessage msg, FloodlightContext cntx) |
String | getName () |
boolean | isCallbackOrderingPrereq (OFType type, String name) |
boolean | isCallbackOrderingPostreq (OFType type, String name) |
ConnectModeRequest.Mode | connectMode (final ConnectModeRequest.Mode mode) |
void | installDefaultRules (final DatapathId dpid) 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, 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, final int inputVlanId, final 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 |
Map< DatapathId, IOFSwitch > | getAllSwitchMap () |
long | deleteMeter (final DatapathId dpid, final long meterId) throws SwitchOperationException |
List< Long > | deleteAllNonDefaultRules (final DatapathId dpid) throws SwitchOperationException |
List< Long > | deleteRulesByCriteria (final DatapathId dpid, DeleteRulesCriteria... criteria) throws SwitchOperationException |
List< Long > | deleteDefaultRules (final DatapathId dpid) throws SwitchOperationException |
void | installVerificationRule (final DatapathId dpid, final boolean isBroadcast) throws SwitchOperationException |
void | installDropFlowCustom (final DatapathId dpid, String dstMac, String dstMask, final long cookie, final int priority) throws SwitchOperationException |
void | installDropFlow (final DatapathId dpid) throws SwitchOperationException |
void | startSafeMode (final DatapathId dpid) |
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 |
Static Public Attributes | |
static final long | FLOW_COOKIE_MASK = 0x7FFFFFFFFFFFFFFFL |
static final int | VERIFICATION_RULE_PRIORITY = FlowModUtils.PRIORITY_MAX - 1000 |
static final int | DEFAULT_RULE_PRIORITY = FlowModUtils.PRIORITY_HIGH |
Additional Inherited Members | |
![]() | |
String | OVS_MANUFACTURER = "Nicira, Inc." |
long | DROP_RULE_COOKIE = 0x8000000000000001L |
long | VERIFICATION_BROADCAST_RULE_COOKIE = 0x8000000000000002L |
long | VERIFICATION_UNICAST_RULE_COOKIE = 0x8000000000000003L |
Created by jonv on 29/3/17.
Definition at line 120 of file SwitchManager.java.
void org.openkilda.floodlight.switchmanager.SwitchManager.configurePort | ( | DatapathId | dpId, |
int | portNumber, | ||
Boolean | portAdminDown | ||
) | throws SwitchOperationException |
Configure switch port.
Configurations
dpId | datapath ID of the switch. |
portNumber | the port to configure. |
portAdminDown | the port status to be applied. |
SwitchOperationException | Switch not found or Port not found |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 1484 of file SwitchManager.java.
ConnectModeRequest.Mode org.openkilda.floodlight.switchmanager.SwitchManager.connectMode | ( | final ConnectModeRequest.Mode | mode | ) |
Set connection mode.
mode | the mode to use, if not null |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 290 of file SwitchManager.java.
List<Long> org.openkilda.floodlight.switchmanager.SwitchManager.deleteAllNonDefaultRules | ( | final DatapathId | dpid | ) | throws SwitchOperationException |
Deletes all non-default rules from the switch.
dpid | datapath ID of the switch |
SwitchOperationException | Switch not found |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 594 of file SwitchManager.java.
List<Long> org.openkilda.floodlight.switchmanager.SwitchManager.deleteDefaultRules | ( | final DatapathId | dpid | ) | throws SwitchOperationException |
Deletes the default rules (drop + verification) from the switch.
dpid | datapath ID of the switch |
SwitchOperationException | Switch not found |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 680 of file SwitchManager.java.
long org.openkilda.floodlight.switchmanager.SwitchManager.deleteMeter | ( | final DatapathId | dpid, |
final long | meterId | ||
) | throws SwitchOperationException |
Deletes the meter from the switch OF_13.
dpid | datapath ID of the switch |
meterId | meter identifier |
SwitchOperationException | Switch not found |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 571 of file SwitchManager.java.
List<Long> org.openkilda.floodlight.switchmanager.SwitchManager.deleteRulesByCriteria | ( | final DatapathId | dpid, |
DeleteRulesCriteria... | criteria | ||
) | throws SwitchOperationException |
Delete rules that match the criteria.
dpid | datapath ID of the switch |
criteria | the list of delete criteria |
SwitchOperationException | Switch not found |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 649 of file SwitchManager.java.
List<OFFlowStatsEntry> org.openkilda.floodlight.switchmanager.SwitchManager.dumpFlowTable | ( | final DatapathId | dpid | ) |
Returns list of installed flows.
dpid | switch id |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 467 of file SwitchManager.java.
OFMeterConfigStatsReply org.openkilda.floodlight.switchmanager.SwitchManager.dumpMeters | ( | final DatapathId | dpid | ) | throws SwitchOperationException |
Returns list of installed meters.
dpid | switch id |
SwitchOperationException | Switch not found |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 500 of file SwitchManager.java.
Map<DatapathId, IOFSwitch> org.openkilda.floodlight.switchmanager.SwitchManager.getAllSwitchMap | ( | ) |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 561 of file SwitchManager.java.
Collection<Class<? extends IFloodlightService> > org.openkilda.floodlight.switchmanager.SwitchManager.getModuleDependencies | ( | ) |
Definition at line 196 of file SwitchManager.java.
Collection<Class<? extends IFloodlightService> > org.openkilda.floodlight.switchmanager.SwitchManager.getModuleServices | ( | ) |
Definition at line 176 of file SwitchManager.java.
String org.openkilda.floodlight.switchmanager.SwitchManager.getName | ( | ) |
Definition at line 262 of file SwitchManager.java.
Map<Class<? extends IFloodlightService>, IFloodlightService> org.openkilda.floodlight.switchmanager.SwitchManager.getServiceImpls | ( | ) |
Definition at line 186 of file SwitchManager.java.
void org.openkilda.floodlight.switchmanager.SwitchManager.init | ( | FloodlightModuleContext | context | ) | throws FloodlightModuleException |
Definition at line 208 of file SwitchManager.java.
void org.openkilda.floodlight.switchmanager.SwitchManager.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)
dpid | datapathId of switch |
SwitchOperationException | in case of errors |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 301 of file SwitchManager.java.
void org.openkilda.floodlight.switchmanager.SwitchManager.installDropFlow | ( | final DatapathId | dpid | ) | throws SwitchOperationException |
Installs the default drop rule.
dpid | datapathId of switch |
SwitchOperationException | in case of errors |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 747 of file SwitchManager.java.
void org.openkilda.floodlight.switchmanager.SwitchManager.installDropFlowCustom | ( | final DatapathId | dpid, |
String | dstMac, | ||
String | dstMask, | ||
final long | cookie, | ||
final int | priority | ||
) | throws SwitchOperationException |
Installs custom drop rule .. ie cookie, priority, match
dpid | datapathId of switch |
dstMac | Destination Mac address to match on |
dstMask | Destination Mask to match on |
cookie | Cookie to use for this rule |
priority | Priority of the rule |
SwitchOperationException | switch operation exception |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 731 of file SwitchManager.java.
long org.openkilda.floodlight.switchmanager.SwitchManager.installEgressFlow | ( | final DatapathId | dpid, |
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.
dpid | datapathId of the switch |
flowId | flow id |
inputPort | port to expect the packet on |
outputPort | port to forward the packet out |
transitVlanId | vlan to match on the ingressPort |
outputVlanId | set vlan on packet before forwarding via outputPort; 0 means not to set |
outputVlanType | type of action to apply to the outputVlanId if greater than 0 |
SwitchOperationException | Switch not found |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 356 of file SwitchManager.java.
long org.openkilda.floodlight.switchmanager.SwitchManager.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.
dpid | datapathId of the switch |
flowId | flow id |
inputPort | port to expect the packet on |
outputPort | port to forward the packet out |
inputVlanId | input vlan to match on, 0 means not to match on vlan |
transitVlanId | vlan to add before outputing on outputPort |
SwitchOperationException | Switch not found |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 311 of file SwitchManager.java.
long org.openkilda.floodlight.switchmanager.SwitchManager.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
dpid | datapath ID of the switch |
bandwidth | the bandwidth limit value |
burstSize | the size of the burst |
meterId | the meter ID |
SwitchOperationException | Switch not found |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 531 of file SwitchManager.java.
long org.openkilda.floodlight.switchmanager.SwitchManager.installOneSwitchFlow | ( | final DatapathId | dpid, |
final String | flowId, | ||
final Long | cookie, | ||
final int | inputPort, | ||
final int | outputPort, | ||
final int | inputVlanId, | ||
final int | outputVlanId, | ||
final OutputVlanType | outputVlanType, | ||
final long | meterId | ||
) | throws SwitchOperationException |
Installs flow through one switch.
dpid | datapathId of the switch |
flowId | flow id |
inputPort | port to expect packet on |
outputPort | port to forward packet out |
inputVlanId | vlan to match on inputPort |
outputVlanId | set vlan on packet before forwarding via outputPort; 0 means not to set |
outputVlanType | type of action to apply to the outputVlanId if greater than 0 |
SwitchOperationException | Switch not found |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 416 of file SwitchManager.java.
long org.openkilda.floodlight.switchmanager.SwitchManager.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.
dpid | datapathId of the switch |
flowId | flow id |
inputPort | port to expect packet on |
outputPort | port to forward packet out |
transitVlanId | vlan to match on inputPort |
SwitchOperationException | Switch not found |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 388 of file SwitchManager.java.
void org.openkilda.floodlight.switchmanager.SwitchManager.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.
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 689 of file SwitchManager.java.
boolean org.openkilda.floodlight.switchmanager.SwitchManager.isCallbackOrderingPostreq | ( | OFType | type, |
String | name | ||
) |
Definition at line 281 of file SwitchManager.java.
boolean org.openkilda.floodlight.switchmanager.SwitchManager.isCallbackOrderingPrereq | ( | OFType | type, |
String | name | ||
) |
Definition at line 272 of file SwitchManager.java.
Command org.openkilda.floodlight.switchmanager.SwitchManager.receive | ( | IOFSwitch | sw, |
OFMessage | msg, | ||
FloodlightContext | cntx | ||
) |
Definition at line 244 of file SwitchManager.java.
void org.openkilda.floodlight.switchmanager.SwitchManager.safeModeTick | ( | ) |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 1357 of file SwitchManager.java.
void org.openkilda.floodlight.switchmanager.SwitchManager.sendPortUpEvents | ( | final IOFSwitch | sw | ) | throws SwitchOperationException |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 1470 of file SwitchManager.java.
void org.openkilda.floodlight.switchmanager.SwitchManager.sendSwitchActivate | ( | final IOFSwitch | sw | ) | throws SwitchOperationException |
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 1461 of file SwitchManager.java.
void org.openkilda.floodlight.switchmanager.SwitchManager.startSafeMode | ( | final DatapathId | dpid | ) |
Safely install default rules - ie monitor traffic.
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 1326 of file SwitchManager.java.
void org.openkilda.floodlight.switchmanager.SwitchManager.startUp | ( | FloodlightModuleContext | context | ) | throws FloodlightModuleException |
Definition at line 233 of file SwitchManager.java.
void org.openkilda.floodlight.switchmanager.SwitchManager.stopSafeMode | ( | final DatapathId | dpid | ) |
Stop the safe install .. switch is deactivated or removed.
Implements org.openkilda.floodlight.switchmanager.ISwitchManager.
Definition at line 1339 of file SwitchManager.java.
|
static |
Definition at line 132 of file SwitchManager.java.
|
static |
Make sure we clear the top bit .. that is for NON_SYSTEM_MASK. This mask is applied to Cookie IDs when creating a flow.
Definition at line 127 of file SwitchManager.java.
|
static |
Definition at line 131 of file SwitchManager.java.