19

What is the source of the implementation of ping is Cygwin using?

It apparently isn't GNU ping (because in GNU ping, the number of pings to send is decided with -c X, while in Cygwin ping, it's decided with -n X).

Is it a custom ping? BusyBox ping? Toybox ping? NetBSD ping? OpenBSD ping? FreeBSD ping? Something else?

45

It's Windows ping. Just run:

which ping 

You'll get:

/cygdrive/c/WINDOWS/system32/ping
11

Cygwin ping is available on ping package from inetutils source

$ which ping
/usr/bin/ping 

$ cygcheck -f `which ping`
ping-1.9.4-1

x86_64 $ ping --help
Usage: ping [OPTION...] HOST ...
Send ICMP ECHO_REQUEST packets to network hosts.

 Options controlling ICMP request types:
      --address              send ICMP_ADDRESS packets (root only)
      --echo                 send ICMP_ECHO packets (default)
      --mask                 same as --address
      --timestamp            send ICMP_TIMESTAMP packets
  -t, --type=TYPE            send TYPE packets

 Options valid for all request types:

  -c, --count=NUMBER         stop after sending NUMBER packets
....
  • 7
    You should use command -v ping, not which ping. Also see How to check if a program exists from a Bash script? and the discussion around Posix and environments. – jww Sep 10 at 2:53
  • And which ping implementation is that? – OrangeDog Sep 10 at 9:44
  • GNU gnu.org/software/inetutils – matzeri Sep 10 at 22:02
  • @jww command -v ping and which ping produces exactly the same output on my system as the ping package is installed. Eventually you can use which -a ping – matzeri Sep 10 at 22:08
  • @matzeri the point is it won't on everyone else's system – OrangeDog Sep 11 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.