MAC-NR: Add harq-id to the struct and context

Change-Id: Id5c68dc2a4a334a27590d1ee417f9f30c81a3d7e
Reviewed-on: https://code.wireshark.org/review/30335
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
This commit is contained in:
Martin Mathieson 2018-10-22 10:43:03 +01:00
parent b8965d3762
commit 35adb8552c
2 changed files with 20 additions and 0 deletions

View File

@ -41,6 +41,7 @@ static int hf_mac_nr_context_direction = -1;
static int hf_mac_nr_context_rnti = -1;
static int hf_mac_nr_context_rnti_type = -1;
static int hf_mac_nr_context_ueid = -1;
static int hf_mac_nr_context_harqid = -1;
static int hf_mac_nr_context_bcch_transport_channel = -1;
static int hf_mac_nr_context_phr_type2_othercell = -1;
@ -2423,6 +2424,11 @@ static int dissect_mac_nr(tvbuff_t *tvb, packet_info *pinfo,
PROTO_ITEM_SET_GENERATED(ti);
}
/* Harqid */
ti = proto_tree_add_boolean(context_tree, hf_mac_nr_context_harqid,
tvb, 0, 0, p_mac_nr_info->harqid);
PROTO_ITEM_SET_GENERATED(ti);
/* Type 2 other */
ti = proto_tree_add_boolean(context_tree, hf_mac_nr_context_phr_type2_othercell,
tvb, 0, 0, p_mac_nr_info->phr_type2_othercell);
@ -2516,6 +2522,10 @@ static gboolean dissect_mac_nr_heur(tvbuff_t *tvb, packet_info *pinfo,
p_mac_nr_info->ueid = tvb_get_ntohs(tvb, offset);
offset += 2;
break;
case MAC_NR_HARQID:
p_mac_nr_info->harqid = tvb_get_guint8(tvb, offset);
offset++;
break;
case MAC_NR_FRAME_SUBFRAME_TAG:
p_mac_nr_info->sysframeNumber = tvb_get_bits16(tvb, offset<<3, 12, ENC_BIG_ENDIAN);
p_mac_nr_info->subframeNumber = tvb_get_bits8(tvb, ((offset+1)<<3)+4, 4);
@ -2633,6 +2643,12 @@ void proto_register_mac_nr(void)
"User Equipment Identifier associated with message", HFILL
}
},
{ &hf_mac_nr_context_harqid,
{ "HarqId",
"mac-nr.harqid", FT_UINT8, BASE_DEC, NULL, 0x0,
"HARQ Identifier", HFILL
}
},
{ &hf_mac_nr_context_bcch_transport_channel,
{ "Transport channel",
"mac-nr.bcch-transport-channel", FT_UINT8, BASE_DEC, VALS(bcch_transport_channel_vals), 0x0,

View File

@ -36,6 +36,7 @@ typedef struct mac_nr_info
/* Extra info to display */
guint16 rnti;
guint16 ueid;
guint8 harqid;
/* Will these be included in the ME PHR report? */
guint8 phr_type2_othercell;
@ -99,6 +100,9 @@ void set_mac_nr_proto_data(packet_info *pinfo, mac_nr_info *p_mac_nr_info);
#define MAC_NR_PHR_TYPE2_OTHERCELL_TAG 0x05
/* 1 byte, TRUE/FALSE */
#define MAC_NR_HARQID 0x06
/* 1 byte */
/* MAC PDU. Following this tag comes the actual MAC PDU (there is no length, the PDU
continues until the end of the frame) */