Documentation ¶
Index ¶
- Constants
- func AllBytes(data []byte, x byte) bool
- func IsDatapathNameAlreadyExistsError(err error) bool
- func IsKernelLacksODPError(err error) bool
- func IsNoSuchDatapathError(err error) bool
- func IsNoSuchFlowError(err error) bool
- func IsNoSuchVportError(err error) bool
- func MakeAlignedByteSlice(len int) []byte
- func MakeAlignedByteSliceCap(len int, cap int) []byte
- type Action
- type Attr
- type Attrs
- func (attrs Attrs) Get(typ uint16, optional bool) ([]byte, error)
- func (attrs Attrs) GetEmpty(typ uint16) (bool, error)
- func (attrs Attrs) GetFixedBytes(typ uint16, expect int, optional bool) ([]byte, error)
- func (attrs Attrs) GetNestedAttrs(typ uint16, optional bool) (Attrs, error)
- func (attrs Attrs) GetOptionalBytes(typ uint16, dest []byte) (bool, error)
- func (attrs Attrs) GetOptionalUint16(typ uint16) (uint16, bool, error)
- func (attrs Attrs) GetOptionalUint64(typ uint16) (uint64, bool, error)
- func (attrs Attrs) GetOptionalUint8(typ uint16) (uint8, bool, error)
- func (attrs Attrs) GetOrderedAttrs(typ uint16) ([]Attr, error)
- func (attrs Attrs) GetString(typ uint16) (string, error)
- func (attrs Attrs) GetUint16(typ uint16) (uint16, error)
- func (attrs Attrs) GetUint32(typ uint16) (uint32, error)
- func (attrs Attrs) GetUint64(typ uint16) (uint64, error)
- type BlobFlowKey
- type BlobFlowKeyish
- type Cancelable
- type Consumer
- type Datapath
- type DatapathHandle
- func (dp DatapathHandle) ClearFlow(f FlowSpec) error
- func (origDP DatapathHandle) ConsumeMisses(consumer MissConsumer) (Cancelable, error)
- func (dp DatapathHandle) ConsumeVportEvents(consumer VportEventsConsumer) (Cancelable, error)
- func (dp DatapathHandle) CreateFlow(f FlowSpec) error
- func (dp DatapathHandle) CreateVport(spec VportSpec) (VportID, error)
- func (dp DatapathHandle) Delete() error
- func (dp DatapathHandle) DeleteFlow(fks FlowKeys) error
- func (dp DatapathHandle) DeleteVport(id VportID) error
- func (dp DatapathHandle) EnumerateFlows() ([]FlowInfo, error)
- func (dp DatapathHandle) EnumerateVports() ([]Vport, error)
- func (dp DatapathHandle) Execute(packet []byte, keys FlowKeys, actions []Action) error
- func (dp DatapathHandle) ID() DatapathID
- func (dp DatapathHandle) LookupVport(id VportID) (Vport, error)
- func (dp DatapathHandle) LookupVportByName(name string) (Vport, error)
- func (dp DatapathHandle) LookupVportName(id VportID) (string, error)
- func (dp DatapathHandle) Reopen() (DatapathHandle, error)
- type DatapathID
- type Dpif
- func (dpif *Dpif) Close() error
- func (dpif *Dpif) ConsumeVportEvents(consumer VportEventsConsumer) (Cancelable, error)
- func (dpif *Dpif) CreateDatapath(name string) (DatapathHandle, error)
- func (dpif *Dpif) EnumerateDatapaths() (map[string]DatapathHandle, error)
- func (dpif *Dpif) LookupDatapath(name string) (DatapathHandle, error)
- func (dpif *Dpif) LookupDatapathByID(ifindex DatapathID) (Datapath, error)
- func (dpif *Dpif) LookupVportByName(name string) (DatapathHandle, Vport, error)
- func (dpif *Dpif) Reopen() (*Dpif, error)
- type EthernetFlowKey
- func (key EthernetFlowKey) Ignored() bool
- func (fk EthernetFlowKey) Key() OvsKeyEthernet
- func (fk EthernetFlowKey) Mask() OvsKeyEthernet
- func (fk *EthernetFlowKey) SetEthDst(addr [ETH_ALEN]byte)
- func (fk *EthernetFlowKey) SetEthSrc(addr [ETH_ALEN]byte)
- func (fk *EthernetFlowKey) SetMaskedEthDst(addr [ETH_ALEN]byte, mask [ETH_ALEN]byte)
- func (fk *EthernetFlowKey) SetMaskedEthSrc(addr [ETH_ALEN]byte, mask [ETH_ALEN]byte)
- func (fk EthernetFlowKey) String() string
- type FlowInfo
- type FlowKey
- type FlowKeyParser
- type FlowKeyParsers
- type FlowKeys
- type FlowSpec
- type GeneveVportSpec
- type GenlFamily
- type GenlMsghdr
- type GreVportSpec
- type InPortFlowKey
- type MissConsumer
- type NetlinkError
- type NetlinkSocket
- func (s *NetlinkSocket) Close() error
- func (s *NetlinkSocket) LookupGenlFamily(name string) (family GenlFamily, err error)
- func (s *NetlinkSocket) PortId() uint32
- func (s *NetlinkSocket) Receive(consumer func(*NlMsgParser) (bool, error)) error
- func (s *NetlinkSocket) Request(req *NlMsgBuilder) (resp *NlMsgParser, err error)
- func (s *NetlinkSocket) RequestMulti(req *NlMsgBuilder, consumer func(*NlMsgParser) error) error
- type NlMsgBuilder
- func (nlmsg *NlMsgBuilder) Align(a int)
- func (nlmsg *NlMsgBuilder) AlignGrow(a int, size uintptr) int
- func (nlmsg *NlMsgBuilder) Finish() (res []byte, seq uint32)
- func (nlmsg *NlMsgBuilder) Grow(size uintptr) int
- func (nlmsg *NlMsgBuilder) PutAttr(typ uint16, gen func())
- func (nlmsg *NlMsgBuilder) PutEmptyAttr(typ uint16)
- func (nlmsg *NlMsgBuilder) PutGenlMsghdr(cmd uint8, version uint8) *GenlMsghdr
- func (nlmsg *NlMsgBuilder) PutNestedAttrs(typ uint16, gen func())
- func (nlmsg *NlMsgBuilder) PutSliceAttr(typ uint16, data []byte)
- func (nlmsg *NlMsgBuilder) PutStringAttr(typ uint16, str string)
- func (nlmsg *NlMsgBuilder) PutUint16Attr(typ uint16, val uint16)
- func (nlmsg *NlMsgBuilder) PutUint32Attr(typ uint16, val uint32)
- func (nlmsg *NlMsgBuilder) PutUint8Attr(typ uint16, val uint8)
- type NlMsgParser
- func (nlmsg *NlMsgParser) Advance(size uintptr) error
- func (nlmsg *NlMsgParser) AlignAdvance(a int, size uintptr) (int, error)
- func (nlmsg *NlMsgParser) CheckAvailable(size uintptr) error
- func (nlmsg *NlMsgParser) CheckGenlMsghdr(cmd int, fallbackCmd int) (*GenlMsghdr, error)
- func (nlmsg *NlMsgParser) ExpectNlMsghdr(typ uint16) (*syscall.NlMsghdr, error)
- func (nlmsg *NlMsgParser) NlMsghdr() *syscall.NlMsghdr
- func (nlmsg *NlMsgParser) TakeAttrs() (Attrs, error)
- type OutputAction
- type OvsFlowStats
- type OvsHeader
- type OvsKeyEthernet
- type SetTunnelAction
- func (a SetTunnelAction) Equals(bx Action) bool
- func (a *SetTunnelAction) SetCsum(csum bool)
- func (a *SetTunnelAction) SetDf(df bool)
- func (a *SetTunnelAction) SetIpv4Dst(addr [4]byte)
- func (a *SetTunnelAction) SetIpv4Src(addr [4]byte)
- func (a *SetTunnelAction) SetTos(tos uint8)
- func (a *SetTunnelAction) SetTpDst(port uint16)
- func (a *SetTunnelAction) SetTpSrc(port uint16)
- func (a *SetTunnelAction) SetTtl(ttl uint8)
- func (a *SetTunnelAction) SetTunnelId(id [8]byte)
- func (ta SetTunnelAction) String() string
- type SetUnknownAction
- type SimpleVportSpec
- type TunnelAttrs
- type TunnelAttrsPresence
- type TunnelFlowKey
- func (a TunnelFlowKey) Equals(gb FlowKey) bool
- func (key TunnelFlowKey) Ignored() bool
- func (fk TunnelFlowKey) Key() TunnelAttrs
- func (fk TunnelFlowKey) Mask() TunnelAttrs
- func (fk *TunnelFlowKey) SetCsum(csum bool)
- func (fk *TunnelFlowKey) SetDf(df bool)
- func (fk *TunnelFlowKey) SetIpv4Dst(addr [4]byte)
- func (fk *TunnelFlowKey) SetIpv4Src(addr [4]byte)
- func (fk *TunnelFlowKey) SetTos(tos uint8)
- func (fk *TunnelFlowKey) SetTpDst(port uint16)
- func (fk *TunnelFlowKey) SetTpSrc(port uint16)
- func (fk *TunnelFlowKey) SetTtl(ttl uint8)
- func (fk *TunnelFlowKey) SetTunnelId(id [8]byte)
- func (fk TunnelFlowKey) String() string
- type UnknownFlowKey
- type Vport
- type VportEventsConsumer
- type VportID
- type VportSpec
- type VportSpecBase
- type VxlanVportSpec
Constants ¶
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:
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 )
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 )
const ( CTRL_ATTR_MCAST_GRP_UNSPEC = 0 CTRL_ATTR_MCAST_GRP_NAME = 1 CTRL_ATTR_MCAST_GRP_ID = 2 )
const ( OVS_DATAPATH_VERSION = 2 OVS_VPORT_VERSION = 1 OVS_FLOW_VERSION = 1 OVS_PACKET_VERSION = 1 )
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 )
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 )
const ( OVS_DP_F_UNALIGNED = 1 OVS_DP_F_VPORT_PIDS = 2 )
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 )
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 )
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 )
const ( OVS_TUNNEL_ATTR_UNSPEC = 0 OVS_TUNNEL_ATTR_DST_PORT = 1 )
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 )
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 )
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 )
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 )
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 )
const ( OVS_PACKET_CMD_UNSPEC = 0 OVS_PACKET_CMD_MISS = 1 OVS_PACKET_CMD_ACTION = 2 OVS_PACKET_CMD_EXECUTE = 3 )
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 )
const ALIGN_BUFFERS = 8
const DumpFlags = syscall.NLM_F_DUMP | syscall.NLM_F_REQUEST
const ETH_ALEN = 6
const RequestFlags = syscall.NLM_F_REQUEST | syscall.NLM_F_ECHO
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.
const SOL_NETLINK = 270
from linux/include/linux/socket.h
const SizeofGenlMsghdr = 4
const SizeofOvsFlowStats = 16
const SizeofOvsHeader = 4
const SizeofOvsKeyEthernet = 12
Variables ¶
This section is empty.
Functions ¶
func IsKernelLacksODPError ¶
func IsNoSuchDatapathError ¶
func IsNoSuchFlowError ¶
func IsNoSuchVportError ¶
func MakeAlignedByteSlice ¶
func MakeAlignedByteSliceCap ¶
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 Attrs ¶
func ParseNestedAttrs ¶
func (Attrs) GetFixedBytes ¶
func (Attrs) GetNestedAttrs ¶
func (Attrs) GetOptionalBytes ¶
func (Attrs) GetOptionalUint16 ¶
func (Attrs) GetOptionalUint64 ¶
func (Attrs) GetOptionalUint8 ¶
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 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 Dpif ¶
type Dpif struct {
// contains filtered or unexported fields
}
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)
type EthernetFlowKey ¶
type EthernetFlowKey struct {
BlobFlowKey
}
func NewEthernetFlowKey ¶
func NewEthernetFlowKey() EthernetFlowKey
func (EthernetFlowKey) Ignored ¶
func (key EthernetFlowKey) Ignored() bool
func (EthernetFlowKey) Key ¶
func (fk EthernetFlowKey) Key() OvsKeyEthernet
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 FlowKey ¶
type FlowKey interface { Ignored() bool Equals(FlowKey) bool // contains filtered or unexported methods }
func NewInPortFlowKey ¶
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 ¶
func MakeFlowKeys ¶
func MakeFlowKeys() FlowKeys
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 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 NetlinkError ¶
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) 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 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 TunnelAttrsPresence ¶
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 VportEventsConsumer ¶
type VportEventsConsumer interface { VportCreated(dpid DatapathID, vport Vport) error VportDeleted(dpid DatapathID, vport Vport) error Error(err error, stopped bool) }
type VportSpec ¶
type VportSpec interface { TypeName() string Name() string // contains filtered or unexported methods }
func NewGeneveVportSpec ¶
func NewGreVportSpec ¶
func NewInternalVportSpec ¶
func NewNetdevVportSpec ¶
func NewVxlanVportSpec ¶
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