From 48f6616f4de301f5fb117debbab436c7e557de1b Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Mon, 26 Jun 2017 16:05:00 +0200 Subject: PDCP LTE: fix dissection of Polling bit for User plane Data PDU with 18 bits SN Change-Id: Id1167d2c6fa84fd5145d5f0313e39f53591a9add Reviewed-on: https://code.wireshark.org/review/22406 Reviewed-by: Pascal Quantin (cherry picked from commit 71a9ade669c51209132f61a0ded27e60c386af99) Reviewed-on: https://code.wireshark.org/review/22408 --- epan/dissectors/packet-pdcp-lte.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c index 7304565088..8afeeb4a7c 100644 --- a/epan/dissectors/packet-pdcp-lte.c +++ b/epan/dissectors/packet-pdcp-lte.c @@ -92,6 +92,7 @@ static int hf_pdcp_lte_seq_num_7 = -1; static int hf_pdcp_lte_reserved3 = -1; static int hf_pdcp_lte_seq_num_12 = -1; static int hf_pdcp_lte_seq_num_15 = -1; +static int hf_pdcp_lte_polling = -1; static int hf_pdcp_lte_reserved5 = -1; static int hf_pdcp_lte_seq_num_18 = -1; static int hf_pdcp_lte_signalling_data = -1; @@ -1959,9 +1960,12 @@ static int dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *ti; guint8 reserved_value; - /* 5 reserved bits */ + /* Polling bit */ + proto_tree_add_item(pdcp_tree, hf_pdcp_lte_polling, tvb, offset, 1, ENC_BIG_ENDIAN); + + /* 4 reserved bits */ ti = proto_tree_add_item(pdcp_tree, hf_pdcp_lte_reserved5, tvb, offset, 1, ENC_BIG_ENDIAN); - reserved_value = (first_byte & 0x7c) >> 2; + reserved_value = (first_byte & 0x3c) >> 2; /* Complain if not 0 */ if (reserved_value != 0) { @@ -2568,10 +2572,16 @@ void proto_register_pdcp(void) "PDCP Seq num", HFILL } }, + { &hf_pdcp_lte_polling, + { "Polling", + "pdcp-lte.polling", FT_BOOLEAN, 8, NULL, 0x40, + NULL, HFILL + } + }, { &hf_pdcp_lte_reserved5, { "Reserved", - "pdcp-lte.reserved5", FT_UINT8, BASE_HEX, NULL, 0x7c, - "5 reserved bits", HFILL + "pdcp-lte.reserved5", FT_UINT8, BASE_HEX, NULL, 0x3c, + "4 reserved bits", HFILL } }, { &hf_pdcp_lte_seq_num_18, -- cgit v1.2.1