Wireshark-dev: Re: [Wireshark-dev] 64bit math
From: Erwin Rol <[email protected]>
Date: Mon, 14 Aug 2006 21:10:55 +0200
Guy Harris wrote:
Erwin Rol wrote:

If i remember right 64bit is a bit problematic due to portability,
Some 64-bit arithmetic snuck into the code base a while ago, and nobody 
complained, so we're now allowing it.
Use "gint64" and "guint64" for 64-bit signed and unsigned integral 
values, respectively.  We have FT_INT64 and FT_UINT64 field types, and 
routines to fetch 64-bit big-endian and little-endian values.
so i have a question, how do i do the following in a "correct" way. For mpeg transport stream dissecting i need to get a a 42bit value from 48bits,
Unfortunately, we don't yet have routines to fetch 48-bit big-endian and 
little-endian values.
I will just fetch them as bytes and shift them manually in a int64, if 64bit math is not a problem anymore than thats not a big deal.
- Erwin