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

From: "Anders Broman" <a.broman@xxxxxxxxx>
Date: Fri, 31 Aug 2007 09:06:54 +0200
Hi,
Yes that looks good and should probably be used in the
dissect_per_octet_string() code as well. How about
a new_octet_aligned_subset_bits()?
Regards
Anders

-----Ursprungligt meddelande-----
Från: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För Kukosa, Tomas
Skickat: den 31 augusti 2007 08:31
Till: Developer support list for Wireshark
Ämne: Re: [Wireshark-dev] RRC Messages does not decode correctely



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
> 
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev