forked from osmocom/wireshark
RLC LTE: upgrade dissector to v13.0.0
Change-Id: Ibe4586925ffe49f5aaab72956c40e123855a1a1e Reviewed-on: https://code.wireshark.org/review/13620 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
parent
96acb62c82
commit
4fc7423da0
|
@ -1624,6 +1624,22 @@ SoundingRS-UL-ConfigDedicated/setup/duration STRINGS=TFS(<e_rrc_duration_val)
|
|||
mapping->rlc_dl_ext_li_field = ext_li_field;
|
||||
}
|
||||
|
||||
#.FN_BODY RLC-Config-v13xx/ul-extended-RLC-AM-SN-r13 VAL_PTR=&ext_am_sn
|
||||
gboolean ext_am_sn;
|
||||
drb_mapping_t *mapping = private_data_get_drb_mapping(actx);
|
||||
%(DEFAULT_BODY)s
|
||||
if (mapping != NULL) {
|
||||
mapping->rlc_ul_ext_am_sn = ext_am_sn;
|
||||
}
|
||||
|
||||
#.FN_BODY RLC-Config-v13xx/dl-extended-RLC-AM-SN-r13 VAL_PTR=&ext_am_sn
|
||||
gboolean ext_am_sn;
|
||||
drb_mapping_t *mapping = private_data_get_drb_mapping(actx);
|
||||
%(DEFAULT_BODY)s
|
||||
if (mapping != NULL) {
|
||||
mapping->rlc_dl_ext_am_sn = ext_am_sn;
|
||||
}
|
||||
|
||||
#.FN_BODY DRB-ToAddMod/logicalChannelIdentity VAL_PTR=&value
|
||||
guint32 value;
|
||||
drb_mapping_t *mapping = private_data_get_drb_mapping(actx);
|
||||
|
|
|
@ -1844,7 +1844,7 @@ static void attach_rlc_lte_info(packet_info *pinfo)
|
|||
p_rlc_lte_info->rlcMode = outhdr_values[i++];
|
||||
p_rlc_lte_info->direction = outhdr_values[i++];
|
||||
p_rlc_lte_info->priority = outhdr_values[i++];
|
||||
p_rlc_lte_info->UMSequenceNumberLength = outhdr_values[i++];
|
||||
p_rlc_lte_info->sequenceNumberLength = outhdr_values[i++];
|
||||
p_rlc_lte_info->channelId = outhdr_values[i++];
|
||||
p_rlc_lte_info->channelType = outhdr_values[i++];
|
||||
p_rlc_lte_info->ueid = outhdr_values[i++];
|
||||
|
|
|
@ -2346,8 +2346,8 @@ static int hf_lte_rrc_um_Uni_Directional_UL = -1; /* T_um_Uni_Directional_UL */
|
|||
static int hf_lte_rrc_um_Uni_Directional_DL = -1; /* T_um_Uni_Directional_DL */
|
||||
static int hf_lte_rrc_ul_extended_RLC_LI_Field_r12 = -1; /* T_ul_extended_RLC_LI_Field_r12 */
|
||||
static int hf_lte_rrc_dl_extended_RLC_LI_Field_r12 = -1; /* T_dl_extended_RLC_LI_Field_r12 */
|
||||
static int hf_lte_rrc_ul_extended_RLC_AM_SN_r13 = -1; /* BOOLEAN */
|
||||
static int hf_lte_rrc_dl_extended_RLC_AM_SN_r13 = -1; /* BOOLEAN */
|
||||
static int hf_lte_rrc_ul_extended_RLC_AM_SN_r13 = -1; /* T_ul_extended_RLC_AM_SN_r13 */
|
||||
static int hf_lte_rrc_dl_extended_RLC_AM_SN_r13 = -1; /* T_dl_extended_RLC_AM_SN_r13 */
|
||||
static int hf_lte_rrc_pollPDU_v13xy = -1; /* PollPDU_v13xy */
|
||||
static int hf_lte_rrc_t_PollRetransmit = -1; /* T_PollRetransmit */
|
||||
static int hf_lte_rrc_pollPDU = -1; /* PollPDU */
|
||||
|
@ -13205,6 +13205,38 @@ dissect_lte_rrc_DRB_ToAddMod_eag_1(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
|
|||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
dissect_lte_rrc_T_ul_extended_RLC_AM_SN_r13(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
gboolean ext_am_sn;
|
||||
drb_mapping_t *mapping = private_data_get_drb_mapping(actx);
|
||||
offset = dissect_per_boolean(tvb, offset, actx, tree, hf_index, &ext_am_sn);
|
||||
|
||||
if (mapping != NULL) {
|
||||
mapping->rlc_ul_ext_am_sn = ext_am_sn;
|
||||
}
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
dissect_lte_rrc_T_dl_extended_RLC_AM_SN_r13(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
gboolean ext_am_sn;
|
||||
drb_mapping_t *mapping = private_data_get_drb_mapping(actx);
|
||||
offset = dissect_per_boolean(tvb, offset, actx, tree, hf_index, &ext_am_sn);
|
||||
|
||||
if (mapping != NULL) {
|
||||
mapping->rlc_dl_ext_am_sn = ext_am_sn;
|
||||
}
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
||||
static const value_string lte_rrc_PollPDU_v13xy_vals[] = {
|
||||
{ 0, "p512" },
|
||||
{ 1, "p1024" },
|
||||
|
@ -13228,8 +13260,8 @@ dissect_lte_rrc_PollPDU_v13xy(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
|
|||
|
||||
|
||||
static const per_sequence_t RLC_Config_v13xx_sequence[] = {
|
||||
{ &hf_lte_rrc_ul_extended_RLC_AM_SN_r13, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_lte_rrc_BOOLEAN },
|
||||
{ &hf_lte_rrc_dl_extended_RLC_AM_SN_r13, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_lte_rrc_BOOLEAN },
|
||||
{ &hf_lte_rrc_ul_extended_RLC_AM_SN_r13, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_lte_rrc_T_ul_extended_RLC_AM_SN_r13 },
|
||||
{ &hf_lte_rrc_dl_extended_RLC_AM_SN_r13, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_lte_rrc_T_dl_extended_RLC_AM_SN_r13 },
|
||||
{ &hf_lte_rrc_pollPDU_v13xy, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_lte_rrc_PollPDU_v13xy },
|
||||
{ NULL, 0, 0, NULL }
|
||||
};
|
||||
|
@ -62046,11 +62078,11 @@ void proto_register_lte_rrc(void) {
|
|||
{ &hf_lte_rrc_ul_extended_RLC_AM_SN_r13,
|
||||
{ "ul-extended-RLC-AM-SN-r13", "lte-rrc.ul_extended_RLC_AM_SN_r13",
|
||||
FT_BOOLEAN, BASE_NONE, NULL, 0,
|
||||
"BOOLEAN", HFILL }},
|
||||
NULL, HFILL }},
|
||||
{ &hf_lte_rrc_dl_extended_RLC_AM_SN_r13,
|
||||
{ "dl-extended-RLC-AM-SN-r13", "lte-rrc.dl_extended_RLC_AM_SN_r13",
|
||||
FT_BOOLEAN, BASE_NONE, NULL, 0,
|
||||
"BOOLEAN", HFILL }},
|
||||
NULL, HFILL }},
|
||||
{ &hf_lte_rrc_pollPDU_v13xy,
|
||||
{ "pollPDU-v13xy", "lte-rrc.pollPDU_v13xy",
|
||||
FT_UINT32, BASE_DEC, VALS(lte_rrc_PollPDU_v13xy_vals), 0,
|
||||
|
|
|
@ -1201,17 +1201,41 @@ typedef enum rlc_channel_type_t {
|
|||
rlcAM,
|
||||
rlcAMulExtLiField,
|
||||
rlcAMdlExtLiField,
|
||||
rlcAMextLiField
|
||||
rlcAMextLiField,
|
||||
rlcAMul16,
|
||||
rlcAMdl16,
|
||||
rlcAM16,
|
||||
rlcAMul16ulExtLiField,
|
||||
rlcAMdl16ulExtLiField,
|
||||
rlcAM16ulExtLiField,
|
||||
rlcAMul16dlExtLiField,
|
||||
rlcAMdl16dlExtLiField,
|
||||
rlcAM16dlExtLiField,
|
||||
rlcAMul16extLiField,
|
||||
rlcAMdl16extLiField,
|
||||
rlcAM16extLiField,
|
||||
} rlc_channel_type_t;
|
||||
|
||||
static const value_string rlc_channel_type_vals[] = {
|
||||
{ rlcTM , "TM"},
|
||||
{ rlcUM5 , "UM, SN Len=5"},
|
||||
{ rlcUM10 , "UM, SN Len=10"},
|
||||
{ rlcAM , "AM"},
|
||||
{ rlcAMulExtLiField, "AM, UL Extended LI Field"},
|
||||
{ rlcAMdlExtLiField, "AM, DL Extended LI Field"},
|
||||
{ rlcAMextLiField , "AM, UL/DL Extended LI Field"},
|
||||
{ rlcTM , "TM"},
|
||||
{ rlcUM5 , "UM, SN Len=5"},
|
||||
{ rlcUM10 , "UM, SN Len=10"},
|
||||
{ rlcAM , "AM"},
|
||||
{ rlcAMulExtLiField , "AM, UL Extended LI Field"},
|
||||
{ rlcAMdlExtLiField , "AM, DL Extended LI Field"},
|
||||
{ rlcAMextLiField , "AM, UL/DL Extended LI Field"},
|
||||
{ rlcAMul16 , "AM, UL SN Len=16"},
|
||||
{ rlcAMdl16 , "AM, DL SN Len=16"},
|
||||
{ rlcAM16 , "AM, SN Len=16"},
|
||||
{ rlcAMul16ulExtLiField, "AM, UL SN Len=16, UL Extended LI Field"},
|
||||
{ rlcAMdl16ulExtLiField, "AM, DL SN Len=16, UL Extended LI Field"},
|
||||
{ rlcAM16ulExtLiField , "AM, SN Len=16, UL Extended LI Field"},
|
||||
{ rlcAMul16dlExtLiField, "AM, UL SN Len=16, DL Extended LI Field"},
|
||||
{ rlcAMdl16dlExtLiField, "AM, DL SN Len=16, DL Extended LI Field"},
|
||||
{ rlcAM16dlExtLiField , "AM, SN Len=16, DL Extended LI Field"},
|
||||
{ rlcAMul16extLiField , "AM, UL SN Len=16, UL/DL Extended LI Field"},
|
||||
{ rlcAMdl16extLiField , "AM, DL SN Len=16, UL/DL Extended LI Field"},
|
||||
{ rlcAM16extLiField , "AM, SN Len=16, UL/DL Extended LI Field"},
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
|
@ -2985,7 +3009,7 @@ static void call_rlc_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
|
|||
int offset, guint16 data_length,
|
||||
guint8 mode, guint8 direction, guint16 ueid,
|
||||
guint16 channelType, guint16 channelId,
|
||||
guint8 UMSequenceNumberLength,
|
||||
guint8 sequenceNumberLength,
|
||||
guint8 priority, gboolean rlcExtLiField)
|
||||
{
|
||||
tvbuff_t *rb_tvb = tvb_new_subset_length(tvb, offset, data_length);
|
||||
|
@ -3005,7 +3029,7 @@ static void call_rlc_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
|
|||
p_rlc_lte_info->channelType = channelType;
|
||||
p_rlc_lte_info->channelId = channelId;
|
||||
p_rlc_lte_info->pduLength = data_length;
|
||||
p_rlc_lte_info->UMSequenceNumberLength = UMSequenceNumberLength;
|
||||
p_rlc_lte_info->sequenceNumberLength = sequenceNumberLength;
|
||||
p_rlc_lte_info->extendedLiField = rlcExtLiField;
|
||||
|
||||
/* Store info in packet */
|
||||
|
@ -3649,20 +3673,132 @@ static void show_ues_tti(packet_info *pinfo, mac_lte_info *p_mac_lte_info, tvbuf
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void set_rlc_seqnum_length_ext_li_field(rlc_channel_type_t rlc_channel_type,
|
||||
guint8 direction,
|
||||
guint8 *seqnum_length,
|
||||
gboolean *rlc_ext_li_field)
|
||||
{
|
||||
switch (rlc_channel_type) {
|
||||
case rlcUM5:
|
||||
*seqnum_length = 5;
|
||||
break;
|
||||
case rlcUM10:
|
||||
*seqnum_length = 10;
|
||||
break;
|
||||
case rlcAMulExtLiField:
|
||||
*seqnum_length = 10;
|
||||
if (direction == DIRECTION_UPLINK) {
|
||||
*rlc_ext_li_field = TRUE;
|
||||
}
|
||||
break;
|
||||
case rlcAMdlExtLiField:
|
||||
*seqnum_length = 10;
|
||||
if (direction == DIRECTION_DOWNLINK) {
|
||||
*rlc_ext_li_field = TRUE;
|
||||
}
|
||||
break;
|
||||
case rlcAMextLiField:
|
||||
*seqnum_length = 10;
|
||||
*rlc_ext_li_field = TRUE;
|
||||
break;
|
||||
case rlcAMul16:
|
||||
if (direction == DIRECTION_UPLINK) {
|
||||
*seqnum_length = 16;
|
||||
} else {
|
||||
*seqnum_length = 10;
|
||||
}
|
||||
break;
|
||||
case rlcAMdl16:
|
||||
if (direction == DIRECTION_UPLINK) {
|
||||
*seqnum_length = 10;
|
||||
} else {
|
||||
*seqnum_length = 16;
|
||||
}
|
||||
break;
|
||||
case rlcAM16:
|
||||
*seqnum_length = 16;
|
||||
break;
|
||||
case rlcAMul16ulExtLiField:
|
||||
if (direction == DIRECTION_UPLINK) {
|
||||
*seqnum_length = 16;
|
||||
*rlc_ext_li_field = TRUE;
|
||||
} else {
|
||||
*seqnum_length = 10;
|
||||
}
|
||||
break;
|
||||
case rlcAMdl16ulExtLiField:
|
||||
if (direction == DIRECTION_UPLINK) {
|
||||
*seqnum_length = 10;
|
||||
*rlc_ext_li_field = TRUE;
|
||||
} else {
|
||||
*seqnum_length = 16;
|
||||
}
|
||||
break;
|
||||
case rlcAM16ulExtLiField:
|
||||
*seqnum_length = 16;
|
||||
if (direction == DIRECTION_UPLINK) {
|
||||
*rlc_ext_li_field = TRUE;
|
||||
}
|
||||
break;
|
||||
case rlcAMul16dlExtLiField:
|
||||
if (direction == DIRECTION_UPLINK) {
|
||||
*seqnum_length = 16;
|
||||
} else {
|
||||
*seqnum_length = 10;
|
||||
*rlc_ext_li_field = TRUE;
|
||||
}
|
||||
break;
|
||||
case rlcAMdl16dlExtLiField:
|
||||
if (direction == DIRECTION_UPLINK) {
|
||||
*seqnum_length = 10;
|
||||
} else {
|
||||
*seqnum_length = 16;
|
||||
*rlc_ext_li_field = TRUE;
|
||||
}
|
||||
break;
|
||||
case rlcAM16dlExtLiField:
|
||||
*seqnum_length = 16;
|
||||
if (direction == DIRECTION_DOWNLINK) {
|
||||
*rlc_ext_li_field = TRUE;
|
||||
}
|
||||
break;
|
||||
case rlcAMul16extLiField:
|
||||
if (direction == DIRECTION_UPLINK) {
|
||||
*seqnum_length = 16;
|
||||
} else {
|
||||
*seqnum_length = 10;
|
||||
}
|
||||
*rlc_ext_li_field = TRUE;
|
||||
break;
|
||||
case rlcAMdl16extLiField:
|
||||
if (direction == DIRECTION_UPLINK) {
|
||||
*seqnum_length = 10;
|
||||
} else {
|
||||
*seqnum_length = 16;
|
||||
}
|
||||
*rlc_ext_li_field = TRUE;
|
||||
break;
|
||||
case rlcAM16extLiField:
|
||||
*seqnum_length = 16;
|
||||
*rlc_ext_li_field = TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Lookup channel details for lcid */
|
||||
static void lookup_rlc_channel_from_lcid(guint16 ueid,
|
||||
guint8 lcid,
|
||||
guint8 direction,
|
||||
rlc_channel_type_t *rlc_channel_type,
|
||||
guint8 *UM_seqnum_length,
|
||||
guint8 *seqnum_length,
|
||||
gint *drb_id,
|
||||
gboolean *rlc_ext_li_field)
|
||||
{
|
||||
/* Zero params (in case no match is found) */
|
||||
*rlc_channel_type = rlcRaw;
|
||||
*UM_seqnum_length = 0;
|
||||
*seqnum_length = 0;
|
||||
*drb_id = 0;
|
||||
*rlc_ext_li_field = FALSE;
|
||||
|
||||
|
@ -3675,30 +3811,9 @@ static void lookup_rlc_channel_from_lcid(guint16 ueid,
|
|||
|
||||
*rlc_channel_type = lcid_drb_mappings[m].channel_type;
|
||||
|
||||
/* Set UM_seqnum_length */
|
||||
switch (*rlc_channel_type) {
|
||||
case rlcUM5:
|
||||
*UM_seqnum_length = 5;
|
||||
break;
|
||||
case rlcUM10:
|
||||
*UM_seqnum_length = 10;
|
||||
break;
|
||||
case rlcAMulExtLiField:
|
||||
if (direction == DIRECTION_UPLINK) {
|
||||
*rlc_ext_li_field = TRUE;
|
||||
}
|
||||
break;
|
||||
case rlcAMdlExtLiField:
|
||||
if (direction == DIRECTION_DOWNLINK) {
|
||||
*rlc_ext_li_field = TRUE;
|
||||
}
|
||||
break;
|
||||
case rlcAMextLiField:
|
||||
*rlc_ext_li_field = TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/* Set seqnum_length and rlc_ext_li_field */
|
||||
set_rlc_seqnum_length_ext_li_field(*rlc_channel_type, direction,
|
||||
seqnum_length, rlc_ext_li_field);
|
||||
|
||||
/* Set drb_id */
|
||||
*drb_id = lcid_drb_mappings[m].drbid;
|
||||
|
@ -3720,30 +3835,9 @@ static void lookup_rlc_channel_from_lcid(guint16 ueid,
|
|||
|
||||
*rlc_channel_type = ue_mappings->mapping[lcid].channel_type;
|
||||
|
||||
/* Set UM_seqnum_length */
|
||||
switch (*rlc_channel_type) {
|
||||
case rlcUM5:
|
||||
*UM_seqnum_length = 5;
|
||||
break;
|
||||
case rlcUM10:
|
||||
*UM_seqnum_length = 10;
|
||||
break;
|
||||
case rlcAMulExtLiField:
|
||||
if (direction == DIRECTION_UPLINK) {
|
||||
*rlc_ext_li_field = TRUE;
|
||||
}
|
||||
break;
|
||||
case rlcAMdlExtLiField:
|
||||
if (direction == DIRECTION_DOWNLINK) {
|
||||
*rlc_ext_li_field = TRUE;
|
||||
}
|
||||
break;
|
||||
case rlcAMextLiField:
|
||||
*rlc_ext_li_field = TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/* Set seqnum_length and rlc_ext_li_field */
|
||||
set_rlc_seqnum_length_ext_li_field(*rlc_channel_type, direction,
|
||||
seqnum_length, rlc_ext_li_field);
|
||||
|
||||
/* Set drb_id */
|
||||
*drb_id = ue_mappings->mapping[lcid].drbid;
|
||||
|
@ -5220,7 +5314,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
|
||||
/* Look for mapping for this LCID to drb channel set by UAT table */
|
||||
rlc_channel_type_t rlc_channel_type;
|
||||
guint8 UM_seqnum_length;
|
||||
guint8 seqnum_length;
|
||||
gint drb_id;
|
||||
gboolean rlc_ext_li_field;
|
||||
guint8 priority = get_mac_lte_channel_priority(p_mac_lte_info->ueid,
|
||||
|
@ -5230,7 +5324,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
lcids[n],
|
||||
p_mac_lte_info->direction,
|
||||
&rlc_channel_type,
|
||||
&UM_seqnum_length,
|
||||
&seqnum_length,
|
||||
&drb_id,
|
||||
&rlc_ext_li_field);
|
||||
|
||||
|
@ -5240,16 +5334,28 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
case rlcUM10:
|
||||
call_rlc_dissector(tvb, pinfo, tree, pdu_ti, offset, data_length,
|
||||
RLC_UM_MODE, p_mac_lte_info->direction, p_mac_lte_info->ueid,
|
||||
CHANNEL_TYPE_DRB, (guint16)drb_id, UM_seqnum_length,
|
||||
CHANNEL_TYPE_DRB, (guint16)drb_id, seqnum_length,
|
||||
priority, FALSE);
|
||||
break;
|
||||
case rlcAM:
|
||||
case rlcAMulExtLiField:
|
||||
case rlcAMdlExtLiField:
|
||||
case rlcAMextLiField:
|
||||
case rlcAMul16:
|
||||
case rlcAMdl16:
|
||||
case rlcAM16:
|
||||
case rlcAMul16ulExtLiField:
|
||||
case rlcAMdl16ulExtLiField:
|
||||
case rlcAM16ulExtLiField:
|
||||
case rlcAMul16dlExtLiField:
|
||||
case rlcAMdl16dlExtLiField:
|
||||
case rlcAM16dlExtLiField:
|
||||
case rlcAMul16extLiField:
|
||||
case rlcAMdl16extLiField:
|
||||
case rlcAM16extLiField:
|
||||
call_rlc_dissector(tvb, pinfo, tree, pdu_ti, offset, data_length,
|
||||
RLC_AM_MODE, p_mac_lte_info->direction, p_mac_lte_info->ueid,
|
||||
CHANNEL_TYPE_DRB, (guint16)drb_id, 0,
|
||||
CHANNEL_TYPE_DRB, (guint16)drb_id, seqnum_length,
|
||||
priority, rlc_ext_li_field);
|
||||
break;
|
||||
case rlcTM:
|
||||
|
@ -6745,7 +6851,51 @@ void set_mac_lte_channel_mapping(drb_mapping_t *drb_mapping)
|
|||
if (drb_mapping->rlcMode_present) {
|
||||
switch (drb_mapping->rlcMode) {
|
||||
case RLC_AM_MODE:
|
||||
if (drb_mapping->rlc_ul_ext_li_field == TRUE) {
|
||||
if (drb_mapping->rlc_ul_ext_am_sn == TRUE) {
|
||||
if (drb_mapping->rlc_dl_ext_am_sn == TRUE) {
|
||||
if (drb_mapping->rlc_ul_ext_li_field == TRUE) {
|
||||
if (drb_mapping->rlc_dl_ext_li_field == TRUE) {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAM16extLiField;
|
||||
} else {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAM16ulExtLiField;
|
||||
}
|
||||
} else {
|
||||
if (drb_mapping->rlc_dl_ext_li_field == TRUE) {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAM16dlExtLiField;
|
||||
} else {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAM16;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (drb_mapping->rlc_ul_ext_li_field == TRUE) {
|
||||
if (drb_mapping->rlc_dl_ext_li_field == TRUE) {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAMul16extLiField;
|
||||
} else {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAMul16ulExtLiField;
|
||||
}
|
||||
} else {
|
||||
if (drb_mapping->rlc_dl_ext_li_field == TRUE) {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAMul16dlExtLiField;
|
||||
} else {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAMul16;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (drb_mapping->rlc_dl_ext_am_sn == TRUE) {
|
||||
if (drb_mapping->rlc_ul_ext_li_field == TRUE) {
|
||||
if (drb_mapping->rlc_dl_ext_li_field == TRUE) {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAMdl16extLiField;
|
||||
} else {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAMdl16ulExtLiField;
|
||||
}
|
||||
} else {
|
||||
if (drb_mapping->rlc_dl_ext_li_field == TRUE) {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAMdl16dlExtLiField;
|
||||
} else {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAMdl16;
|
||||
}
|
||||
}
|
||||
} else if (drb_mapping->rlc_ul_ext_li_field == TRUE) {
|
||||
if (drb_mapping->rlc_dl_ext_li_field == TRUE) {
|
||||
ue_mappings->mapping[lcid].channel_type = rlcAMextLiField;
|
||||
} else {
|
||||
|
|
|
@ -310,6 +310,8 @@ typedef struct drb_mapping_t
|
|||
guint8 rlcMode; /* Part of RLC config - optional */
|
||||
gboolean rlc_ul_ext_li_field; /* Part of RLC config - optional */
|
||||
gboolean rlc_dl_ext_li_field; /* Part of RLC config - optional */
|
||||
gboolean rlc_ul_ext_am_sn; /* Part of RLC config - optional */
|
||||
gboolean rlc_dl_ext_am_sn; /* Part of RLC config - optional */
|
||||
gboolean um_sn_length_present;
|
||||
guint8 um_sn_length; /* Part of RLC config - optional */
|
||||
gboolean ul_priority_present;
|
||||
|
|
|
@ -118,6 +118,7 @@ static int hf_rlc_lte_context_channel_type = -1;
|
|||
static int hf_rlc_lte_context_channel_id = -1;
|
||||
static int hf_rlc_lte_context_pdu_length = -1;
|
||||
static int hf_rlc_lte_context_um_sn_length = -1;
|
||||
static int hf_rlc_lte_context_am_sn_length = -1;
|
||||
|
||||
/* Transparent mode fields */
|
||||
static int hf_rlc_lte_tm = -1;
|
||||
|
@ -148,8 +149,13 @@ static int hf_rlc_lte_am_p = -1;
|
|||
static int hf_rlc_lte_am_fi = -1;
|
||||
static int hf_rlc_lte_am_fixed_e = -1;
|
||||
static int hf_rlc_lte_am_fixed_sn = -1;
|
||||
static int hf_rlc_lte_am_fixed_reserved = -1;
|
||||
static int hf_rlc_lte_am_segment_lsf16 = -1;
|
||||
static int hf_rlc_lte_am_fixed_reserved2 = -1;
|
||||
static int hf_rlc_lte_am_fixed_sn16 = -1;
|
||||
static int hf_rlc_lte_am_segment_lsf = -1;
|
||||
static int hf_rlc_lte_am_segment_so = -1;
|
||||
static int hf_rlc_lte_am_segment_so16 = -1;
|
||||
static int hf_rlc_lte_am_data = -1;
|
||||
|
||||
/* Control fields */
|
||||
|
@ -1204,7 +1210,11 @@ static void addChannelSequenceInfo(sequence_analysis_report *p,
|
|||
p_rlc_lte_info->channelId);
|
||||
proto_item_append_text(seqnum_ti, " - SNs missing (%u to %u)",
|
||||
p->firstSN, p->lastSN);
|
||||
tap_info->missingSNs = ((1024 + p->lastSN - p->firstSN) % 1024) + 1;
|
||||
if (p_rlc_lte_info->sequenceNumberLength == AM_SN_LENGTH_16_BITS) {
|
||||
tap_info->missingSNs = ((65536 + (guint32)p->lastSN - (guint32)p->firstSN) % 65536) + 1;
|
||||
} else {
|
||||
tap_info->missingSNs = ((1024 + p->lastSN - p->firstSN) % 1024) + 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
expert_add_info_format(pinfo, ti, &ei_rlc_lte_am_sn_missing,
|
||||
|
@ -1273,7 +1283,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p,
|
|||
if (!p->sequenceExpectedCorrect) {
|
||||
/* Work out SN wrap (in case needed below) */
|
||||
guint16 snLimit;
|
||||
if (p_rlc_lte_info->UMSequenceNumberLength == 5) {
|
||||
if (p_rlc_lte_info->sequenceNumberLength == UM_SN_LENGTH_5_BITS) {
|
||||
snLimit = 32;
|
||||
}
|
||||
else {
|
||||
|
@ -1400,7 +1410,7 @@ static sequence_analysis_state checkChannelSequenceInfo(packet_info *pinfo, tvbu
|
|||
sequence_analysis_report *p_report_in_frame = NULL;
|
||||
gboolean createdChannel = FALSE;
|
||||
guint16 expectedSequenceNumber = 0;
|
||||
guint16 snLimit = 0;
|
||||
guint32 snLimit = 0;
|
||||
|
||||
/* If find stat_report_in_frame already, use that and get out */
|
||||
if (pinfo->fd->flags.visited) {
|
||||
|
@ -1453,7 +1463,7 @@ static sequence_analysis_state checkChannelSequenceInfo(packet_info *pinfo, tvbu
|
|||
switch (p_channel_status->rlcMode) {
|
||||
case RLC_UM_MODE:
|
||||
|
||||
if (p_rlc_lte_info->UMSequenceNumberLength == 5) {
|
||||
if (p_rlc_lte_info->sequenceNumberLength == UM_SN_LENGTH_5_BITS) {
|
||||
snLimit = 32;
|
||||
}
|
||||
else {
|
||||
|
@ -1563,7 +1573,7 @@ static sequence_analysis_state checkChannelSequenceInfo(packet_info *pinfo, tvbu
|
|||
if (p_report_in_frame->previousFrameNum != 0) {
|
||||
/* Get report for previous frame */
|
||||
sequence_analysis_report *p_previous_report;
|
||||
if (p_rlc_lte_info->UMSequenceNumberLength == 5) {
|
||||
if (p_rlc_lte_info->sequenceNumberLength == UM_SN_LENGTH_5_BITS) {
|
||||
snLimit = 32;
|
||||
}
|
||||
else {
|
||||
|
@ -1588,9 +1598,15 @@ static sequence_analysis_state checkChannelSequenceInfo(packet_info *pinfo, tvbu
|
|||
|
||||
case RLC_AM_MODE:
|
||||
|
||||
if (p_rlc_lte_info->sequenceNumberLength == AM_SN_LENGTH_16_BITS) {
|
||||
snLimit = 65536;
|
||||
} else {
|
||||
snLimit = 1024;
|
||||
}
|
||||
|
||||
/* Work out expected sequence number */
|
||||
if (!createdChannel) {
|
||||
expectedSequenceNumber = (p_channel_status->previousSequenceNumber + 1) % 1024;
|
||||
expectedSequenceNumber = (p_channel_status->previousSequenceNumber + 1) % snLimit;
|
||||
}
|
||||
else {
|
||||
/* Whatever we got is fine.. */
|
||||
|
@ -1616,7 +1632,7 @@ static sequence_analysis_state checkChannelSequenceInfo(packet_info *pinfo, tvbu
|
|||
|
||||
if (sequenceNumber != expectedSequenceNumber) {
|
||||
/* Don't trash reassembly info if this looks like a close retx... */
|
||||
if (((1024 + sequenceNumber - expectedSequenceNumber) % 1024) < 50) {
|
||||
if (((snLimit + sequenceNumber - expectedSequenceNumber) % snLimit) < 50) {
|
||||
reassembly_destroy(p_channel_status);
|
||||
}
|
||||
}
|
||||
|
@ -1669,7 +1685,7 @@ static sequence_analysis_state checkChannelSequenceInfo(packet_info *pinfo, tvbu
|
|||
/* Get report for previous frame */
|
||||
sequence_analysis_report *p_previous_report;
|
||||
p_previous_report = (sequence_analysis_report*)g_hash_table_lookup(sequence_analysis_report_hash,
|
||||
get_report_hash_key((sequenceNumber+1023) % 1024,
|
||||
get_report_hash_key((sequenceNumber+snLimit-1) % snLimit,
|
||||
p_report_in_frame->previousFrameNum,
|
||||
p_rlc_lte_info,
|
||||
FALSE));
|
||||
|
@ -1683,7 +1699,7 @@ static sequence_analysis_state checkChannelSequenceInfo(packet_info *pinfo, tvbu
|
|||
}
|
||||
|
||||
/* Previous subframe repeated? */
|
||||
else if (((sequenceNumber+1) % 1024) == expectedSequenceNumber) {
|
||||
else if (((sequenceNumber+1) % snLimit) == expectedSequenceNumber) {
|
||||
p_report_in_frame->state = SN_Repeated;
|
||||
|
||||
/* Set report for this frame */
|
||||
|
@ -1702,10 +1718,10 @@ static sequence_analysis_state checkChannelSequenceInfo(packet_info *pinfo, tvbu
|
|||
|
||||
else {
|
||||
/* Need to work out if new (with skips, or likely a retx (due to NACK)) */
|
||||
int delta = (1024 + expectedSequenceNumber - sequenceNumber) % 1024;
|
||||
gint delta = (snLimit + expectedSequenceNumber - sequenceNumber) % snLimit;
|
||||
|
||||
/* Rx window is 512, so check to see if this is a retx */
|
||||
if (delta < 512) {
|
||||
/* Rx window is 512/32768, so check to see if this is a retx */
|
||||
if (delta < (gint)(snLimit>>1)) {
|
||||
/* Probably a retx due to receiving NACK */
|
||||
p_report_in_frame->state = SN_Retx;
|
||||
|
||||
|
@ -1718,7 +1734,7 @@ static sequence_analysis_state checkChannelSequenceInfo(packet_info *pinfo, tvbu
|
|||
p_report_in_frame->state = SN_Missing;
|
||||
|
||||
p_report_in_frame->firstSN = expectedSequenceNumber;
|
||||
p_report_in_frame->lastSN = (1024 + sequenceNumber-1) % 1024;
|
||||
p_report_in_frame->lastSN = (snLimit + sequenceNumber-1) % snLimit;
|
||||
|
||||
/* Update channel state - forget about missed SNs */
|
||||
p_report_in_frame->sequenceExpected = expectedSequenceNumber;
|
||||
|
@ -1915,6 +1931,7 @@ static void checkChannelACKWindow(guint16 ack_sn,
|
|||
channel_hash_key channel_key;
|
||||
channel_sequence_analysis_status *p_channel_status;
|
||||
sequence_analysis_report *p_report_in_frame = NULL;
|
||||
guint32 snLimit;
|
||||
|
||||
/* If find stat_report_in_frame already, use that and get out */
|
||||
if (pinfo->fd->flags.visited) {
|
||||
|
@ -1953,7 +1970,8 @@ static void checkChannelACKWindow(guint16 ack_sn,
|
|||
|
||||
/* Is it in the rx window? This test will catch if it's ahead, but we don't
|
||||
really know what the back of the tx window is... */
|
||||
if (((1024 + p_channel_status->previousSequenceNumber+1 - ack_sn) % 1024) > 512) {
|
||||
snLimit = (p_rlc_lte_info->sequenceNumberLength == AM_SN_LENGTH_16_BITS) ? 65536 : 1024;
|
||||
if (((snLimit + (guint32)p_channel_status->previousSequenceNumber+1 - ack_sn) % snLimit) > (snLimit>>1)) {
|
||||
|
||||
/* Set result */
|
||||
p_report_in_frame = wmem_new0(wmem_file_scope(), sequence_analysis_report);
|
||||
|
@ -2087,7 +2105,7 @@ static void dissect_rlc_lte_um(tvbuff_t *tvb, packet_info *pinfo,
|
|||
|
||||
/*******************************/
|
||||
/* Fixed UM header */
|
||||
if (p_rlc_lte_info->UMSequenceNumberLength == UM_SN_LENGTH_5_BITS) {
|
||||
if (p_rlc_lte_info->sequenceNumberLength == UM_SN_LENGTH_5_BITS) {
|
||||
/* Framing info (2 bits) */
|
||||
proto_tree_add_bits_ret_val(um_header_tree, hf_rlc_lte_um_fi,
|
||||
tvb, offset*8, 2,
|
||||
|
@ -2104,7 +2122,7 @@ static void dissect_rlc_lte_um(tvbuff_t *tvb, packet_info *pinfo,
|
|||
&sn, ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
}
|
||||
else if (p_rlc_lte_info->UMSequenceNumberLength == UM_SN_LENGTH_10_BITS) {
|
||||
else if (p_rlc_lte_info->sequenceNumberLength == UM_SN_LENGTH_10_BITS) {
|
||||
guint8 reserved;
|
||||
proto_item *ti;
|
||||
|
||||
|
@ -2136,7 +2154,7 @@ static void dissect_rlc_lte_um(tvbuff_t *tvb, packet_info *pinfo,
|
|||
/* Invalid length of sequence number */
|
||||
proto_tree_add_expert_format(um_header_tree, pinfo, &ei_rlc_lte_um_sn, tvb, 0, 0,
|
||||
"Invalid sequence number length (%u bits)",
|
||||
p_rlc_lte_info->UMSequenceNumberLength);
|
||||
p_rlc_lte_info->sequenceNumberLength);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2276,9 +2294,10 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb,
|
|||
rlc_lte_info *p_rlc_lte_info,
|
||||
rlc_lte_tap_info *tap_info)
|
||||
{
|
||||
guint8 cpt;
|
||||
guint8 cpt, sn_size, so_size;
|
||||
guint32 sn_limit;
|
||||
guint64 ack_sn, nack_sn;
|
||||
guint16 nack_count = 0;
|
||||
guint16 nack_count = 0, so_end_of_pdu;
|
||||
guint64 e1 = 0, e2 = 0;
|
||||
guint64 so_start, so_end;
|
||||
int bit_offset = offset * 8;
|
||||
|
@ -2297,13 +2316,25 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb,
|
|||
return;
|
||||
}
|
||||
|
||||
if (p_rlc_lte_info->sequenceNumberLength == AM_SN_LENGTH_16_BITS) {
|
||||
sn_size = 16;
|
||||
sn_limit = 65536;
|
||||
so_size = 16;
|
||||
so_end_of_pdu = 0xffff;
|
||||
} else {
|
||||
sn_size = 10;
|
||||
sn_limit = 1024;
|
||||
so_size = 15;
|
||||
so_end_of_pdu = 0x7fff;
|
||||
}
|
||||
|
||||
/* The Status PDU itself starts 4 bits into the byte */
|
||||
bit_offset += 4;
|
||||
|
||||
/* ACK SN */
|
||||
proto_tree_add_bits_ret_val(tree, hf_rlc_lte_am_ack_sn, tvb,
|
||||
bit_offset, 10, &ack_sn, ENC_BIG_ENDIAN);
|
||||
bit_offset += 10;
|
||||
bit_offset, sn_size, &ack_sn, ENC_BIG_ENDIAN);
|
||||
bit_offset += sn_size;
|
||||
write_pdu_label_and_info(top_ti, status_ti, pinfo, " ACK_SN=%-4u", (guint16)ack_sn);
|
||||
|
||||
tap_info->ACKNo = (guint16)ack_sn;
|
||||
|
@ -2325,8 +2356,8 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb,
|
|||
|
||||
/* NACK_SN */
|
||||
nack_ti = proto_tree_add_bits_ret_val(tree, hf_rlc_lte_am_nack_sn, tvb,
|
||||
bit_offset, 10, &nack_sn, ENC_BIG_ENDIAN);
|
||||
bit_offset += 10;
|
||||
bit_offset, sn_size, &nack_sn, ENC_BIG_ENDIAN);
|
||||
bit_offset += sn_size;
|
||||
write_pdu_label_and_info(top_ti, NULL, pinfo, " NACK_SN=%-4u", (guint16)nack_sn);
|
||||
|
||||
/* We shouldn't NACK the ACK_SN! */
|
||||
|
@ -2337,7 +2368,7 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb,
|
|||
}
|
||||
|
||||
/* NACK should always be 'behind' the ACK */
|
||||
if ((1024 + ack_sn - nack_sn) % 1024 > 512) {
|
||||
if ((sn_limit + ack_sn - nack_sn) % sn_limit > (sn_limit>>1)) {
|
||||
expert_add_info(pinfo, nack_ti, &ei_rlc_lte_am_nack_sn_ahead_ack);
|
||||
}
|
||||
|
||||
|
@ -2379,15 +2410,15 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb,
|
|||
if (e2) {
|
||||
/* Read SOstart, SOend */
|
||||
proto_tree_add_bits_ret_val(tree, hf_rlc_lte_am_so_start, tvb,
|
||||
bit_offset, 15, &so_start, ENC_BIG_ENDIAN);
|
||||
bit_offset += 15;
|
||||
bit_offset, so_size, &so_start, ENC_BIG_ENDIAN);
|
||||
bit_offset += so_size;
|
||||
|
||||
proto_tree_add_bits_ret_val(tree, hf_rlc_lte_am_so_end, tvb,
|
||||
bit_offset, 15, &so_end, ENC_BIG_ENDIAN);
|
||||
bit_offset += 15;
|
||||
bit_offset, so_size, &so_end, ENC_BIG_ENDIAN);
|
||||
bit_offset += so_size;
|
||||
|
||||
|
||||
if ((guint16)so_end == 0x7fff) {
|
||||
if ((guint16)so_end == so_end_of_pdu) {
|
||||
write_pdu_label_and_info(top_ti, NULL, pinfo,
|
||||
" (SOstart=%u SOend=<END-OF_PDU>)",
|
||||
(guint16)so_start);
|
||||
|
@ -2523,9 +2554,33 @@ static void dissect_rlc_lte_am(tvbuff_t *tvb, packet_info *pinfo,
|
|||
proto_tree_add_item(am_header_tree, hf_rlc_lte_am_fixed_e, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
/* Sequence Number */
|
||||
sn = tvb_get_ntohs(tvb, offset) & 0x03ff;
|
||||
proto_tree_add_item(am_header_tree, hf_rlc_lte_am_fixed_sn, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
if (p_rlc_lte_info->sequenceNumberLength == AM_SN_LENGTH_16_BITS) {
|
||||
guint8 reserved;
|
||||
|
||||
if (is_resegmented) {
|
||||
/* Last Segment Field (LSF) */
|
||||
proto_tree_add_item(am_header_tree, hf_rlc_lte_am_segment_lsf16, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
/* Reserved (R1) */
|
||||
am_ti = proto_tree_add_item(am_header_tree, hf_rlc_lte_am_fixed_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
reserved = tvb_get_guint8(tvb, offset) & 0x01;
|
||||
} else {
|
||||
/* Reserved (R1) */
|
||||
am_ti = proto_tree_add_item(am_header_tree, hf_rlc_lte_am_fixed_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
reserved = tvb_get_guint8(tvb, offset) & 0x03;
|
||||
}
|
||||
if (reserved != 0) {
|
||||
expert_add_info_format(pinfo, am_ti, &ei_rlc_lte_reserved_bits_not_zero,
|
||||
"RLC AM Fixed header Reserved bits not zero (found 0x%x)", reserved);
|
||||
}
|
||||
offset += 1;
|
||||
proto_tree_add_item(am_header_tree, hf_rlc_lte_am_fixed_sn16, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
sn = tvb_get_ntohs(tvb, offset);
|
||||
offset += 2;
|
||||
} else {
|
||||
proto_tree_add_item(am_header_tree, hf_rlc_lte_am_fixed_sn, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
sn = tvb_get_ntohs(tvb, offset) & 0x03ff;
|
||||
offset += 2;
|
||||
}
|
||||
tap_info->sequenceNumber = sn;
|
||||
|
||||
write_pdu_label_and_info(top_ti, am_header_ti, pinfo, "sn=%-4u", sn);
|
||||
|
@ -2535,12 +2590,18 @@ static void dissect_rlc_lte_am(tvbuff_t *tvb, packet_info *pinfo,
|
|||
if (is_resegmented) {
|
||||
guint16 segmentOffset;
|
||||
|
||||
/* Last Segment Field (LSF) */
|
||||
proto_tree_add_item(am_header_tree, hf_rlc_lte_am_segment_lsf, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
if (p_rlc_lte_info->sequenceNumberLength == AM_SN_LENGTH_16_BITS) {
|
||||
/* SO */
|
||||
proto_tree_add_item(am_header_tree, hf_rlc_lte_am_segment_so16, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
segmentOffset = tvb_get_ntohs(tvb, offset);
|
||||
} else {
|
||||
/* Last Segment Field (LSF) */
|
||||
proto_tree_add_item(am_header_tree, hf_rlc_lte_am_segment_lsf, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
/* SO */
|
||||
segmentOffset = tvb_get_ntohs(tvb, offset) & 0x7fff;
|
||||
proto_tree_add_item(am_header_tree, hf_rlc_lte_am_segment_so, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
/* SO */
|
||||
proto_tree_add_item(am_header_tree, hf_rlc_lte_am_segment_so, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
segmentOffset = tvb_get_ntohs(tvb, offset) & 0x7fff;
|
||||
}
|
||||
write_pdu_label_and_info(top_ti, am_header_ti, pinfo, " SO=%u ", segmentOffset);
|
||||
offset += 2;
|
||||
}
|
||||
|
@ -2700,7 +2761,7 @@ static gboolean dissect_rlc_lte_heur(tvbuff_t *tvb, packet_info *pinfo,
|
|||
tvbuff_t *rlc_tvb;
|
||||
guint8 tag = 0;
|
||||
gboolean infoAlreadySet = FALSE;
|
||||
gboolean umSeqNumLengthTagPresent = FALSE;
|
||||
gboolean seqNumLengthTagPresent = FALSE;
|
||||
|
||||
/* Do this again on re-dissection to re-discover offset of actual PDU */
|
||||
|
||||
|
@ -2734,16 +2795,19 @@ static gboolean dissect_rlc_lte_heur(tvbuff_t *tvb, packet_info *pinfo,
|
|||
|
||||
/* Read fixed fields */
|
||||
p_rlc_lte_info->rlcMode = tvb_get_guint8(tvb, offset++);
|
||||
if (p_rlc_lte_info->rlcMode == RLC_AM_MODE) {
|
||||
p_rlc_lte_info->sequenceNumberLength = AM_SN_LENGTH_10_BITS;
|
||||
}
|
||||
|
||||
/* Read optional fields */
|
||||
while (tag != RLC_LTE_PAYLOAD_TAG) {
|
||||
/* Process next tag */
|
||||
tag = tvb_get_guint8(tvb, offset++);
|
||||
switch (tag) {
|
||||
case RLC_LTE_UM_SN_LENGTH_TAG:
|
||||
p_rlc_lte_info->UMSequenceNumberLength = tvb_get_guint8(tvb, offset);
|
||||
case RLC_LTE_SN_LENGTH_TAG:
|
||||
p_rlc_lte_info->sequenceNumberLength = tvb_get_guint8(tvb, offset);
|
||||
offset++;
|
||||
umSeqNumLengthTagPresent = TRUE;
|
||||
seqNumLengthTagPresent = TRUE;
|
||||
break;
|
||||
case RLC_LTE_DIRECTION_TAG:
|
||||
p_rlc_lte_info->direction = tvb_get_guint8(tvb, offset);
|
||||
|
@ -2780,7 +2844,7 @@ static gboolean dissect_rlc_lte_heur(tvbuff_t *tvb, packet_info *pinfo,
|
|||
}
|
||||
}
|
||||
|
||||
if ((p_rlc_lte_info->rlcMode == RLC_UM_MODE) && (umSeqNumLengthTagPresent == FALSE)) {
|
||||
if ((p_rlc_lte_info->rlcMode == RLC_UM_MODE) && (seqNumLengthTagPresent == FALSE)) {
|
||||
/* Conditional field is not present */
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -2894,7 +2958,14 @@ static void dissect_rlc_lte_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
|
||||
if (p_rlc_lte_info->rlcMode == RLC_UM_MODE) {
|
||||
ti = proto_tree_add_uint(context_tree, hf_rlc_lte_context_um_sn_length,
|
||||
tvb, 0, 0, p_rlc_lte_info->UMSequenceNumberLength);
|
||||
tvb, 0, 0, p_rlc_lte_info->sequenceNumberLength);
|
||||
PROTO_ITEM_SET_GENERATED(ti);
|
||||
}
|
||||
|
||||
if (p_rlc_lte_info->rlcMode == RLC_AM_MODE) {
|
||||
ti = proto_tree_add_uint(context_tree, hf_rlc_lte_context_am_sn_length,
|
||||
tvb, 0, 0, p_rlc_lte_info->sequenceNumberLength ?
|
||||
p_rlc_lte_info->sequenceNumberLength : 10);
|
||||
PROTO_ITEM_SET_GENERATED(ti);
|
||||
}
|
||||
|
||||
|
@ -2928,7 +2999,7 @@ static void dissect_rlc_lte_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
tap_info->channelType = p_rlc_lte_info->channelType;
|
||||
tap_info->channelId = p_rlc_lte_info->channelId;
|
||||
tap_info->pduLength = p_rlc_lte_info->pduLength;
|
||||
tap_info->UMSequenceNumberLength = p_rlc_lte_info->UMSequenceNumberLength;
|
||||
tap_info->sequenceNumberLength = p_rlc_lte_info->sequenceNumberLength;
|
||||
tap_info->loggedInMACFrame = (p_get_proto_data(wmem_file_scope(), pinfo, proto_mac_lte, 0) != NULL);
|
||||
|
||||
tap_info->rlc_lte_time = pinfo->abs_ts;
|
||||
|
@ -3120,6 +3191,12 @@ void proto_register_rlc_lte(void)
|
|||
"Length of UM sequence number in bits", HFILL
|
||||
}
|
||||
},
|
||||
{ &hf_rlc_lte_context_am_sn_length,
|
||||
{ "AM Sequence number length",
|
||||
"rlc-lte.am-seqnum-length", FT_UINT8, BASE_DEC, 0, 0x0,
|
||||
"Length of AM sequence number in bits", HFILL
|
||||
}
|
||||
},
|
||||
|
||||
/* Transparent mode fields */
|
||||
{ &hf_rlc_lte_tm,
|
||||
|
@ -3252,6 +3329,30 @@ void proto_register_rlc_lte(void)
|
|||
"AM Fixed Sequence Number", HFILL
|
||||
}
|
||||
},
|
||||
{ &hf_rlc_lte_am_fixed_reserved,
|
||||
{ "Reserved",
|
||||
"rlc-lte.am.reserved", FT_UINT8, BASE_DEC, 0, 0x03,
|
||||
"Acknowledged Mode Fixed header reserved bits", HFILL
|
||||
}
|
||||
},
|
||||
{ &hf_rlc_lte_am_segment_lsf16,
|
||||
{ "Last Segment Flag",
|
||||
"rlc-lte.am.segment.lsf", FT_UINT8, BASE_HEX, VALS(lsf_vals), 0x02,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
{ &hf_rlc_lte_am_fixed_reserved2,
|
||||
{ "Reserved",
|
||||
"rlc-lte.am.reserved", FT_UINT8, BASE_DEC, 0, 0x01,
|
||||
"Acknowledged Mode Fixed header reserved bit", HFILL
|
||||
}
|
||||
},
|
||||
{ &hf_rlc_lte_am_fixed_sn16,
|
||||
{ "Sequence Number",
|
||||
"rlc-lte.am.fixed.sn", FT_UINT16, BASE_DEC, 0, 0xffff,
|
||||
"AM Fixed Sequence Number", HFILL
|
||||
}
|
||||
},
|
||||
{ &hf_rlc_lte_am_segment_lsf,
|
||||
{ "Last Segment Flag",
|
||||
"rlc-lte.am.segment.lsf", FT_UINT8, BASE_HEX, VALS(lsf_vals), 0x80,
|
||||
|
@ -3264,6 +3365,12 @@ void proto_register_rlc_lte(void)
|
|||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
{ &hf_rlc_lte_am_segment_so16,
|
||||
{ "Segment Offset",
|
||||
"rlc-lte.am.segment.offset", FT_UINT16, BASE_DEC, 0, 0xffff,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
{ &hf_rlc_lte_am_data,
|
||||
{ "AM Data",
|
||||
"rlc-lte.am.data", FT_BYTES, BASE_NONE, 0, 0x0,
|
||||
|
|
|
@ -48,6 +48,8 @@
|
|||
/* UMSequenceNumberLength */
|
||||
#define UM_SN_LENGTH_5_BITS 5
|
||||
#define UM_SN_LENGTH_10_BITS 10
|
||||
#define AM_SN_LENGTH_10_BITS 10
|
||||
#define AM_SN_LENGTH_16_BITS 16
|
||||
|
||||
/* Info attached to each LTE RLC frame */
|
||||
typedef struct rlc_lte_info
|
||||
|
@ -55,7 +57,7 @@ typedef struct rlc_lte_info
|
|||
guint8 rlcMode;
|
||||
guint8 direction;
|
||||
guint8 priority;
|
||||
guint8 UMSequenceNumberLength;
|
||||
guint8 sequenceNumberLength;
|
||||
guint16 ueid;
|
||||
guint16 channelType;
|
||||
guint16 channelId;
|
||||
|
@ -73,7 +75,7 @@ typedef struct rlc_lte_tap_info {
|
|||
guint16 channelType;
|
||||
guint16 channelId;
|
||||
guint16 pduLength;
|
||||
guint8 UMSequenceNumberLength;
|
||||
guint8 sequenceNumberLength;
|
||||
|
||||
nstime_t rlc_lte_time;
|
||||
guint8 loggedInMACFrame;
|
||||
|
@ -122,10 +124,11 @@ void set_rlc_lte_drb_li_field(packet_info *pinfo, guint16 ueid, guint8 drbid, gb
|
|||
(where the allowed values are defined above */
|
||||
|
||||
/* Conditional field. This field is mandatory in case of RLC Unacknowledged mode.
|
||||
In case of RLC Acknowledged mode, the field is optional (assume 10 bits by default).
|
||||
The format is to have the tag, followed by the value (there is no length field,
|
||||
it's implicit from the tag). The allowed values are defined above. */
|
||||
|
||||
#define RLC_LTE_UM_SN_LENGTH_TAG 0x02
|
||||
#define RLC_LTE_SN_LENGTH_TAG 0x02
|
||||
/* 1 byte */
|
||||
|
||||
/* Optional fields. Attaching this info to frames will allow you
|
||||
|
|
|
@ -413,7 +413,7 @@ void LteRlcGraphDialog::zoomAxes(bool in)
|
|||
}
|
||||
else {
|
||||
// Don't want to zoom out *too* far on y axis.
|
||||
if (rp->yAxis->range().size() > (1024+10)) {
|
||||
if (rp->yAxis->range().size() > (65536+10)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -449,7 +449,7 @@ void LteRlcGraphDialog::zoomYAxis(bool in)
|
|||
}
|
||||
else {
|
||||
// Don't want to zoom out *too* far on y axis.
|
||||
if (rp->yAxis->range().size() > (1024+10)) {
|
||||
if (rp->yAxis->range().size() > (65536+10)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -469,7 +469,7 @@ void LteRlcGraphDialog::panAxes(int x_pixels, int y_pixels)
|
|||
double v_pan = 0.0;
|
||||
|
||||
// Don't scroll up beyond max range, or below 0
|
||||
if (((y_pixels > 0) && (rp->yAxis->range().upper > 1024)) ||
|
||||
if (((y_pixels > 0) && (rp->yAxis->range().upper > 65536)) ||
|
||||
((y_pixels < 0) && (rp->yAxis->range().lower < 0))) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue