Wireshark-dev: [Wireshark-dev] Bits Dissect Issue

From: Sean <yunjnz@xxxxxxxxx>
Date: Thu, 4 Dec 2008 12:34:49 -0800 (PST)
Hi,

I want to dissect a packet, each field of this packet is not byte aligned, 
and the bits mask position of each field is not fixed. The position is determined by some bits in the content.
For example, the following packet:
F1 has one bit, F2 has 3 bits, F3 has 10 bits, F4 has 1 bit, F5 has 1 bit
After F1-F2-F3-F4-F5, the next sequence is still F1-F2-F3-F4-F5 if the current F4 is 1,
and there will be a sequence of E1-E2-E3 if F5 is 1, E1 has 1 bit, E2 has 2 bits, E3 has 5 bits.

+  +  +  +  +  +  +  +
F1 F2    F3
F3(Cont.)      F4 F5 F1
F2       F3

How to decode such a packet with wireshark?
Your help will be highly appreciated!

Regards,
Sean