vmnetworking

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupVM

func SetupVM(ctx context.Context, nws []Network, debug bool) (func(context.Context) error, func() error, error)

Types

type DHCPLease

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

DHCPLease provides a limited implementation of DHCP lease renewal and release.

It provides a limited implementation of the DHCP state machine defined in RFC 2131. More specifically, it only implements the RENEWING state defined in Section 4.4.5 (see 1). The REBINDING state is not implemented.

func (*DHCPLease) Release

func (l *DHCPLease) Release(ctx context.Context) error

Release releases the DHCP lease.

TODO(aker): Release is never called.

func (*DHCPLease) RenewLoop

func (l *DHCPLease) RenewLoop(ctx context.Context) error

RenewLoop runs the loop that periodically renews the DHCP lease.

func (*DHCPLease) Routers

func (l *DHCPLease) Routers() []netip.Addr

Routers returns the 'router' option received by the DHCP server.

type Network

type Network struct {
	MAC   net.HardwareAddr
	Addr4 netip.Prefix
	Addr6 netip.Prefix
	DHCP  bool
}

func (Network) Validate

func (nw Network) Validate() error

Jump to

Keyboard shortcuts

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