Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Adding an item to the proto tree for which there is no associate

From: Richard Sharpe <realrichardsharpe@xxxxxxxxx>
Date: Tue, 3 Jan 2017 13:55:46 -0800
Hi folks,

I am trying to indicate that a particular procedure (like the NULL
proc) has no parameter or no response value.

I was trying to add the string "void" using proto_tree_add_none_format
but this is not inserting anything into the tree.

For example:

        tmp_item = proto_tree_add_none_format(tree, hf_void, tvb,
offset, 0, "void");
        PROTO_ITEM_SET_GENERATED(tmp_item);

I was then expecting to see something like (because this is an RPC
sub-dissector):

    [Program Version: 3]
    [V3 Procedure: SOME_PROC_NAME (4)]
    void

However, the void is not showing up. What am I doing wrong?

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)