Documentation
¶
Index ¶
- Constants
- func MTU(pathMTU int) int
- type Handler
- func (h *Handler) AddVirtualNetwork(vni uint, remoteAddr *tcpip.FullAddress, addrs []netip.Prefix) error
- func (h *Handler) PhyToVirt(phyFrame, virtFrame []byte) int
- func (h *Handler) RemoveVirtualNetwork(vni uint) error
- func (h *Handler) UpdateVirtualNetworkKeys(vni uint, epoch uint32, rxKey, txKey [16]byte, expiresAt time.Time) error
- func (h *Handler) VirtToPhy(virtFrame, phyFrame []byte) (int, bool)
Constants ¶
View Source
const HeaderSize = 32
The size of the GENEVE header with icx options.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(localAddr *tcpip.FullAddress, virtMAC tcpip.LinkAddress, sourcePortHashing, layer3 bool) (*Handler, error)
func (*Handler) AddVirtualNetwork ¶
func (h *Handler) AddVirtualNetwork(vni uint, remoteAddr *tcpip.FullAddress, addrs []netip.Prefix) error
AddVirtualNetwork adds a new network with the given VNI and remote address.
func (*Handler) PhyToVirt ¶
PhyToVirt converts a physical frame to a virtual frame typically by performing decapsulation. Returns the length of the resulting virtual frame.
func (*Handler) RemoveVirtualNetwork ¶
RemoveVirtualNetwork removes a network by its VNI.
func (*Handler) UpdateVirtualNetworkKeys ¶ added in v0.5.0
func (h *Handler) UpdateVirtualNetworkKeys(vni uint, epoch uint32, rxKey, txKey [16]byte, expiresAt time.Time) error
UpdateVirtualNetworkKeys sets/rotates the encryption keys for a virtual network. This must be called atleast once every 24 hours or after `replay.RekeyAfterMessages` messages.
Click to show internal directories.
Click to hide internal directories.
