mirror of
https://github.com/soypat/lneto.git
synced 2026-08-19 06:04:01 +00:00
huge tap/bridge overhaul; udp node; dhcp node; DHCP example
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user