This commit is contained in:
黄思敏 2022-08-29 09:26:16 +08:00
parent abfc67cb6b
commit aede50e657

View File

@ -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())