On Fri, Jul 18, 2025, 3:06 PM Pablo MG <pmartin-go...@freebox.fr> wrote:

> Hello,
>
> The subject is probably a XY problem so I'll explain my initial need. In
> the protocol ieee80211, we have a bitmap of validated frames; if a frame
> is missing we add an item "missing frame". The issue is that we rarely
> have enough frames to validate to fill the whole bitmap so we end up
> with the following:
>
> Block Ack Bitmap: ffff000000000000
>      Missing frame: 1932
>      Missing frame: 1933
>      Missing frame: 1934
> [...]
>
> This is not useful. What would be useful is having the list of missing
> frame between the first frame and the last frame received and the last
> frame received. So my idea was to read the bitmap from the end, detect
> the last validated frame (so the first 1 I encounter), write that item,
> and continue to read the bitmap and add an item on top of the previous
> one each time I encounter a missing frame. The issue I have is that all
> the `proto_tree_add_item...()` do a "push back" on the linked list of
> the tree, I have no way to "push front". I found
> `proto_tree_move_item()` function, but I can only move an item behind
> another one, so I can't put move an item on top.
>

You can get the first child and call `proto_tree_move_item()` twice - once
to move your new item immediately behind the first child, and then again,
switching the order of the two proto_item parameters in the function so
that the first child is moved behind the new item.

Cheers,
John
_______________________________________________
Wireshark-dev mailing list -- wireshark-dev@wireshark.org
To unsubscribe send an email to wireshark-dev-le...@wireshark.org

Reply via email to