--===============1511649391== Content-Type: multipart/signed; boundary="nextPart1159852.OvmKAPH5OC"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1159852.OvmKAPH5OC Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Nathan Toone wrote: >Any pointers on going about doing this? The best I can tell you is to check if the default route(1) is present.=20 That covers some 90%(2) of the cases. The other 10% are people with=20 default routes present but no Internet, and people with no default route=20 but Internet connectivity. How you will do that, I don't know. You could try some low-level ioctls in= =20 order to read the routing table. Or you could try and parse the output of=20 `/sbin/route -n` or `netstat -rn`. I am sure you will have a nice time=20 figuring out all the possible formats for all platforms you want to run=20 the code on. (1) default route =3D route with a /0 (0.0.0.0) netmask (2) 78% of the statistics are invented Another solution would be to try and do whatever you want, or load=20 Google's homepage. If it fails, it's likely connectivity is down. =2D-=20 Thiago Macieira - thiago (AT) macieira (DOT) info PGP/GPG: 0x6EF45358; fingerprint: E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358 5. Swa he g=C3=A9anhwearf t=C3=B3 timbran, and hwonne he c=C3=B3m, l=C3=A1!= Unix cw=C3=A6=C3=B0 "Hello,=20 World". =C7=BCfre =C7=BDghwilc w=C3=A6s gl=C3=A6d and seo woruld w=C3=A6s f= r=C3=A9o. --nextPart1159852.OvmKAPH5OC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQBCEWw0M/XwBW70U1gRArz5AJ9OCoq8qLj9KKWCXfgC1F4iQ2GLvwCfWJoK GZHSbm7vy8ZlH20VMS5aQmY= =dkkz -----END PGP SIGNATURE----- --nextPart1159852.OvmKAPH5OC-- --===============1511649391== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============1511649391==--