Documentation ¶
Index ¶
- Variables
- func ReservedIP(n net.IPNet) (net.IP, error)
- type Controller
- type ControllerEventListener
- type Descriptions
- type Device
- func (r *Device) Close()
- func (r *Device) Descriptions() Descriptions
- func (r *Device) Factory() openflow.Factory
- func (r *Device) Features() Features
- 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) SendMessage(msg encoding.BinaryMarshaler) error
- func (r *Device) String() string
- func (r *Device) Writer() transceiver.Writer
- type EventListener
- type Features
- type Finder
- type LocationStatus
- type Node
- type Port
- type TopologyEventListener
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrClosedDevice = errors.New("already closed device")
)
Functions ¶
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(db database) *Controller
func (*Controller) AddConnection ¶
func (r *Controller) AddConnection(ctx context.Context, c net.Conn)
func (*Controller) SetEventListener ¶
func (r *Controller) SetEventListener(l EventListener)
func (*Controller) String ¶
func (r *Controller) String() string
type ControllerEventListener ¶
type Descriptions ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func (*Device) Descriptions ¶
func (r *Device) Descriptions() Descriptions
func (*Device) SendMessage ¶
func (r *Device) SendMessage(msg encoding.BinaryMarshaler) error
func (*Device) Writer ¶
func (r *Device) Writer() transceiver.Writer
type EventListener ¶
type EventListener interface { ControllerEventListener TopologyEventListener }
type Finder ¶
type Finder interface { Device(id string) *Device Devices() []*Device // IsEnabledBySTP returns whether p is disabled by spanning tree protocol IsEnabledBySTP(p *Port) bool // IsEdge returns whether p is an edge among two switches IsEdge(p *Port) bool Node(mac net.HardwareAddr) (*Node, LocationStatus, error) Path(srcDeviceID, dstDeviceID string) [][2]*Port }
type LocationStatus ¶
type LocationStatus int
const ( // Unregistered MAC address. LocationUnregistered LocationStatus = iota // Registered MAC address, but we don't know its physical location yet. LocationUndiscovered // Registered MAC address, and we know its physical location. LocationDiscovered )
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) MAC ¶
func (r *Node) MAC() net.HardwareAddr
type Port ¶
type Port struct {
// contains filtered or unexported fields
}
Port represents a switch port and also implements the graph.Point interface.
type TopologyEventListener ¶
Click to show internal directories.
Click to hide internal directories.