On 22 Feb 13:50, Chris Green wrote:
I want a fast (as in less than a second, not 'computer fast') way of checking if a particular private IP is present on the LAN.
Now, assuming that your network interface has to come up first, and that it won't randomly change location between, there'll be a call to /etc/network/if-up.d/blah once the interface is up... So, the *obvious* thing to do, is do the test in there, and then cache the result, use that cached result for your test and your test is then sub 1 second.
Not exactly rocket science. It's an obvious case for only check on connection to a network.
Thanks,