IOFSwitch.SwitchType| Modifier and Type | Field and Description |
|---|---|
private int |
actions |
private java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> |
attributes |
private int |
buffers |
private int |
capabilities |
private Connection |
conn |
private java.util.Date |
connectedSince |
private long |
datapathId |
private org.openflow.protocol.statistics.OFDescriptionStatistics |
description |
private static java.lang.String |
HA_CHECK_SWITCH |
private java.util.concurrent.ConcurrentMap<java.lang.Short,java.lang.Long> |
portBroadcastCacheHitMap |
private java.lang.Object |
portLock |
private java.util.concurrent.ConcurrentHashMap<java.lang.String,org.openflow.protocol.OFPhysicalPort> |
portsByName |
private java.util.concurrent.ConcurrentHashMap<java.lang.Short,org.openflow.protocol.OFPhysicalPort> |
portsByNumber |
private java.util.concurrent.ConcurrentHashMap<java.lang.Integer,java.lang.Object> |
responsesCache
This field is used to exchange information with switch.
|
private IOFHandler.Role |
role |
private java.lang.String |
stringId |
private byte |
tables |
private TimedCache<java.lang.Long> |
timedCache |
private java.util.concurrent.atomic.AtomicInteger |
transactionIdSource |
PROP_FASTWILDCARDS, PROP_REQUIRES_L3_MATCH, PROP_SUPPORTS_NETMASK_TBL, PROP_SUPPORTS_OFPP_FLOOD, PROP_SUPPORTS_OFPP_TABLE, SWITCH_DESCRIPTION_DATA, SWITCH_DESCRIPTION_FUTURE, SWITCH_IS_CORE_SWITCH, SWITCH_SUPPORTS_NX_ROLE| Constructor and Description |
|---|
OFSwitchImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
clearAllFlowMods()
Clear all flowmods on this switch
|
void |
deletePort(short portNumber)
Delete a port for the switch.
|
void |
deletePort(java.lang.String portName)
Delete a port for the switch.
|
void |
deliverFeaturesReply(int xid,
org.openflow.protocol.OFFeaturesReply reply)
Deliver a feature reply from switch to IOFSwitch object.
|
void |
deliverSwitchStatistics(int xid,
java.util.List<org.openflow.protocol.statistics.OFStatistics> m)
deliver an switch statistics from switch to IOFSwitch object.
|
int |
getActions()
Returns switch features from features Reply
|
java.lang.Object |
getAttribute(java.lang.String name)
Set properties for switch specific behavior
|
java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> |
getAttributes()
Retrieves attributes of this switch
|
int |
getBuffers()
Returns switch features from features Reply
|
int |
getCapabilities()
Returns switch features from features Reply
|
java.util.Date |
getConnectedSince()
Retrieves the date the switch connected to this controller
|
Connection |
getConnection() |
org.openflow.protocol.statistics.OFDescriptionStatistics |
getDescription()
Get the OFDescriptionStatistics object.
|
java.util.Collection<java.lang.Short> |
getEnabledPortNumbers()
Get list of the port numbers of all enabled ports.
|
java.util.Collection<org.openflow.protocol.OFPhysicalPort> |
getEnabledPorts()
Get list of all enabled ports.
|
org.openflow.protocol.OFFeaturesReply |
getFeaturesReply()
query FEATURE_REPLY to the switch.
|
long |
getId()
Get the datapathId of the switch
|
java.net.SocketAddress |
getInetAddress() |
int |
getNextTransactionId()
Returns the next available transaction id
|
org.openflow.protocol.OFPhysicalPort |
getPort(short portNumber)
Retrieve the port object by the port number.
|
org.openflow.protocol.OFPhysicalPort |
getPort(java.lang.String portName)
Retrieve the port object by the port name.
|
java.util.Map<java.lang.Short,java.lang.Long> |
getPortBroadcastHits()
Get the portBroadcastCacheHits
|
java.util.Collection<org.openflow.protocol.OFPhysicalPort> |
getPorts()
Get list of all ports.
|
IOFHandler.Role |
getRole()
Get the current role of the controller for the switch
|
java.lang.String |
getStringId()
Get a string version of the ID for this switch
|
java.util.List<org.openflow.protocol.statistics.OFStatistics> |
getSwitchStatistics(org.openflow.protocol.OFStatisticsRequest req)
Modules that use IOFSwitch objects use this method to request statistics
to the switch.
|
byte |
getTables()
Returns switch features from features Reply
|
boolean |
hasAttribute(java.lang.String name)
Checks if a specific switch property exists for this switch
|
boolean |
isActive()
Check if the controller is an active controller for the switch.
|
boolean |
isConnected()
Check if the switch is still connected;
Only call while holding processMessageLock
|
boolean |
portEnabled(org.openflow.protocol.OFPhysicalPort port) |
boolean |
portEnabled(short portNumber) |
boolean |
portEnabled(java.lang.String portName) |
java.lang.Object |
removeAttribute(java.lang.String name)
Set properties for switch specific behavior
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Set properties for switch specific behavior
|
void |
setConnection(Connection conn) |
void |
setFeaturesReply(org.openflow.protocol.OFFeaturesReply featuresReply)
Set the OFFeaturesReply message returned by the switch during initial
handshake.
|
void |
setPort(org.openflow.protocol.OFPhysicalPort port)
Add or modify a switch port.
|
void |
setSwitchProperties(org.openflow.protocol.statistics.OFDescriptionStatistics description)
Set the SwitchProperties based on it's description
|
java.lang.String |
toString() |
boolean |
updateBroadcastCache(java.lang.Long entry,
java.lang.Short port)
Update broadcast cache
|
private static final java.lang.String HA_CHECK_SWITCH
private java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> attributes
private java.util.Date connectedSince
private Connection conn
private java.lang.String stringId
private org.openflow.protocol.statistics.OFDescriptionStatistics description
private java.util.concurrent.atomic.AtomicInteger transactionIdSource
private java.lang.Object portLock
private java.util.concurrent.ConcurrentHashMap<java.lang.Short,org.openflow.protocol.OFPhysicalPort> portsByNumber
private java.util.concurrent.ConcurrentHashMap<java.lang.String,org.openflow.protocol.OFPhysicalPort> portsByName
private java.util.concurrent.ConcurrentHashMap<java.lang.Integer,java.lang.Object> responsesCache
private IOFHandler.Role role
private TimedCache<java.lang.Long> timedCache
private java.util.concurrent.ConcurrentMap<java.lang.Short,java.lang.Long> portBroadcastCacheHitMap
private int capabilities
private int buffers
private int actions
private byte tables
private long datapathId
public void setConnection(Connection conn)
setConnection in interface IOFSwitchpublic Connection getConnection()
getConnection in interface IOFSwitchpublic java.lang.Object getAttribute(java.lang.String name)
IOFSwitchgetAttribute in interface IOFSwitchname - name of propertypublic void setAttribute(java.lang.String name,
java.lang.Object value)
IOFSwitchsetAttribute in interface IOFSwitchname - name of propertyvalue - value for namepublic java.lang.Object removeAttribute(java.lang.String name)
IOFSwitchremoveAttribute in interface IOFSwitchname - name of propertypublic boolean hasAttribute(java.lang.String name)
IOFSwitchhasAttribute in interface IOFSwitchname - name of propertypublic void setFeaturesReply(org.openflow.protocol.OFFeaturesReply featuresReply)
IOFSwitchsetFeaturesReply in interface IOFSwitchpublic java.util.Collection<org.openflow.protocol.OFPhysicalPort> getEnabledPorts()
IOFSwitchgetEnabledPorts in interface IOFSwitchpublic java.util.Collection<java.lang.Short> getEnabledPortNumbers()
IOFSwitchgetEnabledPortNumbers in interface IOFSwitchpublic org.openflow.protocol.OFPhysicalPort getPort(short portNumber)
IOFSwitchpublic org.openflow.protocol.OFPhysicalPort getPort(java.lang.String portName)
IOFSwitchpublic void setPort(org.openflow.protocol.OFPhysicalPort port)
IOFSwitchpublic java.util.Collection<org.openflow.protocol.OFPhysicalPort> getPorts()
IOFSwitchpublic void deletePort(short portNumber)
IOFSwitchdeletePort in interface IOFSwitchpublic void deletePort(java.lang.String portName)
IOFSwitchdeletePort in interface IOFSwitchpublic boolean portEnabled(short portNumber)
portEnabled in interface IOFSwitchpublic boolean portEnabled(java.lang.String portName)
portEnabled in interface IOFSwitchpublic boolean portEnabled(org.openflow.protocol.OFPhysicalPort port)
portEnabled in interface IOFSwitchpublic long getId()
IOFSwitchpublic java.lang.String getStringId()
IOFSwitchgetStringId in interface IOFSwitchpublic org.openflow.protocol.statistics.OFDescriptionStatistics getDescription()
IOFSwitchgetDescription in interface IOFSwitchpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.concurrent.ConcurrentMap<java.lang.Object,java.lang.Object> getAttributes()
IOFSwitchgetAttributes in interface IOFSwitchpublic java.util.Date getConnectedSince()
IOFSwitchgetConnectedSince in interface IOFSwitchpublic int getNextTransactionId()
IOFSwitchgetNextTransactionId in interface IOFSwitchpublic boolean isConnected()
IOFSwitchisConnected in interface IOFSwitchpublic IOFHandler.Role getRole()
IOFSwitchpublic boolean isActive()
IOFSwitchpublic void setSwitchProperties(org.openflow.protocol.statistics.OFDescriptionStatistics description)
IOFSwitchsetSwitchProperties in interface IOFSwitchpublic boolean clearAllFlowMods()
IOFSwitchclearAllFlowMods in interface IOFSwitchpublic java.util.Map<java.lang.Short,java.lang.Long> getPortBroadcastHits()
IOFSwitchgetPortBroadcastHits in interface IOFSwitchpublic java.net.SocketAddress getInetAddress()
public int getBuffers()
IOFSwitchgetBuffers in interface IOFSwitchpublic int getActions()
IOFSwitchgetActions in interface IOFSwitchpublic int getCapabilities()
IOFSwitchgetCapabilities in interface IOFSwitchpublic byte getTables()
IOFSwitchpublic boolean updateBroadcastCache(java.lang.Long entry,
java.lang.Short port)
IOFSwitchupdateBroadcastCache in interface IOFSwitchpublic java.util.List<org.openflow.protocol.statistics.OFStatistics> getSwitchStatistics(org.openflow.protocol.OFStatisticsRequest req)
getSwitchStatistics in interface IOFSwitchreq - OFStatisticsRequest object.public void deliverSwitchStatistics(int xid,
java.util.List<org.openflow.protocol.statistics.OFStatistics> m)
IOFSwitchdeliverSwitchStatistics in interface IOFSwitchm - OFStatistics objectspublic org.openflow.protocol.OFFeaturesReply getFeaturesReply()
IOFSwitchgetFeaturesReply in interface IOFSwitchpublic void deliverFeaturesReply(int xid,
org.openflow.protocol.OFFeaturesReply reply)
IOFSwitchdeliverFeaturesReply in interface IOFSwitch