Marcus,

looking at Microsoft documentation seems to indicate if
FLAG_ICC_FORCE_CONNECTION is set, it should try to ping the URL.

http://msdn.microsoft.com/workshop/networking/wininet/reference/functions/In
ternetCheckConnection.asp

        Stephane Lussier
        Macadamian Technologies

> -----Original Message-----
> From: Marcus Meissner [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 26, 2000 6:01 AM
> To: Aric Stewart
> Cc: [EMAIL PROTECTED]
> Subject: Re: InternetCheckConnection
>
>
> On Tue, Jul 25, 2000 at 10:14:25AM -0500, Aric Stewart wrote:
> > This implements InternetCheckConnection. Because i cannot do it properly
> > i had to use a kludge where i call ping via a system call. Explanation
> > as well as the way i wanted to to the ping are in the code.
>
> I have doubts about this is being a good idea.
>
> pinging www.ibm.net? Not a good idea, this can be considered a denail of
> service attack. Imagine an application doing
>
>       TryFireUpDialin();
>       while (!InternetCheckConnection());
>
> Not good. Also even without a ping getting through we can still access
> URLs if behind a firewall.
>
>
> We should probably just check if we have a network connection at all.
>
> Or only return TRUE.
>
> How to check network connections:
>
> Parse output of:
>       /sbin/ifconfig  - for occurences of ppp*, eth* or similar.
>                       - for occurences of non 127.* addresses.
>       /sbin/route -n  - dito
>
> Ciao, Marcus
>
>

Reply via email to