测试
This commit is contained in:
parent
c3ef9455f0
commit
bebad295ad
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/md5"
|
||||
"encoding/binary"
|
||||
"encoding/gob"
|
||||
"fmt"
|
||||
|
@ -219,6 +220,9 @@ func (nc *NetCard) runRead() {
|
|||
bytesMap[realAddr] = buffer
|
||||
}
|
||||
|
||||
h := md5.New()
|
||||
h.Write([]byte(rframe))
|
||||
log.Printf("%x", h.Sum(nil))
|
||||
buffer.BytesArray = append(buffer.BytesArray, []byte(rframe))
|
||||
}
|
||||
|
||||
|
@ -271,8 +275,10 @@ func (nc *NetCard) runWrite() {
|
|||
}
|
||||
|
||||
for _, buf := range bufs {
|
||||
h := md5.New()
|
||||
h.Write(buf)
|
||||
|
||||
log.Printf("get wframes decode len: %d, write buf: %d", len(buf), len(buf))
|
||||
log.Printf("get wframes decode len: %d, write buf hash: %x", len(buf), h.Sum(nil))
|
||||
log.Printf("get decode frames decode source: %s dst: %s", waterutil.IPv4Source(buf), waterutil.IPv4Destination(buf))
|
||||
_, err := ifce.Write(buf)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user