diff options
Diffstat (limited to 'epan/proto.h')
-rw-r--r-- | epan/proto.h | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/epan/proto.h b/epan/proto.h index 2affd72551..cfa35be308 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -217,7 +217,7 @@ typedef struct field_info { gint appendix_length; /**< length of appendix data */ gint tree_type; /**< one of ETT_ or -1 */ item_label_t *rep; /**< string for GUI tree */ - int flags; /**< bitfield like FI_GENERATED, ... */ + guint32 flags; /**< bitfield like FI_GENERATED, ... */ tvbuff_t *ds_tvb; /**< data source tvbuff */ fvalue_t value; } field_info; @@ -226,12 +226,12 @@ typedef struct field_info { /** The protocol field should not be shown in the tree (it's used for filtering only), * used in field_info.flags. */ /* HIDING PROTOCOL FIELDS IS DEPRECATED, IT'S CONSIDERED TO BE BAD GUI DESIGN! */ -#define FI_HIDDEN 0x0001 +#define FI_HIDDEN 0x00000001 /** The protocol field should be displayed as "generated by Wireshark", * used in field_info.flags. */ -#define FI_GENERATED 0x0002 +#define FI_GENERATED 0x0000002 /* The protocol field is actually a URL */ -#define FI_URL 0x0004 +#define FI_URL 0x00000004 /** convenience macro to get field_info.flags */ @@ -262,37 +262,44 @@ typedef proto_node proto_tree; /** A protocol item element. */ typedef proto_node proto_item; +/* + * Expert information. + * This is in the flags field; we allocate this from the top down, + * so as not to collide with FI_ flags, which are allocated from + * the bottom up. + */ + /* expert severities */ -#define PI_SEVERITY_MASK 0x001C /* mask usually for internal use only! */ +#define PI_SEVERITY_MASK 0x00E00000 /* mask usually for internal use only! */ /** Usual workflow, e.g. TCP connection establishing */ -#define PI_CHAT 0x0004 +#define PI_CHAT 0x00200000 /** Notable messages, e.g. an application returned an "usual" error code like HTTP 404 */ -#define PI_NOTE 0x0008 +#define PI_NOTE 0x00400000 /** Warning, e.g. application returned an "unusual" error code */ -#define PI_WARN 0x000C +#define PI_WARN 0x00600000 /** Serious problems, e.g. [Malformed Packet] */ -#define PI_ERROR 0x0010 +#define PI_ERROR 0x00800000 /* expert "event groups" */ -#define PI_GROUP_MASK 0xFF00 /* mask usually for internal use only! */ +#define PI_GROUP_MASK 0xFF000000 /* mask usually for internal use only! */ /** The protocol field has a bad checksum, usually PI_WARN */ -#define PI_CHECKSUM 0x0100 +#define PI_CHECKSUM 0x01000000 /** The protocol field indicates a sequence problem (e.g. TCP window is zero) */ -#define PI_SEQUENCE 0x0200 +#define PI_SEQUENCE 0x02000000 /** The protocol field indicates a bad application response code (e.g. HTTP 404), usually PI_NOTE */ -#define PI_RESPONSE_CODE 0x0400 +#define PI_RESPONSE_CODE 0x04000000 /** The protocol field indicates an application request (e.g. File Handle == xxxx), usually PI_CHAT */ -#define PI_REQUEST_CODE 0x0500 +#define PI_REQUEST_CODE 0x05000000 /** The data is undecoded, the protocol dissection is incomplete here, usually PI_WARN */ -#define PI_UNDECODED 0x0800 +#define PI_UNDECODED 0x08000000 /** The protocol field indicates a reassemble (e.g. DCE/RPC defragmentation), usually PI_CHAT (or PI_ERROR) */ -#define PI_REASSEMBLE 0x1000 +#define PI_REASSEMBLE 0x10000000 /** The packet data is malformed, the dissector has "given up", usually PI_ERROR */ -#define PI_MALFORMED 0x2000 +#define PI_MALFORMED 0x20000000 /** A generic debugging message (shouldn't remain in production code!), usually PI_ERROR */ -#define PI_DEBUG 0x4000 +#define PI_DEBUG 0x40000000 /** The protocol field indicates a security probem (e.g. unsecure implementation) */ -/*#define PI_SECURITY 0x8000*/ +/*#define PI_SECURITY 0x80000000*/ /* add more, see http://wiki.wireshark.org/Development/ExpertInfo */ |