Wireshark mailing list archives

How do I dissect a set of flags


From: Richard Sharpe <realrichardsharpe () gmail com>
Date: Sun, 31 May 2015 19:55:05 -0700

I have a bunch of flags, many of which can be set at the same time,
and I thought I could use something like this:

static const value_string posix_flags_vals[] = {
        { 0x01, "POSIX_V1_POSIX_LOCK" },
        { 0x08, "POSIX_V1_POSIX_FILE_SEMANTICS" },
        { 0x10, "POSIX_V1_CASE_SENSITIVE" },
        { 0x40, "POSIX_V1_POSIX_STAT_INFO" },
        { 0, NULL }
};

However, when the flags are 0x50 I get unknown.

I probably want a Non Set value, but then if any of the other bits are
set, I should see that flag, but I don't really want things saying NOT
SET.

How do I do that?

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: