Wireshark-dev: Re: [Wireshark-dev] Get 3 bytes

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 12 Mar 2007 17:00:35 -0700

On Mar 12, 2007, at 4:32 PM, Steven Le wrote:

guint32 is 32 bits --> so type mismatch???

No, no type mismatch. I know of no C implementations on modern machines that support a 24-bit integral data type, so there's no "guint24" type. A 24-bit value fits in 32 bits, so guint32 works fine for the routines to get 24-bit values.

However, as Stephen Fisher noted, unless you actually need to look at the value, just use proto_tree_add_item().