interger to I P address

Brian Epstein bepstein at ias.edu
Wed Aug 27 11:11:34 CDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/27/2008 11:50 AM, Andree Toonk wrote:
| #or in one line, like ipcalc does:
| sub ntoa_in_one_line { join(".", unpack("CCCC", pack("N", $_[0]))); }

For completeness:

sub aton_in_one_line { unpack('N',pack('C4',split(/\./,$_[0]))); }

Thanks,
ep

- --
Brian Epstein <bepstein at ias.edu>                     +1 609-734-8179
Network and Security Officer            Institute for Advanced Study
Key fingerprint = 128A 38F4 4CFA 5EDB 99CE  4734 6117 4C25 0371 C12A
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFItXy2YRdMJQNxwSoRAvVpAJwIZSnjfTxXKRo0IR4JykMfxFECRwCgzDMS
EUi/2U9FwoaIEnygJIWIV1o=
=dQ4q
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3296 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mailman.nanog.org/pipermail/nanog/attachments/20080827/0704563f/attachment.bin>


More information about the NANOG mailing list