新TAP测试(TODO 解析arp)
This commit is contained in:
parent
5fadad660c
commit
850015b4d0
|
@ -21,7 +21,7 @@ import (
|
||||||
|
|
||||||
type NetTunnel struct {
|
type NetTunnel struct {
|
||||||
ifce *water.Interface
|
ifce *water.Interface
|
||||||
ifmac []byte
|
ifmac net.HardwareAddr
|
||||||
|
|
||||||
shutdown *perfectshutdown.PerfectShutdown
|
shutdown *perfectshutdown.PerfectShutdown
|
||||||
writer chan []byte
|
writer chan []byte
|
||||||
|
@ -87,7 +87,8 @@ func NewNetTunnel() *NetTunnel {
|
||||||
|
|
||||||
for _, ifa := range ifas {
|
for _, ifa := range ifas {
|
||||||
if ifa.Name == nt.ifce.Name() {
|
if ifa.Name == nt.ifce.Name() {
|
||||||
nt.ifmac = ifa.HardwareAddr[0:6]
|
nt.ifmac = ifa.HardwareAddr
|
||||||
|
log.Println(nt.ifmac)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user