aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/rrc/rrc.cnf
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2012-08-08 20:43:48 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2012-08-08 20:43:48 +0000
commit25523bd0bf3ce1f7f809dc8be7af8acf1bbc2fab (patch)
tree4edd5f13a50a96905d0f0060c8942ba21b37750a /asn1/rrc/rrc.cnf
parenta1218c94c9ece40dda22ed74c2dfc6bb0faa7991 (diff)
Various small changes:
- add a missing test on null pointer - always initialize rrc_nas_sys_info_gsm_map_type with a value from its associated enum - fix some typo errors - remove some useless directives from conformance file - detabify files (ASN.1 generated dissectors are indented with spaces) svn path=/trunk/; revision=44358
Diffstat (limited to 'asn1/rrc/rrc.cnf')
-rw-r--r--asn1/rrc/rrc.cnf286
1 files changed, 137 insertions, 149 deletions
diff --git a/asn1/rrc/rrc.cnf b/asn1/rrc/rrc.cnf
index 4312ce492a..9711395bb0 100644
--- a/asn1/rrc/rrc.cnf
+++ b/asn1/rrc/rrc.cnf
@@ -145,16 +145,16 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
%(DEFAULT_BODY)s
- if (nas_message_tvb)
- call_dissector(gsm_a_dtap_handle,nas_message_tvb,%(ACTX)s->pinfo, tree);
+ if (nas_message_tvb)
+ call_dissector(gsm_a_dtap_handle,nas_message_tvb,%(ACTX)s->pinfo, tree);
#.FN_BODY InterRATHandoverInfo/ue-CapabilityContainer/present VAL_PTR = &ue_radio_access_cap_info_tvb
tvbuff_t *ue_radio_access_cap_info_tvb=NULL;
%(DEFAULT_BODY)s
- if (ue_radio_access_cap_info_tvb)
- call_dissector(rrc_ue_radio_access_cap_info_handle,ue_radio_access_cap_info_tvb,%(ACTX)s->pinfo, tree);
+ if (ue_radio_access_cap_info_tvb)
+ call_dissector(rrc_ue_radio_access_cap_info_handle,ue_radio_access_cap_info_tvb,%(ACTX)s->pinfo, tree);
#.END
@@ -398,10 +398,10 @@ fp_info *fpinf ;
%(DEFAULT_BODY)s
- fpinf = p_get_proto_data(actx->pinfo->fd, proto_fp);
- if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)fpinf->com_context_id))) != NULL ){
- c_inf->setup_frame = actx->pinfo->fd->num;
- }
+ fpinf = p_get_proto_data(actx->pinfo->fd, proto_fp);
+ if(fpinf && ((c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)fpinf->com_context_id))) != NULL) ){
+ c_inf->setup_frame = actx->pinfo->fd->num;
+ }
#.FN_BODY SecurityModeFailure
@@ -505,8 +505,8 @@ fp_info *fpinf ;
%(DEFAULT_BODY)s
- if (dl_dcch_message_tvb)
- call_dissector(rrc_dl_dcch_handle,dl_dcch_message_tvb,%(ACTX)s->pinfo, proto_tree_get_root(tree));
+ if (dl_dcch_message_tvb)
+ call_dissector(rrc_dl_dcch_handle,dl_dcch_message_tvb,%(ACTX)s->pinfo, proto_tree_get_root(tree));
#.FN_BODY GSM-MessageList/_item VAL_PTR = &gsm_messagelist_tvb
tvbuff_t *gsm_messagelist_tvb=NULL;
@@ -514,7 +514,7 @@ fp_info *fpinf ;
%(DEFAULT_BODY)s
if (gsm_messagelist_tvb)
- call_dissector(gsm_a_dtap_handle,gsm_messagelist_tvb,actx->pinfo, tree);
+ call_dissector(gsm_a_dtap_handle,gsm_messagelist_tvb,actx->pinfo, tree);
#.FN_BODY HandoverFromUTRANCommand-GSM-r3-IEs/gsm-message/single-GSM-Message single-GSM-Message-r3
tvbuff_t *gsm_message_tvb=NULL;
@@ -528,8 +528,8 @@ fp_info *fpinf ;
gsm_message_tvb = tvb_new_octet_aligned(tvb, offset, 8*whole_octets_remaining);
if (gsm_message_tvb) {
- add_new_data_source(actx->pinfo,gsm_message_tvb,"GSM Message(aligned)");
- call_dissector(gsm_a_dtap_handle,gsm_message_tvb,actx->pinfo, tree);
+ add_new_data_source(actx->pinfo,gsm_message_tvb,"GSM Message(aligned)");
+ call_dissector(gsm_a_dtap_handle,gsm_message_tvb,actx->pinfo, tree);
}
#.FN_BODY HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Message-r6
tvbuff_t *gsm_message_tvb=NULL;
@@ -543,31 +543,31 @@ fp_info *fpinf ;
gsm_message_tvb = tvb_new_octet_aligned(tvb, offset, 8*whole_octets_remaining);
if (gsm_message_tvb) {
- add_new_data_source(actx->pinfo,gsm_message_tvb,"GSM Message(aligned)");
- call_dissector(gsm_a_dtap_handle,gsm_message_tvb,actx->pinfo, tree);
+ add_new_data_source(actx->pinfo,gsm_message_tvb,"GSM Message(aligned)");
+ call_dissector(gsm_a_dtap_handle,gsm_message_tvb,actx->pinfo, tree);
}
#.FN_BODY GSM-Classmark2 VAL_PTR = &parameter_tvb
-tvbuff_t *parameter_tvb=NULL;
+ tvbuff_t *parameter_tvb=NULL;
%(DEFAULT_BODY)s
if (parameter_tvb){
- de_ms_cm_2(parameter_tvb, tree, actx->pinfo, 2, tvb_get_guint8(parameter_tvb,1), NULL, 0);
+ de_ms_cm_2(parameter_tvb, tree, actx->pinfo, 2, tvb_get_guint8(parameter_tvb,1), NULL, 0);
}
#.FN_BODY GSM-Classmark3 VAL_PTR = &parameter_tvb
-tvbuff_t *parameter_tvb=NULL;
+ tvbuff_t *parameter_tvb=NULL;
%(DEFAULT_BODY)s
if (parameter_tvb){
- de_ms_cm_3(parameter_tvb, tree, actx->pinfo, 0, tvb_length(parameter_tvb), NULL, 0);
+ de_ms_cm_3(parameter_tvb, tree, actx->pinfo, 0, tvb_length(parameter_tvb), NULL, 0);
}
#.FN_BODY InterRATHandoverInfoWithInterRATCapabilities-r3-IEs/interRATHandoverInfo VAL_PTR = &parameter_tvb
-tvbuff_t *parameter_tvb=NULL;
+ tvbuff_t *parameter_tvb=NULL;
%(DEFAULT_BODY)s
if (parameter_tvb){
- dissect_rrc_InterRATHandoverInfo_PDU(parameter_tvb, actx->pinfo, tree);
+ dissect_rrc_InterRATHandoverInfo_PDU(parameter_tvb, actx->pinfo, tree);
}
#.FN_BODY EUTRA-RadioAccessCapability/ue-EUTRA-Capability VAL_PTR = &ue_eutra_cap_tvb
@@ -673,38 +673,38 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
gint *cur_val=NULL;
guint16 hr=0;
- %(DEFAULT_BODY)s
+ %(DEFAULT_BODY)s
- /*TODO: This should probably be done better*/
- if(type == 4){ /*If this is type HS-DSCH*/
- num_chans_per_flow[flowd]++;
+ /*TODO: This should probably be done better*/
+ 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 ){
+ /*TODO: This configuration should proably be unique for each UE*/
+ if(num_chans_per_flow[flowd] > 1 ){
- if(hrnti == NULL){
- expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Did not detect any H-RNTI ");
- }
- else{
- /*Read the H-RNTI value*/
- hr = tvb_get_bits16(hrnti,0,16,TRUE);
+ if(hrnti == NULL){
+ expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Did not detect any H-RNTI ");
+ }
+ else{
+ /*Read the H-RNTI value*/
+ hr = tvb_get_bits16(hrnti,0,16,TRUE);
- /*If it doesnt exists, insert it*/
- if( (cur_val=g_tree_lookup(hsdsch_muxed_flows, GINT_TO_POINTER((gint)hr))) == NULL ){
+ /*If it doesnt exists, insert it*/
+ if( (cur_val=g_tree_lookup(hsdsch_muxed_flows, GINT_TO_POINTER((gint)hr))) == NULL ){
- flowd_p = (guint*)g_malloc0(sizeof(gint));
- *flowd_p = (1<<flowd); /*Set the bit to mark it as true*/
- g_tree_insert(hsdsch_muxed_flows, GINT_TO_POINTER((gint)hr), flowd_p);
+ flowd_p = (guint*)g_malloc0(sizeof(gint));
+ *flowd_p = (1<<flowd); /*Set the bit to mark it as true*/
+ g_tree_insert(hsdsch_muxed_flows, GINT_TO_POINTER((gint)hr), flowd_p);
- }else{
- *cur_val = (1<<flowd) | *cur_val;
+ }else{
+ *cur_val = (1<<flowd) | *cur_val;
- }
- }
+ }
+ }
- }
+ }
- }
+ }
/*Here we try to figure out which HS-DSCH channels are multiplexed*/
#.FN_BODY DL-TransportChannelType-r7 VAL_PTR = &type
@@ -712,137 +712,125 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
gint *cur_val=NULL;
guint16 hr=0;
- %(DEFAULT_BODY)s
-
- /*TODO: This should probably be done better*/
- if(type == 4){ /*If this is type HS-DSCH*/
- num_chans_per_flow[flowd]++;
-
-
- if(num_chans_per_flow[flowd] > 1 ){
+ %(DEFAULT_BODY)s
- if(hrnti == NULL){
- expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Did not detect any H-RNTI ");
- }
- else{
- /*Read the H-RNTI value*/
- hr = tvb_get_bits16(hrnti,0,16,TRUE);
+ /*TODO: This should probably be done better*/
+ if(type == 4){ /*If this is type HS-DSCH*/
+ num_chans_per_flow[flowd]++;
- /*If it doesnt exists, insert it*/
- if( (cur_val=g_tree_lookup(hsdsch_muxed_flows, GINT_TO_POINTER((gint)hr))) == NULL ){
- flowd_p = (guint*)g_malloc0(sizeof(gint));
- *flowd_p = (1<<flowd); /* Set the bit to mark it as true*/
- g_tree_insert(hsdsch_muxed_flows, GINT_TO_POINTER((gint)hr), flowd_p);
+ if(num_chans_per_flow[flowd] > 1 ){
- }else{
- *cur_val = (1<<flowd) | *cur_val;
+ if(hrnti == NULL){
+ expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Did not detect any H-RNTI ");
+ }
+ else{
+ /*Read the H-RNTI value*/
+ hr = tvb_get_bits16(hrnti,0,16,TRUE);
- }
- }
+ /*If it doesnt exists, insert it*/
+ if( (cur_val=g_tree_lookup(hsdsch_muxed_flows, GINT_TO_POINTER((gint)hr))) == NULL ){
- }
+ flowd_p = (guint*)g_malloc0(sizeof(gint));
+ *flowd_p = (1<<flowd); /* Set the bit to mark it as true*/
+ g_tree_insert(hsdsch_muxed_flows, GINT_TO_POINTER((gint)hr), flowd_p);
- }
+ }else{
+ *cur_val = (1<<flowd) | *cur_val;
+ }
+ }
-#.FN_BODY DL-LogicalChannelMapping-r5
+ }
- %(DEFAULT_BODY)s
-
-#.FN_BODY DL-LogicalChannelMapping-r7
-
- %(DEFAULT_BODY)s
-#.FN_BODY LogicalChannelIdentity
-
- %(DEFAULT_BODY)s
+ }
#.FN_BODY MAC-d-FlowIdentity VAL_PTR = &flowd
- %(DEFAULT_BODY)s
+%(DEFAULT_BODY)s
#.FN_BODY SRB-InformationSetupList2-r6
- %(DEFAULT_BODY)s
- /*Clear memory*/
- memset(num_chans_per_flow,0,sizeof(guint8));
+%(DEFAULT_BODY)s
+ /*Clear memory*/
+ memset(num_chans_per_flow,0,sizeof(guint8));
#.FN_BODY H-RNTI VAL_PTR = &hrnti
- %(DEFAULT_BODY)s
+%(DEFAULT_BODY)s
#.FN_BODY START-Value VAL_PTR = &start_val
- fp_info *fpinf;
- rrc_ciphering_info * c_inf;
- int i;
- guint32 * start;
-
- %(DEFAULT_BODY)s
-
- /*We base this map on comuncation context from fp*/
- fpinf = p_get_proto_data(actx->pinfo->fd, proto_fp);
-
- /*If no info found, skip all this*/
- if(fpinf == NULL){
- return offset;
- }
- /*Retrieves the start value for the two ciphering domains*/
- switch(rrc_nas_sys_info_gsm_map_type){
- case RRC_NAS_SYS_INFO_CS:
- /*
- g_warning("Not implemented");
- */
- break;
- case RRC_NAS_SYS_INFO_PS:
-
- /*Find the entry for the comucnation context (taken from FP)*/
- if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)fpinf->com_context_id))) == NULL ){
- c_inf = g_malloc0(sizeof(rrc_ciphering_info));
-
- /*Initaite tree with START_PS values.*/
- if(!c_inf->start_ps)
- c_inf->start_ps = g_tree_new_full(rrc_key_cmp,
- NULL,rrc_free_key,rrc_free_value);
-
- /*Clear and intiliaze seq_no matrix*/
- for(i = 0; i< 31; i++){
- c_inf->seq_no[i][0] = -1;
- c_inf->seq_no[i][1] = -1;
- }
- g_tree_insert(rrc_ciph_inf, GINT_TO_POINTER((gint)fpinf->com_context_id), c_inf);
- }
-
- /*Retrive and store the value*/
- start = g_malloc(sizeof(guint32));
- *start = tvb_get_bits32(start_val,0,20,ENC_BIG_ENDIAN);
- if(c_inf && c_inf->start_ps)
- /*Insert the value based on current frame num since this might vary over time*/
- g_tree_insert(c_inf->start_ps, GINT_TO_POINTER((gint)actx->pinfo->fd->num), start);
-
- break;
- default:
- break;
- }
- /*is this dangerous?*/
- rrc_nas_sys_info_gsm_map_type = 0;
+ fp_info *fpinf;
+ rrc_ciphering_info * c_inf;
+ int i;
+ guint32 * start;
+
+%(DEFAULT_BODY)s
+
+ /*We base this map on communication context from fp*/
+ fpinf = p_get_proto_data(actx->pinfo->fd, proto_fp);
+
+ /*If no info found, skip all this*/
+ if(fpinf == NULL){
+ return offset;
+ }
+ /*Retrieve the start value for the two ciphering domains*/
+ switch(rrc_nas_sys_info_gsm_map_type){
+ case RRC_NAS_SYS_INFO_CS:
+ /*
+ g_warning("Not implemented");
+ */
+ break;
+ case RRC_NAS_SYS_INFO_PS:
+
+ /*Find the entry for the communication context (taken from FP)*/
+ if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)fpinf->com_context_id))) == NULL ){
+ c_inf = g_malloc0(sizeof(rrc_ciphering_info));
+
+ /*Initiate tree with START_PS values.*/
+ if(!c_inf->start_ps)
+ c_inf->start_ps = g_tree_new_full(rrc_key_cmp,
+ NULL,rrc_free_key,rrc_free_value);
+
+ /*Clear and initialize seq_no matrix*/
+ for(i = 0; i< 31; i++){
+ c_inf->seq_no[i][0] = -1;
+ c_inf->seq_no[i][1] = -1;
+ }
+ g_tree_insert(rrc_ciph_inf, GINT_TO_POINTER((gint)fpinf->com_context_id), c_inf);
+ }
+
+ /*Retrieve and store the value*/
+ start = g_malloc(sizeof(guint32));
+ *start = tvb_get_bits32(start_val,0,20,ENC_BIG_ENDIAN);
+ if(c_inf && c_inf->start_ps)
+ /*Insert the value based on current frame num since this might vary over time*/
+ g_tree_insert(c_inf->start_ps, GINT_TO_POINTER((gint)actx->pinfo->fd->num), start);
+
+ break;
+ default:
+ break;
+ }
+ /*is this dangerous?*/
+ rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
#.FN_BODY RB-ActivationTimeInfo
- fp_info *fpinf;
- rrc_ciphering_info * c_inf;
+ fp_info *fpinf;
+ rrc_ciphering_info * c_inf;
- fpinf = p_get_proto_data(actx->pinfo->fd, proto_fp);
+ fpinf = p_get_proto_data(actx->pinfo->fd, proto_fp);
%(DEFAULT_BODY)s
- /*If no info found, skip all this*/
- if(fpinf == NULL){
- return offset;
- }
- /*This should not happen*/
- if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)fpinf->com_context_id))) == NULL ){
- return offset;
- }
- /*Set the ciphering activation frame information*/
- c_inf->seq_no[rbid][fpinf->is_uplink] = activation_frame;
+ /*If no info found, skip all this*/
+ if(fpinf == NULL){
+ return offset;
+ }
+ /*This should not happen*/
+ if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)fpinf->com_context_id))) == NULL ){
+ return offset;
+ }
+ /*Set the ciphering activation frame information*/
+ c_inf->seq_no[rbid][fpinf->is_uplink] = activation_frame;
#.FN_BODY RB-Identity VAL_PTR = &rbid