fwutil

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeVAddrLAN

func MakeVAddrLAN(c fw.Config) vaddr.Suite
func MakeVAddrUplink(c fw.Config) vaddr.Suite

Types

type ConfigLANAddr

type ConfigLANAddr interface {
	// The IP+net of the LAN interface expected by local clients.
	LANAddr() (a fw.Addr, ok bool)
}

type ConfigLANHWAddr

type ConfigLANHWAddr interface {
	// The MAC address to use for the LAN. This is virtually assigned to
	// facilitate HA failover.
	LANHWAddr() net.HardwareAddr
}

type ConfigUplinkAddr

type ConfigUplinkAddr interface {
	// The IP+net of the uplink interface for connection.
	UplinkAddr() (a fw.Addr, ok bool)
}

If this interface isn't implemented by a fw.Config and ConfigUplinkHWAddr is, it's assumed DHCP will be used.

type ConfigUplinkHWAddr

type ConfigUplinkHWAddr interface {
	// The MAC address to use for the uplink interface. This is virtually
	// assigned to facilitate HA failover with picky (*cough* *cough* FiOS
	// *cough*) network hardware.
	UplinkHWAddr() net.HardwareAddr
}

Implementing this interface implies a virtual IP will be used. To specify a static virtual IP, implement ConfigUplinkAddr. If this interface is implemented and ConfigUplinkAddr is not implemented, a virtual IP will be requested using DHCP on the uplink.

type ConfigUplinkLeaseStore

type ConfigUplinkLeaseStore interface {
	// When ConfigUplinkAddr isn't implemented, the dhcp.LeaseStore to use when
	// using DHCP. This can be nil and DHCP will still work; it just won't save
	// leases.
	UplinkLeaseStore() dhcp.LeaseStore
}

Allows specifying the dhcp.LeaseStore when DHCP is used. DHCP is used when ConfigUplinkHWAddr is implemented and ConfigUplinkAddr is not.

Jump to

Keyboard shortcuts

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