Board index » delphi » Indy ping -a (resolves addresses to host name)

Indy ping -a (resolves addresses to host name)

I'm using Indy8006b (with Delphi 5 on NT workstation SP6) and would
like to using Ping like the ping in
Windows NT

ie ping -a xxx.xxx.xxx.xxx (resolves addresses to host name)

Is there a way of doing this with Indy please?

I'm a novice in Internet components.

Thanks in advance

John Chapman

 

Re:Indy ping -a (resolves addresses to host name)


jn.chap...@ic24.net (jn.chapman) wrote in <39e99404_2@dnews>:

Quote
>I'm using Indy8006b (with Delphi 5 on NT workstation SP6) and would
>like to using Ping like the ping in
>Windows NT

>ie ping -a xxx.xxx.xxx.xxx (resolves addresses to host name)

You mean actually use it from the command line? Take a IdICMP component and
fill the host property. That's it. If you want to make a console
application create it at runtime.

Re:Indy ping -a (resolves addresses to host name)


Thanks for the swift response:
Using you Gui example I can do a simple Ping.

However, in NT I can ping like this:

ping -a 172.22.100.240

Pinging PCXYZ [999.22.100.240] with 32 bytes of data:

Reply from 999.22.100.240: bytes=32 time<10ms TTL=128

It comes back with the host name of the (remote) PC.
Is there something in Indy that allows me do the same?

Hadi Hariri - Team Indy <h...@delphihome.com> wrote in message
news:8scbi4$1h21@bornews.borland.com...

Quote
> jn.chap...@ic24.net (jn.chapman) wrote in <39e99404_2@dnews>:

> >I'm using Indy8006b (with Delphi 5 on NT workstation SP6) and would
> >like to using Ping like the ping in
> >Windows NT

> >ie ping -a xxx.xxx.xxx.xxx (resolves addresses to host name)

> You mean actually use it from the command line? Take a IdICMP component
and
> fill the host property. That's it. If you want to make a console
> application create it at runtime.

Re:Indy ping -a (resolves addresses to host name)


cha...@my-deja.com (John Chapman) wrote in <8sf9nv$pm712
@bornews.borland.com>:

Quote
>Thanks for the swift response:
>Using you Gui example I can do a simple Ping.

>However, in NT I can ping like this:

>ping -a 172.22.100.240

Do a reverse lookup. Look at the GetHosyByAddr, GetHostByName in GStack.
Quote

Re:Indy ping -a (resolves addresses to host name)


Thanks

I did showmessage(gstack.WSGetHostByAddr('XXX.XXX.XXX.XXX'))
and it works!

Hadi Hariri - Team Indy <h...@delphihome.com> wrote in message
news:8sfu9t$5ti4@bornews.borland.com...

Quote
> cha...@my-deja.com (John Chapman) wrote in <8sf9nv$pm712
> @bornews.borland.com>:

> >Thanks for the swift response:
> >Using you Gui example I can do a simple Ping.

> >However, in NT I can ping like this:

> >ping -a 172.22.100.240

> Do a reverse lookup. Look at the GetHosyByAddr, GetHostByName in GStack.

Other Threads