Yes, that's how IP addresses are normally represented in a human readable form.
I've created a function to apply a network mask to an address in this form, but
it would be much faster to do a single AND.
// Return the network base address given an ipaddress and an ip
// network mask -- both must be in dotted quad notation.
function IPNetwork(ipaddress, ipmask) {
var i = 1;
var r = "";
for (i=1; i lte 4; i=i+1)
r = ListAppend(r, BitAnd(ListGetAt(ipaddress, i, "."), ListGetAt(ipmask, i,
".")), ".");
return r;
}
----- Original Message -----
From: "Robertson-Ravo, Neil (REC)" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, September 25, 2002 9:07 AM
Subject: RE: IP Address as CF Number
> they are effectively just lists with a period delimiter AFAIK
>
> -----Original Message-----
> From: Jim McAtee [mailto:[EMAIL PROTECTED]]
> Sent: 25 September 2002 15:38
> To: CF-Talk
> Subject: IP Address as CF Number
>
>
> Can an IP address be safely manipulated as a CF numeric variable? I want to
> be
> able to apply network masks using the BitAND() function to determine if a
> given
> address is on a particular subnet. My concern is that IP addresses are 32
> bit
> unsigned numbers, but if I'm not mistaken, CF numeric variable are 32 bit
> signed.
>
> Jim
>
>
>
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists