odp

package
v0.0.0-...-6b0aa22 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DATAPATH     = iota
	VPORT        = iota
	FLOW         = iota
	PACKET       = iota
	FAMILY_COUNT = iota
)
View Source
const (
	GENL_ID_GENERATE  = 0
	GENL_ID_CTRL      = syscall.NLMSG_MIN_TYPE
	GENL_ID_VFS_DQUOT = syscall.NLMSG_MIN_TYPE + 1
	GENL_ID_PMCRAID   = syscall.NLMSG_MIN_TYPE + 2
)

reserved static generic netlink identifiers:

View Source
const (
	CTRL_CMD_UNSPEC       = 0
	CTRL_CMD_NEWFAMILY    = 1
	CTRL_CMD_DELFAMILY    = 2
	CTRL_CMD_GETFAMILY    = 3
	CTRL_CMD_NEWOPS       = 4
	CTRL_CMD_DELOPS       = 5
	CTRL_CMD_GETOPS       = 6
	CTRL_CMD_NEWMCAST_GRP = 7
	CTRL_CMD_DELMCAST_GRP = 8
)
View Source
const (
	CTRL_ATTR_UNSPEC       = 0
	CTRL_ATTR_FAMILY_ID    = 1
	CTRL_ATTR_FAMILY_NAME  = 2
	CTRL_ATTR_VERSION      = 3
	CTRL_ATTR_HDRSIZE      = 4
	CTRL_ATTR_MAXATTR      = 5
	CTRL_ATTR_OPS          = 6
	CTRL_ATTR_MCAST_GROUPS = 7
)
View Source
const (
	CTRL_ATTR_MCAST_GRP_UNSPEC = 0
	CTRL_ATTR_MCAST_GRP_NAME   = 1
	CTRL_ATTR_MCAST_GRP_ID     = 2
)
View Source
const (
	OVS_DATAPATH_VERSION = 2
	OVS_VPORT_VERSION    = 1
	OVS_FLOW_VERSION     = 1
	OVS_PACKET_VERSION   = 1
)
View Source
const (
	OVS_DP_CMD_UNSPEC = 0
	OVS_DP_CMD_NEW    = 1
	OVS_DP_CMD_DEL    = 2
	OVS_DP_CMD_GET    = 3
	OVS_DP_CMD_SET    = 4
)
View Source
const (
	OVS_DP_ATTR_UNSPEC         = 0
	OVS_DP_ATTR_NAME           = 1
	OVS_DP_ATTR_UPCALL_PID     = 2
	OVS_DP_ATTR_STATS          = 3
	OVS_DP_ATTR_MEGAFLOW_STATS = 4
	OVS_DP_ATTR_USER_FEATURES  = 5
)
View Source
const (
	OVS_DP_F_UNALIGNED  = 1
	OVS_DP_F_VPORT_PIDS = 2
)
View Source
const (
	OVS_VPORT_CMD_UNSPEC = 0
	OVS_VPORT_CMD_NEW    = 1
	OVS_VPORT_CMD_DEL    = 2
	OVS_VPORT_CMD_GET    = 3
	OVS_VPORT_CMD_SET    = 4
)
View Source
const (
	OVS_VPORT_ATTR_UNSPEC     = 0
	OVS_VPORT_ATTR_PORT_NO    = 1
	OVS_VPORT_ATTR_TYPE       = 2
	OVS_VPORT_ATTR_NAME       = 3
	OVS_VPORT_ATTR_OPTIONS    = 4
	OVS_VPORT_ATTR_UPCALL_PID = 5
	OVS_VPORT_ATTR_STATS      = 6
)
View Source
const (
	OVS_VPORT_TYPE_UNSPEC   = 0
	OVS_VPORT_TYPE_NETDEV   = 1
	OVS_VPORT_TYPE_INTERNAL = 2
	OVS_VPORT_TYPE_GRE      = 3
	OVS_VPORT_TYPE_VXLAN    = 4
	OVS_VPORT_TYPE_GENEVE   = 5
)
View Source
const (
	OVS_TUNNEL_ATTR_UNSPEC   = 0
	OVS_TUNNEL_ATTR_DST_PORT = 1
)
View Source
const (
	OVS_FLOW_CMD_UNSPEC = 0
	OVS_FLOW_CMD_NEW    = 1
	OVS_FLOW_CMD_DEL    = 2
	OVS_FLOW_CMD_GET    = 3
	OVS_FLOW_CMD_SET    = 4
)
View Source
const (
	OVS_FLOW_ATTR_UNSPEC    = 0
	OVS_FLOW_ATTR_KEY       = 1
	OVS_FLOW_ATTR_ACTIONS   = 2
	OVS_FLOW_ATTR_STATS     = 3
	OVS_FLOW_ATTR_TCP_FLAGS = 4
	OVS_FLOW_ATTR_USED      = 5
	OVS_FLOW_ATTR_CLEAR     = 6
	OVS_FLOW_ATTR_MASK      = 7
)
View Source
const (
	OVS_KEY_ATTR_UNSPEC    = 0
	OVS_KEY_ATTR_ENCAP     = 1
	OVS_KEY_ATTR_PRIORITY  = 2
	OVS_KEY_ATTR_IN_PORT   = 3
	OVS_KEY_ATTR_ETHERNET  = 4
	OVS_KEY_ATTR_VLAN      = 5
	OVS_KEY_ATTR_ETHERTYPE = 6
	OVS_KEY_ATTR_IPV4      = 7
	OVS_KEY_ATTR_IPV6      = 8
	OVS_KEY_ATTR_TCP       = 9
	OVS_KEY_ATTR_UDP       = 10
	OVS_KEY_ATTR_ICMP      = 11
	OVS_KEY_ATTR_ICMPV6    = 12
	OVS_KEY_ATTR_ARP       = 13
	OVS_KEY_ATTR_ND        = 14
	OVS_KEY_ATTR_SKB_MARK  = 15
	OVS_KEY_ATTR_TUNNEL    = 16
	OVS_KEY_ATTR_SCTP      = 17
	OVS_KEY_ATTR_TCP_FLAGS = 18
	OVS_KEY_ATTR_DP_HASH   = 19
	OVS_KEY_ATTR_RECIRC_ID = 20
)
View Source
const (
	OVS_TUNNEL_KEY_ATTR_ID            = 0
	OVS_TUNNEL_KEY_ATTR_IPV4_SRC      = 1
	OVS_TUNNEL_KEY_ATTR_IPV4_DST      = 2
	OVS_TUNNEL_KEY_ATTR_TOS           = 3
	OVS_TUNNEL_KEY_ATTR_TTL           = 4
	OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT = 5
	OVS_TUNNEL_KEY_ATTR_CSUM          = 6
	OVS_TUNNEL_KEY_ATTR_OAM           = 7
	OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS   = 8
	OVS_TUNNEL_KEY_ATTR_TP_SRC        = 9
	OVS_TUNNEL_KEY_ATTR_TP_DST        = 10
	OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS    = 11
	OVS_TUNNEL_KEY_ATTR_IPV6_SRC      = 12
	OVS_TUNNEL_KEY_ATTR_IPV6_DST      = 13
)
View Source
const (
	OVS_ACTION_ATTR_UNSPEC    = 0
	OVS_ACTION_ATTR_OUTPUT    = 1
	OVS_ACTION_ATTR_USERSPACE = 2
	OVS_ACTION_ATTR_SET       = 3
	OVS_ACTION_ATTR_PUSH_VLAN = 4
	OVS_ACTION_ATTR_POP_VLAN  = 5
	OVS_ACTION_ATTR_SAMPLE    = 6
)
View Source
const (
	OVS_PACKET_CMD_UNSPEC  = 0
	OVS_PACKET_CMD_MISS    = 1
	OVS_PACKET_CMD_ACTION  = 2
	OVS_PACKET_CMD_EXECUTE = 3
)
View Source
const (
	OVS_PACKET_ATTR_UNSPEC   = 0
	OVS_PACKET_ATTR_PACKET   = 1
	OVS_PACKET_ATTR_KEY      = 2
	OVS_PACKET_ATTR_ACTIONS  = 3
	OVS_PACKET_ATTR_USERDATA = 4
)
View Source
const ALIGN_BUFFERS = 8
View Source
const ETH_ALEN = 6

