Re: Unsigned integer to IP address?

From: Ana C. Dent <anacedent_at_hotmail.com>
Date: Wed, 08 Oct 2003 17:26:24 -0700
Message-ID: <QW1hb.59632$Ms2.15910_at_fed1read03>


Monica Roman wrote:
> "Ana C. Dent" <anacedent_at_hotmail.com> wrote in message news:<lGhgb.54981$Ms2.34316@fed1read03>...
>

>>Inside the OS an IP# is just a 32-bit integer.
>>It is typically represented in what is called "dottted-quad" notation.
>>This means that each 8-bit byte (0-255) represents one of the 4 numbers 
>>displayed. So you need to "convert" the large decimal number into the
>>appropriate ONE & ZERO, group them into four 8 bits bytes & the convert
>>those four values back to decimal (Small Matter Of Programming [SMOP]).

>
>
> Ana, Thank you! Now the question is how do I do that? Or, where can I
> find info, any books or articles you can recommend?
>
> Thanks,
>
> Monica
PERL has a built-in function ( but I don't recall its name right now) which "converts" the integer into a dotted-quad string; complete with three decimal points in the correct places. Received on Thu Oct 09 2003 - 02:26:24 CEST

Original text of this message