User Tools

Site Tools


# $EPIC: iptolong.txt,v 1.2 2006/08/01 03:40:36 sthalik Exp $




  • If the <dotted-quad> value is omitted the empty string is returned.
  • The <dotted-quad> value is taken to be a dotted-quad ipv4 internet address of the form “A.B.C.D” where A,B,C,D are integers less than 256.
  • The return value is the NETWORK ORDER integer equivalent of <dotted-quad>.


This function does the reverse of $longtoip(). The DCC handshake uses 'long's to swap ip addresses. You could use $convert() to convert your hostname to a dotted-quad and then use this function to convert it to a “long” value which would be suitable for use in a DCC handshake. Why you would do such a thing is not certain but this function is included for completeness sake.


The “long” integer IPv4 address equivalent of <dotted-quad>


$iptolong( returns “2131231747”

iptolong.txt · Last modified: 2006/08/01 03:45 (external edit)