Wireshark-bugs: [Wireshark-bugs] [Bug 4413] Improve bitview display

Date: Mon, 24 May 2010 06:59:36 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4413

--- Comment #23 from Martin Mathieson <martin.r.mathieson@xxxxxxxxxxxxxx> 2010-05-24 06:59:35 PDT ---
(In reply to comment #22)
> Ups, I haven't notice that PI_* use the same flags...
> 
> Thanks for patch, I don't quite get why some PI_* values are like bitmasks, and
> some not.
> 

Me either.  I wondered if maybe you could OR some of them together, but I
didn't try to think about which ones might not make sense together.

> It might be good think to shrink it more:
> 
> -#define PI_RESPONSE_CODE    0x00040000
> -#define PI_REQUEST_CODE    0x00050000
> -#define PI_UNDECODED        0x00080000
> -#define PI_REASSEMBLE        0x00100000
> -#define PI_MALFORMED        0x00200000
> ...
> -#define PI_SECURITY        0x01000000
> 
> +#define PI_RESPONSE_CODE    0x00030000 << 9
> +#define PI_REQUEST_CODE    0x00040000 << 9
> +#define PI_UNDECODED        0x00050000 << 9
> +#define PI_REASSEMBLE        0x00060000 << 9
> +#define PI_MALFORMED        0x00070000 << 9
> ....
> +#define PI_SECURITY        0x000a0000 << 9
> 
> #define REP_LITTLE_ENDIAN       0x80000000 // intended to use in flags??
> #define FI_LITTLE_ENDIAN        REP_LITTLE_ENDIAN // so lets use.
> #define FI_BIG_ENDIAN           0x40000000
> 

I agree, and went for the quick and cowardly local fix because I needed to see
inside those subtrees today!  Unfortunately I don't think I can spend any more
time on this today now. 


> 
> and epan/wslua/init.lua still needs a patch ;/

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.