测试
This commit is contained in:
parent
abfc67cb6b
commit
aede50e657
4
main.go
4
main.go
|
@ -50,7 +50,7 @@ func testmain() {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
config := water.Config{
|
config := water.Config{
|
||||||
DeviceType: water.TAP,
|
DeviceType: water.TUN,
|
||||||
}
|
}
|
||||||
config.Name = "stun"
|
config.Name = "stun"
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ func testmain() {
|
||||||
frame = frame[:n]
|
frame = frame[:n]
|
||||||
|
|
||||||
log.Printf("DstMac: %s SrcMac: %s\n", waterutil.MACDestination(frame), waterutil.MACSource(frame))
|
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("Ethertype: % x\n", frame.Ethertype())
|
||||||
// log.Printf("Payload: % x\n", frame.Payload())
|
// log.Printf("Payload: % x\n", frame.Payload())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user