Versions in this module Expand all Collapse all v0 v0.14.2 Sep 20, 2019 Changes in this version + var ErrClosedDevice = errors.New("already closed device") + var NullMAC = net.HardwareAddr([]byte{ ... }) + func ReservedIP(n net.IPNet) (net.IP, error) + type Controller struct + func NewController(db database) *Controller + func (r *Controller) AddConnection(ctx context.Context, c net.Conn) + func (r *Controller) Announce(ip net.IP, mac net.HardwareAddr) error + func (r *Controller) RemoveFlows() error + func (r *Controller) RemoveFlowsByMAC(mac net.HardwareAddr) error + func (r *Controller) SetEventListener(l EventListener) + func (r *Controller) String() string + type ControllerEventListener interface + OnDeviceDown func(Finder, *Device) error + OnDeviceUp func(Finder, *Device) error + OnFlowRemoved func(Finder, openflow.FlowRemoved) error + OnPacketIn func(Finder, *Port, *protocol.Ethernet) error + OnPortDown func(Finder, *Port) error + OnPortUp func(Finder, *Port) error + type Descriptions struct + Description string + Hardware string + Manufacturer string + Serial string + Software string + type Device struct + func (r *Device) Close() + func (r *Device) Descriptions() Descriptions + func (r *Device) Factory() openflow.Factory + func (r *Device) Features() Features + func (r *Device) Flood(ingress *Port, packet []byte) error + func (r *Device) FlowTableID() uint8 + func (r *Device) ID() string + func (r *Device) IsClosed() bool + func (r *Device) Port(num uint32) *Port + func (r *Device) Ports() []*Port + func (r *Device) RemoveFlow(match openflow.Match, port openflow.OutPort) error + func (r *Device) RemoveFlowByMAC(mac net.HardwareAddr) error + func (r *Device) RemoveFlows() error + func (r *Device) SendARPAnnouncement(ip net.IP, mac net.HardwareAddr) error + func (r *Device) SendARPDiscovery(sha net.HardwareAddr, spa, tpa net.IP) error + func (r *Device) SendMessage(msg encoding.BinaryMarshaler) error + func (r *Device) SetFlow(match openflow.Match, port openflow.OutPort) error + func (r *Device) String() string + func (r *Device) Writer() transceiver.Writer + type EventListener interface + type Features struct + DPID uint64 + NumBuffers uint32 + NumTables uint8 + type Finder interface + Device func(id string) *Device + Devices func() []*Device + IsEdge func(p *Port) bool + IsEnabledBySTP func(p *Port) bool + Node func(mac net.HardwareAddr) (*Node, LocationStatus, error) + Path func(srcDeviceID, dstDeviceID string) [][2]*Port + type LocationStatus int + const LocationDiscovered + const LocationUndiscovered + const LocationUnregistered + type Node struct + func NewNode(p *Port, mac net.HardwareAddr) *Node + func (r *Node) MAC() net.HardwareAddr + func (r *Node) Port() *Port + func (r *Node) String() string + type Port struct + func NewPort(d *Device, num uint32) *Port + func (r *Port) Device() *Device + func (r *Port) ID() string + func (r *Port) Number() uint32 + func (r *Port) SetValue(p openflow.Port) + func (r *Port) String() string + func (r *Port) Value() openflow.Port + func (r *Port) Vertex() graph.Vertex + type TopologyEventListener interface + OnTopologyChange func(Finder) error