Duncan Thomson wrote:
>
> Christopher K. St. John wrote:
>
> > It's TCP based,
> > and mod_jk packets don't align with TCP frames, so things were getting
> > a little messy
>
> I have been scratching my head over how I'm going to deal with application
level
> messages that don't align with TCP segments. If tcp_dissect_pdus() will do the
> trick, I could use some info on it.
>
I not 100% sure I'm using it correctly, I copied the
code in packet-dns.c. It's certainly a lot easier than
trying to do munge together the tcp segments yourself,
and appears to handle both multiple protocol packets per
tcp segment and protocol packets that cross tcp segment
boundaries.
Basic idea is that it works for protocols that have a
fixed-length header that contains a field with the
length of the remainder of the message. You give
tcp_dissect_pdus() the length of the fixed-length
section, a pointer to a routine that dissects out the
length, and a normal dissector function. Your dissector
function then gets magically called with a fixed-up tvb.
But I don't know if the interface is stable or
experimental (from the cvs logs it looks like it's
about 3 weeks old), what the limitations are, or even
if I'm supposed to be using it.
--
Christopher St. John cks@xxxxxxxxxxxxxxxxx
DistribuTopia http://www.distributopia.com