common

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	HelloElemType_VersionBitmap
)

Variables

This section is empty.

Functions

func NewHeaderGenerator

func NewHeaderGenerator(ver int) func() Header

Types

type Header struct {
	Version uint8
	Type    uint8
	Length  uint16
	Xid     uint32
}

The version specifies the OpenFlow protocol version being used. During the current draft phase of the OpenFlow Protocol, the most significant bit will be set to indicate an experimental version and the lower bits will indicate a revision number. The current version is 0x01. The final version for a Type 0 switch will be 0x00. The length field indicates the total length of the message, so no additional framing is used to distinguish one frame from the next.

func (*Header) Header

func (h *Header) Header() *Header

func (*Header) Len

func (h *Header) Len() (n uint16)

func (*Header) MarshalBinary

func (h *Header) MarshalBinary() (data []byte, err error)

func (*Header) UnmarshalBinary

func (h *Header) UnmarshalBinary(data []byte) error

type Hello

type Hello struct {
	Header
	Elements []HelloElem
}

The OFPT_HELLO message consists of an OpenFlow header plus a set of variable size hello elements. The version field part of the header field (see 7.1) must be set to the highest OpenFlow switch protocol version supported by the sender (see 6.3.1). The elements field is a set of hello elements, containing optional data to inform the initial handshake of the connection. Implementations must ignore (skip) all elements of a Hello message that they do not support. The version field part of the header field (see 7.1) must be set to the highest OpenFlow switch protocol version supported by the sender (see 6.3.1). The elements field is a set of hello elements, containing optional data to inform the initial handshake of the connection. Implementations must ignore (skip) all elements of a Hello message that they do not support.

func NewHello

func NewHello(ver int) (h *Hello, err error)

func (*Hello) Len

func (h *Hello) Len() (n uint16)

func (*Hello) MarshalBinary

func (h *Hello) MarshalBinary() (data []byte, err error)

func (*Hello) UnmarshalBinary

func (h *Hello) UnmarshalBinary(data []byte) error

type HelloElem

type HelloElem interface {
	Header() *HelloElemHeader
	util.Message
}

type HelloElemHeader

type HelloElemHeader struct {
	Type   uint16
	Length uint16
}

func NewHelloElemHeader

func NewHelloElemHeader() *HelloElemHeader

func (*HelloElemHeader) Header

func (h *HelloElemHeader) Header() *HelloElemHeader

func (*HelloElemHeader) Len

func (h *HelloElemHeader) Len() (n uint16)

func (*HelloElemHeader) MarshalBinary

func (h *HelloElemHeader) MarshalBinary() (data []byte, err error)

func (*HelloElemHeader) UnmarshalBinary

func (h *HelloElemHeader) UnmarshalBinary(data []byte) error

type HelloElemVersionBitmap

type HelloElemVersionBitmap struct {
	HelloElemHeader
	Bitmaps []uint32
}

func NewHelloElemVersionBitmap

func NewHelloElemVersionBitmap() *HelloElemVersionBitmap

func (*HelloElemVersionBitmap) Header

func (*HelloElemVersionBitmap) Len

func (h *HelloElemVersionBitmap) Len() (n uint16)

func (*HelloElemVersionBitmap) MarshalBinary

func (h *HelloElemVersionBitmap) MarshalBinary() (data []byte, err error)

func (*HelloElemVersionBitmap) UnmarshalBinary

func (h *HelloElemVersionBitmap) UnmarshalBinary(data []byte) error

Jump to

Keyboard shortcuts

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