|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IOFSwitch
Nested Class Summary | |
---|---|
static class |
IOFSwitch.OFPortType
|
static class |
IOFSwitch.PortChangeEvent
Describes a change of an open flow port |
static class |
IOFSwitch.PortChangeType
the type of change that happened to an open flow port |
Field Summary | |
---|---|
static java.lang.String |
PROP_REQUIRES_L3_MATCH
|
static java.lang.String |
PROP_SUPPORTS_NETMASK_TBL
|
static java.lang.String |
PROP_SUPPORTS_OFPP_FLOOD
|
static java.lang.String |
PROP_SUPPORTS_OFPP_TABLE
|
static java.lang.String |
SWITCH_DESCRIPTION_FUTURE
|
static java.lang.String |
SWITCH_IS_CORE_SWITCH
|
static java.lang.String |
SWITCH_SUPPORTS_NX_ROLE
|
Method Summary | |
---|---|
boolean |
attributeEquals(java.lang.String name,
java.lang.Object other)
Check if the given attribute is present and if so whether it is equal to "other" |
void |
cancelAllStatisticsReplies()
Cancel all statistics replies |
void |
cancelFeaturesReply(int transactionId)
|
void |
cancelStatisticsReply(int transactionId)
Cancel the statistics reply with the given transaction ID |
void |
clearAllFlowMods()
Clear all flowmods on this switch |
OrderedCollection<IOFSwitch.PortChangeEvent> |
comparePorts(java.util.Collection<ImmutablePort> ports)
Compute the changes that would be required to replace the old ports of this switch with the new ports |
void |
deliverOFFeaturesReply(OFMessage reply)
Deliver the featuresReply future reply |
void |
deliverStatisticsReply(OFStatisticsReply reply)
Deliver the statistics future reply |
void |
disconnectOutputStream()
|
void |
flush()
Flush all flows queued for this switch in the current thread. |
short |
getAccessFlowPriority()
Get the suggested priority to use when installing access flows in this switch. |
int |
getActions()
|
java.lang.Object |
getAttribute(java.lang.String name)
Set properties for switch specific behavior |
java.util.Map<java.lang.Object,java.lang.Object> |
getAttributes()
Retrieves attributes of this switch |
int |
getBuffers()
Returns switch features from features Reply |
int |
getCapabilities()
|
java.util.Date |
getConnectedSince()
Retrieves the date the switch connected to this controller |
short |
getCoreFlowPriority()
Get the suggested priority to use when installing core flows in this switch. |
OFDescriptionStatistics |
getDescriptionStatistics()
|
java.util.Collection<java.lang.Integer> |
getEnabledPortNumbers()
Get list of the port numbers of all enabled ports. |
java.util.Collection<ImmutablePort> |
getEnabledPorts()
Get list of all enabled ports. |
IFloodlightProviderService.Role |
getHARole()
Get the current role of the controller for the switch |
long |
getId()
Get the datapathId of the switch |
java.net.SocketAddress |
getInetAddress()
Get the IP Address for the switch |
int |
getNextTransactionId()
Returns the next available transaction id |
ImmutablePort |
getPort(int portNumber)
Retrieve the port object by the port number. |
ImmutablePort |
getPort(java.lang.String portName)
Retrieve the port object by the port name. |
java.util.Map<java.lang.Integer,java.lang.Long> |
getPortBroadcastHits()
Get the portBroadcastCacheHits |
java.util.Collection<ImmutablePort> |
getPorts()
Get list of all ports. |
IOFSwitch.OFPortType |
getPortType(int port_num)
Return the type of OFPort |
java.lang.String |
getStringId()
Get a string version of the ID for this switch |
byte |
getTables()
|
boolean |
hasAttribute(java.lang.String name)
Checks if a specific switch property exists for this switch |
boolean |
inputThrottled(OFMessage ofm)
Called when OFMessage enters pipeline. |
boolean |
isActive()
Check if the switch is active. |
boolean |
isConnected()
Check if the switch is connected to this controller. |
boolean |
isDriverHandshakeComplete()
Check if the sub-handshake for this switch driver has been completed. |
boolean |
isFastPort(int port_num)
Can the port be turned on without forming a new loop? |
boolean |
isOverloaded()
Return if the switch is currently overloaded. |
boolean |
isWriteThrottleEnabled()
Return whether write throttling is enabled on the switch |
boolean |
portEnabled(int portNumber)
|
boolean |
portEnabled(java.lang.String portName)
|
void |
processDriverHandshakeMessage(OFMessage m)
Pass the given OFMessage to the driver as part of this driver's sub-handshake. |
OrderedCollection<IOFSwitch.PortChangeEvent> |
processOFPortStatus(OFPortStatus ps)
Add or modify a switch port. |
java.util.concurrent.Future<java.util.List<OFStatistics>> |
queryStatistics(OFStatisticsRequest request)
Returns a Future object that can be used to retrieve the asynchronous OFStatisticsReply when it is available. |
java.util.concurrent.Future<OFFeaturesReply> |
querySwitchFeaturesReply()
Returns a Future object that can be used to retrieve the asynchronous OFStatisticsReply when it is available. |
java.lang.Object |
removeAttribute(java.lang.String name)
Set properties for switch specific behavior |
void |
sendStatsQuery(OFStatisticsRequest request,
int xid,
IOFMessageListener caller)
Send a flow statistics request to the switch. |
void |
setAccessFlowPriority(short prio)
Set the suggested priority to use when installing access flows in this switch. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Set properties for switch specific behavior |
void |
setChannel(org.jboss.netty.channel.Channel channel)
Set the netty Channel this switch instance is associated with Called immediately after instantiation |
void |
setConnected(boolean connected)
Set whether the switch is connected |
void |
setCoreFlowPriority(short prio)
Set the suggested priority to use when installing core flows in this switch. |
void |
setDebugCounterService(IDebugCounterService debugCounters)
Set debug counter service for per-switch counters Called immediately after instantiation |
void |
setFeaturesReply(OFFeaturesReply featuresReply)
Set the OFFeaturesReply message returned by the switch during initial handshake. |
void |
setFloodlightProvider(Controller controller)
Set IFloodlightProviderService for this switch instance Called immediately after instantiation |
void |
setHARole(IFloodlightProviderService.Role role)
Set switch's HA role to role. |
void |
setPortDescriptions(java.util.List<OFPortDescription> portDescriptions)
Set the OFFeaturesReply message returned by the switch during initial handshake. |
OrderedCollection<IOFSwitch.PortChangeEvent> |
setPorts(java.util.Collection<ImmutablePort> ports)
Replace the ports of this switch with the given ports. |
void |
setSwitchProperties(OFDescriptionStatistics description)
Set the SwitchProperties based on it's description |
void |
setTableFull(boolean isFull)
Set the flow table full flag in the switch |
void |
setThreadPoolService(IThreadPoolService threadPool)
Set IThreadPoolService for this switch instance Called immediately after instantiation |
void |
startDriverHandshake()
Start this switch driver's sub handshake. |
boolean |
updateBroadcastCache(java.lang.Long entry,
java.lang.Integer port)
Update broadcast cache |
void |
write(java.util.List<OFMessage> msglist,
FloodlightContext bc)
Writes the list of messages to the output stream, bypassing rate limiting. |
void |
write(OFMessage m,
FloodlightContext bc)
Writes to the OFMessage to the output stream, bypassing rate limiting. |
void |
writeThrottled(java.util.List<OFMessage> msglist,
FloodlightContext bc)
Writes the list of messages to the output stream, subject to rate limiting. |
void |
writeThrottled(OFMessage msg,
FloodlightContext cntx)
Write OFMessage to the output stream, subject to switch rate limiting. |
Field Detail |
---|
static final java.lang.String SWITCH_DESCRIPTION_FUTURE
static final java.lang.String SWITCH_SUPPORTS_NX_ROLE
static final java.lang.String SWITCH_IS_CORE_SWITCH
static final java.lang.String PROP_REQUIRES_L3_MATCH
static final java.lang.String PROP_SUPPORTS_OFPP_TABLE
static final java.lang.String PROP_SUPPORTS_OFPP_FLOOD
static final java.lang.String PROP_SUPPORTS_NETMASK_TBL
Method Detail |
---|
void setFloodlightProvider(Controller controller)
controller
- void setThreadPoolService(IThreadPoolService threadPool)
threadPool
- void setDebugCounterService(IDebugCounterService debugCounters) throws IDebugCounterService.CounterException
debugCounters
-
IDebugCounterService.CounterException
void setChannel(org.jboss.netty.channel.Channel channel)
channel
- boolean inputThrottled(OFMessage ofm)
ofm
-
boolean isOverloaded()
void writeThrottled(OFMessage msg, FloodlightContext cntx) throws java.io.IOException
msg
- cntx
-
java.io.IOException
void writeThrottled(java.util.List<OFMessage> msglist, FloodlightContext bc) throws java.io.IOException
msglist
- bc
-
java.io.IOException
void write(OFMessage m, FloodlightContext bc) throws java.io.IOException
m
- bc
-
java.io.IOException
void write(java.util.List<OFMessage> msglist, FloodlightContext bc) throws java.io.IOException
msglist
- bc
-
java.io.IOException
void disconnectOutputStream()
java.io.IOException
int getBuffers()
int getActions()
int getCapabilities()
byte getTables()
OFDescriptionStatistics getDescriptionStatistics()
void setFeaturesReply(OFFeaturesReply featuresReply)
featuresReply
- void setPortDescriptions(java.util.List<OFPortDescription> portDescriptions)
featuresReply
- java.util.Collection<ImmutablePort> getEnabledPorts()
java.util.Collection<java.lang.Integer> getEnabledPortNumbers()
ImmutablePort getPort(int portNumber)
portNumber
-
ImmutablePort getPort(java.lang.String portName)
portName
-
OrderedCollection<IOFSwitch.PortChangeEvent> processOFPortStatus(OFPortStatus ps)
ps
- the port status message
java.util.Collection<ImmutablePort> getPorts()
boolean portEnabled(int portNumber)
portNumber
-
boolean portEnabled(java.lang.String portName)
portNumber
-
OrderedCollection<IOFSwitch.PortChangeEvent> comparePorts(java.util.Collection<ImmutablePort> ports)
ports
- new ports to set
OrderedCollection<IOFSwitch.PortChangeEvent> setPorts(java.util.Collection<ImmutablePort> ports)
ports
- new ports to set
long getId()
java.lang.String getStringId()
java.net.SocketAddress getInetAddress()
java.util.Map<java.lang.Object,java.lang.Object> getAttributes()
java.util.Date getConnectedSince()
int getNextTransactionId()
java.util.concurrent.Future<java.util.List<OFStatistics>> queryStatistics(OFStatisticsRequest request) throws java.io.IOException
request
- statistics request
java.io.IOException
java.util.concurrent.Future<OFFeaturesReply> querySwitchFeaturesReply() throws java.io.IOException
request
- statistics request
java.io.IOException
void deliverOFFeaturesReply(OFMessage reply)
reply
- the reply to delivervoid cancelFeaturesReply(int transactionId)
boolean isConnected()
boolean isActive()
void setConnected(boolean connected)
connected
- whether the switch is connectedIFloodlightProviderService.Role getHARole()
void setHARole(IFloodlightProviderService.Role role)
role
- haRoleReplyReceived
- void deliverStatisticsReply(OFStatisticsReply reply)
reply
- the reply to delivervoid cancelStatisticsReply(int transactionId)
transactionId
- the transaction IDvoid cancelAllStatisticsReplies()
boolean hasAttribute(java.lang.String name)
name
- name of property
java.lang.Object getAttribute(java.lang.String name)
name
- name of property
boolean attributeEquals(java.lang.String name, java.lang.Object other)
name
- the name of the attribute to checkother
- the object to compare the attribute against.
void setAttribute(java.lang.String name, java.lang.Object value)
name
- name of propertyvalue
- value for namejava.lang.Object removeAttribute(java.lang.String name)
name
- name of property
void clearAllFlowMods()
boolean updateBroadcastCache(java.lang.Long entry, java.lang.Integer port)
data
-
java.util.Map<java.lang.Integer,java.lang.Long> getPortBroadcastHits()
void sendStatsQuery(OFStatisticsRequest request, int xid, IOFMessageListener caller) throws java.io.IOException
request
- flow statistics request messagexid
- transaction id, must be obtained by using the getXid() API.caller
- the caller of the API. receive() callback of this
caller would be called when the reply from the switch is received.
java.io.IOException
void flush()
void setSwitchProperties(OFDescriptionStatistics description)
description
- IOFSwitch.OFPortType getPortType(int port_num)
port_num
-
boolean isFastPort(int port_num)
port_num
-
boolean isWriteThrottleEnabled()
void setTableFull(boolean isFull)
void setAccessFlowPriority(short prio)
void setCoreFlowPriority(short prio)
short getAccessFlowPriority()
short getCoreFlowPriority()
void startDriverHandshake()
SwitchDriverSubHandshakeAlreadyStarted
- if the sub-handshake has
already been startedboolean isDriverHandshakeComplete()
SwitchDriverSubHandshakeNotStarted
- if startDriverHandshake() has
not been called yet.void processDriverHandshakeMessage(OFMessage m)
m
- The message that the driver should process
SwitchDriverSubHandshakeCompleted
- if isDriverHandshake() returns
false before this method call
SwitchDriverSubHandshakeNotStarted
- if startDriverHandshake() has
not been called yet.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |