Dual-stack ping command

Jan Sucan sucanjan at gmail.com
Sat Aug 3 12:30:05 UTC 2019


Hello,

my name is Jan and I'm a this year's GSoC student. My mentor is Alan 
Somers. I'm working on a new dual-stack ping command. You can find it here:

https://github.com/jansucan/freebsd/tree/ping/sbin/ping

It's still work in progress but it should be fully functional. The main 
goals were to remove code duplicity and make the code more maintainable 
while not changing stdout output. The new ping is based mainly on the 
old ping and ping6. The code was moved, compartmentalized, and modified 
rather than rewritten.
Usage information can be found in the new manual page. Options for IPv4 
target (ping) have not been changed. Options for IPv6 target (ping6) 
have been renamed not to conflict with the IPv4 options. Few of the most 
important features and changes are:

- It's possible to build IPv4-only, IPv6-only, and IPv4-IPv6 version.
- Major code duplicities have been eliminated (option parsing, 
initialization, signal handling, pinger loop).
- Use of global variables has been eliminated.
- The code has been compartmentalized into smaller separate source 
files. Unused code has been removed.
- Capsicum and Casper support has been added for IPv6 ping code too.
- Option parsing is extensively tested using ATF.

I would like to ask for a feedback.

Thanks
Jan



More information about the freebsd-net mailing list