Wireshark mailing list archives
Re: Boolean Field Registration Qurey
From: Jakub Zawadzki <darkjames () darkjames ath cx>
Date: Thu, 15 Apr 2010 09:31:11 +0200
Hi, On Thu, Apr 15, 2010 at 02:48:41PM +0800, Tamás Reg?s wrote:
In README.developer it says the general rules: static hf_register_info hf[] = { { &hf_PROTOABBREV_FIELDABBREV, { "FIELDNAME", "PROTOABBREV.FIELDABBREV", FIELDTYPE, FIELDBASE, FIELDCONVERT, BITMASK, "FIELDDESCR", HFILL } } }; In proto.h the FIELDBASE declared as enum: typedef enum { BASE_NONE, /**< none */ BASE_DEC, /**< decimal */ BASE_HEX, /**< hexadecimal */ BASE_OCT, /**< octal */ BASE_DEC_HEX, /**< decimal (hexadecimal) */ BASE_HEX_DEC, /**< hexadecimal (decimal) */ BASE_CUSTOM /**< call custom routine (in ->strings) to format */ } base_display_e;
If you are using FT_BOOLEAN, it's no longer BASE_* enum, but number of field bits.
From proto.h:
int display; /**< one of BASE_, or number of field bits for FT_BOOLEAN */ If you have real boolean (0/1) field, I think you need to pass 1 there :) ___________________________________________________________________________ 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:
- Boolean Field Registration Qurey Tamás Regõs (Apr 14)
- Re: Boolean Field Registration Qurey Jakub Zawadzki (Apr 15)
- Re: Boolean Field Registration Qurey Bill Meier (Apr 15)
- Re: Boolean Field Registration Qurey Guy Harris (Apr 15)
- Re: Boolean Field Registration Qurey Bill Meier (Apr 15)
- Re: Boolean Field Registration Qurey Jakub Zawadzki (Apr 15)