forked from osmocom/wireshark
DCT2000: Fix up the way RRC dissectors are called.
Change-Id: I61d51cfdde1ec7b358a6e1ade7d58f82aa897f04 Reviewed-on: https://code.wireshark.org/review/33455 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:
parent
c504a49a37
commit
3bbc888798
|
@ -85,6 +85,7 @@ static int hf_catapult_dct2000_rlc_channel_type = -1;
|
|||
static int hf_catapult_dct2000_rlc_mui = -1;
|
||||
static int hf_catapult_dct2000_rlc_cnf = -1;
|
||||
static int hf_catapult_dct2000_rlc_discard_req = -1;
|
||||
static int hf_catapult_dct2000_carrier_type = -1;
|
||||
|
||||
static int hf_catapult_dct2000_lte_ccpri_opcode = -1;
|
||||
static int hf_catapult_dct2000_lte_ccpri_status = -1;
|
||||
|
@ -285,6 +286,12 @@ enum LTE_or_NR {
|
|||
NR
|
||||
};
|
||||
|
||||
static const value_string carrier_type_vals[] = {
|
||||
{ 1, "LTE"},
|
||||
{ 2, "NR"},
|
||||
{ 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
#define MAX_OUTHDR_VALUES 32
|
||||
|
||||
|
@ -888,9 +895,8 @@ static void dissect_rrc_lte_nr(tvbuff_t *tvb, gint offset,
|
|||
{
|
||||
/* Dedicated channel info */
|
||||
|
||||
/* Length will fit in one byte here */
|
||||
guint len = tvb_get_guint8(tvb, offset++);
|
||||
guint len_offset = offset;
|
||||
/* Skip length */
|
||||
offset++;
|
||||
|
||||
logicalChannelType = Channel_DCCH;
|
||||
|
||||
|
@ -924,13 +930,6 @@ static void dissect_rrc_lte_nr(tvbuff_t *tvb, gint offset,
|
|||
return;
|
||||
}
|
||||
|
||||
/* Optional Carrier Type */
|
||||
if (((offset-len_offset) < len) && tvb_get_guint8(tvb, offset)==0x20) {
|
||||
offset++;
|
||||
/* TODO: could show in tree, but for now skip */
|
||||
offset += (1+tvb_get_guint8(tvb, offset));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -992,6 +991,15 @@ static void dissect_rrc_lte_nr(tvbuff_t *tvb, gint offset,
|
|||
return;
|
||||
}
|
||||
|
||||
/* Optional Carrier Type */
|
||||
if (tvb_get_guint8(tvb, offset)==0x20) {
|
||||
offset++;
|
||||
proto_tree_add_item(tree, hf_catapult_dct2000_carrier_type,
|
||||
tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
offset += (1+tvb_get_guint8(tvb, offset));
|
||||
}
|
||||
|
||||
|
||||
if (opcode == 0x07) {
|
||||
/* Data_Ind_UE_SM - 1 byte MAC */
|
||||
offset++;
|
||||
|
@ -2717,7 +2725,8 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
|
|||
(strcmp(protocol_name, "rrc_r11_lte") == 0) ||
|
||||
(strcmp(protocol_name, "rrc_r12_lte") == 0) ||
|
||||
(strcmp(protocol_name, "rrc_r13_lte") == 0) ||
|
||||
(strcmp(protocol_name, "rrc_r15_lte") == 0))) {
|
||||
(strcmp(protocol_name, "rrc_r15_lte") == 0) ||
|
||||
(strcmp(protocol_name, "rrcpdcpprim_r15_lte") == 0))) {
|
||||
|
||||
dissect_rrc_lte_nr(tvb, offset, pinfo, tree, LTE);
|
||||
return tvb_captured_length(tvb);
|
||||
|
@ -3359,6 +3368,12 @@ void proto_register_catapult_dct2000(void)
|
|||
"RLC Discard Req", HFILL
|
||||
}
|
||||
},
|
||||
{ &hf_catapult_dct2000_carrier_type,
|
||||
{ "Carrier Type",
|
||||
"dct2000.carrier-type", FT_UINT8, BASE_NONE, VALS(carrier_type_vals), 0x0,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
||||
{ &hf_catapult_dct2000_lte_ccpri_opcode,
|
||||
{ "CCPRI opcode",
|
||||
|
|
Loading…
Reference in New Issue