caucy / batch_ping Goto Github PK
View Code? Open in Web Editor NEWsupport multi ping
support multi ping
使用batch ping 出现接收的包数大于发出的包数,因为在一个进程中同时进行了多次ping的动作
run err socket: The requested protocol has not been configured into the system, or no implementation for it exists.
在我的机器上实测当IP超出50个会panic,后来尝试将IP分成若干个小于50条的切片依次调用,只有第一次能执行成功,之后就一直是“it is time to exit”,请问如何解决
pid is stored as int but gets converted to uint16 and thus will never match when processPacket compares int on batchpinger to uint16 from packet
// Pinger.SendICMP
xid := p.id & 0xffff
body := &icmp.Echo{
ID: xid,
Seq: seqID,
Data: t,
}
// BatchPinger.processPacket
xid := p.id & 0xffff
if pkt.ID != xid {
...
}
source:, network:ip
ip 192.168.8.110, sended
ip 192.168.8.120, sended
not the process id
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x32a564]
goroutine 156 [running]:
github.com/caucy/batch_ping/ping.(*BatchPinger).ProcessPacket(0x2d08e60, 0x2d557c4, 0x9, 0x200)
E:/go_proj/src/github.com/caucy/batch_ping/ping/batch_ping.go:261 +0x1e8
github.com/caucy/batch_ping/ping.(*BatchPinger).RecvICMP(0x2d08e60, 0x2fd6b90, 0x2d05c40)
E:/go_proj/src/github.com/caucy/batch_ping/ping/batch_ping.go:160 +0x190
created by github.com/caucy/batch_ping/ping.(*BatchPinger).Run
E:/go_proj/src/github.com/caucy/batch_ping/ping/batch_ping.go:126 +0x1a0
模块只能mac 使用,给的测试代码放在windows上无法使用。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.