See my comment below.
Regards,
Tom
>
> > Thanks, I'll take a look at yours and thanks to Guy Harris for
> > reassuring me it would be fine to reuse the fields.
> > I had some troubles with the column info until I realized that I could
> > simply parse the entire packet and THEN set the INFO section by using
> > a temporary string variable. That is, append or insert all your stuff
> > onto the string variable and then at the end of the dissector, just
> > set the column INFO to that end result string.
> >
> The problem is that the stuff for the info column comes from different
> dissectors.
> You can have in one SCTP PACKET
> ISUP/MTP3/M3UA/SCTP/IP and SCCPMGT/SCCP/MTP3/M3UA/SCTP/IP
> and part of the information comes from packet-iusp.c and
> packet-sccpmgt.c.
> At least one would have to share the stuff. But this is what I do in
> only appending.
> But the more protocol get involved, the more complicate it gets that
> everything works
> all the times (which mean when some dissectors are disabled).
I made some functions (see attached files) to support colecting
information from more dissectors.
The 1st protocols over TCP should call pdu_init() during initializing
(i.e. in the function registered with register_init_routine()) and then
call pdu_next() at the beginnig of every PDU.
Then this dissector and all upper layers uses pdu_set_proto() and
pdu_set_info() to put information into COL_PROTO and COL_INFO.
It displays for each PDU the most upper layer protocol and information.
The function pdu_set_info() has two string parameters. One "mandatory"
and one "optional" string. The "optional" string is displayed only if
packet contains just one PDU.
Attachment:
pdu.c
Description: application/unknown-content-type-tornadosourcetype
Attachment:
pdu.h
Description: application/unknown-content-type-tornadosourcetype