Documentation ¶
Index ¶
- Variables
- func NewInstance() interface{}
- func NewSwitch(stream *MessageStream, msg ofp10.SwitchFeatures)
- type ApplicationInstanceGenerator
- type BufferPool
- type Controller
- type Link
- type LinkDiscovery
- type MessageStream
- type Network
- type OFSwitch
- func (sw *OFSwitch) AddInstance(inst interface{})
- func (s *OFSwitch) DPID() net.HardwareAddr
- func (s *OFSwitch) Link(dpid net.HardwareAddr) (l Link, ok bool)
- func (s *OFSwitch) Links() []Link
- func (sw *OFSwitch) MarshalJSON() ([]byte, error)
- func (sw *OFSwitch) Port(portNo uint16) (port ofp10.PhyPort, ok bool)
- func (s *OFSwitch) Ports() []ofp10.PhyPort
- func (s *OFSwitch) Send(req util.Message)
- func (sw *OFSwitch) SetPort(portNo uint16, port ofp10.PhyPort)
- type OgoInstance
- func (o *OgoInstance) ConnectionDown(dpid net.HardwareAddr)
- func (o *OgoInstance) ConnectionUp(dpid net.HardwareAddr)
- func (o *OgoInstance) EchoReply(dpid net.HardwareAddr)
- func (o *OgoInstance) EchoRequest(dpid net.HardwareAddr)
- func (o *OgoInstance) FeaturesReply(dpid net.HardwareAddr, features *ofp10.SwitchFeatures)
- func (o *OgoInstance) PacketIn(dpid net.HardwareAddr, msg *ofp10.PacketIn)
Constants ¶
This section is empty.
Variables ¶
View Source
var Applications []ApplicationInstanceGenerator
Functions ¶
func NewSwitch ¶
func NewSwitch(stream *MessageStream, msg ofp10.SwitchFeatures)
Builds and populates a Switch struct then starts listening for OpenFlow messages on conn.
Types ¶
type ApplicationInstanceGenerator ¶
type ApplicationInstanceGenerator func() interface{}
type BufferPool ¶
func NewBufferPool ¶
func NewBufferPool() *BufferPool
type Controller ¶
type Controller struct{}
func NewController ¶
func NewController() *Controller
func (*Controller) Listen ¶
func (c *Controller) Listen(port string)
func (*Controller) RegisterApplication ¶
func (c *Controller) RegisterApplication(fn ApplicationInstanceGenerator)
Setup OpenFlow Message chans for each message type.
type Link ¶
Internal representation of a network link. Can be used to describe the state of the link. Each switch maintains its own set of links.
type LinkDiscovery ¶
type LinkDiscovery struct { SrcDPID net.HardwareAddr Nsec int64 /* Number of nanoseconds elapsed since Jan 1, 1970. */ // contains filtered or unexported fields }
func NewLinkDiscovery ¶
func NewLinkDiscovery() *LinkDiscovery
func (*LinkDiscovery) Len ¶
func (d *LinkDiscovery) Len() uint16
func (*LinkDiscovery) MarshalBinary ¶
func (d *LinkDiscovery) MarshalBinary() (data []byte, err error)
func (*LinkDiscovery) UnmarshalBinary ¶
func (d *LinkDiscovery) UnmarshalBinary(data []byte) error
type MessageStream ¶
type MessageStream struct { // OpenFlow Version Version uint8 // Channel on which to publish connection errors Error chan error // Channel on which to publish inbound messages Inbound chan util.Message // Channel on which to receive outbound messages Outbound chan util.Message // Channel on which to receive a shutdown command Shutdown chan bool // contains filtered or unexported fields }
func NewMessageStream ¶
func NewMessageStream(conn *net.TCPConn) *MessageStream
Returns a pointer to a new MessageStream. Used to parse OpenFlow messages from conn.
func (*MessageStream) GetAddr ¶
func (m *MessageStream) GetAddr() net.Addr
type Network ¶
A map from DPIDs to all Switches that have connected since Ogo started.
func NewNetwork ¶
func NewNetwork() *Network
type OFSwitch ¶
type OFSwitch struct {
// contains filtered or unexported fields
}
func Switch ¶
func Switch(dpid net.HardwareAddr) (*OFSwitch, bool)
Returns a pointer to the Switch mapped to dpid.
func Switches ¶
func Switches() []*OFSwitch
Returns a slice of *OFPSwitches for operations across all switches.
func (*OFSwitch) AddInstance ¶
func (sw *OFSwitch) AddInstance(inst interface{})
func (*OFSwitch) Link ¶
func (s *OFSwitch) Link(dpid net.HardwareAddr) (l Link, ok bool)
Returns the link between Switch s and the Switch dpid.
func (*OFSwitch) MarshalJSON ¶
type OgoInstance ¶
type OgoInstance struct {
// contains filtered or unexported fields
}
func (*OgoInstance) ConnectionDown ¶
func (o *OgoInstance) ConnectionDown(dpid net.HardwareAddr)
func (*OgoInstance) ConnectionUp ¶
func (o *OgoInstance) ConnectionUp(dpid net.HardwareAddr)
func (*OgoInstance) EchoReply ¶
func (o *OgoInstance) EchoReply(dpid net.HardwareAddr)
func (*OgoInstance) EchoRequest ¶
func (o *OgoInstance) EchoRequest(dpid net.HardwareAddr)
func (*OgoInstance) FeaturesReply ¶
func (o *OgoInstance) FeaturesReply(dpid net.HardwareAddr, features *ofp10.SwitchFeatures)
func (*OgoInstance) PacketIn ¶
func (o *OgoInstance) PacketIn(dpid net.HardwareAddr, msg *ofp10.PacketIn)
Directories ¶
Path | Synopsis |
---|---|
example
|
|
protocol
|
|
ofp10
OpenFlow Wire Protocol 0x01 Package ofp10 provides OpenFlow 1.0 structs along with Read and Write methods for each.
|
OpenFlow Wire Protocol 0x01 Package ofp10 provides OpenFlow 1.0 structs along with Read and Write methods for each. |
ofpxx
Package ofpxx defines OpenFlow message types that are version independent.
|
Package ofpxx defines OpenFlow message types that are version independent. |
Click to show internal directories.
Click to hide internal directories.