Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Unpack and Network Packets

by mongre (Initiate)
on Dec 08, 2000 at 10:00 UTC ( #45700=perlquestion: print w/ replies, xml ) Need Help??
mongre has asked for the wisdom of the Perl Monks concerning the following question:

I am sniffing traffic with the Net::Pcap module and I am having a heck of a time figuring out how to turn the binary packed data into some usable (ie ip addresses, ports etc) Has anyone done this? I could sure use some tips or a code snippet, what I have found so far can get me the Hex for Ethernet Addresses but that is all I have been able to get... unpack (" H12 H12 H4 H*",$pkt) Thanks for any help you can provide.. Cheers Terrence

Comment on Unpack and Network Packets
Replies are listed 'Best First'.
Re: Unpack and Network Packets
by Anonymous Monk on Dec 08, 2000 at 12:57 UTC
    I was just playing with pcap recently myself, I found these helpful modules:


    Hope they help, good luck.

Re: Unpack and Network Packets
by drip (Beadle) on Mar 27, 2008 at 05:58 UTC
    and if it is UPD packet:


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://45700]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (15)
As of 2015-12-01 13:04 GMT
Find Nodes?
    Voting Booth?

    My keyboard shows this many letters:

    Results (10 votes), past polls