Not exactly what you are asking for but you could try this:
(dissecting and displaying the top 12 bits of a 16 bit integer in a
somewhat binary representation)
{ &hf_foo,
{"Foo", "foo.foo", FT_UINT16, BASE_HEX, NULL, 0xfff0, "something", HFILL }},
I.e specifying a bitmask which will make ethereal decode it and display it as
XXXX XXXX XXXX ....
Probably not exactly what you want but maybe close enough?
On 6/8/06, kyan-ki kyan-ki <kyan-ki@xxxxxxxxxx> wrote:
Hi,
I'm developping an Ethereal plugin to add a dissector for a protocol.
This protocol has a field Mask that I would like to display in binary e.g.
Mask : 1100 1011 1010
But I can't find the solution that allows such a thing :
In proto.c, one have :
/** radix for decimal values, used in header_field_info.display */
typedef enum {
BASE_NONE, /**< none */
BASE_DEC, /**< decimal */
BASE_HEX, /**< hexadecimal */
BASE_OCT, /**< octal */
BASE_DEC_HEX, /**< decimal (hexadecimal) */
BASE_HEX_DEC /**< hexadecimal (decimal) */
} base_display_e;
But there is no BASE_BIN for example, in order to insert into (e.g.):
static hf_register_info hf[] = {
{ &hf_foo_pdu_type,
{ "FOO PDU Type","foo.type",
FT_UINT8, BASE_DEC, NULL, 0x0,
"", HFILL }
},
};
Has someone a solution for this problem without I have to modify ethereal
source code and rebuild it ?
_________________________________________________________________
Windows Live Mail : venez tester la version bêta !
http://www.ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev