Ethereal-dev: Re: [Ethereal-dev] What's the reason we have packet-dcerpc-epm.c and packet-dcer

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sat, 18 Dec 2004 11:52:13 -0800
jaime.fournier@xxxxxxxx wrote:

Because one is a different version of interface than the other.

So are NFSv2 and NFSv3, but we don't have "packet-nfs.c" and "packet-nfs3.c" - and they differ by *far* more than EPM3 and EPM4 do (I just replaced all occurrences of "epm4" with "epm" in "packet-dcerpc-epm4.c", and the only differences between them are:

	the version number in the $Id line;

	the lack of HTTP support in epm4;

	the value of ver_epm;

the passing of "TRUE" rather than "FALSE" to "proto_tree_add_item()" in epm4 when adding a PROTO_ID_IP item (which I assume is the byte-order bug Ulf referred to - FT_IPv4 items used to ignore the byte-order flag, but somebody had a protocol where IPv4 addresses were put into a packet low-order-byte first, so they made it not ignore the flag, which broke a few other dissectors that were passing TRUE rather than FALSE);

	the "4" in the strings in the "proto_register_protocol()" call).

If common code isn't shared between them, you run the risk of getting the bugs Ulf found - and it looks as if almost all if not all of the code can be shared.