> Hi all,
>
> I am writing a small linux application and at some point i want to know if
> the user is hooked to the internet. how can i tell if the user has
internet
> access at the moment ????

As you have already seen...I would do what follows:

1) Look for 5 or more well known hosts in Internet, that I know hardly comes
down
2) Ping all of them to see if they are alive
3) If none of them are alive...something have to be wrong with the
connection

Of course to 1), you can connect directly to a known working port and see if
you receive a wellcome message or something that tells yuo, you're connected

Eduardo

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to