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: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] 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 > [email protected] > http://www.wireshark.org/mailman/listinfo/wireshark-dev > _______________________________________________ Wireshark-dev mailing list [email protected] http://www.wireshark.org/mailman/listinfo/wireshark-dev
