common

package
v0.0.0-...-e7dfef0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

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.

Types

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func NewResolver

func NewResolver(stack *stacks.PortStack, dhcp *stacks.DHCPClient) (*Resolver, error)

func (*Resolver) LookupNetIP

func (r *Resolver) LookupNetIP(host string) ([]netip.Addr, error)

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL