Re: Free Vacation when you Request the Info...

Subject: Re: Free Vacation when you Request the Info...
From: Daniel E. White (
Date: Sat Oct 09 1999 - 20:59:55 MDT

It is the equivalent unsigned long integer you get if you put the 4 unsigned short integers of an IP address into the same memory space.

I have used this trick to make an IP address a single thingie so that I can use it in a database and do simple arithmetic comparisons on it.

It goes like this:

#include <stdio.h>

int main ( int agrc, char *argv[] )

        unsigned char *ipAddress ;
        unsigned long number = 3626046468L ;

        ipAddress = (unsigned char *)(&number) ;

        /* we could then do this: */

        printf ( "The IP Address is %u.%u.%u.%u\n", ipAddress[0], ipAddress[1], ipAddress[2], ipAddress[3] ) ;

        exit ( 0 ) ;

And when I run it, it says:

The IP Address is

And nslookup says:


>That's a real address. it just doesn't look like one. :)
>Dennis Murphy wrote:
>> And the SPAMmer can't even get a proper IP address!
>> Sheesh. Spam that doesn't even offer a real address. What has the world
>> come to?
>> > On Sat, 9 Oct 1999 wrote:
>> > > http://3626046468/md2/freetraveling/index2.html
>> > > <a href="http://3626046468/md2/freetraveling/index2.html">Click
>original electronic noise: icq: 2690054
>Full Length Free MP3 downloads, RealAudio Streams and Cheap CDs

                                                               Dan White
"Sometimes  I  think  the  surest  sign  that  intelligent  life exists
 elsewhere  in the universe is that none of it has tried to contact us."
                                                  Calvin (Bill Waterson)

This archive was generated by hypermail 2a24 : Tue Nov 02 1999 - 16:20:57 MST