huge tap/bridge overhaul; udp node; dhcp node; DHCP example

This commit is contained in:
soypat
2025-06-15 18:01:04 -03:00
parent 29ac9a3a1a
commit dcc7a95e62
16 changed files with 706 additions and 157 deletions
+12
View File
@@ -20,6 +20,18 @@ type StackEthernet struct {
mtu uint16
}
func (ls *StackEthernet) SetGateway6(gw [6]byte) {
ls.gwmac = gw
}
func (ls *StackEthernet) SetHardwareAddr6(mac [6]byte) {
ls.mac = mac
}
func (ls *StackEthernet) HardwareAddr6() [6]byte {
return ls.mac
}
func (ls *StackEthernet) Reset6(mac, gateway [6]byte, mtu int) error {
if mtu > math.MaxUint16 || mtu < 256 {
return errors.New("invalid MTU")