Documentation
¶
Overview ¶
Copyright 2014 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
#nosec G404: random number generator not used for security purposes
Copyright 2014 Cisco Systems Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func DialUnixOrNamedPipe(address string) (net.Conn, error)
- func GenerateICMPHeader(icmpType, icmpCode *uint8) *protocol.ICMP
- func GenerateTCPHeader(dstPort, srcPort uint16, flags *uint8) *protocol.TCP
- func GetErrorMessage(errType, errCode uint16, vendor uint32) string
- func GetErrorMessageType(errData util.Buffer) string
- func GetUint32ValueWithRange(data uint32, rng *openflow15.NXRange) uint32
- func GetUint32ValueWithRangeFromBytes(data []byte, rng *openflow15.NXRange) (uint32, error)
- func GetUint64ValueWithRange(data uint64, rng *openflow15.NXRange) uint64
- func GetUint64ValueWithRangeFromBytes(data []byte, rng *openflow15.NXRange) (uint64, error)
- func NewTunnelIpv6DstField(tunnelIpDst net.IP, tunnelIpDstMask *net.IP) *openflow15.MatchField
- func NewTunnelIpv6SrcField(tunnelIpSrc net.IP, tunnelIpSrcMask *net.IP) *openflow15.MatchField
- func ResetFieldLength(field *openflow15.MatchField, tlvMapStatus *TLVTableStatus) *openflow15.MatchField
- type AppInterface
- type CTStatesChecker
- func (s *CTStatesChecker) IsDNAT() bool
- func (s *CTStatesChecker) IsEst() bool
- func (s *CTStatesChecker) IsInv() bool
- func (s *CTStatesChecker) IsNew() bool
- func (s *CTStatesChecker) IsRel() bool
- func (s *CTStatesChecker) IsRpl() bool
- func (s *CTStatesChecker) IsSNAT() bool
- func (s *CTStatesChecker) IsTrk() bool
- func (s *CTStatesChecker) IsUnDNAT() bool
- func (s *CTStatesChecker) IsUnEst() bool
- func (s *CTStatesChecker) IsUnInv() bool
- func (s *CTStatesChecker) IsUnNew() bool
- func (s *CTStatesChecker) IsUnRel() bool
- func (s *CTStatesChecker) IsUnRpl() bool
- func (s *CTStatesChecker) IsUnSNAT() bool
- func (s *CTStatesChecker) IsUnTrk() bool
- type ConnectionMode
- type ConnectionRetryControl
- type Controller
- type CopyFieldAction
- func (a *CopyFieldAction) GetActionMessage() openflow15.Action
- func (a *CopyFieldAction) GetActionType() string
- func (a *CopyFieldAction) ResetDstFieldLength(ofSwitch *OFSwitch)
- func (a *CopyFieldAction) ResetFieldsLength(ofSwitch *OFSwitch)
- func (a *CopyFieldAction) ResetSrcFieldLength(ofSwitch *OFSwitch)
- type DataWithMask
- type DecTTLAction
- type EmptyElem
- type FgraphElem
- type Flood
- func (self *Flood) AddOutput(out *Output) error
- func (self *Flood) AddTunnelOutput(out *Output, tunnelId uint64) error
- func (self *Flood) Delete() error
- func (self *Flood) GetFlowInstr() openflow15.Instruction
- func (self *Flood) NumOutput() int
- func (self *Flood) RemoveOutput(out *Output) error
- func (self *Flood) Type() string
- type FloodOutput
- type Flow
- func (self *Flow) AddConjunction(conjID uint32, clause uint8, nClause uint8) error
- func (self *Flow) ApplyAction(action OFAction)
- func (self *Flow) ApplyActions(actions []OFAction)
- func (self *Flow) ClearActions()
- func (self *Flow) ConnTrack(commit bool, force bool, tableID *uint8, zoneID *uint16, ...) error
- func (self *Flow) Controller(reason uint8) error
- func (self *Flow) CopyActionsToNewFlow(newFlow *Flow)
- func (self *Flow) CopyField(nBits uint16, srcOffset uint16, dstOffset uint16, srcOxmId *openflow15.OxmId, ...) error
- func (self *Flow) DecTTL() error
- func (self *Flow) DelConjunction(conjID uint32) error
- func (self *Flow) Delete() error
- func (self *Flow) Drop()
- func (self *Flow) GenerateFlowModMessage(commandType int) (flowMod *openflow15.FlowMod, err error)
- func (self *Flow) GetBundleMessage(command int) (*FlowBundleMessage, error)
- func (self *Flow) GetFlowInstr() openflow15.Instruction
- func (self *Flow) Goto(tableID uint8)
- func (self *Flow) IsRealized() bool
- func (self *Flow) Learn(learn *FlowLearn) error
- func (self *Flow) LoadReg(fieldName string, data uint64, dataRange *openflow15.NXRange) error
- func (self *Flow) MonitorRealizeStatus()
- func (self *Flow) MoveRegs(srcName string, dstName string, srcRange *openflow15.NXRange, ...) error
- func (self *Flow) Next(elem FgraphElem) error
- func (self *Flow) Note(data []byte) error
- func (self *Flow) OutputReg(name string, start int, end int) error
- func (self *Flow) PopMpls(etherType uint16) error
- func (self *Flow) PopVlan() error
- func (self *Flow) PushMpls(etherType uint16) error
- func (self *Flow) ResetApplyActions(actions []OFAction)
- func (self *Flow) ResetWriteActions(actions []OFAction)
- func (self *Flow) Resubmit(ofPort uint16, tableID uint8) error
- func (self *Flow) Send(operationType int) error
- func (self *Flow) SetARPOper(arpOp uint16) error
- func (self *Flow) SetARPSha(arpSha net.HardwareAddr) error
- func (self *Flow) SetARPSpa(ip net.IP) error
- func (self *Flow) SetARPTha(arpTha net.HardwareAddr) error
- func (self *Flow) SetARPTpa(ip net.IP) error
- func (self *Flow) SetDscp(dscp uint8) error
- func (self *Flow) SetField(field *openflow15.MatchField) error
- func (self *Flow) SetIPField(ip net.IP, field string) error
- func (self *Flow) SetL4Field(port uint16, field string) error
- func (self *Flow) SetMacDa(macDa net.HardwareAddr) error
- func (self *Flow) SetMacSa(macSa net.HardwareAddr) error
- func (self *Flow) SetMetadata(metadata, metadataMask uint64) error
- func (self *Flow) SetRealized()
- func (self *Flow) SetTunnelId(tunnelId uint64) error
- func (self *Flow) SetVlan(vlanId uint16) error
- func (self *Flow) Type() string
- func (self *Flow) UnsetDscp() error
- func (self *Flow) UpdateInstallStatus(installed bool)
- func (self *Flow) WriteAction(action OFAction)
- func (self *Flow) WriteActions(actions []OFAction)
- func (self *Flow) WriteMetadata(metadata uint64, metadataMask uint64)
- type FlowAction
- type FlowBundleMessage
- type FlowLearn
- func (l *FlowLearn) AddLoadAction(toField *LearnField, learnBits uint16, fromField *LearnField, fromValue []byte) error
- func (l *FlowLearn) AddMatch(matchField *LearnField, learnBits uint16, fromField *LearnField, ...) error
- func (l *FlowLearn) AddOutputAction(toField *LearnField, learnBits uint16) error
- func (l *FlowLearn) DeleteLearnedFlowsAfterDeletion()
- func (l *FlowLearn) GetActionMessage() openflow15.Action
- func (l *FlowLearn) GetActionType() string
- type FlowMatch
- type Group
- func (self *Group) AddBuckets(buckets ...*openflow15.Bucket)
- func (self *Group) AddProperty(prop util.Message)
- func (self *Group) Delete() error
- func (self *Group) GetActionMessage() openflow15.Action
- func (self *Group) GetActionType() string
- func (self *Group) GetBundleMessage(command int) *GroupBundleMessage
- func (self *Group) GetFlowInstr() openflow15.Instruction
- func (self *Group) Install() error
- func (self *Group) ResetBuckets(buckets ...*openflow15.Bucket)
- func (self *Group) Type() string
- type GroupBundleMessage
- type GroupType
- type LearnField
- type MatchField
- type Matchers
- type MessageResult
- type MessageType
- type Meter
- type MeterAction
- type MeterBundleMessage
- type MeterFlag
- type MeterType
- type NXConjunctionAction
- type NXConnTrackAction
- type NXController
- type NXLoadAction
- type NXLoadXXRegAction
- type NXMoveAction
- type NXNoteAction
- type NXOutput
- type NXRegister
- type NXTunMetadata
- type OFAction
- type OFError
- type OFSwitch
- func (s *OFSwitch) AddTunnelTLVMap(optClass uint16, optType uint8, optLength uint8, tunMetadataIndex uint16) error
- func (self *OFSwitch) CheckStatus(timeout time.Duration) bool
- func (s *OFSwitch) ClearTunnelTLVMap(tlvMaps []*openflow15.TLVTableMap) error
- func (self *OFSwitch) DPID() net.HardwareAddr
- func (self *OFSwitch) DefaultTable() *Table
- func (self *OFSwitch) DeleteGroup(groupId uint32) error
- func (self *OFSwitch) DeleteMeter(meterId uint32) error
- func (self *OFSwitch) DeleteTable(tableId uint8) error
- func (s *OFSwitch) DeleteTunnelTLVMap(tlvMaps []*openflow15.TLVTableMap) error
- func (self *OFSwitch) DisableOFPortForwarding(port int, portMAC net.HardwareAddr) error
- func (self *OFSwitch) Disconnect()
- func (self *OFSwitch) DropAction() *Output
- func (self *OFSwitch) DumpFlowStats(cookieID uint64, cookieMask *uint64, flowMatch *FlowMatch, tableID *uint8) ([]*openflow15.FlowDesc, error)
- func (self *OFSwitch) EnableMonitor()
- func (self *OFSwitch) EnableOFPortForwarding(port int, portMAC net.HardwareAddr) error
- func (self *OFSwitch) GetControllerID() uint16
- func (self *OFSwitch) GetGroup(groupId uint32) *Group
- func (self *OFSwitch) GetMeter(meterId uint32) *Meter
- func (s *OFSwitch) GetTLVMapTableStatus() *TLVTableStatus
- func (self *OFSwitch) GetTable(tableId uint8) *Table
- func (self *OFSwitch) IsReady() bool
- func (self *OFSwitch) NewFlood() (*Flood, error)
- func (self *OFSwitch) NewGroup(groupId uint32, groupType GroupType) (*Group, error)
- func (self *OFSwitch) NewMeter(meterId uint32, flags MeterFlag) (*Meter, error)
- func (self *OFSwitch) NewTable(tableId uint8) (*Table, error)
- func (self *OFSwitch) NewTransaction(flag TransactionType) *Transaction
- func (self *OFSwitch) NormalLookup() *Output
- func (self *OFSwitch) OutputPort(portNo uint32) (*Output, error)
- func (self *OFSwitch) ResumePacket(pktIn *PacketIn) error
- func (self *OFSwitch) Send(req util.Message) error
- func (self *OFSwitch) SendToController() *Output
- func (self *OFSwitch) SetPacketInFormat(format uint32) error
- type OpenFlowModMessage
- type Output
- type OvsDriver
- func (self *OvsDriver) AddController(ipAddr string, portNo uint16) error
- func (self *OvsDriver) CreateBridge(bridgeName string) error
- func (self *OvsDriver) CreatePort(intfName, intfType string, vlanTag uint) error
- func (self *OvsDriver) CreateVtep(intfName string, vtepRemoteIP string) error
- func (d *OvsDriver) Delete() error
- func (self *OvsDriver) DeleteBridge(bridgeName string) error
- func (self *OvsDriver) DeletePort(intfName string) error
- func (self *OvsDriver) DeleteVtep(intfName string) error
- func (self *OvsDriver) Disconnected(ovsClient *libovsdb.OvsdbClient)
- func (self *OvsDriver) Echo([]interface{})
- func (self *OvsDriver) GetOfpPortNo(intfName string) (uint32, error)
- func (self *OvsDriver) IsBridgePresent(bridgeName string) bool
- func (self *OvsDriver) IsControllerPresent(ipAddr string, portNo uint16) bool
- func (self *OvsDriver) IsPortNamePresent(intfName string) bool
- func (self *OvsDriver) IsVtepPresent(remoteIP string) (bool, string)
- func (self *OvsDriver) Locked([]interface{})
- func (self *OvsDriver) PrintCache()
- func (self *OvsDriver) RemoveController(target string) error
- func (self *OvsDriver) Stolen([]interface{})
- func (self *OvsDriver) Update(context interface{}, tableUpdates libovsdb.TableUpdates)
- type PacketIn
- type PacketOut
- type PopMPLSAction
- type PopVLANAction
- type PortField
- type ProtocolField
- type PushMPLSAction
- type PushVLANAction
- type Resubmit
- type SetARPOpAction
- type SetARPShaAction
- type SetARPSpaAction
- type SetARPThaAction
- type SetARPTpaAction
- type SetDSCPAction
- type SetDstIPAction
- type SetDstMACAction
- type SetFieldAction
- type SetICMPv4CodeAction
- type SetICMPv4TypeAction
- type SetICMPv6CodeAction
- type SetICMPv6TypeAction
- type SetNDSLLAction
- type SetNDTLLAction
- type SetNDTargetAction
- type SetSCTPDstAction
- type SetSCTPSrcAction
- type SetSrcIPAction
- type SetSrcMACAction
- type SetTCPDstPortAction
- type SetTCPFlagsAction
- type SetTCPSrcPortAction
- type SetTunnelDstAction
- type SetTunnelIDAction
- type SetTunnelSrcAction
- type SetUDPDstPortAction
- type SetUDPSrcPortAction
- type SetVLANAction
- type TLVStatusManager
- type TLVTableStatus
- func (t *TLVTableStatus) AddTLVMap(m *openflow15.TLVTableMap)
- func (t *TLVTableStatus) GetAllocatedResources() (space uint32, indexes []uint16)
- func (t *TLVTableStatus) GetMaxFields() uint16
- func (t *TLVTableStatus) GetMaxSpace() uint32
- func (t *TLVTableStatus) GetTLVMap(index uint16) *openflow15.TLVTableMap
- func (t *TLVTableStatus) GetTLVMapString(m *openflow15.TLVTableMap) string
- func (t *TLVTableStatus) String() string
- type Table
- type Transaction
- type TransactionType
- type Uint32WithMask
- type Uint64WithMask
- type XXRegister
Constants ¶
const ( MeterKbps MeterFlag = 0b0001 MeterPktps MeterFlag = 0b0010 MeterBurst MeterFlag = 0b0100 MeterStats MeterFlag = 0b1000 MeterDrop MeterType = 1 /* Drop packet. */ MeterDSCPRemark MeterType = 2 /* Remark DSCP in the IP header. */ MeterExperimenter MeterType = 0xFFFF /* Experimenter meter band. */ )
const ( ActTypePushVlan = "pushVlan" ActTypeSetVlan = "setVlan" ActTypePopVlan = "popVlan" ActTypePopMpls = "popMpls" ActTypePushMpls = "pushMpls" ActTypeSetDstMac = "setMacDa" ActTypeSetSrcMac = "setMacSa" ActTypeSetTunnelID = "setTunnelId" ActTypeMetatdata = "setMetadata" ActTypeSetSrcIP = "setIPSa" ActTypeSetDstIP = "setIPDa" ActTypeSetTunnelSrcIP = "setTunSa" ActTypeSetTunnelDstIP = "setTunDa" ActTypeSetDSCP = "setDscp" ActTypeSetARPOper = "setARPOper" ActTypeSetARPSHA = "setARPSha" ActTypeSetARPTHA = "setARPTha" ActTypeSetARPSPA = "setARPSpa" ActTypeSetARPTPA = "setARPTpa" ActTypeSetTCPsPort = "setTCPSrc" ActTypeSetTCPdPort = "setTCPDst" ActTypeSetTCPFlags = "setTCPFlags" ActTypeSetUDPsPort = "setUDPSrc" ActTypeSetUDPdPort = "setUDPDst" ActTypeSetSCTPsPort = "setSCTPSrc" ActTypeSetSCTPdPort = "setSCTPDst" ActTypeSetNDTarget = "setNDTarget" ActTypeSetNDSLL = "setNDSLL" ActTypeSetNDTLL = "setNDTLL" ActTypeSetICMP6Type = "setICMPv6Type" ActTypeSetICMP6Code = "setICMPv6Code" ActTypeSetICMP4Type = "setICMPv4Type" ActTypeSetICMP4Code = "setICMPv4Code" ActTypeNXLoad = "loadReg" ActTypeNXMove = "moveReg" ActTypeNXCT = "ct" ActTypeNXConjunction = "conjunction" ActTypeDecTTL = "decTTL" ActTypeNXResubmit = "resubmit" ActTypeGroup = "group" ActTypeNXLearn = "learn" ActTypeNXNote = "note" ActTypeController = "controller" ActTypeOutput = "output" ActTypeNXOutput = "nxOutput" ActTypeSetField = "setField" ActTypeCopyField = "copyField" ActTypeMeter = "meter" )
const ( OF = uint32(0) OFEx = uint32(0x4f4e4600) )
const ( InitConnection = iota ReConnection CompleteConnection )
Connection operation type
const ( Atomic = TransactionType(openflow15.OFPBCT_ATOMIC) Ordered = TransactionType(openflow15.OFPBCT_ORDERED) )
const IP_PROTO_SCTP = 132
const IP_PROTO_TCP = 6
const IP_PROTO_UDP = 17
const (
PC_NO_FLOOD = 1 << 4
)
Variables ¶
Functions ¶
func GenerateICMPHeader ¶
func GenerateTCPHeader ¶
func GetErrorMessage ¶
func GetErrorMessageType ¶
func GetUint32ValueWithRange ¶
func GetUint32ValueWithRange(data uint32, rng *openflow15.NXRange) uint32
func GetUint32ValueWithRangeFromBytes ¶
func GetUint32ValueWithRangeFromBytes(data []byte, rng *openflow15.NXRange) (uint32, error)
func GetUint64ValueWithRange ¶
func GetUint64ValueWithRange(data uint64, rng *openflow15.NXRange) uint64
func GetUint64ValueWithRangeFromBytes ¶
func GetUint64ValueWithRangeFromBytes(data []byte, rng *openflow15.NXRange) (uint64, error)
func NewTunnelIpv6DstField ¶
func NewTunnelIpv6DstField(tunnelIpDst net.IP, tunnelIpDstMask *net.IP) *openflow15.MatchField
func NewTunnelIpv6SrcField ¶
func NewTunnelIpv6SrcField(tunnelIpSrc net.IP, tunnelIpSrcMask *net.IP) *openflow15.MatchField
func ResetFieldLength ¶
func ResetFieldLength(field *openflow15.MatchField, tlvMapStatus *TLVTableStatus) *openflow15.MatchField
Types ¶
type AppInterface ¶
type AppInterface interface { // A Switch connected to the controller SwitchConnected(sw *OFSwitch) // Switch disconnected from the controller SwitchDisconnected(sw *OFSwitch) // Controller received a packet from the switch PacketRcvd(sw *OFSwitch, pkt *PacketIn) // Controller received a multi-part reply from the switch MultipartReply(sw *OFSwitch, rep *openflow15.MultipartReply) FlowGraphEnabledOnSwitch() bool TLVMapEnabledOnSwitch() bool // PortStatusRcvd notifies AppInterface a new PortStatus message is received. PortStatusRcvd(status *openflow15.PortStatus) }
type CTStatesChecker ¶
type CTStatesChecker Uint32WithMask
func (*CTStatesChecker) IsDNAT ¶
func (s *CTStatesChecker) IsDNAT() bool
func (*CTStatesChecker) IsEst ¶
func (s *CTStatesChecker) IsEst() bool
func (*CTStatesChecker) IsInv ¶
func (s *CTStatesChecker) IsInv() bool
func (*CTStatesChecker) IsNew ¶
func (s *CTStatesChecker) IsNew() bool
func (*CTStatesChecker) IsRel ¶
func (s *CTStatesChecker) IsRel() bool
func (*CTStatesChecker) IsRpl ¶
func (s *CTStatesChecker) IsRpl() bool
func (*CTStatesChecker) IsSNAT ¶
func (s *CTStatesChecker) IsSNAT() bool
func (*CTStatesChecker) IsTrk ¶
func (s *CTStatesChecker) IsTrk() bool
func (*CTStatesChecker) IsUnDNAT ¶
func (s *CTStatesChecker) IsUnDNAT() bool
func (*CTStatesChecker) IsUnEst ¶
func (s *CTStatesChecker) IsUnEst() bool
func (*CTStatesChecker) IsUnInv ¶
func (s *CTStatesChecker) IsUnInv() bool
func (*CTStatesChecker) IsUnNew ¶
func (s *CTStatesChecker) IsUnNew() bool
func (*CTStatesChecker) IsUnRel ¶
func (s *CTStatesChecker) IsUnRel() bool
func (*CTStatesChecker) IsUnRpl ¶
func (s *CTStatesChecker) IsUnRpl() bool
func (*CTStatesChecker) IsUnSNAT ¶
func (s *CTStatesChecker) IsUnSNAT() bool
func (*CTStatesChecker) IsUnTrk ¶
func (s *CTStatesChecker) IsUnTrk() bool
type ConnectionRetryControl ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func (*Controller) Connect ¶
func (c *Controller) Connect(sock string) error
Linux: Connect to Unix Domain Socket file Windows: Connect to named pipe
type CopyFieldAction ¶ added in v0.6.0
type CopyFieldAction struct { SrcOxmId openflow15.OxmId DstOxmId openflow15.OxmId NBits uint16 SrcOffset uint16 DstOffset uint16 }
func NewCopyFieldAction ¶ added in v0.6.0
func NewCopyFieldAction(nBits uint16, srcOffset uint16, dstOffset uint16, srcOxmId *openflow15.OxmId, dstOxmId *openflow15.OxmId) *CopyFieldAction
func (*CopyFieldAction) GetActionMessage ¶ added in v0.6.0
func (a *CopyFieldAction) GetActionMessage() openflow15.Action
func (*CopyFieldAction) GetActionType ¶ added in v0.6.0
func (a *CopyFieldAction) GetActionType() string
func (*CopyFieldAction) ResetDstFieldLength ¶ added in v0.6.0
func (a *CopyFieldAction) ResetDstFieldLength(ofSwitch *OFSwitch)
func (*CopyFieldAction) ResetFieldsLength ¶ added in v0.6.0
func (a *CopyFieldAction) ResetFieldsLength(ofSwitch *OFSwitch)
func (*CopyFieldAction) ResetSrcFieldLength ¶ added in v0.6.0
func (a *CopyFieldAction) ResetSrcFieldLength(ofSwitch *OFSwitch)
type DataWithMask ¶
type DecTTLAction ¶
type DecTTLAction struct { }
func (*DecTTLAction) GetActionMessage ¶
func (a *DecTTLAction) GetActionMessage() openflow15.Action
func (*DecTTLAction) GetActionType ¶
func (a *DecTTLAction) GetActionType() string
type EmptyElem ¶
type EmptyElem struct { }
func NewEmptyElem ¶
func NewEmptyElem() *EmptyElem
func (*EmptyElem) GetFlowInstr ¶
func (self *EmptyElem) GetFlowInstr() openflow15.Instruction
instruction set for NXOutput element
type FgraphElem ¶
type FgraphElem interface { // Returns the type of fw graph element Type() string // Returns the formatted instruction set. // This is used by the previous Fgraph element to install instruction set // in the flow entry GetFlowInstr() openflow15.Instruction }
type Flood ¶
type Flood struct { Switch *OFSwitch // Switch where this flood entry is present GroupId uint32 // Unique id for the openflow group FloodList []FloodOutput // List of output ports to flood to // contains filtered or unexported fields }
Flood Fgraph element
func (*Flood) AddTunnelOutput ¶
Add a new Output to group element
func (*Flood) GetFlowInstr ¶
func (self *Flood) GetFlowInstr() openflow15.Instruction
instruction set for output element
func (*Flood) RemoveOutput ¶
Remove a port from flood list
type FloodOutput ¶
type FloodOutput struct {
// contains filtered or unexported fields
}
type Flow ¶
type Flow struct { Table *Table // Table where this flow resides Match FlowMatch // Fields to be matched NextElem FgraphElem // Next fw graph element HardTimeout uint16 // Timeout to remove the flow after it is installed in the switch IdleTimeout uint16 // Timeout to remove the flow after its last hit CookieID uint64 // Cookie ID for flowMod message CookieMask *uint64 // Cookie Mask for flowMod message // contains filtered or unexported fields }
State of a flow entry
func (*Flow) AddConjunction ¶
Special Actions to to the flow to set conjunctions Note:
- nclause should be in [2, 64].
- clause value should be less than or equals to ncluase, and its value should be started from 1. actual clause in libopenflow messages is started from 0, here would decrement 1 to keep the display value is consistent with expected configuration
func (*Flow) ApplyAction ¶
func (*Flow) ApplyActions ¶
func (*Flow) ClearActions ¶
func (self *Flow) ClearActions()
func (*Flow) ConnTrack ¶
func (self *Flow) ConnTrack(commit bool, force bool, tableID *uint8, zoneID *uint16, execActions ...openflow15.Action) error
Special actions on the flow for connection trackng
func (*Flow) Controller ¶
func (*Flow) CopyActionsToNewFlow ¶
func (*Flow) CopyField ¶ added in v0.6.0
func (self *Flow) CopyField(nBits uint16, srcOffset uint16, dstOffset uint16, srcOxmId *openflow15.OxmId, dstOxmId *openflow15.OxmId) error
func (*Flow) DelConjunction ¶
func (*Flow) GenerateFlowModMessage ¶
func (self *Flow) GenerateFlowModMessage(commandType int) (flowMod *openflow15.FlowMod, err error)
GenerateFlowModMessage translates the Flow a FlowMod message according to the commandType.
func (*Flow) GetBundleMessage ¶
func (self *Flow) GetBundleMessage(command int) (*FlowBundleMessage, error)
func (*Flow) GetFlowInstr ¶
func (self *Flow) GetFlowInstr() openflow15.Instruction
instruction set for flow element
func (*Flow) Learn ¶
Special Actions to the flow to learn from the current packet and generate a new flow entry.
func (*Flow) MonitorRealizeStatus ¶
func (self *Flow) MonitorRealizeStatus()
MonitorRealizeStatus sends MultipartRequest to get current flow status, it is calling if needs to check flow's realized status
func (*Flow) MoveRegs ¶
func (self *Flow) MoveRegs(srcName string, dstName string, srcRange *openflow15.NXRange, dstRange *openflow15.NXRange) error
Special Actions on the flow to move data from src_field[rng] to dst_field[rng]
func (*Flow) Next ¶
func (self *Flow) Next(elem FgraphElem) error
Set Next element in the Fgraph. This determines what actions will be part of the flow's instruction set
func (*Flow) ResetApplyActions ¶
func (*Flow) ResetWriteActions ¶
func (*Flow) Send ¶
Send generates a FlowMod message according the operationType, and then sends it to the OFSwitch.
func (*Flow) SetARPOper ¶
func (*Flow) SetARPSha ¶
func (self *Flow) SetARPSha(arpSha net.HardwareAddr) error
Special action on the flow to set ARP source host addr
func (*Flow) SetARPTha ¶
func (self *Flow) SetARPTha(arpTha net.HardwareAddr) error
Special action on the flow to set ARP target host addr
func (*Flow) SetField ¶ added in v0.6.0
func (self *Flow) SetField(field *openflow15.MatchField) error
func (*Flow) SetIPField ¶
Special action on the flow to set an ip field
func (*Flow) SetL4Field ¶
Special action on the flow to set a L4 field
func (*Flow) SetMacDa ¶
func (self *Flow) SetMacDa(macDa net.HardwareAddr) error
Special action on the flow to set mac dest addr
func (*Flow) SetMacSa ¶
func (self *Flow) SetMacSa(macSa net.HardwareAddr) error
Special action on the flow to set mac source addr
func (*Flow) SetMetadata ¶
Special actions on the flow to set metadata
func (*Flow) SetRealized ¶
func (self *Flow) SetRealized()
func (*Flow) SetTunnelId ¶
Special actions on the flow to set vlan id
func (*Flow) UpdateInstallStatus ¶
updateInstallStatus changes isInstalled value.
func (*Flow) WriteAction ¶
func (*Flow) WriteActions ¶
func (*Flow) WriteMetadata ¶
type FlowAction ¶
type FlowAction struct { ActionType string // Type of action "setVlan", "setMetadata" // contains filtered or unexported fields }
additional Actions in flow's instruction set
type FlowBundleMessage ¶
type FlowBundleMessage struct {
// contains filtered or unexported fields
}
func (*FlowBundleMessage) GetMessage ¶ added in v0.6.3
func (m *FlowBundleMessage) GetMessage() util.Message
type FlowLearn ¶
type FlowLearn struct {
// contains filtered or unexported fields
}
func NewLearnAction ¶
func (*FlowLearn) AddLoadAction ¶
func (l *FlowLearn) AddLoadAction(toField *LearnField, learnBits uint16, fromField *LearnField, fromValue []byte) error
func (*FlowLearn) AddMatch ¶
func (l *FlowLearn) AddMatch(matchField *LearnField, learnBits uint16, fromField *LearnField, fromValue []byte) error
func (*FlowLearn) AddOutputAction ¶
func (l *FlowLearn) AddOutputAction(toField *LearnField, learnBits uint16) error
func (*FlowLearn) DeleteLearnedFlowsAfterDeletion ¶
func (l *FlowLearn) DeleteLearnedFlowsAfterDeletion()
func (*FlowLearn) GetActionMessage ¶
func (l *FlowLearn) GetActionMessage() openflow15.Action
func (*FlowLearn) GetActionType ¶
type FlowMatch ¶
type FlowMatch struct { Priority uint16 // Priority of the flow InputPort uint32 // Input port number MacDa *net.HardwareAddr // Mac dest MacDaMask *net.HardwareAddr // Mac dest mask MacSa *net.HardwareAddr // Mac source MacSaMask *net.HardwareAddr // Mac source mask Ethertype uint16 // Ethertype NonVlan bool // Non-vlan VlanId *uint16 // vlan id VlanMask *uint16 // Mask for vlan id ArpOper uint16 // ARP Oper type ArpSha *net.HardwareAddr // ARP source host address ArpTha *net.HardwareAddr // ARP target host address ArpSpa *net.IP // ARP source protocol address ArpTpa *net.IP // ARP target protocol address IpSa *net.IP // IPv4 source addr IpSaMask *net.IP // IPv4 source mask IpDa *net.IP // IPv4 dest addr IpDaMask *net.IP // IPv4 dest mask CtIpSa *net.IP // IPv4 source addr in ct CtIpSaMask *net.IP // IPv4 source mask in ct CtIpDa *net.IP // IPv4 dest addr in ct CtIpDaMask *net.IP // IPv4 dest mask in ct CtIpv6Sa *net.IP // IPv6 source addr CtIpv6SaMask *net.IP // IPv6 source mask in ct CtIpv6Da *net.IP // IPv6 dest addr in ct CtIpv6DaMask *net.IP // IPv6 dest mask in ct IpProto uint8 // IP protocol CtIpProto uint8 // IP protocol in ct IpDscp uint8 // DSCP/TOS field SrcPort uint16 // Source port in transport layer SrcPortMask *uint16 // Mask for source port in transport layer DstPort uint16 // Dest port in transport layer DstPortMask *uint16 // Mask for dest port in transport layer CtTpSrcPort uint16 // Source port in the transport layer in ct CtTpDstPort uint16 // Dest port in the transport layer in ct Icmp6Code *uint8 // ICMPv6 code Icmp6Type *uint8 // ICMPv6 type Icmp4Code *uint8 // ICMPv4 code Icmp4Type *uint8 // ICMPv4 type NdTarget *net.IP // ICMPv6 Neighbor Discovery Target NdTargetMask *net.IP // Mask for ICMPv6 Neighbor Discovery Target NdSll *net.HardwareAddr // ICMPv6 Neighbor Discovery Source Ethernet Address NdTll *net.HardwareAddr // ICMPv6 Neighbor DIscovery Target Ethernet Address IpTtl *uint8 // IPV4 TTL Metadata *uint64 // OVS metadata MetadataMask *uint64 // Metadata mask TunnelId uint64 // Vxlan Tunnel id i.e. VNI TunnelDst *net.IP // Tunnel destination addr TcpFlags *uint16 // TCP flags TcpFlagsMask *uint16 // Mask for TCP flags ConjunctionID *uint32 // Add AddConjunction ID CtStates *openflow15.CTStates // Connection tracking states NxRegs []*NXRegister // regX or regX[m..n] XxRegs []*XXRegister // xxregN or xxRegN[m..n] CtMark uint32 // conn_track mark CtMarkMask *uint32 // Mask of conn_track mark CtLabelLo uint64 // conntrack label [0..63] CtLabelHi uint64 // conntrack label [64..127] CtLabelLoMask uint64 // conntrack label masks [0..63] CtLabelHiMask uint64 // conntrack label masks [64..127] ActsetOutput uint32 // Output port number TunMetadatas []*NXTunMetadata // tun_metadataX or tun_metadataX[m..n] PktMark uint32 // Packet mark PktMarkMask *uint32 // Packet mark mask }
Small subset of openflow fields we currently support
type Group ¶
type Group struct { Switch *OFSwitch ID uint32 GroupType GroupType Buckets []*openflow15.Bucket Properties []util.Message // contains filtered or unexported fields }
func (*Group) AddBuckets ¶
func (self *Group) AddBuckets(buckets ...*openflow15.Bucket)
func (*Group) AddProperty ¶ added in v0.9.0
func (*Group) GetActionMessage ¶
func (self *Group) GetActionMessage() openflow15.Action
func (*Group) GetActionType ¶
func (*Group) GetBundleMessage ¶
func (self *Group) GetBundleMessage(command int) *GroupBundleMessage
func (*Group) GetFlowInstr ¶
func (self *Group) GetFlowInstr() openflow15.Instruction
func (*Group) ResetBuckets ¶
func (self *Group) ResetBuckets(buckets ...*openflow15.Bucket)
type GroupBundleMessage ¶
type GroupBundleMessage struct {
// contains filtered or unexported fields
}
func (*GroupBundleMessage) GetMessage ¶ added in v0.6.3
func (m *GroupBundleMessage) GetMessage() util.Message
type LearnField ¶
type MatchField ¶
type MatchField struct { *openflow15.MatchField // contains filtered or unexported fields }
func NewMatchField ¶
func NewMatchField(mf *openflow15.MatchField) *MatchField
func (*MatchField) GetName ¶
func (m *MatchField) GetName() string
func (*MatchField) GetNickName ¶
func (m *MatchField) GetNickName() string
func (*MatchField) GetValue ¶
func (m *MatchField) GetValue() interface{}
type Matchers ¶
type Matchers struct {
// contains filtered or unexported fields
}
func (*Matchers) GetMatchByName ¶
func (m *Matchers) GetMatchByName(name string) *MatchField
type MessageResult ¶
type MessageResult struct {
// contains filtered or unexported fields
}
func (*MessageResult) GetErrorCode ¶
func (r *MessageResult) GetErrorCode() uint16
func (*MessageResult) GetErrorType ¶
func (r *MessageResult) GetErrorType() uint16
func (*MessageResult) GetExperimenterID ¶
func (r *MessageResult) GetExperimenterID() int32
func (*MessageResult) GetXid ¶
func (r *MessageResult) GetXid() uint32
func (*MessageResult) IsSucceed ¶
func (r *MessageResult) IsSucceed() bool
type MessageType ¶
type MessageType int
const ( UnknownMessage MessageType = iota BundleControlMessage BundleAddMessage )
type Meter ¶
type Meter struct { Switch *OFSwitch ID uint32 Flags MeterFlag MeterBands []*util.Message // contains filtered or unexported fields }
func (*Meter) AddMeterBand ¶
func (*Meter) GetBundleMessage ¶
func (self *Meter) GetBundleMessage(command int) *MeterBundleMessage
type MeterAction ¶ added in v0.6.0
type MeterAction struct {
MeterId uint32
}
func NewMeterAction ¶ added in v0.6.0
func NewMeterAction(meterId uint32) *MeterAction
func (*MeterAction) GetActionMessage ¶ added in v0.6.0
func (a *MeterAction) GetActionMessage() openflow15.Action
func (*MeterAction) GetActionType ¶ added in v0.6.0
func (a *MeterAction) GetActionType() string
type MeterBundleMessage ¶
type MeterBundleMessage struct {
// contains filtered or unexported fields
}
func (*MeterBundleMessage) GetMessage ¶ added in v0.6.3
func (m *MeterBundleMessage) GetMessage() util.Message
type NXConjunctionAction ¶
func NewNXConjunctionAction ¶
func NewNXConjunctionAction(conjID uint32, clause uint8, nClause uint8) (*NXConjunctionAction, error)
func (*NXConjunctionAction) GetActionMessage ¶
func (a *NXConjunctionAction) GetActionMessage() openflow15.Action
func (*NXConjunctionAction) GetActionType ¶
func (a *NXConjunctionAction) GetActionType() string
type NXConnTrackAction ¶
type NXConnTrackAction struct {
// contains filtered or unexported fields
}
func NewNXConnTrackAction ¶
func NewNXConnTrackAction(commit bool, force bool, table *uint8, zone *uint16, actions ...openflow15.Action) *NXConnTrackAction
This function only support immediate number for ct_zone
func NewNXConnTrackActionWithZoneField ¶ added in v0.5.0
func NewNXConnTrackActionWithZoneField(commit bool, force bool, table *uint8, zoneImm *uint16, zoneSrcFieldName string, zoneSrcRange *openflow15.NXRange, actions ...openflow15.Action) *NXConnTrackAction
This function support immediate number and field or subfield for ct_zone
func (*NXConnTrackAction) GetActionMessage ¶
func (a *NXConnTrackAction) GetActionMessage() openflow15.Action
func (*NXConnTrackAction) GetActionType ¶
func (a *NXConnTrackAction) GetActionType() string
type NXController ¶
type NXController struct { Version2 bool ControllerID uint16 Reason uint8 UserData []byte MeterID uint32 Pause bool MaxLen *uint16 }
func (*NXController) GetActionMessage ¶
func (a *NXController) GetActionMessage() openflow15.Action
func (*NXController) GetActionType ¶
func (a *NXController) GetActionType() string
type NXLoadAction ¶
type NXLoadAction struct { Field *openflow15.MatchField Value uint64 Range *openflow15.NXRange }
func NewNXLoadAction ¶
func NewNXLoadAction(fieldName string, data uint64, dataRange *openflow15.NXRange) (*NXLoadAction, error)
func (*NXLoadAction) GetActionMessage ¶
func (a *NXLoadAction) GetActionMessage() openflow15.Action
func (*NXLoadAction) GetActionType ¶
func (a *NXLoadAction) GetActionType() string
func (*NXLoadAction) ResetFieldLength ¶
func (a *NXLoadAction) ResetFieldLength(ofSwitch *OFSwitch)
type NXLoadXXRegAction ¶
func (*NXLoadXXRegAction) GetActionMessage ¶
func (a *NXLoadXXRegAction) GetActionMessage() openflow15.Action
func (*NXLoadXXRegAction) GetActionType ¶
func (a *NXLoadXXRegAction) GetActionType() string
type NXMoveAction ¶
type NXMoveAction struct { SrcField *openflow15.MatchField DstField *openflow15.MatchField SrcStart uint16 DstStart uint16 MoveNbits uint16 }
func NewNXMoveAction ¶
func NewNXMoveAction(srcName string, dstName string, srcRange *openflow15.NXRange, dstRange *openflow15.NXRange) (*NXMoveAction, error)
func (*NXMoveAction) GetActionMessage ¶
func (a *NXMoveAction) GetActionMessage() openflow15.Action
func (*NXMoveAction) GetActionType ¶
func (a *NXMoveAction) GetActionType() string
func (*NXMoveAction) ResetFieldsLength ¶
func (a *NXMoveAction) ResetFieldsLength(ofSwitch *OFSwitch)
type NXNoteAction ¶
type NXNoteAction struct {
Notes []byte
}
func (*NXNoteAction) GetActionMessage ¶
func (a *NXNoteAction) GetActionMessage() openflow15.Action
func (*NXNoteAction) GetActionType ¶
func (a *NXNoteAction) GetActionType() string
type NXOutput ¶
type NXOutput struct {
// contains filtered or unexported fields
}
func (*NXOutput) GetActionMessage ¶
func (self *NXOutput) GetActionMessage() openflow15.Action
Return a NXOutput action
func (*NXOutput) GetActionType ¶
type NXRegister ¶
type NXRegister struct { ID int // ID of NXM_NX_REG, value should be from 0 to 15 Data uint32 // Data to cache in register. Note: Don't shift Data to its offset in caller Mask uint32 // Bitwise mask of data Range *openflow15.NXRange // Range of bits in register }
Matches data either exactly or with optional mask in register number ID. The mask could be calculated according to range automatically
type NXTunMetadata ¶
type NXTunMetadata struct { ID int // ID of NXM_NX_TUN_METADATA, value should be from 0 to 7. OVS supports 64 tun_metadata, but only 0-7 is implemented in libOpenflow Data interface{} // Data to set in the register Range *openflow15.NXRange // Range of bits in the field }
type OFAction ¶
type OFAction interface { GetActionMessage() openflow15.Action GetActionType() string }
type OFSwitch ¶
type OFSwitch struct {
// contains filtered or unexported fields
}
func NewSwitch ¶
func NewSwitch(stream *util.MessageStream, dpid net.HardwareAddr, app AppInterface, connCh chan int, ctrlID uint16) *OFSwitch
Builds and populates a Switch struct then starts listening for OpenFlow messages on conn.
func (*OFSwitch) AddTunnelTLVMap ¶
func (*OFSwitch) ClearTunnelTLVMap ¶
func (s *OFSwitch) ClearTunnelTLVMap(tlvMaps []*openflow15.TLVTableMap) error
func (*OFSwitch) DefaultTable ¶
Return table 0 which is the starting table for all packets
func (*OFSwitch) DeleteGroup ¶
Delete a group. Return an error if there are flows refer pointing at it
func (*OFSwitch) DeleteMeter ¶
Delete a meter. Return an error if there are flows refer pointing at it
func (*OFSwitch) DeleteTable ¶
Delete a table. Return an error if there are fgraph nodes pointing at it
func (*OFSwitch) DeleteTunnelTLVMap ¶
func (s *OFSwitch) DeleteTunnelTLVMap(tlvMaps []*openflow15.TLVTableMap) error
func (*OFSwitch) DisableOFPortForwarding ¶
func (self *OFSwitch) DisableOFPortForwarding(port int, portMAC net.HardwareAddr) error
func (*OFSwitch) Disconnect ¶
func (self *OFSwitch) Disconnect()
func (*OFSwitch) DropAction ¶
Return the drop graph element
func (*OFSwitch) DumpFlowStats ¶
func (*OFSwitch) EnableMonitor ¶
func (self *OFSwitch) EnableMonitor()
func (*OFSwitch) EnableOFPortForwarding ¶
func (self *OFSwitch) EnableOFPortForwarding(port int, portMAC net.HardwareAddr) error
func (*OFSwitch) GetControllerID ¶
func (*OFSwitch) GetTLVMapTableStatus ¶
func (s *OFSwitch) GetTLVMapTableStatus() *TLVTableStatus
func (*OFSwitch) NewTransaction ¶
func (self *OFSwitch) NewTransaction(flag TransactionType) *Transaction
NewTransaction creates a transaction on the switch. It will assign a bundle ID, and sets the bundle flags.
func (*OFSwitch) NormalLookup ¶
NormalLookup Return normal lookup graph element
func (*OFSwitch) OutputPort ¶
Return a output graph element for the port
func (*OFSwitch) ResumePacket ¶ added in v0.7.0
func (*OFSwitch) SendToController ¶
SendToController Return send to controller graph element
func (*OFSwitch) SetPacketInFormat ¶ added in v0.7.0
type OpenFlowModMessage ¶
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
func NewOutputController ¶
func NewOutputController() *Output
func NewOutputInPort ¶
func NewOutputInPort() *Output
func NewOutputNormal ¶
func NewOutputNormal() *Output
func NewOutputPort ¶
func (*Output) GetActionMessage ¶
func (self *Output) GetActionMessage() openflow15.Action
Return an output action (Used by group mods)
func (*Output) GetActionType ¶
func (*Output) GetFlowInstr ¶
func (self *Output) GetFlowInstr() openflow15.Instruction
instruction set for output element
type OvsDriver ¶
type OvsDriver struct { // Name of the OVS bridge OvsBridgeName string // contains filtered or unexported fields }
OVS driver state
func (*OvsDriver) AddController ¶
Add controller configuration to OVS
func (*OvsDriver) CreateBridge ¶
**************** OVS driver API ********************
func (*OvsDriver) CreatePort ¶
Create an internal port in OVS
func (*OvsDriver) CreateVtep ¶
Create a VTEP port on the OVS
func (*OvsDriver) DeleteBridge ¶
Delete a bridge from ovs
func (*OvsDriver) DeletePort ¶
Delete a port from OVS
func (*OvsDriver) DeleteVtep ¶
Delete a VTEP port
func (*OvsDriver) Disconnected ¶
func (self *OvsDriver) Disconnected(ovsClient *libovsdb.OvsdbClient)
func (*OvsDriver) GetOfpPortNo ¶
Return OFP port number for an interface
func (*OvsDriver) IsBridgePresent ¶
Check if the bridge entry already exists
func (*OvsDriver) IsControllerPresent ¶
Check if Controller already exists
func (*OvsDriver) IsPortNamePresent ¶
Check the local cache and see if the portname is taken already HACK alert: This is used to pick next port number instead of managing port number space actively across agent restarts
func (*OvsDriver) IsVtepPresent ¶
Check if VTEP already exists
func (*OvsDriver) PrintCache ¶
func (self *OvsDriver) PrintCache()
Dump the contents of the cache into stdout
func (*OvsDriver) RemoveController ¶
func (*OvsDriver) Update ¶
func (self *OvsDriver) Update(context interface{}, tableUpdates libovsdb.TableUpdates)
************************ Notification handler for OVS DB changes ****************
type PacketIn ¶
type PacketIn struct { *openflow15.PacketIn UserData []byte Continuation []byte }
func (*PacketIn) GetMatches ¶
type PacketOut ¶
type PacketOut struct { InPort uint32 OutPort uint32 Actions []OFAction SrcMAC net.HardwareAddr DstMAC net.HardwareAddr IPHeader *protocol.IPv4 IPv6Header *protocol.IPv6 TCPHeader *protocol.TCP UDPHeader *protocol.UDP ICMPHeader *protocol.ICMP ARPHeader *protocol.ARP // EthernetPacket provides a convenient way to fill an Ethernet packet into // openflow15.PacketOut. User could either directly provide an Ethernet packet // using this field or filling L2/3/4 headers and fields above, then an Ethernet // packet will be generated accordingly and added to openflow15.PacketOut. EthernetPacket *protocol.Ethernet }
func GenerateSimpleIPPacket ¶
func GenerateSimpleIPPacket(srcMAC, dstMAC net.HardwareAddr, srcIP, dstIP net.IP) *PacketOut
func GenerateTCPPacket ¶
func (*PacketOut) GetMessage ¶
type PopMPLSAction ¶ added in v0.5.6
type PopMPLSAction struct {
EtherType uint16
}
func (*PopMPLSAction) GetActionMessage ¶ added in v0.5.6
func (a *PopMPLSAction) GetActionMessage() openflow15.Action
func (*PopMPLSAction) GetActionType ¶ added in v0.5.6
func (a *PopMPLSAction) GetActionType() string
type PopVLANAction ¶
type PopVLANAction struct { }
func (*PopVLANAction) GetActionMessage ¶
func (a *PopVLANAction) GetActionMessage() openflow15.Action
func (*PopVLANAction) GetActionType ¶
func (a *PopVLANAction) GetActionType() string
type PortField ¶
type PortField struct {
Port uint16
}
func (*PortField) MarshalBinary ¶
func (*PortField) UnmarshalBinary ¶
type ProtocolField ¶
type ProtocolField struct {
Protocol uint8
}
func (*ProtocolField) Len ¶
func (m *ProtocolField) Len() uint16
func (*ProtocolField) MarshalBinary ¶
func (m *ProtocolField) MarshalBinary() (data []byte, err error)
func (*ProtocolField) UnmarshalBinary ¶
func (m *ProtocolField) UnmarshalBinary(data []byte) error
type PushMPLSAction ¶ added in v0.5.6
type PushMPLSAction struct {
EtherType uint16
}
func (*PushMPLSAction) GetActionMessage ¶ added in v0.5.6
func (a *PushMPLSAction) GetActionMessage() openflow15.Action
func (*PushMPLSAction) GetActionType ¶ added in v0.5.6
func (a *PushMPLSAction) GetActionType() string
type PushVLANAction ¶ added in v0.4.0
type PushVLANAction struct {
EtherType uint16
}
func (*PushVLANAction) GetActionMessage ¶ added in v0.4.0
func (a *PushVLANAction) GetActionMessage() openflow15.Action
func (*PushVLANAction) GetActionType ¶ added in v0.4.0
func (a *PushVLANAction) GetActionType() string
type Resubmit ¶
type Resubmit struct {
// contains filtered or unexported fields
}
func NewResubmit ¶
func NewResubmitWithCT ¶ added in v0.5.3
func (*Resubmit) GetActionMessage ¶
func (self *Resubmit) GetActionMessage() openflow15.Action
Return a resubmit action (Used as a last action by flows in the table pipeline)
func (*Resubmit) GetActionType ¶
func (*Resubmit) GetFlowInstr ¶
func (self *Resubmit) GetFlowInstr() openflow15.Instruction
instruction set for resubmit element
type SetARPOpAction ¶
type SetARPOpAction struct {
Value uint16
}
func (*SetARPOpAction) GetActionMessage ¶
func (a *SetARPOpAction) GetActionMessage() openflow15.Action
func (*SetARPOpAction) GetActionType ¶
func (a *SetARPOpAction) GetActionType() string
type SetARPShaAction ¶
type SetARPShaAction struct {
MAC net.HardwareAddr
}
func (*SetARPShaAction) GetActionMessage ¶
func (a *SetARPShaAction) GetActionMessage() openflow15.Action
func (*SetARPShaAction) GetActionType ¶
func (a *SetARPShaAction) GetActionType() string
type SetARPSpaAction ¶
func (*SetARPSpaAction) GetActionMessage ¶
func (a *SetARPSpaAction) GetActionMessage() openflow15.Action
func (*SetARPSpaAction) GetActionType ¶
func (a *SetARPSpaAction) GetActionType() string
type SetARPThaAction ¶
type SetARPThaAction struct {
MAC net.HardwareAddr
}
func (*SetARPThaAction) GetActionMessage ¶
func (a *SetARPThaAction) GetActionMessage() openflow15.Action
func (*SetARPThaAction) GetActionType ¶
func (a *SetARPThaAction) GetActionType() string
type SetARPTpaAction ¶
func (*SetARPTpaAction) GetActionMessage ¶
func (a *SetARPTpaAction) GetActionMessage() openflow15.Action
func (*SetARPTpaAction) GetActionType ¶
func (a *SetARPTpaAction) GetActionType() string
type SetDSCPAction ¶
func (*SetDSCPAction) GetActionMessage ¶
func (a *SetDSCPAction) GetActionMessage() openflow15.Action
func (*SetDSCPAction) GetActionType ¶
func (a *SetDSCPAction) GetActionType() string
type SetDstIPAction ¶
func (*SetDstIPAction) GetActionMessage ¶
func (a *SetDstIPAction) GetActionMessage() openflow15.Action
func (*SetDstIPAction) GetActionType ¶
func (a *SetDstIPAction) GetActionType() string
type SetDstMACAction ¶
type SetDstMACAction struct {
MAC net.HardwareAddr
}
func (*SetDstMACAction) GetActionMessage ¶
func (a *SetDstMACAction) GetActionMessage() openflow15.Action
func (*SetDstMACAction) GetActionType ¶
func (a *SetDstMACAction) GetActionType() string
type SetFieldAction ¶ added in v0.6.0
type SetFieldAction struct {
Field *openflow15.MatchField
}
func NewSetFieldAction ¶ added in v0.6.0
func NewSetFieldAction(field *openflow15.MatchField) *SetFieldAction
func (*SetFieldAction) GetActionMessage ¶ added in v0.6.0
func (a *SetFieldAction) GetActionMessage() openflow15.Action
func (*SetFieldAction) GetActionType ¶ added in v0.6.0
func (a *SetFieldAction) GetActionType() string
type SetICMPv4CodeAction ¶ added in v0.2.5
type SetICMPv4CodeAction struct {
Code uint8
}
Currently, we only support Flow.Send() function to generate ICMP match/set flow message. We can also support Flow.Next() function to generate ICMP match/set flow message in future once libOpenflow support NewICMPXxxxField API.
func (*SetICMPv4CodeAction) GetActionMessage ¶ added in v0.2.5
func (a *SetICMPv4CodeAction) GetActionMessage() openflow15.Action
func (*SetICMPv4CodeAction) GetActionType ¶ added in v0.2.5
func (a *SetICMPv4CodeAction) GetActionType() string
type SetICMPv4TypeAction ¶ added in v0.2.5
type SetICMPv4TypeAction struct {
Type uint8
}
Currently, we only support Flow.Send() function to generate ICMP match/set flow message. We can also support Flow.Next() function to generate ICMP match/set flow message in future once libOpenflow support NewICMPXxxxField API.
func (*SetICMPv4TypeAction) GetActionMessage ¶ added in v0.2.5
func (a *SetICMPv4TypeAction) GetActionMessage() openflow15.Action
func (*SetICMPv4TypeAction) GetActionType ¶ added in v0.2.5
func (a *SetICMPv4TypeAction) GetActionType() string
type SetICMPv6CodeAction ¶
type SetICMPv6CodeAction struct {
Code uint8
}
func (*SetICMPv6CodeAction) GetActionMessage ¶
func (a *SetICMPv6CodeAction) GetActionMessage() openflow15.Action
func (*SetICMPv6CodeAction) GetActionType ¶
func (a *SetICMPv6CodeAction) GetActionType() string
type SetICMPv6TypeAction ¶
type SetICMPv6TypeAction struct {
Type uint8
}
func (*SetICMPv6TypeAction) GetActionMessage ¶
func (a *SetICMPv6TypeAction) GetActionMessage() openflow15.Action
func (*SetICMPv6TypeAction) GetActionType ¶
func (a *SetICMPv6TypeAction) GetActionType() string
type SetNDSLLAction ¶
type SetNDSLLAction struct {
MAC net.HardwareAddr
}
func (*SetNDSLLAction) GetActionMessage ¶
func (a *SetNDSLLAction) GetActionMessage() openflow15.Action
func (*SetNDSLLAction) GetActionType ¶
func (a *SetNDSLLAction) GetActionType() string
type SetNDTLLAction ¶
type SetNDTLLAction struct {
MAC net.HardwareAddr
}
func (*SetNDTLLAction) GetActionMessage ¶
func (a *SetNDTLLAction) GetActionMessage() openflow15.Action
func (*SetNDTLLAction) GetActionType ¶
func (a *SetNDTLLAction) GetActionType() string
type SetNDTargetAction ¶
func (*SetNDTargetAction) GetActionMessage ¶
func (a *SetNDTargetAction) GetActionMessage() openflow15.Action
func (*SetNDTargetAction) GetActionType ¶
func (a *SetNDTargetAction) GetActionType() string
type SetSCTPDstAction ¶
type SetSCTPDstAction struct {
Port uint16
}
func (*SetSCTPDstAction) GetActionMessage ¶
func (a *SetSCTPDstAction) GetActionMessage() openflow15.Action
func (*SetSCTPDstAction) GetActionType ¶
func (a *SetSCTPDstAction) GetActionType() string
type SetSCTPSrcAction ¶
type SetSCTPSrcAction struct {
Port uint16
}
func (*SetSCTPSrcAction) GetActionMessage ¶
func (a *SetSCTPSrcAction) GetActionMessage() openflow15.Action
func (*SetSCTPSrcAction) GetActionType ¶
func (a *SetSCTPSrcAction) GetActionType() string
type SetSrcIPAction ¶
func (*SetSrcIPAction) GetActionMessage ¶
func (a *SetSrcIPAction) GetActionMessage() openflow15.Action
func (*SetSrcIPAction) GetActionType ¶
func (a *SetSrcIPAction) GetActionType() string
type SetSrcMACAction ¶
type SetSrcMACAction struct {
MAC net.HardwareAddr
}
func (*SetSrcMACAction) GetActionMessage ¶
func (a *SetSrcMACAction) GetActionMessage() openflow15.Action
func (*SetSrcMACAction) GetActionType ¶
func (a *SetSrcMACAction) GetActionType() string
type SetTCPDstPortAction ¶
type SetTCPDstPortAction struct {
Port uint16
}
func (*SetTCPDstPortAction) GetActionMessage ¶
func (a *SetTCPDstPortAction) GetActionMessage() openflow15.Action
func (*SetTCPDstPortAction) GetActionType ¶
func (a *SetTCPDstPortAction) GetActionType() string
type SetTCPFlagsAction ¶
func (*SetTCPFlagsAction) GetActionMessage ¶
func (a *SetTCPFlagsAction) GetActionMessage() openflow15.Action
func (*SetTCPFlagsAction) GetActionType ¶
func (a *SetTCPFlagsAction) GetActionType() string
type SetTCPSrcPortAction ¶
type SetTCPSrcPortAction struct {
Port uint16
}
func (*SetTCPSrcPortAction) GetActionMessage ¶
func (a *SetTCPSrcPortAction) GetActionMessage() openflow15.Action
func (*SetTCPSrcPortAction) GetActionType ¶
func (a *SetTCPSrcPortAction) GetActionType() string
type SetTunnelDstAction ¶
func (*SetTunnelDstAction) GetActionMessage ¶
func (a *SetTunnelDstAction) GetActionMessage() openflow15.Action
func (*SetTunnelDstAction) GetActionType ¶
func (a *SetTunnelDstAction) GetActionType() string
type SetTunnelIDAction ¶
type SetTunnelIDAction struct {
TunnelID uint64
}
func (*SetTunnelIDAction) GetActionMessage ¶
func (a *SetTunnelIDAction) GetActionMessage() openflow15.Action
func (*SetTunnelIDAction) GetActionType ¶
func (a *SetTunnelIDAction) GetActionType() string
type SetTunnelSrcAction ¶
func (*SetTunnelSrcAction) GetActionMessage ¶
func (a *SetTunnelSrcAction) GetActionMessage() openflow15.Action
func (*SetTunnelSrcAction) GetActionType ¶
func (a *SetTunnelSrcAction) GetActionType() string
type SetUDPDstPortAction ¶
type SetUDPDstPortAction struct {
Port uint16
}
func (*SetUDPDstPortAction) GetActionMessage ¶
func (a *SetUDPDstPortAction) GetActionMessage() openflow15.Action
func (*SetUDPDstPortAction) GetActionType ¶
func (a *SetUDPDstPortAction) GetActionType() string
type SetUDPSrcPortAction ¶
type SetUDPSrcPortAction struct {
Port uint16
}
func (*SetUDPSrcPortAction) GetActionMessage ¶
func (a *SetUDPSrcPortAction) GetActionMessage() openflow15.Action
func (*SetUDPSrcPortAction) GetActionType ¶
func (a *SetUDPSrcPortAction) GetActionType() string
type SetVLANAction ¶
type SetVLANAction struct {
VlanID uint16
}
func (*SetVLANAction) GetActionMessage ¶
func (a *SetVLANAction) GetActionMessage() openflow15.Action
func (*SetVLANAction) GetActionType ¶
func (a *SetVLANAction) GetActionType() string
type TLVStatusManager ¶
type TLVStatusManager interface {
TLVMapReplyRcvd(ofSwitch *OFSwitch, status *TLVTableStatus)
}
type TLVTableStatus ¶
type TLVTableStatus openflow15.TLVTableReply
func (*TLVTableStatus) AddTLVMap ¶
func (t *TLVTableStatus) AddTLVMap(m *openflow15.TLVTableMap)
func (*TLVTableStatus) GetAllocatedResources ¶
func (t *TLVTableStatus) GetAllocatedResources() (space uint32, indexes []uint16)
func (*TLVTableStatus) GetMaxFields ¶
func (t *TLVTableStatus) GetMaxFields() uint16
func (*TLVTableStatus) GetMaxSpace ¶
func (t *TLVTableStatus) GetMaxSpace() uint32
func (*TLVTableStatus) GetTLVMap ¶
func (t *TLVTableStatus) GetTLVMap(index uint16) *openflow15.TLVTableMap
func (*TLVTableStatus) GetTLVMapString ¶
func (t *TLVTableStatus) GetTLVMapString(m *openflow15.TLVTableMap) string
func (*TLVTableStatus) String ¶
func (t *TLVTableStatus) String() string
type Table ¶
Fgraph table element
func (*Table) DeleteFlow ¶
Delete a flow from the table
func (*Table) GetFlowInstr ¶
func (self *Table) GetFlowInstr() openflow15.Instruction
instruction set for table element
type Transaction ¶
type Transaction struct { ID uint32 // contains filtered or unexported fields }
func (*Transaction) Abort ¶
func (tx *Transaction) Abort() error
Abort discards the bundle configuration. If transaction is not closed, it sends OFPBCT_CLOSE_REQUEST in advance.
func (*Transaction) AddFlow ¶
func (tx *Transaction) AddFlow(flowMod *openflow15.FlowMod) error
func (*Transaction) AddMessage ¶
func (tx *Transaction) AddMessage(modMessage OpenFlowModMessage) error
AddMessage adds messages in the bundle.
func (*Transaction) Begin ¶
func (tx *Transaction) Begin() error
Begin opens a bundle configuration.
func (*Transaction) Commit ¶
func (tx *Transaction) Commit() error
Commit commits the bundle configuration. If transaction is not closed, it sends OFPBCT_CLOSE_REQUEST in advance.
func (*Transaction) Complete ¶
func (tx *Transaction) Complete() (int, error)
Complete closes the bundle configuration. It returns the number of successful messages added in the bundle.
type TransactionType ¶
type TransactionType uint16
type Uint32WithMask ¶
type Uint64WithMask ¶
type XXRegister ¶
Source Files
¶
- dial.go
- fgraph.go
- fgraphEmptyElem.go
- fgraphFlood.go
- fgraphFlow.go
- fgraphGroup.go
- fgraphMeter.go
- fgraphNXOutput.go
- fgraphOutput.go
- fgraphResubmit.go
- fgraphSwitch.go
- fgraphTable.go
- learnAction.go
- message_result.go
- ofAction.go
- ofErrors.go
- ofMatchFields.go
- ofPacket.go
- ofSwitch.go
- ofTlvMap.go
- ofctrl.go
- ovsdbDriver.go
- transaction.go