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. I thought about adding a placeholder item to put on top of the tree, to put all my items behind it ; but I then would have to remove it but there is no function to remove an item (I might just hide it but it's not very clean).

So I don't know if there is a need for new functions in proto.h or if I'm just try to resolve my problem the wrong way?

[Alternatively, I could store the content of the item in an array and once I have all my items read the array in reverse to add the items to the tree, or read the bitmap backwards until I find the last validated frame, stop, and read the bitmap forwards up to the last validated frame; but I'm not a fan of either solution.]

Best regards,

Pablo MG

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

Reply via email to