Ethereal-dev: Re: [Ethereal-dev] add bit element to a tree

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

From: david martinez <davidmfcg@xxxxxxxx>
Date: Thu, 8 Dec 2005 19:06:26 +0100 (CET)
Lot of thanks,  but if i have, for example, a byte and
a the field that i want goes from 3rd bit to 5th bit
and i apply the bitmask 0x38 i must apply a shift for
obtain the value or that apply the shift for me too???
thanks a lot

 --- Gilbert Ramirez <gram@xxxxxxxxxxxxxxx> escribió:

> The hf_register_info struct for defining fields has
> a field for
> defining bitmasks. If you define the bitmask you
> want *there*, then
> proto_tree_add_XXX should apply the bitmask for you.
> 
> --gilbert
> 
> On 12/8/05, david martinez <davidmfcg@xxxxxxxx>
> wrote:
> >
> > hi, i'm new in creat a dissector and this is my
> problem: i want to add an
> > element to a tree, this element is not on the tvb
> becouse is only come bits
> > (3 or 4 bits), i get a byte and i masked it for
> obtain the value that i'm
> > interested; the problem is that the functions
> proto_tree_add_XXX obtain
> > datas from the tvb and i want to obtain datas from
> the var that i masked
> > before. thanks a lot, sorry for my english
> >
> >  ________________________________
> >
> > Correo Yahoo!
> > Comprueba qué es nuevo, aquí
> > http://correo.yahoo.es
> >
> >
> > _______________________________________________
> > 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
> 



		
______________________________________________ 
Renovamos el Correo Yahoo! 
Nuevos servicios, más seguridad 
http://correo.yahoo.es