Ethereal-dev: Re: [Ethereal-dev] SMPP: Multiple PDU's within one TCP packet

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 18 Jan 2004 04:42:49 -0800
On Sun, Jan 18, 2004 at 12:16:23PM +0000, Chris Wilson wrote:
> Ok - I'll make things work that way.

Note that if you make it use "tcp_dissect_pdus()" you'll get that for
free.

"tcp_dissect_pdus()" takes, as one argument, a pointer to a function
that dissects a single packet.  If SMPP over other protocols puts an
integral number of SMPP packets in one of the other protocol's packets,
you'd use, for SMPP-over-X.25 and other such protocols, a dissector that
calls the "dissect a single SMPP packet" routine in a loop.  (You'd
probably have a low-level routine to dissect an SMPP packet and return
the length of the packet; that length would be used to step the offset
within X.25 packets.  "tcp_dissect_pdus()" would call a wrapper routine
that calls the low-level routine and throws away the return value, as
"tcp_dissect_pdus()" also gets passed another routine that gets the
packet length from the packet - it needs that *before* dissecting, so
that it knows whether it has to do any reassembly.)