Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Net::Pcap garbage Output

by almut (Canon)
on May 26, 2008 at 02:31 UTC ( [id://688469] : note . print w/replies, xml ) Need Help??

in reply to Net::Pcap garbage Output

You could use the inet_ntoa function from Socket to convert the numbers

use Socket; my $ip = inet_ntoa(pack "N", 3232236032); #

Replies are listed 'Best First'.
Re^2: Net::Pcap garbage Output
by WalkingZero (Sexton) on May 26, 2008 at 02:38 UTC
    Alas it does not appear to be that simple. If you convert for example 415348283078 to hex you get 60B4AFD6C6 which is not the MAC address that is genuinely in the sha field of the ARP packet.
      it does not appear to be that simple.

      Right, inet_ntoa does only work with IP addresses / 32-bit numbers...