Silmaril
Member since Jan 20, 2010
- Profile: /members/5217-silmaril.htm
- Comments: 3
Recent Blog Comments By Silmaril
-
Converting IP Addresses To And From Integer Values With ColdFusion
Posted on Jan 27, 2010 at 9:08 AM
@Ben Yes indeed it's reversible, but the main use of decimal based IP addresse is for comparaison for systems that cannot directly compare IP addresses, and while 128.0.0.1 is between 127.0.0.1 and 129.0.0.1, it will be harder to verify using a signed integer... read more »
-
Converting IP Addresses To And From Integer Values With ColdFusion
Posted on Jan 27, 2010 at 3:50 AM
Hi, The problem with your first solution is that for any IP adresse in the upper half of the IPv4 pool (> 128.0.0.1) coldfusion will answer with a negative number, ex: IP Address: 170.112.108.147 IP Number: -1435472749 Coldfusion bit operations are working on 32 bits signed integer,... read more »
-
Exploring ColdFusion InputBaseN() And FormatBaseN() Functions
Posted on Jan 20, 2010 at 6:13 AM
@Ben: yes, however coldfusion bit shifting operate on signed integer, which is not good for this operation. @Tom: Personnally i use the following to convert from dotted decimal to decimal: <cfset ipdec = 0> <cfloop list="#ip_source#" delimiters="." index="i"> <cfset ipdec=ip... read more »