diff --git a/tobiko/shell/ping/_interface.py b/tobiko/shell/ping/_interface.py index ff0cf0e45..2c8e4e98c 100644 --- a/tobiko/shell/ping/_interface.py +++ b/tobiko/shell/ping/_interface.py @@ -274,12 +274,62 @@ Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface] """.strip() +IP_VERSION_IPUTILS_PING_USAGE_NEW = """ +ping: invalid option -- '-' + +Usage + ping [options] + +Options: + dns name or ip address + -a use audible ping + -A use adaptive ping + -B sticky source address + -c stop after replies + -D print timestamps + -d use SO_DEBUG socket option + -f flood ping + -h print help and exit + -I either interface name or address + -i seconds between sending each packet + -L suppress loopback of multicast packets + -l send number of packages while waiting replies + -m tag the packets going out + -M define mtu discovery, can be one of + -n no dns name resolution + -O report outstanding replies + -p contents of padding byte + -q quiet output + -Q use quality of service bits + -s use as number of data bytes to be sent + -S use as SO_SNDBUF socket option value + -t define time to live + -U print user-to-user latency + -v verbose output + -V print version and exit + -w reply wait in seconds + -W time to wait for response + +IPv4 options: + -4 use IPv4 + -b allow pinging broadcast + -R record route + -T define timestamp, can be one of {timestamp_formats} + +IPv6 options: + -6 use IPv6 + -F define flow label, default is random + -N use icmp6 node info query, try as argument +""".strip().format(timestamp_formats="") + + @ping_interface class IpUtilsIpVersionPingInterface(IpUtilsPingInterface, IpVersionPingInterface): def match_ping_usage(self, usage): - return usage.startswith(IP_VERSION_IPUTILS_PING_USAGE) + return (usage.startswith(IP_VERSION_IPUTILS_PING_USAGE) or + usage.startswith(IP_VERSION_IPUTILS_PING_USAGE_NEW)) BUSYBOX_PING_USAGE = """