新TAP测试(TODO 解析arp)

This commit is contained in:
黄思敏 2022-09-01 12:04:43 +08:00
parent 5fadad660c
commit 850015b4d0

View File

@ -21,7 +21,7 @@ import (
type NetTunnel struct {
ifce *water.Interface
ifmac []byte
ifmac net.HardwareAddr
shutdown *perfectshutdown.PerfectShutdown
writer chan []byte
@ -87,7 +87,8 @@ func NewNetTunnel() *NetTunnel {
for _, ifa := range ifas {
if ifa.Name == nt.ifce.Name() {
nt.ifmac = ifa.HardwareAddr[0:6]
nt.ifmac = ifa.HardwareAddr
log.Println(nt.ifmac)
}
}