It does look like the value you pass to
proto_tree_add_boolean(tree, id, tvb, start, length, value);
is not a 1 or a 0 it is the raw data byte containing the boolean at the
position defined by the mask.
If I am correct this makes the documentation a bit missleading.
Anybody know if there is a function that returns the boolean (1 or 0) value
of the flag or do I have to do the masking myself to get it?
Hal
From: "Hal Lander" <hal_lander@xxxxxxxxxxx>
Reply-To: Developer support list for Wireshark
<wireshark-dev@xxxxxxxxxxxxx>
To: wireshark-dev@xxxxxxxxxxxxx
Subject: Re: [Wireshark-dev] What do you use to get a boolean
Date: Mon, 12 Feb 2007 05:33:05 -0900
I have not got as far as getting the value of the boolean, I was was
looking for a function to extract it.
I am also not sure if 'value' really is the value of the boolean or the
value of the byte containing the boolean (along with other data)?
Hal
From: Jeff Morriss <jeff.morriss@xxxxxxxxxxx>
Reply-To: Developer support list for Wireshark
<wireshark-dev@xxxxxxxxxxxxx>
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] What do you use to get a boolean
Date: Mon, 12 Feb 2007 22:05:09 +0800
Hal Lander wrote:
> Wireshark has a field type FT_BOOLEAN.
> It lets you add the boolean to the tree using
> proto_tree_add_boolean(tree, id, tvb, start, length, value);
> and is supposed to do all the bit shifting for you to extract the
single bit
> 0 or 1.
>
> I thought it might also provide some way for me to test the bit value?
Actually the last 'value' is, well, the value of the boolean (on the
system running Wireshark). You must have already pulled out 'value'
using one of the tvb functions (and bit shifted it, if necessary).
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev
_________________________________________________________________
FREE online classifieds from Windows Live Expo � buy and sell with people
you know
http://clk.atdmt.com/MSN/go/msnnkwex0010000001msn/direct/01/?href=http://expo.live.com?s_cid=Hotmail_tagline_12/06
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev
_________________________________________________________________
Invite your Hotmail contacts to join your friends list with Windows Live
Spaces
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us