Some generic netlink operations always return a reply message (e.g *_GET), others don't by default (e.g. *_NEW). In the latter case, NLM_F_ECHO forces a reply. This is undocumented AFAICT.

View Source
const SOL_NETLINK = 270

from linux/include/linux/socket.h

View Source
const SizeofGenlMsghdr = 4
View Source
const SizeofOvsFlowStats = 16
View Source
const SizeofOvsHeader = 4
View Source
const SizeofOvsKeyEthernet = 12

Variables

This section is empty.

Functions

func AllBytes

func AllBytes(data []byte, x byte) bool

func IsDatapathNameAlreadyExistsError

func IsDatapathNameAlreadyExistsError(err error) bool

func IsKernelLacksODPError

func IsKernelLacksODPError(err error) bool

func IsNoSuchDatapathError

func IsNoSuchDatapathError(err error) bool

func IsNoSuchFlowError

func IsNoSuchFlowError(err error) bool

func IsNoSuchVportError

func IsNoSuchVportError(err error) bool

func MakeAlignedByteSlice

func MakeAlignedByteSlice(len int) []byte

func MakeAlignedByteSliceCap

func MakeAlignedByteSliceCap(len int, cap int) []byte

Normal slice or array allocations in golang do not appear to be guaranteed to be aligned (though in practice they are). Unaligned access are slow on some architectures and blow up on others. So this allocates a slice aligned to ALIGN_BUFFERS.

Types

type Action

type Action interface {
	Equals(Action) bool
	// contains filtered or unexported methods
}

type Attr

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

type Attrs

type Attrs map[uint16][]byte

func ParseNestedAttrs

func ParseNestedAttrs(data []byte) (Attrs, error)

func (Attrs) Get

func (attrs Attrs) Get(typ uint16, optional bool) ([]byte, error)

func (Attrs) GetEmpty

func (attrs Attrs) GetEmpty(typ uint16) (bool, error)

func (Attrs) GetFixedBytes

func (attrs Attrs) GetFixedBytes(typ uint16, expect int, optional bool) ([]byte, error)

func (Attrs) GetNestedAttrs

func (attrs Attrs) GetNestedAttrs(typ uint16, optional bool) (Attrs, error)

func (Attrs) GetOptionalBytes

func (attrs Attrs) GetOptionalBytes(typ uint16, dest []byte) (bool, error)

func (Attrs) GetOptionalUint16

func (attrs Attrs) GetOptionalUint16(typ uint16) (uint16, bool, error)

func (Attrs) GetOptionalUint64

func (attrs Attrs) GetOptionalUint64(typ uint16) (uint64, bool, error)

func (Attrs) GetOptionalUint8

func (attrs Attrs) GetOptionalUint8(typ uint16) (uint8, bool, error)

func (Attrs) GetOrderedAttrs

func (attrs Attrs) GetOrderedAttrs(typ uint16) ([]Attr, error)

func (Attrs) GetString

func (attrs Attrs) GetString(typ uint16) (string, error)

func (Attrs) GetUint16

func (attrs Attrs) GetUint16(typ uint16) (uint16, error)

func (Attrs) GetUint32

func (attrs Attrs) GetUint32(typ uint16) (uint32, error)

func (Attrs) GetUint64

func (attrs Attrs) GetUint64(typ uint16) (uint64, error)

type BlobFlowKey

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

Most flow keys can be handled as opaque bytes.

func NewBlobFlowKey

func NewBlobFlowKey(typ uint16, size int) BlobFlowKey

func (BlobFlowKey) Equals

func (a BlobFlowKey) Equals(gb FlowKey) bool

func (BlobFlowKey) Ignored

func (key BlobFlowKey) Ignored() bool

func (BlobFlowKey) String

func (key BlobFlowKey) String() string

type BlobFlowKeyish

type BlobFlowKeyish interface {
	// contains filtered or unexported methods
}

type Cancelable

type Cancelable interface {
	Cancel() error
}

type Consumer

type Consumer interface {
	Error(err error, stopped bool)
}

type Datapath

type Datapath struct {
	Handle DatapathHandle
	Name   string
}

type DatapathHandle

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

func (DatapathHandle) ClearFlow

func (dp DatapathHandle) ClearFlow(f FlowSpec) error

func (DatapathHandle) ConsumeMisses

func (origDP DatapathHandle) ConsumeMisses(consumer MissConsumer) (Cancelable, error)

func (DatapathHandle) ConsumeVportEvents

