Documentation
¶
Index ¶
Constants ¶
View Source
const ( LWTUNNEL_IP_UNSPEC = iota LWTUNNEL_IP_ID LWTUNNEL_IP_DST LWTUNNEL_IP_SRC LWTUNNEL_IP_TTL LWTUNNEL_IP_TOS LWTUNNEL_IP_FLAGS LWTUNNEL_IP_PAD LWTUNNEL_IP_OPTS )
View Source
const ( // DefaultGeneveMTU is the MTU for Geneve tunnel interfaces. Must be >= // the tunnel TUN MTU (1420) so that overlay packets are not fragmented // on the Geneve leg. Safe to set high since Geneve runs over VPC // networks that support jumbo frames. DefaultGeneveMTU = 1450 )
Variables ¶
This section is empty.
Functions ¶
func WithDevName ¶
func WithDevName(dev string) option
WithDevName sets the name of the Geneve interface.
Types ¶
type Endpoint ¶
type Endpoint struct {
// Dst is the destination prefix that should be sent over the tunnel.
Dst tunnet.NetULA
// Remote is a VTEP/VNE address of a remote tunnel endpoint.
Remote netip.Addr
}
Endpoint represents a tunnel route.
type Geneve ¶
type Geneve struct {
// contains filtered or unexported fields
}
Geneve manages Geneve tunnel interfaces and routes.
func NewGeneve ¶
func NewGeneve(opts ...option) *Geneve
NewGeneve creates a new Geneve tunnel manager.
func (*Geneve) SetAddr ¶
SetAddr sets the IPv6 overlay address on the Geneve interface, removing any previously assigned overlay addresses. This is optional and only needed for the originating end of the tunnel to assign an inner source IP address.
func (*Geneve) SyncEndpoints ¶
SyncEndpoints syncs tunnel endpoints. Endpoints that are missing from eps are removed immediately.
type IPEncap ¶
type IPEncap struct {
ID uint32 // VNI - Virtual Network Identifier (24 bits)
Remote net.IP // Remote tunnel endpoint IP address
TTL uint8 // Time to live (8 bits)
}
IPEncap represents IP tunnel encapsulation. Implements netlink.Encap interface.
Click to show internal directories.
Click to hide internal directories.