From Jacob Nordgren and Rishie Sharma:
FP: fixed exotic bug where fakes counter was sometimes not reset, RRC: fixed bug where num_chans_per_flow was not properly cleared svn path=/trunk/; revision=44375
This commit is contained in:
parent
1586d80a77
commit
508e1c3027
|
@ -28,11 +28,11 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* TODO:
|
||||
* - Fix ciphering information for circuit switched stuff
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
@ -62,8 +62,8 @@
|
|||
|
||||
extern int proto_fp; /*Handler to FP*/
|
||||
|
||||
GTree * hsdsch_muxed_flows;
|
||||
GTree * rrc_ciph_inf;
|
||||
GTree * hsdsch_muxed_flows = NULL;
|
||||
GTree * rrc_ciph_inf = NULL;
|
||||
static int msg_type _U_;
|
||||
|
||||
static dissector_handle_t gsm_a_dtap_handle;
|
||||
|
@ -147,24 +147,24 @@ static int activation_frame;
|
|||
|
||||
|
||||
/**
|
||||
* Return the maximum counter, useful for initiating counters
|
||||
* Return the maximum counter, useful for initiating counters
|
||||
*/
|
||||
#if 0
|
||||
#if 0
|
||||
static int get_max_counter(int com_context){
|
||||
int i;
|
||||
guint32 max = 0;
|
||||
rrc_ciphering_info * c_inf;
|
||||
|
||||
|
||||
if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)com_context))) == NULL ){
|
||||
return 0;
|
||||
}
|
||||
for(i = 0; i<31; i++){
|
||||
max = MAX(c_inf->ps_conf_counters[i][0], max);
|
||||
max = MAX(c_inf->ps_conf_counters[i][1], max);
|
||||
}
|
||||
return max;
|
||||
max = MAX(c_inf->ps_conf_counters[i][0], max);
|
||||
max = MAX(c_inf->ps_conf_counters[i][1], max);
|
||||
}
|
||||
#endif
|
||||
return max;
|
||||
}
|
||||
#endif
|
||||
/** Utility functions used for various comparisons/cleanups in tree **/
|
||||
gint rrc_key_cmp(gconstpointer b_ptr, gconstpointer a_ptr, gpointer ignore _U_){
|
||||
if( GPOINTER_TO_INT(a_ptr) > GPOINTER_TO_INT(b_ptr) ){
|
||||
|
@ -200,6 +200,9 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* make entry in the Protocol column on summary display */
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC");
|
||||
|
||||
/*Clear memory*/
|
||||
memset(num_chans_per_flow,0,sizeof(guint8)*RRC_MAX_NUM_HSDHSCH_MACDFLOW);
|
||||
|
||||
/* create the rrc protocol tree */
|
||||
rrc_item = proto_tree_add_item(tree, proto_rrc, tvb, 0, -1, ENC_NA);
|
||||
rrc_tree = proto_item_add_subtree(rrc_item, ett_rrc);
|
||||
|
@ -230,10 +233,7 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void rrc_init(void){
|
||||
|
||||
/*Cleanup*/
|
||||
if(hsdsch_muxed_flows){
|
||||
g_tree_destroy(hsdsch_muxed_flows);
|
||||
|
@ -246,13 +246,12 @@ void rrc_init(void){
|
|||
NULL, /* data pointer, optional */
|
||||
rrc_free_key,
|
||||
rrc_free_value);
|
||||
|
||||
/*Initialize structure for muxed flow indication*/
|
||||
|
||||
/*Initialize structure for muxed flow indication*/
|
||||
rrc_ciph_inf = g_tree_new_full(rrc_key_cmp,
|
||||
NULL, /* data pointer, optional */
|
||||
NULL,
|
||||
rrc_free_value);
|
||||
|
||||
}
|
||||
/*--- proto_register_rrc -------------------------------------------*/
|
||||
void proto_register_rrc(void) {
|
||||
|
|
|
@ -679,7 +679,6 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
|
|||
if(type == 4){ /*If this is type HS-DSCH*/
|
||||
num_chans_per_flow[flowd]++;
|
||||
|
||||
/*TODO: This configuration should proably be unique for each UE*/
|
||||
if(num_chans_per_flow[flowd] > 1 ){
|
||||
|
||||
if(hrnti == NULL){
|
||||
|
@ -748,12 +747,6 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
|
|||
#.FN_BODY MAC-d-FlowIdentity VAL_PTR = &flowd
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
#.FN_BODY SRB-InformationSetupList2-r6
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
/*Clear memory*/
|
||||
memset(num_chans_per_flow,0,sizeof(guint8));
|
||||
|
||||
#.FN_BODY H-RNTI VAL_PTR = &hrnti
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
|
|
|
@ -36,11 +36,11 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* TODO:
|
||||
* - Fix ciphering information for circuit switched stuff
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
@ -70,8 +70,8 @@
|
|||
|
||||
extern int proto_fp; /*Handler to FP*/
|
||||
|
||||
GTree * hsdsch_muxed_flows;
|
||||
GTree * rrc_ciph_inf;
|
||||
GTree * hsdsch_muxed_flows = NULL;
|
||||
GTree * rrc_ciph_inf = NULL;
|
||||
static int msg_type _U_;
|
||||
|
||||
static dissector_handle_t gsm_a_dtap_handle;
|
||||
|
@ -14814,24 +14814,24 @@ static int activation_frame;
|
|||
|
||||
|
||||
/**
|
||||
* Return the maximum counter, useful for initiating counters
|
||||
* Return the maximum counter, useful for initiating counters
|
||||
*/
|
||||
#if 0
|
||||
#if 0
|
||||
static int get_max_counter(int com_context){
|
||||
int i;
|
||||
guint32 max = 0;
|
||||
rrc_ciphering_info * c_inf;
|
||||
|
||||
|
||||
if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)com_context))) == NULL ){
|
||||
return 0;
|
||||
}
|
||||
for(i = 0; i<31; i++){
|
||||
max = MAX(c_inf->ps_conf_counters[i][0], max);
|
||||
max = MAX(c_inf->ps_conf_counters[i][1], max);
|
||||
}
|
||||
return max;
|
||||
max = MAX(c_inf->ps_conf_counters[i][0], max);
|
||||
max = MAX(c_inf->ps_conf_counters[i][1], max);
|
||||
}
|
||||
#endif
|
||||
return max;
|
||||
}
|
||||
#endif
|
||||
/** Utility functions used for various comparisons/cleanups in tree **/
|
||||
gint rrc_key_cmp(gconstpointer b_ptr, gconstpointer a_ptr, gpointer ignore _U_){
|
||||
if( GPOINTER_TO_INT(a_ptr) > GPOINTER_TO_INT(b_ptr) ){
|
||||
|
@ -15088,7 +15088,7 @@ dissect_rrc_ActivationTime(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
|
|||
|
||||
static int
|
||||
dissect_rrc_RB_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 837 "../../asn1/rrc/rrc.cnf"
|
||||
#line 830 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
1U, 32U, &rbid, FALSE);
|
||||
|
@ -15105,7 +15105,7 @@ dissect_rrc_RB_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
|
|||
|
||||
static int
|
||||
dissect_rrc_RLC_SequenceNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 843 "../../asn1/rrc/rrc.cnf"
|
||||
#line 836 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
0U, 4095U, &activation_frame, FALSE);
|
||||
|
@ -15125,7 +15125,7 @@ static const per_sequence_t RB_ActivationTimeInfo_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_RB_ActivationTimeInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 816 "../../asn1/rrc/rrc.cnf"
|
||||
#line 809 "../../asn1/rrc/rrc.cnf"
|
||||
fp_info *fpinf;
|
||||
rrc_ciphering_info * c_inf;
|
||||
|
||||
|
@ -19203,7 +19203,7 @@ dissect_rrc_T_r3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_
|
|||
|
||||
static int
|
||||
dissect_rrc_H_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 758 "../../asn1/rrc/rrc.cnf"
|
||||
#line 751 "../../asn1/rrc/rrc.cnf"
|
||||
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
|
||||
16, 16, FALSE, &hrnti);
|
||||
|
||||
|
@ -38376,7 +38376,7 @@ dissect_rrc_RLC_Info_r5(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
|
|||
|
||||
static int
|
||||
dissect_rrc_MAC_d_FlowIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 749 "../../asn1/rrc/rrc.cnf"
|
||||
#line 748 "../../asn1/rrc/rrc.cnf"
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
0U, 7U, &flowd, FALSE);
|
||||
|
||||
|
@ -38439,7 +38439,6 @@ dissect_rrc_DL_TransportChannelType_r5(tvbuff_t *tvb _U_, int offset _U_, asn1_c
|
|||
if(type == 4){ /*If this is type HS-DSCH*/
|
||||
num_chans_per_flow[flowd]++;
|
||||
|
||||
/*TODO: This configuration should proably be unique for each UE*/
|
||||
if(num_chans_per_flow[flowd] > 1 ){
|
||||
|
||||
if(hrnti == NULL){
|
||||
|
@ -41902,7 +41901,7 @@ static const per_choice_t DL_TransportChannelType_r7_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_DL_TransportChannelType_r7(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 710 "../../asn1/rrc/rrc.cnf"
|
||||
#line 709 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
gint *flowd_p;
|
||||
gint *cur_val=NULL;
|
||||
|
@ -80084,7 +80083,7 @@ static const per_choice_t DL_DCCH_MessageType_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_DL_DCCH_MessageType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 847 "../../asn1/rrc/rrc.cnf"
|
||||
#line 840 "../../asn1/rrc/rrc.cnf"
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_DL_DCCH_MessageType, DL_DCCH_MessageType_choice,
|
||||
&msg_type);
|
||||
|
@ -80114,7 +80113,7 @@ dissect_rrc_DL_DCCH_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
|
|||
|
||||
static int
|
||||
dissect_rrc_START_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 761 "../../asn1/rrc/rrc.cnf"
|
||||
#line 754 "../../asn1/rrc/rrc.cnf"
|
||||
fp_info *fpinf;
|
||||
rrc_ciphering_info * c_inf;
|
||||
int i;
|
||||
|
@ -94228,17 +94227,10 @@ static const per_sequence_t SRB_InformationSetupList2_r6_sequence_of[1] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_SRB_InformationSetupList2_r6(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 752 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_SRB_InformationSetupList2_r6, SRB_InformationSetupList2_r6_sequence_of,
|
||||
3, 4, FALSE);
|
||||
|
||||
/*Clear memory*/
|
||||
memset(num_chans_per_flow,0,sizeof(guint8));
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -131108,6 +131100,9 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* make entry in the Protocol column on summary display */
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC");
|
||||
|
||||
/*Clear memory*/
|
||||
memset(num_chans_per_flow,0,sizeof(guint8)*RRC_MAX_NUM_HSDHSCH_MACDFLOW);
|
||||
|
||||
/* create the rrc protocol tree */
|
||||
rrc_item = proto_tree_add_item(tree, proto_rrc, tvb, 0, -1, ENC_NA);
|
||||
rrc_tree = proto_item_add_subtree(rrc_item, ett_rrc);
|
||||
|
@ -131138,10 +131133,7 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void rrc_init(void){
|
||||
|
||||
/*Cleanup*/
|
||||
if(hsdsch_muxed_flows){
|
||||
g_tree_destroy(hsdsch_muxed_flows);
|
||||
|
@ -131154,13 +131146,12 @@ void rrc_init(void){
|
|||
NULL, /* data pointer, optional */
|
||||
rrc_free_key,
|
||||
rrc_free_value);
|
||||
|
||||
/*Initialize structure for muxed flow indication*/
|
||||
|
||||
/*Initialize structure for muxed flow indication*/
|
||||
rrc_ciph_inf = g_tree_new_full(rrc_key_cmp,
|
||||
NULL, /* data pointer, optional */
|
||||
NULL,
|
||||
rrc_free_value);
|
||||
|
||||
}
|
||||
/*--- proto_register_rrc -------------------------------------------*/
|
||||
void proto_register_rrc(void) {
|
||||
|
@ -166661,7 +166652,7 @@ void proto_register_rrc(void) {
|
|||
NULL, HFILL }},
|
||||
|
||||
/*--- End of included file: packet-rrc-hfarr.c ---*/
|
||||
#line 264 "../../asn1/rrc/packet-rrc-template.c"
|
||||
#line 263 "../../asn1/rrc/packet-rrc-template.c"
|
||||
{ &hf_test,
|
||||
{ "RAB Test", "rrc.RAB.test",
|
||||
FT_UINT8, BASE_DEC, NULL, 0,
|
||||
|
@ -172301,7 +172292,7 @@ void proto_register_rrc(void) {
|
|||
&ett_rrc_UL_RFC3095_Context,
|
||||
|
||||
/*--- End of included file: packet-rrc-ettarr.c ---*/
|
||||
#line 290 "../../asn1/rrc/packet-rrc-template.c"
|
||||
#line 289 "../../asn1/rrc/packet-rrc-template.c"
|
||||
&ett_rrc_eutraFeatureGroupIndicators,
|
||||
&ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo,
|
||||
};
|
||||
|
@ -172381,7 +172372,7 @@ void proto_register_rrc(void) {
|
|||
|
||||
|
||||
/*--- End of included file: packet-rrc-dis-reg.c ---*/
|
||||
#line 304 "../../asn1/rrc/packet-rrc-template.c"
|
||||
#line 303 "../../asn1/rrc/packet-rrc-template.c"
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3952,6 +3952,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
|
|||
rlcinf = se_new0(rlc_info);
|
||||
macinf = se_new0(umts_mac_info);
|
||||
offset = 2; /*To correctly read the tfi*/
|
||||
fakes = 5; /* Reset fake counter. */
|
||||
for (chan=0; chan < fpi->num_chans; chan++) { /*Iterate over the what channels*/
|
||||
/*Iterate over the transport blocks*/
|
||||
/*tfi = tvb_get_guint8(tvb,offset);*/
|
||||
|
|
Loading…
Reference in New Issue