Wireshark mailing list archives
Re: How to catch unlisted values of value_string?
From: Joerg Mayer <jmayer () loplof de>
Date: Sat, 18 Dec 2010 01:48:05 +0100
On Fri, Dec 17, 2010 at 04:48:17PM -0500, eymanm wrote:
But how you combine it with typical static const value_string MyValues[] = { { 1, "MV1" }, { 2, "MV2" }, { 3, "MV3" } };
You don't. Because you are not allowed to have an unterminated value_string array. In case of a terminated value_string array, you use it like the example states: val_to_str(2, MyValues, "%d not in MyValues") would return "MV2". Ciao Joerg -- Joerg Mayer <jmayer () loplof de> We are stuck with technology when what we really want is just stuff that works. Some say that should read Microsoft instead of technology. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- How to catch unlisted values of value_string? eymanm (Dec 17)
- Re: How to catch unlisted values of value_string? Jeff Morriss (Dec 17)
- Re: How to catch unlisted values of value_string? eymanm (Dec 17)
- Re: How to catch unlisted values of value_string? Joerg Mayer (Dec 17)
- Re: How to catch unlisted values of value_string? eymanm (Dec 17)
- Re: How to catch unlisted values of value_string? Stephen Fisher (Dec 20)
- Re: How to catch unlisted values of value_string? Jeff Morriss (Dec 17)