http://qs321.pair.com?node_id=688469


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); # 192.168.2.0

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...