netapps

package
v0.0.0-...-195614b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2020 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlow

func AddFlow(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

AddFlow adds flow for switches

func NewDemoInstance

func NewDemoInstance() interface{}

NewDemoInstance ceates demo instance

func NewL2Forwarder

func NewL2Forwarder() interface{}

NewL2Forwarder interface

func NewL3Forwarder

func NewL3Forwarder(f []string) func() interface{}

NewL3Forwarder L3Forwarder constructor

func NewWebService

func NewWebService(apiOn string)

NewWebService created go web service with three endpoints

func Switches

func Switches(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

Switches populates ogo.Switches() with received json

func TestMod

func TestMod(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

TestMod ;;;

Types

type DemoInstance

type DemoInstance struct{}

DemoInstance definition

func (*DemoInstance) ConnectionDown

func (b *DemoInstance) ConnectionDown(dpid net.HardwareAddr)

ConnectionDown logger

func (*DemoInstance) ConnectionUp

func (b *DemoInstance) ConnectionUp(dpid net.HardwareAddr)

ConnectionUp logger

func (*DemoInstance) PacketIn

func (b *DemoInstance) PacketIn(dpid net.HardwareAddr, pkt *ofp10.PacketIn)

PacketIn processes input packet

type FlowMods

type FlowMods []*ofp10.FlowMod

FlowMods is a set of *ofp10.FlowMod

type Host

type Host struct {
	// contains filtered or unexported fields
}

Host definition

type Hostmap

type Hostmap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Hostmap definition

func NewHostMap

func NewHostMap() *Hostmap

NewHostMap creates new Hostmap instance

func (*Hostmap) Add

func (hm *Hostmap) Add(v ...interface{})

Add populates map

func (*Hostmap) Dpid

func (hm *Hostmap) Dpid(dpid net.HardwareAddr) (map[string]Host, bool)

Dpid dpid to ip

func (*Hostmap) Host

func (hm *Hostmap) Host(v ...interface{}) (h Host, ok bool)

Host return host from map

type L2Forwarder

type L2Forwarder struct {
	*Hostmap
}

L2Forwarder definition

func (*L2Forwarder) PacketIn

func (l2 *L2Forwarder) PacketIn(dpid net.HardwareAddr, pkt *ofp10.PacketIn)

PacketIn processess input packet

type L3Forwarder

type L3Forwarder struct {
	// contains filtered or unexported fields
}

L3Forwarder definition

func (*L3Forwarder) ConnectionUp

func (l3 *L3Forwarder) ConnectionUp(dpid net.HardwareAddr)

ConnectionUp just a logger

func (*L3Forwarder) PacketIn

func (l3 *L3Forwarder) PacketIn(dpid net.HardwareAddr, pkt *ofp10.PacketIn)

PacketIn processes input packet

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL