From a60ac0457738a4be8181780350052a7ef6826923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=80=9D=E6=95=8F?= Date: Thu, 1 Sep 2022 14:26:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0TAP=E6=B5=8B=E8=AF=95(TODO=20=E8=A7=A3?= =?UTF-8?q?=E6=9E=90arp)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netcard.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/netcard.go b/netcard.go index 829ed6f..4b7626c 100644 --- a/netcard.go +++ b/netcard.go @@ -101,9 +101,8 @@ func NewNetTunnel() *NetTunnel { log.Printf("% x len: %d", frame.Ethertype(), len(frame)) switch frame.Ethertype() { case ethernet.ARP: - log.Printf("bytes len: %d type(arp): % x", len(rbuf), frame.Ethertype()) // 数据长度 arp := ARP(frame) - log.Println(arp.IPv4Source(), arp.Source(), arp.IPv4Destination(), arp.Destination()) + log.Printf("bytes len: %d type(arp): % x src: %s(%s) dst: %s(%s)", len(arp), frame.Ethertype(), arp.IPv4Source(), arp.Source(), arp.IPv4Destination(), arp.Destination()) // 数据长度 SwapBytes(frame, 0, frame, 6, 6) binary.BigEndian.PutUint16(frame[20:22], 2)