Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveHardwareAddr ¶
func ResolveHardwareAddr(stack *stacks.PortStack, ip netip.Addr, timeout time.Duration) ([6]byte, error)
ResolveHardwareAddr obtains the hardware address of the given IP address.
func SetupWithDHCP ¶
func SetupWithDHCP(dev netif.InterfaceEthPoller, cfg SetupConfig) (*stacks.DHCPClient, *stacks.PortStack, error)
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
type SetupConfig ¶
type SetupConfig struct { // DHCP requested hostname. Hostname string // DHCP requested IP address. On failing to find DHCP server is used as static IP. RequestedIP string Logger *slog.Logger // Number of UDP ports to open for the stack. (we'll actually open one more than this for DHCP) UDPPorts uint16 // Number of TCP ports to open for the stack. TCPPorts uint16 // DHCPTimeout is the maximum time to wait for DHCP to complete. DHCPTimeout time.Duration }
Click to show internal directories.
Click to hide internal directories.