Tshark, wireshark, and tcpdump are all the same thing. They use libpcap to capture network data and dump it to files. The main difference is that tshark and wireshark have all kinds of slick decoders built right in.

For realtime captures and things, choose Net::Pcap::Easy. I wrote this module. Mostly people are turned of by the word Easy, and I can't blame them, but I think I've done a reasonable job making it easier for me to use. The main thing was to get all the information you need on one manpage.

The real work is in Net::Pcap. It uses NetPacket to do decodes… I find it rather difficult to use in the raw, for one thing the truth values are backwards (like in C) and for another the documentation spans many man pages, but this is surely the more traditional way to do it. I'm also peripherally aware of a POE module that does event based pcaps.

Anyway, I highly recommend you do this a little more natively, rather than trying to grok the random outputs of tshark. Those could change without any notice at all (even just moving from machine to machine) and then you'll have to go back and tweak your regexps and things.


In reply to Re: tshark RTCP capture via PERL by jettero
in thread tshark RTCP capture via PERL by FirtyFree

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.