aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/rrc
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
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')
-rw-r--r--asn1/rrc/packet-rrc-template.c160
-rw-r--r--asn1/rrc/packet-rrc-template.h36
-rw-r--r--asn1/rrc/rrc.cnf286
3 files changed, 235 insertions, 247 deletions
diff --git a/asn1/rrc/packet-rrc-template.c b/asn1/rrc/packet-rrc-template.c
index a6d406e9fc..8a2cdef295 100644
--- a/asn1/rrc/packet-rrc-template.c
+++ b/asn1/rrc/packet-rrc-template.c
@@ -60,7 +60,7 @@
#define PSNAME "RRC"
#define PFNAME "rrc"
-extern int proto_fp; /*Handler to FP*/
+extern int proto_fp; /*Handler to FP*/
GTree * hsdsch_muxed_flows;
GTree * rrc_ciph_inf;
@@ -140,45 +140,45 @@ static tvbuff_t * start_val;
static int cipher_start_val[2] _U_;
/*Stores how many channels we have detected for a HS-DSCH MAC-flow*/
-#define RRC_MAX_NUM_HSDHSCH_MACDFLOW 8
+#define RRC_MAX_NUM_HSDHSCH_MACDFLOW 8
static guint8 num_chans_per_flow[RRC_MAX_NUM_HSDHSCH_MACDFLOW];
static int rbid;
static int activation_frame;
/**
- * Return the maximum conunter, useful for initiating counters
+ * Return the maximum counter, useful for initiating counters
*/
#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;
- }
+ 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;
+ }
#endif
-/** Utility functions used for various comparions/cleanups in tree **/
+/** 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) ){
- return -1;
- }
- return GPOINTER_TO_INT(a_ptr) < GPOINTER_TO_INT(b_ptr);
+ if( GPOINTER_TO_INT(a_ptr) > GPOINTER_TO_INT(b_ptr) ){
+ return -1;
+ }
+ return GPOINTER_TO_INT(a_ptr) < GPOINTER_TO_INT(b_ptr);
}
void rrc_free_key(gpointer key _U_){
- /*Key's should be de allocated elsewhere.*/
+ /*Keys should be de allocated elsewhere.*/
- }
+ }
void rrc_free_value(gpointer value ){
- g_free(value);
- }
+ g_free(value);
+ }
#include "packet-rrc-fn.c"
#include "packet-rrc.h"
@@ -187,68 +187,68 @@ void rrc_free_value(gpointer value ){
static void
dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- /* FIX ME Currently don't know the 'starting point' of this protocol
- * exported DL-DCCH-Message is the entry point.
- */
- proto_item *rrc_item = NULL;
- proto_tree *rrc_tree = NULL;
- struct rrc_info *rrcinf;
-
- top_tree = tree;
- rrcinf = p_get_proto_data(pinfo->fd, proto_rrc);
-
- /* make entry in the Protocol column on summary display */
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC");
-
- /* 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);
-
- if (rrcinf) {
- switch (rrcinf->msgtype[pinfo->fd->subnum]) {
- case RRC_MESSAGE_TYPE_PCCH:
- call_dissector(rrc_pcch_handle, tvb, pinfo, rrc_tree);
- break;
- case RRC_MESSAGE_TYPE_UL_CCCH:
- call_dissector(rrc_ul_ccch_handle, tvb, pinfo, rrc_tree);
- break;
- case RRC_MESSAGE_TYPE_DL_CCCH:
- call_dissector(rrc_dl_ccch_handle, tvb, pinfo, rrc_tree);
- break;
- case RRC_MESSAGE_TYPE_UL_DCCH:
- call_dissector(rrc_ul_dcch_handle, tvb, pinfo, rrc_tree);
- break;
- case RRC_MESSAGE_TYPE_DL_DCCH:
- call_dissector(rrc_dl_dcch_handle, tvb, pinfo, rrc_tree);
- break;
- case RRC_MESSAGE_TYPE_BCCH_FACH:
- call_dissector(rrc_bcch_fach_handle, tvb, pinfo, rrc_tree);
- break;
- default:
- ;
- }
- }
+ /* FIX ME Currently don't know the 'starting point' of this protocol
+ * exported DL-DCCH-Message is the entry point.
+ */
+ proto_item *rrc_item = NULL;
+ proto_tree *rrc_tree = NULL;
+ struct rrc_info *rrcinf;
+
+ top_tree = tree;
+ rrcinf = p_get_proto_data(pinfo->fd, proto_rrc);
+
+ /* make entry in the Protocol column on summary display */
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC");
+
+ /* 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);
+
+ if (rrcinf) {
+ switch (rrcinf->msgtype[pinfo->fd->subnum]) {
+ case RRC_MESSAGE_TYPE_PCCH:
+ call_dissector(rrc_pcch_handle, tvb, pinfo, rrc_tree);
+ break;
+ case RRC_MESSAGE_TYPE_UL_CCCH:
+ call_dissector(rrc_ul_ccch_handle, tvb, pinfo, rrc_tree);
+ break;
+ case RRC_MESSAGE_TYPE_DL_CCCH:
+ call_dissector(rrc_dl_ccch_handle, tvb, pinfo, rrc_tree);
+ break;
+ case RRC_MESSAGE_TYPE_UL_DCCH:
+ call_dissector(rrc_ul_dcch_handle, tvb, pinfo, rrc_tree);
+ break;
+ case RRC_MESSAGE_TYPE_DL_DCCH:
+ call_dissector(rrc_dl_dcch_handle, tvb, pinfo, rrc_tree);
+ break;
+ case RRC_MESSAGE_TYPE_BCCH_FACH:
+ call_dissector(rrc_bcch_fach_handle, tvb, pinfo, rrc_tree);
+ break;
+ default:
+ ;
+ }
+ }
}
void rrc_init(void){
-
- /*Cleanup*/
- if(hsdsch_muxed_flows){
- g_tree_destroy(hsdsch_muxed_flows);
- }
- if(rrc_ciph_inf){
- g_tree_destroy(rrc_ciph_inf);
- }
- /*Initialize structure for muxed flow indication*/
- hsdsch_muxed_flows = g_tree_new_full(rrc_key_cmp,
+
+ /*Cleanup*/
+ if(hsdsch_muxed_flows){
+ g_tree_destroy(hsdsch_muxed_flows);
+ }
+ if(rrc_ciph_inf){
+ g_tree_destroy(rrc_ciph_inf);
+ }
+ /*Initialize structure for muxed flow indication*/
+ hsdsch_muxed_flows = g_tree_new_full(rrc_key_cmp,
NULL, /* data pointer, optional */
rrc_free_key,
rrc_free_value);
- /*Initialize structure for muxed flow indication*/
- rrc_ciph_inf = g_tree_new_full(rrc_key_cmp,
+ /*Initialize structure for muxed flow indication*/
+ rrc_ciph_inf = g_tree_new_full(rrc_key_cmp,
NULL, /* data pointer, optional */
NULL,
rrc_free_value);
@@ -288,7 +288,7 @@ void proto_register_rrc(void) {
&ett_rrc,
#include "packet-rrc-ettarr.c"
&ett_rrc_eutraFeatureGroupIndicators,
- &ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo,
+ &ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo,
};
@@ -305,7 +305,7 @@ void proto_register_rrc(void) {
- register_init_routine(rrc_init);
+ register_init_routine(rrc_init);
}
diff --git a/asn1/rrc/packet-rrc-template.h b/asn1/rrc/packet-rrc-template.h
index 0b4ce10059..6282aa460d 100644
--- a/asn1/rrc/packet-rrc-template.h
+++ b/asn1/rrc/packet-rrc-template.h
@@ -25,38 +25,38 @@
#ifndef PACKET_RRC_H
#define PACKET_RRC_H
-#include <epan/asn1.h> /* Needed for non asn1 dissectors?*/
+#include <epan/asn1.h> /* Needed for non asn1 dissectors?*/
extern int proto_rrc;
#include "packet-rrc-exp.h"
enum rrc_message_type {
- RRC_MESSAGE_TYPE_INVALID = 0,
- RRC_MESSAGE_TYPE_PCCH = 1,
- RRC_MESSAGE_TYPE_UL_CCCH,
- RRC_MESSAGE_TYPE_DL_CCCH,
- RRC_MESSAGE_TYPE_UL_DCCH,
- RRC_MESSAGE_TYPE_DL_DCCH,
- RRC_MESSAGE_TYPE_BCCH_FACH
+ RRC_MESSAGE_TYPE_INVALID = 0,
+ RRC_MESSAGE_TYPE_PCCH = 1,
+ RRC_MESSAGE_TYPE_UL_CCCH,
+ RRC_MESSAGE_TYPE_DL_CCCH,
+ RRC_MESSAGE_TYPE_UL_DCCH,
+ RRC_MESSAGE_TYPE_DL_DCCH,
+ RRC_MESSAGE_TYPE_BCCH_FACH
};
-#define MAX_RRC_FRAMES 64
+#define MAX_RRC_FRAMES 64
typedef struct rrc_info
{
- enum rrc_message_type msgtype[MAX_RRC_FRAMES];
+ enum rrc_message_type msgtype[MAX_RRC_FRAMES];
} rrc_info;
/*Struct for storing ciphering information*/
typedef struct rrc_ciph_info_
{
- int seq_no[31][2]; /*Indicates for each Rbid when ciphering starts*/
- GTree * /*guint32*/ start_cs; /*Start value for CS counter*/
- GTree * /*guint32*/ start_ps; /*Start value for PS counter*/
- guint32 conf_algo_indicator; /*Indicates which type of ciphering algorithm used*/
- guint32 int_algo_indiccator; /*Indicates which type of integrity algorithm used*/
- unsigned int setup_frame; /*Store which frame contained this information*/
- guint32 ps_conf_counters[31][2]; /*This should also be made for CS*/
-
+ int seq_no[31][2]; /*Indicates for each Rbid when ciphering starts*/
+ GTree * /*guint32*/ start_cs; /*Start value for CS counter*/
+ GTree * /*guint32*/ start_ps; /*Start value for PS counter*/
+ guint32 conf_algo_indicator; /*Indicates which type of ciphering algorithm used*/
+ guint32 int_algo_indiccator; /*Indicates which type of integrity algorithm used*/
+ unsigned int setup_frame; /*Store which frame contained this information*/
+ guint32 ps_conf_counters[31][2]; /*This should also be made for CS*/
+
} rrc_ciphering_info;
extern GTree * hsdsch_muxed_flows;
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