*/
/**
- *
+ *
* TODO:
* - Fix ciphering information for circuit switched stuff
*/
-
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
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;
/**
- * 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) ){
/* 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);
}
}
-
-
void rrc_init(void){
-
/*Cleanup*/
if(hsdsch_muxed_flows){
g_tree_destroy(hsdsch_muxed_flows);
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) {
*/
/**
- *
+ *
* TODO:
* - Fix ciphering information for circuit switched stuff
*/
-
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
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;
/**
- * 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) ){
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);
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);
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;
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);
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);
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){
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;
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);
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;
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;
}
/* 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);
}
}
-
-
void rrc_init(void){
-
/*Cleanup*/
if(hsdsch_muxed_flows){
g_tree_destroy(hsdsch_muxed_flows);
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) {
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,
&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,
};
/*--- 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"