Documentation
¶
Index ¶
Constants ¶
View Source
const ( L2PodAnnouncementsInterfacePattern = "l2-pod-announcements-interface-pattern" EnableL2PodAnnouncements = "enable-l2-pod-announcements" )
Variables ¶
View Source
var Cell = cell.Module( "l2-pod-announcements-gneigh", "Gneigh processor sends gratuitous ARP and NDP packets for local pods", cell.Provide( newSender, func(c Config) L2PodAnnouncementConfig { return c }), cell.Config(defaultConfig), cell.Invoke(newGNeighProcessor), )
Cell processes k8s pod events for the local node and determines if a Gratuitous ARP|ND packet needs to be sent.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface struct {
// contains filtered or unexported fields
}
func InterfaceFromNetInterface ¶
InterfaceFromNetInterface constructs an Interface from the given *net.Interface.
func (Interface) HardwareAddr ¶
func (i Interface) HardwareAddr() net.HardwareAddr
HardwareAddr returns the interface hardware address.
type L2PodAnnouncementConfig ¶
type L2PodAnnouncementConfig interface {
Enabled() bool
}
type Sender ¶
type Sender interface {
// Send a Gratuitous ARP packet for a given IP, mapping it to a given source hardware
// address.
SendArp(iface Interface, ip netip.Addr, srcHW net.HardwareAddr) error
// Send a Gratuitous ND packet for a given IP, mapping it to a given source hardware
// address.
SendNd(iface Interface, ip netip.Addr, srcHW net.HardwareAddr) error
// NewArpSender returns a new client bound to a given interface that can
// be used to send multiple Gratuitous ARP packets, for efficiency reasons.
// It must be closed when no longer used.
NewArpSender(iface Interface) (ArpSender, error)
// NewNdSender returns a new client bound to a given interface that can
// be used to send multiple Gratuitous ND packets, for efficiency reasons.
// It must be closed when no longer used.
NewNdSender(iface Interface) (NdSender, error)
// InterfaceByIndex get Interface by ifindex
InterfaceByIndex(idx int) (Interface, error)
}
Click to show internal directories.
Click to hide internal directories.