Bug 3738 - Allow overriding individual functions
Allow overriding individual functions
Status: RESOLVED FIXED
Product: PIDL
Classification: Unclassified
Component: wireshark
svn
Other All
: P3 normal
: ---
Assigned To: Jelmer Vernooij
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-28 13:08 UTC by Jelmer Vernooij
Modified: 2006-05-16 17:26 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jelmer Vernooij 2006-04-28 13:08:34 UTC
(reported by email)

To make it convenient to override specific dissectors without having
to write too much conformance file magic

i would need a directive like this :

FUNCTIONSBODY <functionname>
   code
FUNCTIONEND

like:
FUNCTIONBODY winreg_dissect_element_KeySecurityData_data_
   code
FUNCTIONEND

This directive should still create all the ett and hf fields as
without specifying this directive.
However, where PIDL is emitting this particular function in the code, 
 instead of emitting the current code it will just insert the just the
code specified within this block verbatim and it is up to the
conformance file writer to make sure the code is good.


Example:
FUNCTIONBODY winreg_dissect_element_KeySecurityData_data_
    printf("hello world\n");
    return offset;
FUNCTIONEND

would result in PIDL generating
static int
winreg_dissect_element_KeySecurityData_data_( ...)
{
    printf("hello world\n");
    return offset;
}


All an any other functions and ett and hf variables are still
generated as before.

Only the actual function body for this generated function is replaced.
Comment 1 Jelmer Vernooij 2006-05-16 17:26:21 UTC
Fixed in 15599