func (dp DatapathHandle) ConsumeVportEvents(consumer VportEventsConsumer) (Cancelable, error)

func (DatapathHandle) CreateFlow

func (dp DatapathHandle) CreateFlow(f FlowSpec) error

func (DatapathHandle) CreateVport

func (dp DatapathHandle) CreateVport(spec VportSpec) (VportID, error)

func (DatapathHandle) Delete

func (dp DatapathHandle) Delete() error

func (DatapathHandle) DeleteFlow

func (dp DatapathHandle) DeleteFlow(fks FlowKeys) error

func (DatapathHandle) DeleteVport

func (dp DatapathHandle) DeleteVport(id VportID) error

func (DatapathHandle) EnumerateFlows

func (dp DatapathHandle) EnumerateFlows() ([]FlowInfo, error)

func (DatapathHandle) EnumerateVports

func (dp DatapathHandle) EnumerateVports() ([]Vport, error)

func (DatapathHandle) Execute

func (dp DatapathHandle) Execute(packet []byte, keys FlowKeys, actions []Action) error

func (DatapathHandle) ID

func (dp DatapathHandle) ID() DatapathID

func (DatapathHandle) LookupVport

func (dp DatapathHandle) LookupVport(id VportID) (Vport, error)

func (DatapathHandle) LookupVportByName

func (dp DatapathHandle) LookupVportByName(name string) (Vport, error)

func (DatapathHandle) LookupVportName

func (dp DatapathHandle) LookupVportName(id VportID) (string, error)

func (DatapathHandle) Reopen

func (dp DatapathHandle) Reopen() (DatapathHandle, error)

type DatapathID

type DatapathID int32

Datapaths are identified by the ifindex of their netdev.

type Dpif

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

func NewDpif

func NewDpif() (*Dpif, error)

func (*Dpif) Close

func (dpif *Dpif) Close() error

func (*Dpif) ConsumeVportEvents

func (dpif *Dpif) ConsumeVportEvents(consumer VportEventsConsumer) (Cancelable, error)

func (*Dpif) CreateDatapath

func (dpif *Dpif) CreateDatapath(name string) (DatapathHandle, error)

func (*Dpif) EnumerateDatapaths

func (dpif *Dpif) EnumerateDatapaths() (map[string]DatapathHandle, error)

func (*Dpif) LookupDatapath

func (dpif *Dpif) LookupDatapath(name string) (DatapathHandle, error)

func (*Dpif) LookupDatapathByID

func (dpif *Dpif) LookupDatapathByID(ifindex DatapathID) (Datapath, error)

func (*Dpif) LookupVportByName

func (dpif *Dpif) LookupVportByName(name string) (DatapathHandle, Vport, error)

func (*Dpif) Reopen

func (dpif *Dpif) Reopen() (*Dpif, error)

Open a dpif with a new socket, but reuing the family info

type EthernetFlowKey

type EthernetFlowKey struct {
	BlobFlowKey
}

func NewEthernetFlowKey

func NewEthernetFlowKey() EthernetFlowKey

func (EthernetFlowKey) Ignored

func (key EthernetFlowKey) Ignored() bool

func (EthernetFlowKey) Key

func (EthernetFlowKey) Mask

func (fk EthernetFlowKey) Mask() OvsKeyEthernet

func (*EthernetFlowKey) SetEthDst

func (fk *EthernetFlowKey) SetEthDst(addr [ETH_ALEN]byte)

func (*EthernetFlowKey) SetEthSrc

func (fk *EthernetFlowKey) SetEthSrc(addr [ETH_ALEN]byte)

func (*EthernetFlowKey) SetMaskedEthDst

func (fk *EthernetFlowKey) SetMaskedEthDst(addr [ETH_ALEN]byte,
	mask [ETH_ALEN]byte)

func (*EthernetFlowKey) SetMaskedEthSrc

func (fk *EthernetFlowKey) SetMaskedEthSrc(addr [ETH_ALEN]byte,
	mask [ETH_ALEN]byte)

func (EthernetFlowKey) String

func (fk EthernetFlowKey) String() string

type FlowInfo

type FlowInfo struct {
	FlowSpec
	Packets uint64
	Bytes   uint64
	Used    uint64
}

type FlowKey

type FlowKey interface {
	Ignored() bool
	Equals(FlowKey) bool
	// contains filtered or unexported methods
}

func NewInPortFlowKey

func NewInPortFlowKey(vport VportID) FlowKey

type FlowKeyParser

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

A FlowKeyParser describes how to parse a flow key of a particular type from a netlnk message

type FlowKeyParsers

type FlowKeyParsers map[uint16]FlowKeyParser

Maps an NL attribute type to the corresponding FlowKeyParser

type FlowKeys

type FlowKeys map[uint16]FlowKey

func MakeFlowKeys

func MakeFlowKeys() FlowKeys

func ParseFlowKeys

func ParseFlowKeys(keys Attrs, masks Attrs) (res FlowKeys, err error)

func (FlowKeys) Add

func (keys FlowKeys) Add(k FlowKey)

func (FlowKeys) Equals

func (a FlowKeys) Equals(b FlowKeys) bool

type FlowSpec

type FlowSpec struct {
	FlowKeys
	Actions []Action
}

func NewFlowSpec

func NewFlowSpec() FlowSpec

func (*FlowSpec) AddAction

func (f *FlowSpec) AddAction(a Action)

func (*FlowSpec) AddActions

func (f *FlowSpec) AddActions(as []Action)

func (*FlowSpec) AddKey

func (f *FlowSpec) AddKey(k FlowKey)

func (FlowSpec) Equals

func (a FlowSpec) Equals(b FlowSpec) bool

func (FlowSpec) String

func (f FlowSpec) String() string

type GeneveVportSpec

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

func (GeneveVportSpec) TypeName

func (GeneveVportSpec) TypeName() string

type GenlFamily

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

type GenlMsghdr

type GenlMsghdr struct {
	Cmd      uint8
	Version  uint8
	Reserved uint16
}

type GreVportSpec

type GreVportSpec struct {
	VportSpecBase
}

func (GreVportSpec) TypeName

func (GreVportSpec) TypeName() string

type InPortFlowKey

type InPortFlowKey struct {
	BlobFlowKey
}

func (InPortFlowKey) String

func (key InPortFlowKey) String() string

func (InPortFlowKey) VportID

func (k InPortFlowKey) VportID() VportID

type MissConsumer

type MissConsumer interface {
	Miss(packet []byte, flowKeys FlowKeys) error
	Error(err error, stopped bool)
}

type NetlinkError

type NetlinkError syscall.Errno

func (NetlinkError) Error

func (err NetlinkError) Error() string

type NetlinkSocket

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

func OpenNetlinkSocket

func OpenNetlinkSocket(protocol int) (*NetlinkSocket, error)

func (*NetlinkSocket) Close

func (s *NetlinkSocket) Close() error

func (*NetlinkSocket) LookupGenlFamily

func (s *NetlinkSocket) LookupGenlFamily(name string) (family GenlFamily, err error)

func (*NetlinkSocket) PortId

func (s *NetlinkSocket) PortId() uint32

func (*NetlinkSocket) Receive

func (s *NetlinkSocket) Receive(consumer func(*NlMsgParser) (bool, error)) error

func (*NetlinkSocket) Request

func (s *NetlinkSocket) Request(req *NlMsgBuilder) (resp *NlMsgParser, err error)

Do a netlink request that yields a single response message.

func (*NetlinkSocket) RequestMulti

func (s *NetlinkSocket) RequestMulti(req *NlMsgBuilder, consumer func(*NlMsgParser) error) error

Do a netlink request that yield multiple response messages.

type NlMsgBuilder

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

func NewNlMsgBuilder

func NewNlMsgBuilder(flags uint16, typ uint16) *NlMsgBuilder

func (*NlMsgBuilder) Align

func (nlmsg *NlMsgBuilder) Align(a int)

func (*NlMsgBuilder) AlignGrow

func (nlmsg *NlMsgBuilder) AlignGrow(a int, size uintptr) int

func (*NlMsgBuilder) Finish

func (nlmsg *NlMsgBuilder) Finish() (res []byte, seq uint32)

func (*NlMsgBuilder) Grow

func (nlmsg *NlMsgBuilder) Grow(size uintptr) int

func (*NlMsgBuilder) PutAttr

func (nlmsg *NlMsgBuilder) PutAttr(typ uint16, gen func())

func (*NlMsgBuilder) PutEmptyAttr

func (nlmsg *NlMsgBuilder) PutEmptyAttr(typ uint16)

func (*NlMsgBuilder) PutGenlMsghdr

func (nlmsg *NlMsgBuilder) PutGenlMsghdr(cmd uint8, version uint8) *GenlMsghdr

func (*NlMsgBuilder) PutNestedAttrs

func (nlmsg *NlMsgBuilder) PutNestedAttrs(typ uint16, gen func())

func (*NlMsgBuilder) PutSliceAttr

func (nlmsg *NlMsgBuilder) PutSliceAttr(typ uint16, data []byte)

func (*NlMsgBuilder) PutStringAttr

func (nlmsg *NlMsgBuilder) PutStringAttr(typ uint16, str string)

func (*NlMsgBuilder) PutUint16Attr

func (nlmsg *NlMsgBuilder) PutUint16Attr(typ uint16, val uint16)

func (*NlMsgBuilder) PutUint32Attr

func (nlmsg *NlMsgBuilder) PutUint32Attr(typ uint16, val uint32)

func (*NlMsgBuilder) PutUint8Attr

func (nlmsg *NlMsgBuilder) PutUint8Attr(typ uint16, val uint8)

type NlMsgParser

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

func (*NlMsgParser) Advance

func (nlmsg *NlMsgParser) Advance(size uintptr) error

func (*NlMsgParser) AlignAdvance

func (nlmsg *NlMsgParser) AlignAdvance(a int, size uintptr) (int, error)

func (*NlMsgParser) CheckAvailable

func (nlmsg *NlMsgParser) CheckAvailable(size uintptr) error

func (*NlMsgParser) CheckGenlMsghdr

func (nlmsg *NlMsgParser) CheckGenlMsghdr(cmd int, fallbackCmd int) (*GenlMsghdr, error)

func (*NlMsgParser) ExpectNlMsghdr

func (nlmsg *NlMsgParser) ExpectNlMsghdr(typ uint16) (*syscall.NlMsghdr, error)

func (*NlMsgParser) NlMsghdr

func (nlmsg *NlMsgParser) NlMsghdr() *syscall.NlMsghdr

func (*NlMsgParser) TakeAttrs

func (nlmsg *NlMsgParser) TakeAttrs() (Attrs, error)

type OutputAction

type OutputAction VportID

func NewOutputAction

func NewOutputAction(vport VportID) OutputAction

func (OutputAction) Equals

func (a OutputAction) Equals(bx Action) bool

func (OutputAction) String

func (oa OutputAction) String() string

func (OutputAction) VportID

func (oa OutputAction) VportID() VportID

type OvsFlowStats

type OvsFlowStats struct {
	NPackets uint64
	NBytes   uint64
}

type OvsHeader

type OvsHeader struct {
	DpIfIndex int32
}

type OvsKeyEthernet

type OvsKeyEthernet struct {
	EthSrc [ETH_ALEN]byte
	EthDst [ETH_ALEN]byte
}

type SetTunnelAction

type SetTunnelAction struct {
	TunnelAttrs
	Present TunnelAttrsPresence
}

func (SetTunnelAction) Equals

func (a SetTunnelAction) Equals(bx Action) bool

func (*SetTunnelAction) SetCsum

func (a *SetTunnelAction) SetCsum(csum bool)

func (*SetTunnelAction) SetDf

func (a *SetTunnelAction) SetDf(df bool)

func (*SetTunnelAction) SetIpv4Dst

func (a *SetTunnelAction) SetIpv4Dst(addr [4]byte)

func (*SetTunnelAction) SetIpv4Src

func (a *SetTunnelAction) SetIpv4Src(addr [4]byte)

func (*SetTunnelAction) SetTos

func (a *SetTunnelAction) SetTos(tos uint8)

func (*SetTunnelAction) SetTpDst

func (a *SetTunnelAction) SetTpDst(port uint16)

func (*SetTunnelAction) SetTpSrc

func (a *SetTunnelAction) SetTpSrc(port uint16)

func (*SetTunnelAction) SetTtl

func (a *SetTunnelAction) SetTtl(ttl uint8)

func (*SetTunnelAction) SetTunnelId

func (a *SetTunnelAction) SetTunnelId(id [8]byte)

func (SetTunnelAction) String

