Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Perl and Net::Pcap

by anderam (Initiate)
on Apr 12, 2010 at 17:27 UTC ( #834324=note: print w/replies, xml ) Need Help??

in reply to Perl and Net::Pcap

Hi, first thank you for the introduction into tutorial.

But I found one problem. Is there an option in Net::Pcap to work with nanopcap file format? I tried to open a nanopcap file, which can be easily opened with Wireshark, in my perl script using the Net::Pcap::open_offline() function and I'm getting standard error message "p is not of type pcap_tPtr at".

I really need an advice on this one. Thanks in advance.

Replies are listed 'Best First'.
Re^2: Perl and Net::Pcap
by Anonymous Monk on Aug 13, 2010 at 00:03 UTC
    Hi, this is very excellent article. I am bit struggling Can't locate object method "decode" via package "NetPacket::IP" (perhaps you for got to load "NetPacket::IP"?) at line 83. with this error. Any Idea why? Many Thanks in Advance
      Did you load NetPacket::IP? Its not a trick question
        Thank you for your reply... I had issues configuring NetPacket-0.04, therefore I had to manually add perl modules into /etc/perl/NetPacket it looks like this kelly@linux-desktop:/etc/perl/NetPacket$ ls -l total 84 -rw-r--r-- 1 root root 7185 2010-08-13 00:11 -rw-r--r-- 1 root root 65853 2010-08-13 00:13 -rw-r--r-- 1 root root 6687 2010-08-13 00:14 I am on Ubuntu 2.2, please let me know, whether I ma doing this right, Many Thanks

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://834324]
[gnosti]: I'm reading from ffmpeg lengths of video clips in H:M:S and needing to add them and format them back to H:M:S for feeding back to ffmpeg
[marioroy]: kcott Thanks
[Corion]: gnosti: I would cheat and use my approach instead of dealing with durations as objects, or a module
[Corion]: You could even do the calculation directly - my $duration = $H * 3600+ $M*60 + $S; strftime '%H:%M:%S', timelocal($duratio n)
[Corion]: (and that strftime call is largely superfluous too, converting back to H:M:S isn't hard either)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-08-18 09:02 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (297 votes). Check out past polls.