Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.ConcurrentHashMap<java.lang.Long,IOFSwitch> |
OFController.switches
index to all switches.
|
Modifier and Type | Method and Description |
---|---|
IOFSwitch |
OFController.getSwitch(long id)
return a specific switch with a given identifier
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<IOFSwitch> |
OFController.getSwitches()
return the set of all switches
|
Modifier and Type | Method and Description |
---|---|
void |
OFController.addSwitch(long id,
IOFSwitch sw) |
Modifier and Type | Method and Description |
---|---|
private Entity |
OFMDeviceManager.getSourceEntityFromPacket(Ethernet eth,
IOFSwitch sw,
int ofPort)
Parses an entity from an
Ethernet packet. |
private boolean |
OFMDeviceManager.processPacketInMessage(IOFSwitch sw,
org.openflow.protocol.interfaces.OFPacketIn pi,
MessageContext cntx) |
Modifier and Type | Method and Description |
---|---|
protected RuleWildcardsPair |
OFMFirewall.matchWithRule(IOFSwitch sw,
org.openflow.protocol.interfaces.OFPacketIn pi,
MessageContext cntx)
Iterates over the firewall rules and tries to match them with the
incoming packet (flow).
|
private boolean |
OFMFirewall.processPacketInMessage(IOFSwitch sw,
org.openflow.protocol.interfaces.OFPacketIn pi,
IRoutingDecision decision,
MessageContext cntx)
Checks the incoming packet with the firewall policy and create
a decision to handle the packet.
|
Modifier and Type | Method and Description |
---|---|
void |
IFlowCacheService.deleteAllFlowsAtASourceSwitch(IOFSwitch sw)
Delete all flow from the specified switch
|
Modifier and Type | Method and Description |
---|---|
protected void |
Forwarding.doDropFlow(IOFSwitch sw,
org.openflow.protocol.interfaces.OFPacketIn pi,
IRoutingDecision decision,
MessageContext cntx)
Creates a
OFPacketOut with packetin that is dropped. |
protected void |
Forwarding.doFlood(IOFSwitch sw,
org.openflow.protocol.interfaces.OFPacketIn pi,
MessageContext cntx)
Creates a OFPacketOut with packetin that is flooded on all ports
unless the port is blocked, in which case the packet will be dropped.
|
protected void |
Forwarding.doForwardFlow(IOFSwitch sw,
org.openflow.protocol.interfaces.OFPacketIn pi,
MessageContext cntx,
boolean requestFlowRemovedNotifn)
Creates a OFPacketOut with packetin that is forwarded.
|
void |
ForwardingBase.pushPacket(Connection conn,
IPacket packet,
IOFSwitch sw,
int bufferId,
short inPort,
short outPort,
MessageContext cntx)
Pushes a packet-out to a switch.
|
protected org.openflow.protocol.interfaces.OFMatch |
ForwardingBase.wildcard(org.openflow.protocol.interfaces.OFMatch match,
IOFSwitch sw,
java.lang.Integer wildcard_hints)
Sets wildcards if wildcard_hints is null.
|
Modifier and Type | Field and Description |
---|---|
private IOFSwitch |
MacVlanPair.sw |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<IOFSwitch,java.util.Map<MacVlanPair,java.lang.Short>> |
OFMLearningMac13.macVlanToSwitchPortMap
Table to save learning result.
|
private java.util.Map<IOFSwitch,java.util.Map<MacVlanPair,java.lang.Short>> |
OFMLearningMac10.macVlanToSwitchPortMap
Table to save learning result.
|
private java.util.Map<IOFSwitch,java.util.Map<MacVlanPair,java.lang.Short>> |
OFMLearningMac.macVlanToSwitchPortMap
Table to save learning result.
|
Modifier and Type | Method and Description |
---|---|
IOFSwitch |
MacVlanPair.getSwitch()
Get the switch associated with the MAC address
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<IOFSwitch,java.util.Map<MacVlanPair,java.lang.Short>> |
OFMLearningMac13.getTable()
Get all the mappings between MAC/VLAN to switch port.
|
java.util.Map<IOFSwitch,java.util.Map<MacVlanPair,java.lang.Short>> |
OFMLearningMac10.getTable()
Get all the mappings between MAC/VLAN to switch port.
|
java.util.Map<IOFSwitch,java.util.Map<MacVlanPair,java.lang.Short>> |
OFMLearningMac.getTable()
Get all the mappings between MAC/VLAN to switch port.
|
Modifier and Type | Method and Description |
---|---|
protected void |
OFMLearningMac13.addToPortMap(IOFSwitch sw,
long mac,
short vlan,
short portVal)
Adds a host to the MAC/VLAN->SwitchPort mapping
|
protected void |
OFMLearningMac10.addToPortMap(IOFSwitch sw,
long mac,
short vlan,
short portVal)
Adds a host to the MAC/VLAN->SwitchPort mapping
|
protected void |
OFMLearningMac.addToPortMap(IOFSwitch sw,
long mac,
short vlan,
short portVal)
Adds a host to the MAC/VLAN->SwitchPort mapping
|
void |
OFMLearningMac13.clearLearnedTable(IOFSwitch sw)
Clears the MAC/VLAN -> SwitchPort map for a single switch
|
void |
OFMLearningMac10.clearLearnedTable(IOFSwitch sw)
Clears the MAC/VLAN -> SwitchPort map for a single switch
|
void |
OFMLearningMac.clearLearnedTable(IOFSwitch sw)
Clears the MAC/VLAN -> SwitchPort map for a single switch
|
java.lang.Short |
OFMLearningMac13.getFromPortMap(IOFSwitch sw,
long mac,
short vlan)
Get the port that a MAC/VLAN pair is associated with
|
java.lang.Short |
OFMLearningMac10.getFromPortMap(IOFSwitch sw,
long mac,
short vlan)
Get the port that a MAC/VLAN pair is associated with
|
java.lang.Short |
OFMLearningMac.getFromPortMap(IOFSwitch sw,
long mac,
short vlan)
Get the port that a MAC/VLAN pair is associated with
|
protected void |
OFMLearningMac13.removeFromPortMap(IOFSwitch sw,
long mac,
short vlan)
Removes a host from the MAC/VLAN->SwitchPort mapping
|
protected void |
OFMLearningMac10.removeFromPortMap(IOFSwitch sw,
long mac,
short vlan)
Removes a host from the MAC/VLAN->SwitchPort mapping
|
protected void |
OFMLearningMac.removeFromPortMap(IOFSwitch sw,
long mac,
short vlan)
Removes a host from the MAC/VLAN->SwitchPort mapping
|
private void |
OFMLearningMac.writeFlowMod(IOFSwitch sw,
org.openflow.protocol.interfaces.OFFlowModCommand command,
int bufferId,
org.openflow.protocol.interfaces.OFMatch match,
short outPort,
java.util.List<org.openflow.protocol.OFMessage> out)
Writes a OFFlowMod to a switch.
|
private void |
OFMLearningMac13.writeFlowMod(IOFSwitch sw,
short command,
int bufferId,
org.openflow.protocol.ver1_3.messages.OFMatchOxm matchOxm,
short outPort,
java.util.List<org.openflow.protocol.OFMessage> out)
Writes a OFFlowMod to a switch.
|
private void |
OFMLearningMac10.writeFlowMod(IOFSwitch sw,
short command,
int bufferId,
org.openflow.protocol.ver1_0.messages.OFMatch match,
short outPort,
java.util.List<org.openflow.protocol.OFMessage> out)
Writes a OFFlowMod to a switch.
|
private void |
OFMLearningMac13.writePacketOutForPacketIn(IOFSwitch sw,
org.openflow.protocol.ver1_3.messages.OFPacketIn packetInMessage,
int egressPort,
short getInputPort,
java.util.List<org.openflow.protocol.OFMessage> out)
Writes an OFPacketOut message to a switch.
|
private void |
OFMLearningMac.writePacketOutForPacketIn(IOFSwitch sw,
org.openflow.protocol.interfaces.OFPacketIn packetInMessage,
org.openflow.protocol.OFPort egressPort,
short getInputPort,
java.util.List<org.openflow.protocol.OFMessage> out)
Writes an OFPacketOut message to a switch.
|
private void |
OFMLearningMac10.writePacketOutForPacketIn(IOFSwitch sw,
org.openflow.protocol.ver1_0.messages.OFPacketIn packetInMessage,
short egressPort,
java.util.List<org.openflow.protocol.OFMessage> out)
Writes an OFPacketOut message to a switch.
|
Constructor and Description |
---|
MacVlanPair(java.lang.Long mac,
java.lang.Short vlan,
IOFSwitch sw)
Constructor to create the MacVlanPair object.
|
Modifier and Type | Method and Description |
---|---|
private void |
OFMLinkDiscovery.generateSwitchPortStatusUpdate(IOFSwitch sw,
short port) |
private boolean |
OFMLinkDiscovery.handleLldp(LLDP lldp,
IOFSwitch sw,
org.openflow.protocol.interfaces.OFPacketIn pi,
boolean isStandard,
java.util.List<org.openflow.protocol.OFMessage> outgoing)
From the LLDP packet received, this method first extract following information:
remote switch information
controller id (if this message is created by a controller)
direction of the message
The business logic of this method are as follows:
if the message is a standard LLDP which is not created by this controller, then drop it.
|
private boolean |
OFMLinkDiscovery.handlePacketIn(IOFSwitch sw,
MessageContext context,
org.openflow.protocol.interfaces.OFPacketIn pi,
java.util.List<org.openflow.protocol.OFMessage> outgoing)
This method handles a PACKET_IN message as follows:
First, decapsulate the Ethernet part of the PACKET_IN payload.
|
private boolean |
OFMLinkDiscovery.handlePortStatus(IOFSwitch sw,
MessageContext context,
org.openflow.protocol.interfaces.OFPortStatus ps,
java.util.List<org.openflow.protocol.OFMessage> outgoing)
Handle PORT_STATUS message.
|
private void |
OFMLinkDiscovery.processNewPort(IOFSwitch sw,
int portnum)
Process a new port.
|
private boolean |
OFMLinkDiscovery.sendDiscoveryMessage(IOFSwitch sw,
int port,
boolean isStandard,
boolean isReverse)
Send link discovery message out of a given switch port.
|
Constructor and Description |
---|
OFMLinkDiscovery.Disconnection(IOFSwitch sw) |
Modifier and Type | Method and Description |
---|---|
void |
OFMTopologyManager.doMultiActionPacketOut(byte[] packetData,
IOFSwitch sw,
java.util.Set<java.lang.Integer> ports)
TODO This method must be moved to a layer below forwarding
so that anyone can use it.
|
private boolean |
OFMTopologyManager.processPacketInMessage(IOFSwitch sw,
org.openflow.protocol.interfaces.OFPacketIn pi,
MessageContext context,
java.util.List<org.openflow.protocol.OFMessage> outgoing)
From the OFPacketIn message received, this method performs following procedures.
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<IOFSwitch,java.util.Map<java.lang.Integer,PortInformation>> |
OFProtocol.portInformations
Port Number to PortInformation map.
|
private java.util.Map<IOFSwitch,java.util.Map<java.lang.String,PortInformation>> |
OFProtocol.portInformationsByName
Switch to
|
private java.util.Map<IOFSwitch,java.util.Map<java.lang.Integer,java.lang.Object>> |
OFProtocol.responsesCache
This field is used to exchange information with switch.
|
private java.util.Map<IOFSwitch,SwitchInformation> |
OFProtocol.switchInformations
IOFSwitch to SwitchInformation map.
|
Modifier and Type | Method and Description |
---|---|
private PortInformation |
OFProtocol.createPortInformation(IOFSwitch sw,
int port) |
void |
OFProtocol.deletePort(IOFSwitch sw,
int portNumber)
Delete port information by the number
|
private void |
OFProtocol.deliverFeaturesReply(IOFSwitch sw,
int xid,
org.openflow.protocol.interfaces.OFFeaturesReply reply) |
private void |
OFProtocol.deliverSwitchStatistics(IOFSwitch sw,
org.openflow.protocol.interfaces.OFStatisticsReply m) |
org.openflow.protocol.interfaces.OFStatisticsDescReply |
OFProtocol.getDescription(IOFSwitch sw)
Get switch description as a OFStatisticsDescReply form
|
java.util.Collection<java.lang.Integer> |
OFProtocol.getEnabledPortNumbers(IOFSwitch sw)
Get all the enabled port numbers
|
java.util.Collection<org.openflow.protocol.interfaces.OFPortDesc> |
OFProtocol.getEnabledPorts(IOFSwitch sw)
Get all the enabled ports
|
org.openflow.protocol.interfaces.OFFeaturesReply |
OFProtocol.getFeaturesReply(IOFSwitch sw)
Get OFFeaturesReply for the given switch.
|
org.openflow.protocol.interfaces.OFPortDesc |
OFProtocol.getPort(IOFSwitch sw,
int portNum)
Get port description as an OFPortDesc object
|
PortInformation |
OFProtocol.getPortInformation(IOFSwitch sw,
int port)
Get port information by the port number.
|
PortInformation |
OFProtocol.getPortInformationByName(IOFSwitch sw,
java.lang.String name)
This method should be called after port number is correctly set up.
|
java.util.Collection<PortInformation> |
OFProtocol.getPortInformations(IOFSwitch sw)
Get all PortInformation objects for the given switch
|
java.util.Collection<org.openflow.protocol.interfaces.OFPortDesc> |
OFProtocol.getPorts(IOFSwitch sw)
Get all port information as a collection of OFPortDesc objects
|
java.lang.Object |
OFProtocol.getResponseCacheItem(IOFSwitch sw,
int xid)
This method is used with two other companion methods: setResponseCacheItem and removeResponseCacheItem.
|
SwitchInformation |
OFProtocol.getSwitchInformation(IOFSwitch sw)
Get switch information
|
java.util.List<org.openflow.protocol.interfaces.OFStatisticsReply> |
OFProtocol.getSwitchStatistics(IOFSwitch sw,
org.openflow.protocol.interfaces.OFStatisticsRequest req)
Modules that use IOFSwitch objects use this method to request statistics to the switch.
|
org.openflow.protocol.interfaces.OFMatch |
OFProtocol.loadOFMatchFromPacket(IOFSwitch sw,
byte[] packetData,
short inputPort)
Create an OFMatch object from the packet-in data.
|
org.openflow.protocol.interfaces.OFMatch |
OFProtocol.loadOFMatchFromString(IOFSwitch sw,
java.lang.String match)
Set this OFMatch's parameters based on a comma-separated key=value pair
dpctl-style string, e.g., from the output of OFMatch.toString()
Supported keys/values include KEY(s) VALUE "in_port","input_port" integer "dl_src","eth_src", "dl_dst","eth_dst" hex-string "dl_type", "dl_vlan", "dl_vlan_pcp" integer "nw_src", "nw_dst", "ip_src", "ip_dst" CIDR-style netmask "tp_src","tp_dst" integer (max 64k) The CIDR-style netmasks assume 32 netmask if none given, so: "128.8.128.118/32" is the same as "128.8.128.118" |
boolean |
OFProtocol.portEnabled(IOFSwitch sw,
short port)
Check if a given port is enabled
|
void |
OFProtocol.removePortInformation(IOFSwitch sw,
PortInformation pi)
Remove a specific port information from the switch
|
void |
OFProtocol.removeResponseCacheItem(IOFSwitch sw,
int xid)
This method is used with two other companion methods: setResponseCacheItem and getResponseCacheItem.
|
void |
OFProtocol.setDescription(IOFSwitch sw,
org.openflow.protocol.interfaces.OFStatisticsDescReply r)
Modify switch description using OFStatisticsDescReply object
|
void |
OFProtocol.setPort(IOFSwitch sw,
org.openflow.protocol.interfaces.OFPortDesc portDesc)
Set port information using OFPortDesc object
|
void |
OFProtocol.setPortInformationByName(IOFSwitch sw,
java.lang.String name,
PortInformation pi)
Set the port information
|
void |
OFProtocol.setResponseCacheItem(IOFSwitch sw,
int xid,
java.lang.Object item)
This method is used with two other companion methods: getResponseCacheItem and removeResponseCacheItem.
|
Modifier and Type | Class and Description |
---|---|
class |
OFSwitchImpl
This is the internal representation of an openflow switch.
|
Modifier and Type | Field and Description |
---|---|
private IOFSwitch |
Connection.sw |
Modifier and Type | Method and Description |
---|---|
IOFSwitch |
Connection.getSwitch() |
IOFSwitch |
IOFHandler.getSwitch(long id) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<IOFSwitch> |
IOFHandler.getSwitches() |
Modifier and Type | Method and Description |
---|---|
void |
IOFHandler.addSwitch(long id,
IOFSwitch sw) |
void |
Connection.setSwitch(IOFSwitch sw) |
Modifier and Type | Field and Description |
---|---|
(package private) IOFSwitch |
OFMessageDamper.DamperEntry.sw |
Constructor and Description |
---|
OFMessageDamper.DamperEntry(org.openflow.protocol.OFMessage msg,
IOFSwitch sw) |