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?

Hal





>From: Jeff Morriss <[EMAIL PROTECTED]>
>Reply-To: Developer support list for Wireshark 
><wireshark-dev@wireshark.org>
>To: Developer support list for Wireshark <wireshark-dev@wireshark.org>
>Subject: Re: [Wireshark-dev] What do you use to get a boolean
>Date: Mon, 12 Feb 2007 21:37:30 +0800
>
>
>
>Hal Lander wrote:
> > Hi,
> >
> > There are various routines to get things like "tvb_get_stringz" and
> > "tvb_get_ntohieee_float"
> > What do you use to get a boolean, I have not found anything?
>
>What's a boolean?
>
>Is it a 32-bit entity?  Frequently, but it might not always be.
>
>You probably want to use one of the size-appropriate functions (like
>tvb_get_ntohl()).
>
>_______________________________________________
>Wireshark-dev mailing list
>Wireshark-dev@wireshark.org
>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

_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@wireshark.org
http://www.wireshark.org/mailman/listinfo/wireshark-dev

Reply via email to