Note: This update fixes a serious bug.
Update:
- Add function to print binary or hex for debug.
- Print binary content of ICMP echo reply packet.
- Source IP address display in debug message, plan to add in echo message.
- Replace
recv
withrecvfrom
, fix sent faild in first time. - Fix the issue that program will receive all ICMP echo reply, now it filter the packet only id and seq matched, or drop it.
- Add retry, prog will judge ping failed when after 8 packet not for this prog.
- Add debug options.