From aede50e65783b6223ecfb4c81890d4ef963e33e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=80=9D=E6=95=8F?= Date: Mon, 29 Aug 2022 09:26:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index cc95037..15dd8e6 100644 --- a/main.go +++ b/main.go @@ -50,7 +50,7 @@ func testmain() { }() config := water.Config{ - DeviceType: water.TAP, + DeviceType: water.TUN, } config.Name = "stun" @@ -70,7 +70,7 @@ func testmain() { frame = frame[:n] log.Printf("DstMac: %s SrcMac: %s\n", waterutil.MACDestination(frame), waterutil.MACSource(frame)) - log.Printf("Dst: %s Src: %s\n", frame.Destination(), frame.Source()) + log.Printf("DstIP: %s SrcIP: %s\n", waterutil.IPv4Destination(frame), waterutil.IPv4Source(frame)) log.Printf("Ethertype: % x\n", frame.Ethertype()) // log.Printf("Payload: % x\n", frame.Payload())