Ethereal-dev: [Ethereal-dev] Copying n bits (n > 8) from tvbuff to align on octet boundary

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

Date: Sun, 17 Oct 2004 00:35:56 -0700 (PDT)
Hello, I am looking for a routine that will copy n bits from
a given octet and bit offset from a tvbuff and return the copy
in a buffer aligned on an octet boundary.

For example I have 50 bits that I want to copy from
octet offset 9 bit offset 2 (0 based, with 0 being the LSB).

Basically I want the 50 bits shifted to the left by
5 bits so that I can start a decode on the octet boundary.

I'm hoping there may already be such a thing in ethereal.

Thanks in advance!

Michael Lum [michael.lum [AT] utstar.com]