Add ping utility
Created by: batonius
Problem: Redox doesn't have the ping
utility.
Solution: Introduce the ping
utility with minimal required features.
Changes introduced by this pull request:
- The
ping
utility has been added. - The utility close follows the behavior of the
ping
utility from iputils. - The utility supports both IPv4 and host name destinations.
- The utility supports
-h
,-c
and-i
options. - The utility doesn't require root privileges, suid bit or raw_net capability.
- Several instances of the utility are able to work in parallel without interfering.
Drawbacks:
- The utility has no access to the TTL field of the response packet.
- Without the -c argument
ping
sends requests indefinitely and can't be interrupted with Ctrl-C. It provides no signal handlers and should be terminated on SIGINT, I suppose it has something to do with the current implementations of signals in Redox.
State: Redox has ping
utility with the traditional behavior.
Other: This PR requires redox-os/netstack#1.