goloxi

package module
v0.0.0-...-db23241 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: Apache-2.0 Imports: 3 Imported by: 15

README

Goloxi - OpenFlow library for golang

Goloxi is generated using loxigen. Is it still in an experimental state.

It supports serializing and deserializing OpenFlow messages and structures from version 1.0 to version 1.5. It supports Big Switch and Nicira extensions.

License

This software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

Index

Constants

View Source
const (
	VERSION_1_0 = 1
	VERSION_1_1 = 2
	VERSION_1_2 = 3
	VERSION_1_3 = 4
	VERSION_1_4 = 5
	VERSION_1_5 = 6
)
View Source
const (
	OFPTHello        = 0
	OFPTError        = 1
	OFPTEchoRequest  = 2
	OFPTEchoReply    = 3
	OFPTExperimenter = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

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

func NewDecoder

func NewDecoder(data []byte) *Decoder

func (*Decoder) BaseOffset

func (d *Decoder) BaseOffset() int

func (*Decoder) Bytes

func (d *Decoder) Bytes() []byte

func (*Decoder) Length

func (d *Decoder) Length() int

func (*Decoder) Offset

func (d *Decoder) Offset() int

func (*Decoder) Read

func (d *Decoder) Read(n int) []byte

func (*Decoder) ReadByte

func (d *Decoder) ReadByte() byte

func (*Decoder) ReadUint128

func (d *Decoder) ReadUint128() Uint128

func (*Decoder) ReadUint16

func (d *Decoder) ReadUint16() uint16

func (*Decoder) ReadUint32

func (d *Decoder) ReadUint32() uint32

func (*Decoder) ReadUint64

func (d *Decoder) ReadUint64() uint64

func (*Decoder) ReadUint8

func (d *Decoder) ReadUint8() uint8

func (*Decoder) Skip

func (d *Decoder) Skip(n int)

func (*Decoder) SkipAlign

func (d *Decoder) SkipAlign()

func (*Decoder) SliceDecoder

func (d *Decoder) SliceDecoder(length, rewind int) *Decoder

type Deserializable

type Deserializable interface {
	Decode(decoder *Decoder) error
}

type Encoder

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

func NewEncoder

func NewEncoder() *Encoder

func (*Encoder) Bytes

func (e *Encoder) Bytes() []byte

func (*Encoder) PutChar

func (e *Encoder) PutChar(c byte)

func (*Encoder) PutUint128

func (e *Encoder) PutUint128(i Uint128)

func (*Encoder) PutUint16

func (e *Encoder) PutUint16(i uint16)

func (*Encoder) PutUint32

func (e *Encoder) PutUint32(i uint32)

func (*Encoder) PutUint64

func (e *Encoder) PutUint64(i uint64)

func (*Encoder) PutUint8

func (e *Encoder) PutUint8(i uint8)

func (*Encoder) SkipAlign

func (e *Encoder) SkipAlign()

func (*Encoder) Write

func (e *Encoder) Write(b []byte)
type Header struct {
	Version uint8
	Type    uint8
	Length  uint16
	Xid     uint32
}

func (*Header) Decode

func (self *Header) Decode(decoder *Decoder) (err error)

type IAction

type IAction interface {
	Serializable
	GetType() uint16
	GetLen() uint16
	GetActionName() string
	GetActionFields() map[string]interface{}
}

type IOxm

type IOxm interface {
	Serializable
	GetOXMName() string
	GetOXMValue() interface{}
}

type IOxmId

type IOxmId interface {
	Serializable
	GetOXMName() string
}

type IOxmMasked

type IOxmMasked interface {
	Serializable
	GetOXMName() string
	GetOXMValue() interface{}
	GetOXMValueMask() interface{}
}

type Message

type Message interface {
	Serializable
	GetVersion() uint8
	GetLength() uint16
	MessageType() uint8
	MessageName() string
	GetXid() uint32
	SetXid(xid uint32)
}

type Serializable

type Serializable interface {
	Serialize(encoder *Encoder) error
}

type Uint128

type Uint128 struct {
	Hi uint64
	Lo uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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