# Functions
AsUDP converts netip.AddrPort to net.UDPAddr.
DeviceLogger returns a [device.Logger] that logs to the given [zap.Logger].
GenerateRandomNodeAddr generates a random node address within the last 8 bytes of the given prefix.
LinkUp brings the WireGuard interface up.
NetworkPrefix returns IPv6 prefix for the SideroLink.
NewDevice creates a new device with settings.
PrepareDeviceConfig takes a list of peer events and prepares a list of peer configurations comparing them with the old configuration.
SetupIPToInterface sets up the IP address to the interface.
UAPIOpen opens a UAPI socket.
VirtualNetworkPrefix returns IPv6 prefix for the SideroLink over GRPC.
# Constants
InterfaceName is the name of the WireGuard interface.
LinkMTU is the suggested MTU of the link for Wireguard.
PeerDownInterval is the time since last handshake when established peer is considered to be down.
RecommendedPersistentKeepAliveInterval is the recommended interval for persistent keepalive.
# Structs
Device manages Wireguard link.
DeviceConfig is the configuration for the wireguard device.
PeerEvent is the event about peer state change.
# Interfaces
PeerHandler is an interface for handling peer events.
PeerSource is the interface of the "database" providing SideroLink peer information.