This commit is contained in:
黄思敏 2022-08-25 18:17:18 +08:00
parent 7ae8c78c95
commit 185af2c1bf

3
tap.go
View File

@ -160,7 +160,8 @@ func (nc *NetCard) runRead() {
log.Fatal(err) log.Fatal(err)
} }
log.Printf("%v %v", rframe.Source(), rframe.Destination()) log.Panicf("%v", rframe)
log.Printf("%v %v", net.IP(rframe.Source()).String(), rframe.Destination())
if rframe.Ethertype() != ethernet.IPv4 { if rframe.Ethertype() != ethernet.IPv4 {
continue continue