public interface OpenFlowSwitchDriver extends OpenFlowSwitch, org.onosproject.net.driver.HandlerBehaviour
| Modifier and Type | Method and Description |
|---|---|
boolean |
activateEqualSwitch()
Activate this EQUAL switch-controller relationship in the OF agent.
|
boolean |
activateMasterSwitch()
Activate this MASTER switch-controller relationship in the OF agent.
|
boolean |
connectSwitch()
Announce to the OpenFlow agent that this switch has connected.
|
int |
getNextTransactionId()
Gets the next transaction id to use.
|
void |
handleNiciraRole(org.projectfloodlight.openflow.protocol.OFMessage m)
If this driver know of Nicira style role messages, these should
be handled here.
|
void |
handleRole(org.projectfloodlight.openflow.protocol.OFMessage m)
Handle OF 1.x (where x > 0) role messages.
|
boolean |
handleRoleError(org.projectfloodlight.openflow.protocol.OFErrorMsg error)
Handle the situation where the role request triggers an error.
|
void |
init(Dpid dpid,
org.projectfloodlight.openflow.protocol.OFDescStatsReply desc,
org.projectfloodlight.openflow.protocol.OFVersion ofv)
Initialises the behaviour.
|
boolean |
isDriverHandshakeComplete()
Checks whether the driver specific handshake is complete.
|
void |
processDriverHandshakeMessage(org.projectfloodlight.openflow.protocol.OFMessage m)
Process a message during the driver specific handshake.
|
void |
reassertRole()
Reasserts this controllers role to the switch.
|
void |
removeConnectedSwitch()
Remove this switch from the openflow agent.
|
void |
sendHandshakeMessage(org.projectfloodlight.openflow.protocol.OFMessage message)
Allows the handshaker behaviour to send messages during the
handshake phase only.
|
void |
sendRoleRequest(org.projectfloodlight.openflow.protocol.OFMessage message)
Sends only role request messages.
|
void |
setAgent(OpenFlowAgent agent)
Sets the OpenFlow agent to be used.
|
void |
setChannel(org.jboss.netty.channel.Channel channel)
Sets the associated Netty channel for this switch.
|
void |
setConnected(boolean connected)
Sets whether the switch is connected.
|
void |
setFeaturesReply(org.projectfloodlight.openflow.protocol.OFFeaturesReply featuresReply)
Sets the features reply for this switch.
|
void |
setMeterFeaturesReply(org.projectfloodlight.openflow.protocol.OFMeterFeaturesStatsReply meterFeaturesReply)
Sets the meter features reply for this switch.
|
void |
setOFVersion(org.projectfloodlight.openflow.protocol.OFVersion ofV)
Sets the OF version for this switch.
|
void |
setPortDescReplies(List<org.projectfloodlight.openflow.protocol.OFPortDescStatsReply> portDescReplies)
Sets the ports on this switch.
|
void |
setPortDescReply(org.projectfloodlight.openflow.protocol.OFPortDescStatsReply portDescReply)
Sets the ports on this switch.
|
void |
setRoleHandler(RoleHandler roleHandler)
Sets the Role handler object.
|
void |
setSwitchDescription(org.projectfloodlight.openflow.protocol.OFDescStatsReply desc)
Sets the switch description.
|
void |
setTableFull(boolean full)
Sets this switch has having a full flowtable.
|
void |
startDriverHandshake()
Starts the driver specific handshake process.
|
Boolean |
supportNxRole()
Does this switch support Nicira Role messages.
|
void |
transitionToEqualSwitch()
Transition this switch-controller relationship to an EQUAL state.
|
void |
transitionToMasterSwitch()
Transition this switch-controller relationship to an Master state.
|
channelId, datapathDescription, deviceType, disconnectSwitch, factory, getId, getPorts, getRole, getStringId, handleMessage, hardwareDescription, isConnected, manufacturerDescription, returnRoleReply, sendMsg, sendMsg, serialNumber, setRole, softwareDescriptionvoid setAgent(OpenFlowAgent agent)
agent - the agent to set.void setRoleHandler(RoleHandler roleHandler)
roleHandler - the roleHandler classvoid reassertRole()
boolean handleRoleError(org.projectfloodlight.openflow.protocol.OFErrorMsg error)
error - the error to handle.void handleNiciraRole(org.projectfloodlight.openflow.protocol.OFMessage m)
throws SwitchStateException
m - the role message to handle.SwitchStateException - if the message received was
not a nicira role or was malformed.void handleRole(org.projectfloodlight.openflow.protocol.OFMessage m)
throws SwitchStateException
m - the role message to handleSwitchStateException - if the message received was
not a nicira role or was malformed.boolean connectSwitch()
boolean activateMasterSwitch()
boolean activateEqualSwitch()
void transitionToEqualSwitch()
void transitionToMasterSwitch()
void removeConnectedSwitch()
void setPortDescReply(org.projectfloodlight.openflow.protocol.OFPortDescStatsReply portDescReply)
portDescReply - the port set and descriptionsvoid setPortDescReplies(List<org.projectfloodlight.openflow.protocol.OFPortDescStatsReply> portDescReplies)
portDescReplies - list of port set and descriptionsvoid setFeaturesReply(org.projectfloodlight.openflow.protocol.OFFeaturesReply featuresReply)
featuresReply - the features to set.void setMeterFeaturesReply(org.projectfloodlight.openflow.protocol.OFMeterFeaturesStatsReply meterFeaturesReply)
meterFeaturesReply - the meter features to set.void setSwitchDescription(org.projectfloodlight.openflow.protocol.OFDescStatsReply desc)
desc - the descriptionsint getNextTransactionId()
void setOFVersion(org.projectfloodlight.openflow.protocol.OFVersion ofV)
ofV - the version to set.void setTableFull(boolean full)
full - true if full, false otherswise.void setChannel(org.jboss.netty.channel.Channel channel)
channel - the Netty channelvoid setConnected(boolean connected)
connected - whether the switch is connectedvoid init(Dpid dpid, org.projectfloodlight.openflow.protocol.OFDescStatsReply desc, org.projectfloodlight.openflow.protocol.OFVersion ofv)
dpid - a dpiddesc - a switch descriptionofv - OpenFlow versionBoolean supportNxRole()
void startDriverHandshake()
boolean isDriverHandshakeComplete()
void processDriverHandshakeMessage(org.projectfloodlight.openflow.protocol.OFMessage m)
m - the message to process.void sendRoleRequest(org.projectfloodlight.openflow.protocol.OFMessage message)
message - a role request message.void sendHandshakeMessage(org.projectfloodlight.openflow.protocol.OFMessage message)
message - an OpenFlow message