-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Meino Christian Cramer wrote:
> But in my case I have to avoid *ANY* timeouts (wayting for an answer > or another timeout for example: the timeout of "gethostbyname()") if > possible. My program has to react AS FAST AS POSSIBLE on error > conditions. So if I can check the availability of a net-connection > without actually accessing the net and wait for an answer (or an error > condition) it would be the best solution. The fact that I am urged to > use UDP makes things even more difficult. I know that simply > attaching the computer to a switch/hub and removing the net-plug there > makes the link check worthless ... but I want to try every possibility > to find out, whether there is the chance to contact the "target" > (wrong word...sorry) without trying exactly that (or similiar), > haveing to wait for an answer (or error condition) and paying the > panalty of timeouts then. > > If there is any net-programming hyper-guru out there who knows some > special tricks to achieve the shortest possible time of > reaction...here is someone who will thank her/him very much for any > help in advance ! :) This is probably not suitable (as it may take a couple of seconds to register a change of status) but would greping for 'inet addr:' in ifconfig eth0 do? - -- Regards, Mick -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFH/hY5Fp0QerLYPcRAnrwAJ9iZhFaUV2SLyYRxvmBteRGnbTBrQCeMa+9 3ykTpKtqG2PC4hQn06mD2r8= =NXSt -----END PGP SIGNATURE----- -- gentoo-user@gentoo.org mailing list