Versions in this module Expand all Collapse all v0 v0.0.2 Oct 1, 2023 v0.0.1 Sep 30, 2023 Changes in this version + const DefaultDHCPLeaseTTL + const DefaultDHCPTimeoutICMP + const ErrDupHostname — darwin/amd64, linux/amd64 + const ErrUnconfigured — darwin/amd64, linux/amd64 + const LeaseChangedAdded + const LeaseChangedAddedStatic + const LeaseChangedDBStore + const LeaseChangedRemovedAll + const LeaseChangedRemovedStatic + func Create(conf *ServerConfig) (s *server, err error) + func OptionFQDN(fqdn string) (opt dhcpv4.Option) — darwin/amd64, linux/amd64 + type DHCPServer interface + AddStaticLease func(l *Lease) (err error) + FindMACbyIP func(ip netip.Addr) (mac net.HardwareAddr) + GetLeases func(flags GetLeasesFlags) (leases []*Lease) + HostByIP func(ip netip.Addr) (host string) + IPByHost func(host string) (ip netip.Addr) + RemoveStaticLease func(l *Lease) (err error) + ResetLeases func(leases []*Lease) (err error) + Start func() (err error) + Stop func() (err error) + WriteDiskConfig4 func(c *V4ServerConf) + WriteDiskConfig6 func(c *V6ServerConf) + type GetLeasesFlags uint8 + const LeasesAll + const LeasesDynamic + const LeasesStatic + type Interface interface + Enabled func() (ok bool) + HostByIP func(ip netip.Addr) (host string) + IPByHost func(host string) (ip netip.Addr) + Leases func() (leases []*dhcpsvc.Lease) + MACByIP func(ip netip.Addr) (mac net.HardwareAddr) + Start func() (err error) + Stop func() (err error) + WriteDiskConfig func(c *ServerConfig) + type Lease struct + Expiry time.Time + HWAddr net.HardwareAddr + Hostname string + IP netip.Addr + IsStatic bool + func (l *Lease) Clone() (clone *Lease) + func (l *Lease) IsBlocklisted() (ok bool) + func (l *Lease) UnmarshalJSON(data []byte) (err error) + func (l Lease) MarshalJSON() ([]byte, error) + type OnLeaseChangedT func(flags int) + type ServerConfig struct + Conf4 V4ServerConf + Conf6 V6ServerConf + ConfigModified func() + DataDir string + Enabled bool + HTTPRegister aghhttp.RegisterFunc + InterfaceName string + LocalDomainName string + WorkDir string + type V4ServerConf struct + Enabled bool + GatewayIP netip.Addr + ICMPTimeout uint32 + InterfaceName string + LeaseDuration uint32 + Options []string + RangeEnd netip.Addr + RangeStart netip.Addr + SubnetMask netip.Addr + func (c *V4ServerConf) Validate() (err error) + type V6ServerConf struct + Enabled bool + InterfaceName string + LeaseDuration uint32 + RAAllowSLAAC bool + RASLAACOnly bool + RangeStart net.IP