新TAP测试

This commit is contained in:
黄思敏 2022-08-31 18:14:31 +08:00
parent b885839c09
commit 5bae5ca7b5

View File

@ -112,6 +112,7 @@ func NewNetTunnel() *NetTunnel {
go func() {
for wbuf := range nt.writer {
var frame ethernet.Frame = wbuf
log.Printf("ifce write %d", len(frame))
_, err := nt.ifce.Write(frame)
if err != nil {
log.Println(err)
@ -164,7 +165,7 @@ func (nt *NetTunnel) SendFrames(stream gen.FrameService_SendFramesServer) error
if err != nil {
log.Panic(err)
}
log.Printf("request: %v", len(request.Frames))
frames := Decompress(request.GetFrames())
if len(frames) > 0 {
for _, frame := range frames {