ThomasHabets / arping

ARP Ping
http://www.habets.pp.se/synscan/programs.php
GNU General Public License v2.0
403 stars 63 forks source link

RFE: support the -f option for iputils arping compatibility #37

Closed scop closed 4 years ago

scop commented 4 years ago

iputils arping has the -f option which would be nice to have in your arping as well for compatibility:

  -f : quit on first reply

Maybe just aliasing it to -C 1 (capital C) would be close enough/suffice, if mimicing the iputils behavior isn't feasible. For the iputils one, specifying -f in addition to -c 1 is useful as it makes the command return quicker, immediately on the first received reply.

ThomasHabets commented 4 years ago

arping is at risk of running out of letters in the alphabet for options. So unless there's a specific problem this is adressing (the feature already exists, as you say, with -C 1) I'd say better to skip.

scop commented 4 years ago

The specific problem of incompatible arguments does exist.

https://github.com/GhostofGoes/getmac/pull/52#issuecomment-561989761 https://github.com/GhostofGoes/getmac/blob/master/getmac/getmac.py#L391

Being able to return as quickly as possible is very much a goal there, but cannot be cleanly achieved in a way that works with both arping variants.

ThomasHabets commented 4 years ago

If -C here is a superset of -f, why not add -C to the other arping instead?