Ethereal-dev: Re: [Ethereal-dev] New: bitfield_string

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

From: "Peter J. Creath" <peter-ethereal@xxxxxxxxxx>
Date: Mon, 9 Feb 2004 15:09:34 -0500
You might want to check out the current CVS version of "dissect_xdlc_control()" - it now takes, as an argument, a structure containing hf_ values for named fields for the subfields of the control field, so it no longer directly calls the routines to format bitfields.

Ah, good point.

Your changes might still be useful for dissectors that have bitfields that aren't named fields, however.

For bitfields with more than named fields, I think my changes are very helpful. For completeness, you can of course use bitfield_string to represent named fields as well as more complicated bitfields.

And even if you're only doing named fields, these changes might be preferable. They provide a convenience routine to generate the entire string of bits set (rather than doing it by hand). And perhaps more importantly, they provided a routine to generate the subtree showing the bitfield detail (which I personally find helpful).

	-P