Wireshark mailing list archives

Adding an item to the proto tree for which there is no associated value, like a VOID param


From: Richard Sharpe <realrichardsharpe () gmail com>
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
(何以解憂?唯有杜康。--曹操)
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: