forked from osmocom/wireshark
RLC: Show reassembled data as a field
Adding a field of "Reassembled RLC Data" like other reassembling dissectors have (such as TCP) Also cosmetic changes to the reassembled tree 'root' item Change-Id: I6642ea2ef79f3783f4bcd2d544c34f7b0c1e7ade Reviewed-on: https://code.wireshark.org/review/34814 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
This commit is contained in:
parent
2cccb26bc4
commit
da45dde13b
|
@ -76,6 +76,7 @@ static const enum_val_t li_size_enumvals[] = {
|
|||
static int hf_rlc_seq = -1;
|
||||
static int hf_rlc_ext = -1;
|
||||
static int hf_rlc_pad = -1;
|
||||
static int hf_rlc_reassembled_data = -1;
|
||||
static int hf_rlc_frags = -1;
|
||||
static int hf_rlc_frag = -1;
|
||||
static int hf_rlc_duplicate_of = -1;
|
||||
|
@ -593,8 +594,9 @@ tree_add_fragment_list(struct rlc_sdu *sdu, tvbuff_t *tvb,packet_info *pinfo, pr
|
|||
struct rlc_frag *sdufrag;
|
||||
|
||||
ti = proto_tree_add_item(tree, hf_rlc_frags, tvb, 0, -1, ENC_NA);
|
||||
proto_item_set_generated(ti);
|
||||
frag_tree = proto_item_add_subtree(ti, ett_rlc_fragments);
|
||||
proto_item_append_text(ti, " (%u bytes, %u fragments): ",
|
||||
proto_item_append_text(ti, " (%u bytes, %u fragments) ",
|
||||
sdu->len, sdu->fragcnt);
|
||||
sdufrag = sdu->frags;
|
||||
offset = 0;
|
||||
|
@ -614,6 +616,8 @@ tree_add_fragment_list(struct rlc_sdu *sdu, tvbuff_t *tvb,packet_info *pinfo, pr
|
|||
offset += sdufrag->len;
|
||||
sdufrag = sdufrag->next;
|
||||
}
|
||||
ti = proto_tree_add_item(ti, hf_rlc_reassembled_data, tvb, 0, -1, ENC_NA);
|
||||
proto_item_set_generated(ti);
|
||||
}
|
||||
|
||||
/* add the list of fragments for this sdu to 'tree' */
|
||||
|
@ -626,8 +630,9 @@ tree_add_fragment_list_incomplete(struct rlc_sdu *sdu, tvbuff_t *tvb, proto_tree
|
|||
struct rlc_frag *sdufrag;
|
||||
|
||||
ti = proto_tree_add_item(tree, hf_rlc_frags, tvb, 0, 0, ENC_NA);
|
||||
proto_item_set_generated(ti);
|
||||
frag_tree = proto_item_add_subtree(ti, ett_rlc_fragments);
|
||||
proto_item_append_text(ti, " (%u bytes, %u fragments): ",
|
||||
proto_item_append_text(ti, " (%u bytes, %u fragments) ",
|
||||
sdu->len, sdu->fragcnt);
|
||||
sdufrag = sdu->frags;
|
||||
offset = 0;
|
||||
|
@ -2893,6 +2898,10 @@ proto_register_rlc(void)
|
|||
{ "Padding", "rlc.padding",
|
||||
FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
|
||||
},
|
||||
{ &hf_rlc_reassembled_data,
|
||||
{ "Reassembled RLC Data", "rlc.reassembled_data",
|
||||
FT_BYTES, BASE_NONE, NULL, 0, "The reassembled payload", HFILL }
|
||||
},
|
||||
{ &hf_rlc_frags,
|
||||
{ "Reassembled Fragments", "rlc.fragments",
|
||||
FT_NONE, BASE_NONE, NULL, 0, "Fragments", HFILL }
|
||||
|
|
Loading…
Reference in New Issue