Some thoughts..

Unfortunately, according to google this is the kind of thing that people like to do for graduate theses.. A number of commercial firewalls and routers seem to use Protocol Definition Language, for example PacketBoy which lets you define your own protocol. It's possible that bustools.com sells something you want too.

Much work has been done with this in packet sniffing, especially snort. Maybe not applicable to you but it does have rule writing, variables, and decomposition into separate streams and stateful analysis. Although, it just might work if you could play the data across the network as tcp packets. (or not)

That said, Expect sounds really good. One other possibility I could imagine would be to capture into a database and write SQL snippets. Or convert a processed stream to tokens and use regexes :) my favorite flavor. Good luck!


In reply to Re: parsing protocol data : Is Parse::RecDescent the right tool? by mattr
in thread parsing protocol data : Is Parse::RecDescent the right tool? by rgloden

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.