On Dec 8, 2003, at 6:51 AM, Anders Broman (TN/EAB) wrote:
Included updated patch to call dissector dependent on Media-type.
...and to put the message body into a subtree of the SIP tree rather
than as a top-level item.
Checked in.
What would be the best way to call a dissector for media-type
multipart/mixed as "boundary-string" have to be included(?)in the
call.
I'd probably use the "pinfo->private_data" pointer for that - have all
dissectors that call subdissectors based on a Content-Type header
(currently, that's HTTP, SIP, and WSP) pass in a pointer to a string
containing all the parameters to the content type (i.e., if there's a
semicolon after the content type, skip any white space following the
semicolon and pass a pointer to that text, otherwise pass a null
pointer).
What would be the prefered way to make a dissector for media type
"multipart/mixed" ?
- Put it inside packet-sip
- make a separate dissector
Make it a separate dissector - SIP isn't the only protocol where you
have multipart/mixed content.
named - multipart_mixed.c
- packet-multipart_mixed.c
packet-multipart_mixed.c, so that it can have a reg_handoff routine
that registers itself as "multipart/mixed" with the "media_type"
dissector table.