Wireshark-dev: Re: [Wireshark-dev] RRC Messages does not decode correctely

From: "Kukosa, Tomas" <tomas.kukosa@xxxxxxxxxxx>
Date: Fri, 31 Aug 2007 08:30:49 +0200

The new_octet_aligned_subset() could be changed to get the length in
bits or similar one for bits could be implemented.
 

> -----Original Message-----
> From: wireshark-dev-bounces@xxxxxxxxxxxxx 
> [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Guy Harris
> Sent: Thursday, August 30, 2007 11:41 PM
> To: Developer support list for Wireshark
> Subject: Re: [Wireshark-dev] RRC Messages does not decode correctely
> 
> Anders Broman wrote:
> 
> > I don't know if there'll be a significant performance hit 
> by doing something
> > like:
> > 			while (j < (guint32)min_len){
> > 				for(i=0;i<8;i++){
> > 					offset=dissect_per_boolean(tvb,
> > offset, actx, tree, -1, &bit);
> > 					buff[j]=(buff[j]<<1)|bit;
> > 				}
> > 				j = j+1;
> > 			}
> 
> There might be, but most of the functionality of 
> "dissect_per_boolean()" 
> isn't used if the hf_index value is -1, which it is in your code.
> 
> Perhaps the loop should do the bit-extraction itself, rather 
> than having 
> dissect_per_boolean() do it (and it can probably even check the 
> bit-alignment of the offset and only fetch each byte from the 
> tvbuff once).
> 
> That would probably perform well enough.
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev
>