aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarien Spencer <cusneud@mail.com>2017-06-18 22:54:55 -0700
committerAnders Broman <a.broman58@gmail.com>2017-06-19 23:50:23 +0000
commit0dada943c0671637c29dab86b82fd07cc48ca849 (patch)
tree7992727281611e9fe395e168a5ea4f91e2fac704
parentbef90e1493815a07e619c4cd0da6a7d65321c26e (diff)
RLC: Renamed U-RNTI to UE ID
The 'U-RNTI' field in RLC Info struct is both used in the code and shown in the UI as a generic unique 'UE ID' (not specificly U-RNTI, although sometimes it is) This commit renames the field to fit it's usage. Change-Id: Ib42b8ed5192fe60c9a164d6d225634be53708c66 Reviewed-on: https://code.wireshark.org/review/22225 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/asn1/rrc/rrc.cnf2
-rw-r--r--epan/dissectors/packet-catapult-dct2000.c2
-rw-r--r--epan/dissectors/packet-fp_hint.c2
-rw-r--r--epan/dissectors/packet-rrc.c2
-rw-r--r--epan/dissectors/packet-umts_fp.c23
-rw-r--r--epan/dissectors/packet-umts_mac.c8
-rw-r--r--epan/dissectors/packet-umts_rlc.c30
-rw-r--r--epan/dissectors/packet-umts_rlc.h8
8 files changed, 42 insertions, 35 deletions
diff --git a/epan/dissectors/asn1/rrc/rrc.cnf b/epan/dissectors/asn1/rrc/rrc.cnf
index 7bd44dd5ea..f1e2176ae3 100644
--- a/epan/dissectors/asn1/rrc/rrc.cnf
+++ b/epan/dissectors/asn1/rrc/rrc.cnf
@@ -829,7 +829,7 @@ HNBName TYPE=FT_STRING DISPLAY=STR_UNICODE
if (fpinf && macinf && rlcinf) {
switch(macinf->content[fpinf->cur_tb]){
case MAC_DCCH:
- u_rnti = rlcinf->urnti[fpinf->cur_tb];
+ u_rnti = rlcinf->ueid[fpinf->cur_tb];
break;
case MAC_CCCH:
default:
diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c
index ab18b65b7c..a0474d1d5c 100644
--- a/epan/dissectors/packet-catapult-dct2000.c
+++ b/epan/dissectors/packet-catapult-dct2000.c
@@ -1697,7 +1697,7 @@ static void attach_rlc_info(packet_info *pinfo, guint32 urnti, guint8 rbid,
/* Fill in struct fields for first (only) PDU in this frame */
/* Urnti. Just use UEId */
- p_rlc_info->urnti[0] = urnti;
+ p_rlc_info->ueid[0] = urnti;
/* ciphered (off by default) */
p_rlc_info->ciphered[0] = FALSE;
diff --git a/epan/dissectors/packet-fp_hint.c b/epan/dissectors/packet-fp_hint.c
index d25763e783..9ea1657415 100644
--- a/epan/dissectors/packet-fp_hint.c
+++ b/epan/dissectors/packet-fp_hint.c
@@ -191,7 +191,7 @@ static guint16 assign_rb_info(tvbuff_t *tvb, packet_info *pinfo, guint16 offset,
rlcinf->mode[i] = rlc_mode;
rlcinf->rbid[i] = rb_id;
- rlcinf->urnti[i] = urnti;
+ rlcinf->ueid[i] = urnti;
rlcinf->ciphered[i] = ciphered;
rlcinf->deciphered[i] = deciphered;
rlcinf->li_size[i] = RLC_LI_VARIABLE;
diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c
index 5be823754d..132cb6afda 100644
--- a/epan/dissectors/packet-rrc.c
+++ b/epan/dissectors/packet-rrc.c
@@ -38741,7 +38741,7 @@ dissect_rrc_C_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
if (fpinf && macinf && rlcinf) {
switch(macinf->content[fpinf->cur_tb]){
case MAC_DCCH:
- u_rnti = rlcinf->urnti[fpinf->cur_tb];
+ u_rnti = rlcinf->ueid[fpinf->cur_tb];
break;
case MAC_CCCH:
default:
diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c
index 645ca0a358..8a1bdc9f92 100644
--- a/epan/dissectors/packet-umts_fp.c
+++ b/epan/dissectors/packet-umts_fp.c
@@ -2918,7 +2918,7 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
rlcinf->mode[macd_idx] = lchId_rlc_map[lchid]; /* Set RLC mode by lchid to RLC_MODE map in nbap.h */
/* Set U-RNTI to ComuncationContext signaled from nbap*/
- rlcinf->urnti[macd_idx] = user_identity;
+ rlcinf->ueid[macd_idx] = user_identity;
rlcinf->rbid[macd_idx] = lchid; /*subframes[n].ddi[i];*/ /*Save the DDI value for RLC*/
/*g_warning("========Setting RBID:%d for lchid:%d", subframes[n].ddi[i], lchid);*/
/* rlcinf->mode[0] = RLC_AM;*/
@@ -3313,7 +3313,7 @@ dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
} else {
macinf->ctmux[i] = FALSE; /*Either it's multiplexed and not signled or it's not MUX*/
}
- rlcinf->urnti[i] = user_identity;
+ rlcinf->ueid[i] = user_identity;
rlcinf->li_size[i] = RLC_LI_7BITS;
rlcinf->deciphered[i] = FALSE;
rlcinf->ciphered[i] = FALSE;
@@ -3326,7 +3326,7 @@ dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* */
/*Indicate we need to reset stream*/
if (p_fp_info->reset_frag) {
- rlc_reset_channel(rlcinf->mode[i], macinf->lchid[i], p_fp_info->is_uplink, rlcinf->urnti[i] );
+ rlc_reset_channel(rlcinf->mode[i], macinf->lchid[i], p_fp_info->is_uplink, rlcinf->ueid[i] );
p_fp_info->reset_frag = FALSE;
}
@@ -3628,7 +3628,7 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree
rlcinf->deciphered[j] = FALSE;
rlcinf->rbid[j] = (guint8)lchid[n]+1;
- rlcinf->urnti[j] = user_identity;
+ rlcinf->ueid[j] = user_identity;
}
/* Add PDU block header subtree */
@@ -3873,7 +3873,7 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto
rlcinf->ciphered[j] = FALSE;
rlcinf->deciphered[j] = FALSE;
rlcinf->rbid[j] = (guint8)lchid[n]+1;
- rlcinf->urnti[j] = p_fp_info->channel; /*We need to fake urnti*/
+ rlcinf->ueid[j] = p_fp_info->channel; /*We need to fake urnti*/
next_tvb = tvb_new_subset_length(tvb, offset, (gint)pdu_length[n]);
call_dissector_with_data(mac_fdd_hsdsch_handle, next_tvb, pinfo, top_level_tree, data);
@@ -5075,7 +5075,7 @@ fp_set_per_packet_inf_from_conv(conversation_t *p_conv,
rlcinf->mode[0] = RLC_UNKNOWN_MODE;
break;
}*/
- rlcinf->urnti[0] = get_ue_id_from_conv(p_conv_data);
+ rlcinf->ueid[0] = get_ue_id_from_conv(p_conv_data);
rlcinf->li_size[0] = RLC_LI_7BITS;
rlcinf->ciphered[0] = FALSE;
rlcinf->deciphered[0] = FALSE;
@@ -5102,7 +5102,7 @@ fp_set_per_packet_inf_from_conv(conversation_t *p_conv,
}
fpi->edch_type = fp_edch_channel_info->edch_type;
- rlcinf->urnti[0] = get_ue_id_from_conv(p_conv_data);
+ rlcinf->ueid[0] = get_ue_id_from_conv(p_conv_data);
rlcinf->li_size[0] = RLC_LI_7BITS;
rlcinf->ciphered[0] = FALSE;
rlcinf->deciphered[0] = FALSE;
@@ -5195,7 +5195,7 @@ fp_set_per_packet_inf_from_conv(conversation_t *p_conv,
}
/*** Set RLC info ***/
- rlcinf->urnti[j + chan] = get_ue_id_from_conv(p_conv_data);
+ rlcinf->ueid[j + chan] = get_ue_id_from_conv(p_conv_data);
rlcinf->li_size[j+chan] = RLC_LI_7BITS;
#if 0
/*If this entry exists, SECRUITY_MODE is completed (signled by RRC)*/
@@ -5244,7 +5244,7 @@ fp_set_per_packet_inf_from_conv(conversation_t *p_conv,
rlcinf = wmem_new0(wmem_file_scope(), rlc_info);
/* For RLC re-assembly to work we need to fake a "U-RNTI" as an identifier of this stream.*/
/* Using the (UDP) conversation's ID and the prefix of 0xFFF */
- rlcinf->urnti[0] = (p_conv->conv_index | 0xFFF00000);
+ rlcinf->ueid[0] = (p_conv->conv_index | 0xFFF00000);
rlcinf->mode[0] = RLC_AM;
rlcinf->li_size[0] = RLC_LI_7BITS;
rlcinf->ciphered[0] = FALSE;
@@ -5273,7 +5273,10 @@ fp_set_per_packet_inf_from_conv(conversation_t *p_conv,
for ( chan = 0; chan < fpi->num_chans; chan++ ) {
macinf->ctmux[chan] = 1;
macinf->content[chan] = MAC_CONTENT_DCCH;
- rlcinf->urnti[chan] = fpi->com_context_id; /*Note: For DCCH, MAC dissector will override this with C-RNTI/U-RNTI*/
+ /* RLC dissector requires a non-zero stream identifier ('UE ID') to work */
+ /* For DCCH: MAC dissector will override this with C-RNTI/U-RNTI */
+ /* For CCCH: RLC's mode is TM and the dissector does not need the ID for reassembly - showing 0 in the UI to indicate that */
+ rlcinf->ueid[chan] = 0;
}
p_add_proto_data(wmem_file_scope(), pinfo, proto_umts_mac, 0, macinf);
p_add_proto_data(wmem_file_scope(), pinfo, proto_umts_rlc, 0, rlcinf);
diff --git a/epan/dissectors/packet-umts_mac.c b/epan/dissectors/packet-umts_mac.c
index d89b720aa9..711e2ed977 100644
--- a/epan/dissectors/packet-umts_mac.c
+++ b/epan/dissectors/packet-umts_mac.c
@@ -246,7 +246,7 @@ static guint16 tree_add_common_dcch_dtch_fields(tvbuff_t *tvb, packet_info *pinf
bitoffs += 2;
if (ueid_type == MAC_UEID_TYPE_URNTI) {
proto_tree_add_bits_item(tree, hf_mac_urnti, tvb, bitoffs, 32, ENC_BIG_ENDIAN);
- rlcinf->urnti[fpinf->cur_tb] = tvb_get_bits32(tvb, bitoffs, 32,ENC_BIG_ENDIAN);
+ rlcinf->ueid[fpinf->cur_tb] = tvb_get_bits32(tvb, bitoffs, 32,ENC_BIG_ENDIAN);
bitoffs += 32;
} else if (ueid_type == MAC_UEID_TYPE_CRNTI) {
proto_tree_add_bits_item(tree, hf_mac_crnti, tvb, 4, 16, ENC_BIG_ENDIAN);
@@ -292,7 +292,7 @@ static guint16 tree_add_common_dcch_dtch_fields(tvbuff_t *tvb, packet_info *pinf
/* Choosing between resolved U-RNTI (if found) or the C-RNTI as UE-ID for RLC */
if(fp_crnti_allocation_info != NULL) {
/* Using U-RNTI */
- rlcinf->urnti[fpinf->cur_tb] = fp_crnti_allocation_info->urnti;
+ rlcinf->ueid[fpinf->cur_tb] = fp_crnti_allocation_info->urnti;
/* Adding 'Resolved U-RNTI' related tree items*/
proto_item *temp;
proto_tree *resolved_urnti_tree;
@@ -304,7 +304,7 @@ static guint16 tree_add_common_dcch_dtch_fields(tvbuff_t *tvb, packet_info *pinf
}
else {
/* Using C-RNTI */
- rlcinf->urnti[fpinf->cur_tb] = c_rnti;
+ rlcinf->ueid[fpinf->cur_tb] = c_rnti;
}
bitoffs += 16;
}
@@ -1053,7 +1053,7 @@ static int dissect_mac_fdd_edch_type2(tvbuff_t *tvb, packet_info *pinfo, proto_t
PROTO_ITEM_SET_GENERATED(temp);
/*Set up information needed for MAC and lower layers*/
rlcinf->mode[sdu_no] = lchId_rlc_map[lchid]; /* Set RLC mode by lchid to RLC_MODE map in nbap.h */
- rlcinf->urnti[sdu_no] = p_fp_info->com_context_id;
+ rlcinf->ueid[sdu_no] = p_fp_info->com_context_id;
rlcinf->rbid[sdu_no] = lchid;
rlcinf->li_size[sdu_no] = RLC_LI_7BITS;
rlcinf->ciphered[sdu_no] = FALSE;
diff --git a/epan/dissectors/packet-umts_rlc.c b/epan/dissectors/packet-umts_rlc.c
index d427ddd1b6..3b63cc9d1c 100644
--- a/epan/dissectors/packet-umts_rlc.c
+++ b/epan/dissectors/packet-umts_rlc.c
@@ -236,11 +236,11 @@ static GHashTable *sequence_table = NULL; /* channel -> seq */
static GHashTable *duplicate_table = NULL; /* duplicates */
/* identify an RLC channel, using one of two options:
- * - via Radio Bearer ID and U-RNTI
+ * - via Radio Bearer ID and unique UE ID
* - via Radio Bearer ID and (VPI/VCI/CID) + Link ID
*/
struct rlc_channel {
- guint32 urnti;
+ guint32 ueid;
guint16 vpi;
guint16 vci;
guint8 cid;
@@ -318,8 +318,8 @@ rlc_channel_hash(gconstpointer key)
{
const struct rlc_channel *ch = (const struct rlc_channel *)key;
- if (ch->urnti)
- return ch->urnti | ch->rbid | ch->mode;
+ if (ch->ueid)
+ return ch->ueid | ch->rbid | ch->mode;
return (ch->vci << 16) | (ch->link << 16) | ch->vpi | ch->vci;
}
@@ -329,8 +329,8 @@ rlc_channel_equal(gconstpointer a, gconstpointer b)
{
const struct rlc_channel *x = (const struct rlc_channel *)a, *y = (const struct rlc_channel *)b;
- if (x->urnti || y->urnti)
- return x->urnti == y->urnti &&
+ if (x->ueid || y->ueid)
+ return x->ueid == y->ueid &&
x->rbid == y->rbid &&
x->mode == y->mode &&
x->dir == y->dir ? TRUE : FALSE;
@@ -354,12 +354,12 @@ rlc_channel_assign(struct rlc_channel *ch, enum rlc_mode mode, packet_info *pinf
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_rlc, 0);
if (!fpinf || !rlcinf) return -1;
- if (rlcinf->urnti[fpinf->cur_tb]) {
- ch->urnti = rlcinf->urnti[fpinf->cur_tb];
+ if (rlcinf->ueid[fpinf->cur_tb]) {
+ ch->ueid = rlcinf->ueid[fpinf->cur_tb];
ch->vpi = ch->vci = ch->link = ch->cid = 0;
} else {
if (!atm) return -1;
- ch->urnti = 1;
+ ch->ueid = 1;
ch->vpi = atm->vpi;
ch->vci = atm->vci;
ch->cid = atm->aal2_cid;
@@ -956,7 +956,7 @@ reassemble_sequence(struct rlc_frag ** frags, struct rlc_seqlist * endlist,
/* Reset the specified channel's reassembly data, useful for when a sequence
* resets on transport channel swap. */
void
-rlc_reset_channel(enum rlc_mode mode, guint8 rbid, guint8 dir, guint32 urnti,
+rlc_reset_channel(enum rlc_mode mode, guint8 rbid, guint8 dir, guint32 ueid,
struct atm_phdr *atm)
{
struct rlc_frag ** frags = NULL;
@@ -967,7 +967,7 @@ rlc_reset_channel(enum rlc_mode mode, guint8 rbid, guint8 dir, guint32 urnti,
ch_lookup.mode = mode;
ch_lookup.rbid = rbid;
ch_lookup.dir = dir;
- ch_lookup.urnti = urnti;
+ ch_lookup.ueid = ueid;
frags = get_frags(NULL, &ch_lookup, atm);
endlist = get_endlist(NULL, &ch_lookup, atm);
DISSECTOR_ASSERT(frags && endlist);
@@ -1003,7 +1003,7 @@ add_fragment(enum rlc_mode mode, tvbuff_t *tvb, packet_info *pinfo,
}
rlc_frag_assign(&frag_lookup, mode, pinfo, seq, num_li, atm);
#if RLC_ADD_FRAGMENT_DEBUG_PRINT
- g_print("packet: %d, channel (%d %d %d) seq: %u, num_li: %u, offset: %u, \n", pinfo->num, ch_lookup.dir, ch_lookup.rbid, ch_lookup.urnti, seq, num_li, offset);
+ g_print("packet: %d, channel (%d %d %d) seq: %u, num_li: %u, offset: %u, \n", pinfo->num, ch_lookup.dir, ch_lookup.rbid, ch_lookup.ueid, seq, num_li, offset);
#endif
snmod = getChannelSNModulus(&ch_lookup);
@@ -1352,13 +1352,13 @@ add_channel_info(packet_info * pinfo, proto_tree * tree, fp_info * fpinf, rlc_in
item = proto_tree_add_item(tree, hf_rlc_channel, NULL, 0, 0, ENC_NA);
channel_tree = proto_item_add_subtree(item, ett_rlc_channel);
proto_item_append_text(item, " (rbid: %u, dir: %s, uid: 0x%08x)", rlcinf->rbid[fpinf->cur_tb],
- val_to_str_const(pinfo->link_dir, rlc_dir_vals, "Unknown"), rlcinf->urnti[fpinf->cur_tb]);
+ val_to_str_const(pinfo->link_dir, rlc_dir_vals, "Unknown"), rlcinf->ueid[fpinf->cur_tb]);
PROTO_ITEM_SET_GENERATED(item);
item = proto_tree_add_uint(channel_tree, hf_rlc_channel_rbid, NULL, 0, 0, rlcinf->rbid[fpinf->cur_tb]);
PROTO_ITEM_SET_GENERATED(item);
item = proto_tree_add_uint(channel_tree, hf_rlc_channel_dir, NULL, 0, 0, pinfo->link_dir);
PROTO_ITEM_SET_GENERATED(item);
- item = proto_tree_add_uint(channel_tree, hf_rlc_channel_ueid, NULL, 0, 0, rlcinf->urnti[fpinf->cur_tb]);
+ item = proto_tree_add_uint(channel_tree, hf_rlc_channel_ueid, NULL, 0, 0, rlcinf->ueid[fpinf->cur_tb]);
PROTO_ITEM_SET_GENERATED(item);
}
@@ -2642,7 +2642,7 @@ dissect_rlc_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
offset++;
break;
case RLC_URNTI_TAG:
- rlci->urnti[fpi->cur_tb] = tvb_get_ntohl(tvb, offset);
+ rlci->ueid[fpi->cur_tb] = tvb_get_ntohl(tvb, offset);
offset += 4;
break;
case RLC_RADIO_BEARER_ID_TAG:
diff --git a/epan/dissectors/packet-umts_rlc.h b/epan/dissectors/packet-umts_rlc.h
index cd9c581218..6f37cc4460 100644
--- a/epan/dissectors/packet-umts_rlc.h
+++ b/epan/dissectors/packet-umts_rlc.h
@@ -44,7 +44,11 @@ enum rlc_li_size {
#define MAX_RLC_CHANS 64
typedef struct rlc_info
{
- guint32 urnti[MAX_RLC_CHANS];
+ /* Values in the 'ueid' array should identify users exclusively */
+ /* Preferred content: */
+ /* 1. U-RNTI */
+ /* 2. C-RNC Context (from NBAP) */
+ guint32 ueid[MAX_RLC_CHANS];
guint8 mode[MAX_RLC_CHANS];
guint8 rbid[MAX_RLC_CHANS];
enum rlc_li_size li_size[MAX_RLC_CHANS];
@@ -54,7 +58,7 @@ typedef struct rlc_info
/* Reset the specified channel's reassembly data, useful for when a sequence
* resets on transport channel swap. */
-void rlc_reset_channel(enum rlc_mode mode, guint8 rbid, guint8 dir, guint32 urnti, struct atm_phdr *atm);
+void rlc_reset_channel(enum rlc_mode mode, guint8 rbid, guint8 dir, guint32 ueid, struct atm_phdr *atm);
/* Tells other functions if this packet is ciphered or not */
gboolean rlc_is_ciphered(packet_info * pinfo);