diff --git a/netcard.go b/netcard.go index 28fb831..cbba34e 100644 --- a/netcard.go +++ b/netcard.go @@ -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)) } diff --git a/rpc_client.go b/rpc_client.go index a58163b..2511015 100644 --- a/rpc_client.go +++ b/rpc_client.go @@ -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{