新TAP测试(TODO 解析arp)
This commit is contained in:
parent
803f62c634
commit
75e03ae883
10
netcard.go
10
netcard.go
|
@ -209,11 +209,11 @@ func (nt *NetTunnel) SendFrames(stream gen.FrameService_SendFramesServer) error
|
||||||
log.Panic(err)
|
log.Panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
buf, err := Decompress(request.GetFrames())
|
// buf, err := Decompress(request.GetFrames())
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
log.Panic(err)
|
// log.Panic(err)
|
||||||
}
|
// }
|
||||||
nt.writer <- buf
|
nt.writer <- request.GetFrames()
|
||||||
|
|
||||||
// frames := Decompress(request.GetFrames())
|
// frames := Decompress(request.GetFrames())
|
||||||
// if len(frames) > 0 {
|
// if len(frames) > 0 {
|
||||||
|
|
|
@ -132,7 +132,7 @@ func (cli *RPCClient) run() {
|
||||||
|
|
||||||
// 发到对面的网卡
|
// 发到对面的网卡
|
||||||
err = stream.Send(&gen.RequestFrames{
|
err = stream.Send(&gen.RequestFrames{
|
||||||
Frames: Compress(buf),
|
Frames: buf,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panic(err)
|
log.Panic(err)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user