Table of Contents

# $EPIC: longtoip.txt,v 1.2 2006/08/01 04:07:08 sthalik Exp $

Synopsis:

$longtoip(<integer>)

Technical:

Practical:

This function does the reverse of $iptolong(). The DCC handshake uses 'long's to swap ip addresses. You can use this function to convert the 'long' into a dotted-quad IP address which can then be converted into a hostname by the $convert() function. This can be used to look up the hostname of someone offering you a DCC connection.

Returns:

The dotted-quad IP address equivalent of <integer>

Examples:

$longtoip(2131231747)                                returns "127.8.4.3"
$longtoip(${(127 << 24) + (8 << 16) + (4 << 8) + 3}) returns "127.8.4.3"