🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #154

Re: How can I Trace the Route to an IP Addres from within my program

#154
From: Remy Lebeau (TeamB)
Date: Wed, 25 Jun 2008 20:17
24 lines
1751 bytes
"DreamChaser" <NO-Spam@No-Span.net> wrote in message 
news:4861dce2$1@newsgroups.borland.com...

> Using the pseudo code that Gambit provided I am still
> getting an Options Bad error from IcmpSendEcho().

What EXACTLY is IcmpSendEcho() returning?  What EXACTLY is GetLastError() 
returning?

>    //This is www.google.com
>    ipaddr.S_un.S_addr = inet_addr("74.125.47.147");

You can use gethostbyname() for that:

    struct hostent *host = gethostbyname("www.google.com");
    if( host )
    {
        ipaddr.S_un.S_addr = ((struc in_addr*)(host->h_addr))->s_addr;
        ...
    }


Gambit 
Technical Details
Message-ID: <4862a806$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.isoc.lu!newsgroups.borland.com!not-for-mail
References: <MPG.22c8301ab312798c989a97@newsgroups.borland.com> <485faf40$1@newsgroups.borland.com> <MPG.22cb3a3e698457ac989a9a@newsgroups.borland.com> <rrj264107nnff1gqarmhq4p0v1c23k6801@4ax.com> <4861dce2$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,7aa64e4617379849
X-Google-Attributes: gid11508e,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <MPG.22c8301ab312798c989a97@newsgroups.borland.com> <485faf40$1@newsgroups.borland.com> <MPG.22cb3a3e698457ac989a9a@newsgroups.borland.com> <rrj264107nnff1gqarmhq4p0v1c23k6801@4ax.com> <4861dce2$1@newsgroups.borland.com>
Subject: Re: How can I Trace the Route to an IP Addres from within my program
Date: Wed, 25 Jun 2008 13:17:03 -0700
Lines: 26
Organization: Lebeau Software
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 207.178.157.90
Message-ID: <4862a806$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1214425094 207.178.157.90 (25 Jun 2008 13:18:14 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.isoc.lu!newsgroups.borland.com!not-for-mail