测试
This commit is contained in:
parent
9a35a15897
commit
abfc67cb6b
2
main.go
2
main.go
|
@ -9,6 +9,7 @@ import (
|
||||||
|
|
||||||
"github.com/songgao/packets/ethernet"
|
"github.com/songgao/packets/ethernet"
|
||||||
"github.com/songgao/water"
|
"github.com/songgao/water"
|
||||||
|
"github.com/songgao/water/waterutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -68,6 +69,7 @@ func testmain() {
|
||||||
}
|
}
|
||||||
frame = frame[:n]
|
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("Dst: %s Src: %s\n", frame.Destination(), 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