func (ta SetTunnelAction) String() string

type SetUnknownAction

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

func (SetUnknownAction) Equals

func (a SetUnknownAction) Equals(bx Action) bool

func (SetUnknownAction) String

func (a SetUnknownAction) String() string

type SimpleVportSpec

type SimpleVportSpec struct {
	VportSpecBase
	// contains filtered or unexported fields
}

func (SimpleVportSpec) TypeName

func (s SimpleVportSpec) TypeName() string

type TunnelAttrs

type TunnelAttrs struct {
	TunnelId [8]byte
	Ipv4Src  [4]byte
	Ipv4Dst  [4]byte
	Tos      uint8
	Ttl      uint8
	Df       bool
	Csum     bool
	TpSrc    uint16
	TpDst    uint16
}

type TunnelAttrsPresence

type TunnelAttrsPresence struct {
	TunnelId bool
	Ipv4Src  bool
	Ipv4Dst  bool
	Tos      bool
	Ttl      bool
	Df       bool
	Csum     bool
	TpSrc    bool
	TpDst    bool
}

type TunnelFlowKey

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

func (TunnelFlowKey) Equals

func (a TunnelFlowKey) Equals(gb FlowKey) bool

func (TunnelFlowKey) Ignored

func (key TunnelFlowKey) Ignored() bool

func (TunnelFlowKey) Key

func (fk TunnelFlowKey) Key() TunnelAttrs

func (TunnelFlowKey) Mask

func (fk TunnelFlowKey) Mask() TunnelAttrs

func (*TunnelFlowKey) SetCsum

func (fk *TunnelFlowKey) SetCsum(csum bool)

func (*TunnelFlowKey) SetDf

func (fk *TunnelFlowKey) SetDf(df bool)

func (*TunnelFlowKey) SetIpv4Dst

func (fk *TunnelFlowKey) SetIpv4Dst(addr [4]byte)

func (*TunnelFlowKey) SetIpv4Src

func (fk *TunnelFlowKey) SetIpv4Src(addr [4]byte)

func (*TunnelFlowKey) SetTos

func (fk *TunnelFlowKey) SetTos(tos uint8)

func (*TunnelFlowKey) SetTpDst

func (fk *TunnelFlowKey) SetTpDst(port uint16)

func (*TunnelFlowKey) SetTpSrc

func (fk *TunnelFlowKey) SetTpSrc(port uint16)

func (*TunnelFlowKey) SetTtl

func (fk *TunnelFlowKey) SetTtl(ttl uint8)

func (*TunnelFlowKey) SetTunnelId

func (fk *TunnelFlowKey) SetTunnelId(id [8]byte)

func (TunnelFlowKey) String

func (fk TunnelFlowKey) String() string

type UnknownFlowKey

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

A flow key of a type we don't know about

func (UnknownFlowKey) Equals

func (a UnknownFlowKey) Equals(gb FlowKey) bool

func (UnknownFlowKey) Ignored

func (key UnknownFlowKey) Ignored() bool

func (UnknownFlowKey) String

func (key UnknownFlowKey) String() string

type Vport

type Vport struct {
	ID   VportID
	Spec VportSpec
}

type VportEventsConsumer

type VportEventsConsumer interface {
	VportCreated(dpid DatapathID, vport Vport) error
	VportDeleted(dpid DatapathID, vport Vport) error
	Error(err error, stopped bool)
}

type VportID

type VportID uint32

Vport numbers are scoped to a particular datapath

type VportSpec

type VportSpec interface {
	TypeName() string
	Name() string
	// contains filtered or unexported methods
}

func NewGeneveVportSpec

func NewGeneveVportSpec(name string, port uint16) VportSpec

func NewGreVportSpec

func NewGreVportSpec(name string) VportSpec

func NewInternalVportSpec

func NewInternalVportSpec(name string) VportSpec

func NewNetdevVportSpec

func NewNetdevVportSpec(name string) VportSpec

func NewVxlanVportSpec

func NewVxlanVportSpec(name string, port uint16) VportSpec

type VportSpecBase

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

func (VportSpecBase) Name

func (v VportSpecBase) Name() string

type VxlanVportSpec

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

func (VxlanVportSpec) TypeName

func (VxlanVportSpec) TypeName() string

Jump to

Keyboard shortcuts

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