🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1440

Re: indy ping exmaple

#1440
From: John M.
Date: Fri, 03 Dec 2004 21:21
81 lines
3706 bytes
hi,

wenn i ping yahoo instead of borland, it works in my command:

C:\>ping www.yahoo.com

Pinging www.yahoo.akadns.net [216.109.117.110] with 32 bytes of data:

Reply from 216.109.117.110: bytes=32 time=152ms TTL=56
Reply from 216.109.117.110: bytes=32 time=147ms TTL=57
Reply from 216.109.117.110: bytes=32 time=150ms TTL=57
Reply from 216.109.117.110: bytes=32 time=149ms TTL=57

Ping statistics for 216.109.117.110:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 147ms, Maximum = 152ms, Average = 149ms

C:\>

but why are there sites i can ping and other not?

but when i try to ping yahoo.com or www.yahoo.com in my c++ application i
still get:

Reply from 192.168.0.3: bytes=72 time=3ms TTL=128
Reply from 192.168.0.3: bytes=72 time=2ms TTL=128

i have no idea why this does not work. here again my function:

void __fastcall TForm1::Button2Click(TObject *Sender)
{
   AnsiString s;
   IdIcmpClient1->Ping(Edit1->Text,0);
   switch(IdIcmpClient1->ReplyStatus.ReplyStatusType)
   {
      case rsEcho:
         s = "Reply from " + IdIcmpClient1->ReplyStatus.FromIpAddress
         + (": bytes=" +
AnsiString(IdIcmpClient1->ReplyStatus.BytesReceived))
         + (" time=" +
AnsiString(IdIcmpClient1->ReplyStatus.MsRoundTripTime) + "ms")
         + (" TTL=" + AnsiString(IdIcmpClient1->ReplyStatus.TimeToLive));
         Memo1->Lines->Add(s);
      break;

      case rsError:
         ShowMessage("Request Error");
      break;

      case rsTimeOut:
         ShowMessage("Request Timed Out");
      break;

      case rsErrorUnreachable:
         ShowMessage("Host Unreachable");
      break;

      case rsErrorTTLExceeded:
         ShowMessage("TTL Exceeded");
      break;
   }

}

> I am a member of the Indy team.  I have already submitted the issue for
> Indy's review.

this i great. do you know if there are other people with the same problem.
is it a bug or a problem with my system?

> > > You could try accessing Microsoft's undocumented ICMP.DLL directly.
> Tehnically yes, though Microsoft warns against using it.  MS has been
saying
> for years that ICMP.DLL is going to go away, but it has yet to do so.


okay, than i dont use icmp.dll. but how does indy get the ping, doesnt it
use icmp?

john
Technical Details
Message-ID: <41b0d8ea@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!transit.nntp.hccnet.nl!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41ae5b3a@newsgroups.borland.com> <41ae71eb@newsgroups.borland.com> <41af0a1b@newsgroups.borland.com> <41af5738$1@newsgroups.borland.com> <41af8bb4@newsgroups.borland.com> <41af93ff$3@newsgroups.borland.com> <41b09f9a@newsgroups.borland.com> <41b0afa1$1@newsgroups.borland.com> <41b0b63c@newsgroups.borland.com> <41b0c2ce$1@newsgroups.borland.com> <41b0d3b2$1@newsgroups.borland.com> <41b0d6bb@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,fa101c2ed92ef067
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "John M." <johnnym@yahoo.com>
Newsgroups: borland.public.cppbuilder.internet.web
References: <41ae5b3a@newsgroups.borland.com> <41ae71eb@newsgroups.borland.com> <41af0a1b@newsgroups.borland.com> <41af5738$1@newsgroups.borland.com> <41af8bb4@newsgroups.borland.com> <41af93ff$3@newsgroups.borland.com> <41b09f9a@newsgroups.borland.com> <41b0afa1$1@newsgroups.borland.com> <41b0b63c@newsgroups.borland.com> <41b0c2ce$1@newsgroups.borland.com> <41b0d3b2$1@newsgroups.borland.com> <41b0d6bb@newsgroups.borland.com>
Subject: Re: indy ping exmaple
Date: Fri, 3 Dec 2004 22:21:39 +0100
Lines: 83
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 217.88.156.133
Message-ID: <41b0d8ea@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1102108906 217.88.156.133 (3 Dec 2004 13:21:46 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!transit.nntp.hccnet.nl!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail