Documentation ¶
Index ¶
Constants ¶
View Source
const ( Version13 versionType = "Openflow13" ProtocolIP protocol = "ip" ProtocolARP protocol = "arp" ProtocolTCP protocol = "tcp" ProtocolUDP protocol = "udp" ProtocolSCTP protocol = "sctp" ProtocolICMP protocol = "icmp" )
View Source
const ( NxmFieldSrcMAC = "NXM_OF_ETH_SRC" NxmFieldDstMAC = "NXM_OF_ETH_DST" NxmFieldARPSha = "NXM_NX_ARP_SHA" NxmFieldARPTha = "NXM_NX_ARP_THA" NxmFieldARPSpa = "NXM_OF_ARP_SPA" NxmFieldARPTpa = "NXM_OF_ARP_TPA" NxmFieldCtLabel = "NXM_NX_CT_LABEL" NxmFieldCtMark = "NXM_NX_CT_MARK" NxmFieldARPOp = "NXM_OF_ARP_OP" NxmFieldReg = "NXM_NX_REG" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface { LoadARPOperation(value uint16) FlowBuilder LoadRegRange(regID int, value uint32, to Range) FlowBuilder LoadRange(name string, addr uint32, to Range) FlowBuilder Move(from, to string) FlowBuilder MoveRange(fromName, toName string, from, to Range) FlowBuilder Resubmit(port string, table TableIDType) FlowBuilder CT(commit bool, tableID TableIDType, zone int) CTAction Drop() FlowBuilder Output(port int) FlowBuilder OutputFieldRange(from string, rng Range) FlowBuilder OutputRegRange(regID int, rng Range) FlowBuilder OutputInPort() FlowBuilder SetDstMAC(addr net.HardwareAddr) FlowBuilder SetSrcMAC(addr net.HardwareAddr) FlowBuilder SetARPSha(addr net.HardwareAddr) FlowBuilder SetARPTha(addr net.HardwareAddr) FlowBuilder SetARPSpa(addr net.IP) FlowBuilder SetARPTpa(addr net.IP) FlowBuilder SetSrcIP(addr net.IP) FlowBuilder SetDstIP(addr net.IP) FlowBuilder SetTunnelDst(addr net.IP) FlowBuilder DecTTL() FlowBuilder Normal() FlowBuilder Conjunction(conjID uint32, clauseID uint8, nClause uint8) FlowBuilder }
type Bridge ¶
type Bridge interface { CreateTable(id, next TableIDType, missAction MissActionType) Table GetName() string DeleteTable(id TableIDType) bool DumpTableStatus() []TableStatus // Connect initiates connection to the OFSwitch. It will block until the connection is established. // If Bridge is not connected in maxRetry times, it will return error. Connect(maxRetry int) error // Disconnect stops connection to the OFSwitch. Disconnect() error }
Bridge defines operations on an openflow bridge.
type FlowBuilder ¶
type FlowBuilder interface { Priority(value uint32) FlowBuilder MatchProtocol(name protocol) FlowBuilder MatchReg(regID int, data uint32) FlowBuilder MatchRegRange(regID int, data uint32, rng Range) FlowBuilder MatchInPort(inPort uint32) FlowBuilder MatchDstIP(ip net.IP) FlowBuilder MatchDstIPNet(ipNet net.IPNet) FlowBuilder MatchSrcIP(ip net.IP) FlowBuilder MatchSrcIPNet(ipNet net.IPNet) FlowBuilder MatchDstMAC(mac net.HardwareAddr) FlowBuilder MatchSrcMAC(mac net.HardwareAddr) FlowBuilder MatchARPSha(mac net.HardwareAddr) FlowBuilder MatchARPTha(mac net.HardwareAddr) FlowBuilder MatchARPSpa(ip net.IP) FlowBuilder MatchARPTpa(ip net.IP) FlowBuilder MatchARPOp(op uint16) FlowBuilder MatchCTState(value string) FlowBuilder MatchCTMark(value string) FlowBuilder MatchConjID(value uint32) FlowBuilder MatchTCPDstPort(port uint16) FlowBuilder MatchUDPDstPort(port uint16) FlowBuilder MatchSCTPDstPort(port uint16) FlowBuilder Cookie(cookieID uint64) FlowBuilder Action() Action Done() Flow }
type MissActionType ¶
type MissActionType uint32
const ( TableMissActionDrop MissActionType = iota TableMissActionNormal TableMissActionNext )
type Table ¶
type Table interface { GetID() TableIDType BuildFlow() FlowBuilder GetMissAction() MissActionType Status() TableStatus GetNext() TableIDType }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.