[plt-scheme] Locating IPs

From: Dor Kleiman (dor at ntr.co.il)
Date: Mon Nov 3 06:32:48 EST 2003

It is simple to do it using DNS standards;
Most IPs have reverse DNS addresses, which are unique. Thus, if you, for example, try to lookup 194.90.5.5 you get www.netvision.net.il, which is registered in the DNS server as the reverse address of 194.90.5.5 (although other addresses may point to the same IP as well). However, what I want to know is if there is a scheme built-in function that does that.

Yours,
Katsmall T. Wise, Esquire

-----Original Message-----
From: Paulo Jorge de Oliveira Cantante de Matos [mailto:pocm at netvisao.pt]
Sent: Monday, November 03, 2003 1:10 PM
To: Dor Kleiman
Cc: plt-scheme at list.cs.brown.edu
Subject: RE: [plt-scheme] Locating IPs



>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> How can I find the reverse DNS? That's the least I want to do?
> Something like 194.90.5.5 -> www.netvision.net.il?
> 

I'm not really sure about this but the answer to your problem is not
trivial (not to say impossible). This is because an IP can have more
than one domain name due to virtual hosts. The problem is that the
inverse of the function that given the domain name returns the IP is not
formally a function. You do not have a unique domain name given an IP.
Unless you could find a function that returns a list of domain names for
any IP. Anyway, without going deeper in to the question I would say it's
impossible to do that. However if you manage to do it, send your results
to the list please. :D

Best regards,

> 
> -----Original Message-----
> From: Jens Axel S?gaard [mailto:jensaxel at soegaard.net]
> Sent: Monday, November 03, 2003 11:40 AM
> Cc: PLT-scheme mailing-list (E-mail)
> Subject: Re: [plt-scheme] Locating IPs
> 
> 
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> Dor Kleiman wrote:
> > I want to find the country of which an IP belongs, using DrScheme;
> > 
> > How is that possible?
> 
> Finding the country given the IP is non-trivial.
> Google for country and IP.
-- 

Paulo J. Matos : pocm at mega.ist.utl.pt
Instituto Superior Tecnico - Lisbon
Computer and Software Eng. - A.I.
 - > http://mega.ist.utl.pt/~pocm
---
        -> God had a deadline...
                So, he wrote it all in Lisp!



Posted on the users mailing list.