测试
This commit is contained in:
parent
28df4d850d
commit
a88a1377c4
5
main.go
5
main.go
|
@ -25,7 +25,6 @@ func testmain() {
|
||||||
var a chan bool = make(chan bool)
|
var a chan bool = make(chan bool)
|
||||||
go func() {
|
go func() {
|
||||||
<-a
|
<-a
|
||||||
|
|
||||||
cmdstr := fmt.Sprintf("ip addr add %s dev stun", config.Network.Self.Virt)
|
cmdstr := fmt.Sprintf("ip addr add %s dev stun", config.Network.Self.Virt)
|
||||||
log.Println(cmdstr)
|
log.Println(cmdstr)
|
||||||
cmd := strings.Split(cmdstr, " ")
|
cmd := strings.Split(cmdstr, " ")
|
||||||
|
@ -61,8 +60,8 @@ func testmain() {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
frame = frame[:n]
|
frame = frame[:n]
|
||||||
log.Printf("Dst: %s\n", waterutil.IPv4Destination(frame))
|
log.Printf("Dst: %s %s\n", waterutil.IPv4Destination(frame), frame.Destination())
|
||||||
log.Printf("Src: %s\n", waterutil.IPv4Source(frame))
|
log.Printf("Src: %s %s\n", waterutil.IPv4Source(frame), frame.Source())
|
||||||
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