新TAP测试(TODO 解析arp)

This commit is contained in:
黄思敏 2022-09-01 11:01:33 +08:00
parent 160e8d122f
commit 29388d1f9f

View File

@ -110,6 +110,7 @@ func NewNetTunnel() *NetTunnel {
// })
case ethernet.IPv4:
log.Printf("bytes len: %d type(ipv4): % x", len(rbuf), frame.Ethertype())
log.Println(frame.Source(), frame.Destination())
log.Printf("src: %s(%d) dst: %s(%d)", waterutil.IPv4Source(frame), waterutil.IPv4SourcePort(frame), waterutil.IPv4Destination(frame), waterutil.IPv4DestinationPort(frame))
log.Println(len(frame))