Ethereal-dev: [Ethereal-dev] sub dissectors

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

From: scott jacobs <sjacobs@xxxxxxxxxxxx>
Date: Thu, 26 Jul 2001 15:28:34 -0400
I am working on a protocol dissector for a protocol which can encapsulate
HTTP requests and replies.  Obviously, I'd like to take advantage of the
existing http dissector, but am unsure of the proper way to do so.

I figured I should just create a new tvb and pass it on to the dissector
method, but dissect_http is a static function.  I took away the static
keyword and call the code like this:

        tvbuff_t *sub_tvb;
        sub_tvb = tvb_new_subset(tvb, offset + 12, -1, -1);
        dissect_http(sub_tvb, pinfo, tree);

Is this the correct way to take advantage of existing dissectors?  I would
think so, except that the dissect_http function must have been declared
static for a reason, right?

scott

-- 
---------------------------------------------------------------------
scott jacobs                                     plurimus corporation
---------------------------------------------------------------------