two/internal/dhcpd/dhcpd.go
GnomeZworc 2e24a5da0a
f-86: agent: dummy, DNAT et open par VPC, DHCP 6 et 42, watchdog #86
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-10-26 23:25:15 +01:00

30 lines
433 B
Go

package dhcpd
import (
"net"
"time"
)
const LeaseTime = 12 * time.Hour
type SubnetConfig struct {
Network *net.IPNet
InterfaceIP net.IP
VPCRoute *net.IPNet
DefaultGateway net.IP
MTU int
}
func (c SubnetConfig) InterfaceMTU() int {
if c.MTU == 0 {
return 1500
}
return c.MTU
}
type Host struct {
MAC net.HardwareAddr
IP net.IP
VM string
DefaultRoute bool
}