Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Format column display

I have a dissector written in c

I have information in the packet that is 1 byte

{ &hf_EventType,{ "Event Type", "rtcp_stats.event_type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }  }

But i display it as a string with the function proto_tree_add_uint_format_value

guint8 EventType = tvb_get_guint8(tvb,nOffset);
proto_tree_add_uint_format_value(rtcp_stats_tree, hf_EventType, tvb,
        nOffset, 1, EventType, "%s",
        (EventType==0 ? "Start":"Stop"))

I want the value in the column to appear as a string and not a number

And i also want the filter to be as a string. For example rtcp_stats.event_type=="Start"

Format column display

I have a dissector written in c

I have information in the packet that is 1 byte

{ &hf_EventType,{ "Event Type", "rtcp_stats.event_type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }  }

But i display it as a string with the function proto_tree_add_uint_format_value

guint8 EventType = tvb_get_guint8(tvb,nOffset);
proto_tree_add_uint_format_value(rtcp_stats_tree, hf_EventType, tvb,
        nOffset, 1, EventType, "%s",
        (EventType==0 ? "Start":"Stop"))

I want the value in the column to appear as a string and not a number

And i also want the filter to be as a string. For example rtcp_stats.event_type=="Start"rtcp_stats.event_type=="Start" For now i can only do rtcp_stats.event_type==0