Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Re: OT: How to check for an existing ethernet link ?
Date: Sun, 01 Oct 2006 17:28:41
Message-Id: efot8v$kps$1@sea.gmane.org
In Reply to: Re: [gentoo-user] Re: OT: How to check for an existing ethernet link ? by Meino Christian Cramer
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Meino Christian Cramer wrote:
5
6 > But in my case I have to avoid *ANY* timeouts (wayting for an answer
7 > or another timeout for example: the timeout of "gethostbyname()") if
8 > possible. My program has to react AS FAST AS POSSIBLE on error
9 > conditions. So if I can check the availability of a net-connection
10 > without actually accessing the net and wait for an answer (or an error
11 > condition) it would be the best solution. The fact that I am urged to
12 > use UDP makes things even more difficult. I know that simply
13 > attaching the computer to a switch/hub and removing the net-plug there
14 > makes the link check worthless ... but I want to try every possibility
15 > to find out, whether there is the chance to contact the "target"
16 > (wrong word...sorry) without trying exactly that (or similiar),
17 > haveing to wait for an answer (or error condition) and paying the
18 > panalty of timeouts then.
19 >
20 > If there is any net-programming hyper-guru out there who knows some
21 > special tricks to achieve the shortest possible time of
22 > reaction...here is someone who will thank her/him very much for any
23 > help in advance ! :)
24
25 This is probably not suitable (as it may take a couple of seconds to
26 register a change of status) but would greping for 'inet addr:' in ifconfig
27 eth0 do?
28 - --
29 Regards,
30 Mick
31 -----BEGIN PGP SIGNATURE-----
32 Version: GnuPG v1.4.5 (GNU/Linux)
33
34 iD8DBQFFH/hY5Fp0QerLYPcRAnrwAJ9iZhFaUV2SLyYRxvmBteRGnbTBrQCeMa+9
35 3ykTpKtqG2PC4hQn06mD2r8=
36 =NXSt
37 -----END PGP SIGNATURE-----
38
39 --
40 gentoo-user@g.o mailing list