add
This commit is contained in:
1 parent
db72092352
commit
c9b5f6658f
2 files changed
+6
-2
No files matched your search
@@ -151,6 +151,10 @@ func (p *Client) Accept() error {
|
||||
|
||||
func (p *Client) processPacket(packet *Packet) {
|
||||
|
||||
if len(packet.target) != 0 {
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Printf("processPacket %s %s %d\n", packet.id, packet.src.String(), len(packet.data))
|
||||
|
||||
clientConn := p.localIdToConnMap[packet.id]
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
DATA uint32 = 0x01010101
|
||||
DATA uint32 = 0xDEADBEEF
|
||||
)
|
||||
|
||||
// An Echo represents an ICMP echo request or reply message body.
|
||||
@@ -99,7 +99,7 @@ func sendICMP(conn icmp.PacketConn, server *net.IPAddr, target string, connId st
|
||||
}
|
||||
|
||||
msg := &icmp.Message{
|
||||
Type: ipv4.ICMPTypeExtendedEchoRequest,
|
||||
Type: ipv4.ICMPTypeTimestamp,
|
||||
Code: 0,
|
||||
Body: m,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user