3 ms·
Oh, interesting! Which ping have you got? Mine comes from the iputils-ping Debian package, which the man page confirms it's part of some broader iputils set of
by lucb1e 2y ago
Oh, interesting! Which ping have you got? Mine comes from the iputils-ping Debian package, which the man page confirms it's part of some broader iputils set of tools. I see there is also inetutils-ping which provides the same /bin/ping and /bin/ping6 commands, is that perhaps the one you've got?
For anyone wanting to replicate this "provides" query on Debian, I use `apt-file search /bin/ping` to list what packages have a file with that name -- this will also match `/usr/bin/ping6` (both prefixes and suffixes will match) but that was fine in this case. (If you just do `apt search ping` or something, you get a huge list of any package mentioning the word ping, which may be what you want when searching for something more broadly; and if you use `apt search /bin/ping` it comes up empty because it doesn't have file path data.)
Edit: now that I had looked up which utility it is, I figured I'd check the "is documentation enough" on how it finds which interface to use. It looks to me like it is `getaddrinfo` that decides it: https://github.com/iputils/iputils/blob/master/ping/ping.c#L648-L681 https://github.com/iputils/iputils/blob/master/ping/ping.c#L...
- Latty 2y agoYeah, I'm just using Arch's default iputils: > pkgfile $(which ping) core/iputils That doesn't provide a `ping6`, presumably as `ping -6` is the preferred solution.