新TAP测试
This commit is contained in:
parent
e8e66b6143
commit
b885839c09
|
@ -85,7 +85,7 @@ func NewNetTunnel() *NetTunnel {
|
|||
|
||||
switch frame.Ethertype() {
|
||||
case ethernet.ARP:
|
||||
log.Printf("bytes len: %d type: % x", len(rbuf), frame.Ethertype()) // 数据长度
|
||||
log.Printf("bytes len: %d type(arp): % x", len(rbuf), frame.Ethertype()) // 数据长度
|
||||
nt.clients.Range(func(key, value any) bool {
|
||||
if key == nt.ipv4key {
|
||||
return true
|
||||
|
@ -97,7 +97,7 @@ func NewNetTunnel() *NetTunnel {
|
|||
return true
|
||||
})
|
||||
case ethernet.IPv4:
|
||||
log.Printf("bytes len: %d type: % x", len(rbuf), frame)
|
||||
log.Printf("bytes len: %d type(ipv4): % x", len(rbuf), frame.Ethertype())
|
||||
log.Println(len(frame))
|
||||
}
|
||||
|
||||
|
|
|
@ -97,6 +97,7 @@ func (cli *RPCClient) run() {
|
|||
// Contact the server and print out its response.
|
||||
buf.Reset()
|
||||
Compress(buf, frames)
|
||||
frames = nil
|
||||
|
||||
// 发到对面的网卡
|
||||
err = stream.Send(&gen.Request{
|
||||
|
|
Loading…
Reference in New Issue
Block a user