summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/rrc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/asn1/rrc
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/asn1/rrc')
-rw-r--r--epan/dissectors/asn1/rrc/packet-rrc-template.c155
-rw-r--r--epan/dissectors/asn1/rrc/packet-rrc-template.h14
-rw-r--r--epan/dissectors/asn1/rrc/rrc.cnf173
3 files changed, 177 insertions, 165 deletions
diff --git a/epan/dissectors/asn1/rrc/packet-rrc-template.c b/epan/dissectors/asn1/rrc/packet-rrc-template.c
index 9df0bb60..3420179d 100644
--- a/epan/dissectors/asn1/rrc/packet-rrc-template.c
+++ b/epan/dissectors/asn1/rrc/packet-rrc-template.c
@@ -27,6 +27,7 @@
#include <epan/expert.h>
#include <epan/proto_data.h>
#include <epan/prefs.h>
+#include <wsutil/array.h>
#include "packet-ber.h"
#include "packet-per.h"
@@ -52,11 +53,11 @@ extern int proto_fp; /*Handler to FP*/
extern int proto_umts_mac; /*Handler to MAC*/
extern int proto_umts_rlc; /*Handler to RLC*/
-GTree * hsdsch_muxed_flows = NULL;
-GTree * rrc_ciph_info_tree = NULL;
-wmem_tree_t* rrc_global_urnti_crnti_map = NULL;
+GTree * hsdsch_muxed_flows;
+GTree * rrc_ciph_info_tree;
+wmem_tree_t* rrc_global_urnti_crnti_map;
static int msg_type _U_;
-static gboolean rrc_nas_in_root_tree;
+static bool rrc_nas_in_root_tree;
enum rrc_sib_segment_type {
RRC_SIB_SEG_NO_SEGMENT = 0,
@@ -79,21 +80,21 @@ enum rrc_sib_segment_type {
typedef struct umts_rrc_private_data_t
{
- guint32 s_rnc_id; /* The S-RNC ID part of a U-RNTI */
- guint32 s_rnti; /* The S-RNTI part of a U-RNTI */
- guint32 new_u_rnti;
- guint32 current_u_rnti;
- guint32 scrambling_code;
+ uint32_t s_rnc_id; /* The S-RNC ID part of a U-RNTI */
+ uint32_t s_rnti; /* The S-RNTI part of a U-RNTI */
+ uint32_t new_u_rnti;
+ uint32_t current_u_rnti;
+ uint32_t scrambling_code;
enum nas_sys_info_gsm_map cn_domain;
wmem_strbuf_t* digits_strbuf; /* A collection of digits in a string. Used for reconstructing IMSIs or MCC-MNC pairs */
wmem_strbuf_t* last_mcc_strbuf; /* Last seen MCC digits string */
- gboolean digits_strbuf_parsing_failed_flag; /* Whether an error occurred when creating the IMSI/MCC-MNC pair string */
- guint32 rbid;
- guint32 rlc_ciphering_sqn; /* Sequence number where ciphering starts in a given bearer */
+ bool digits_strbuf_parsing_failed_flag; /* Whether an error occurred when creating the IMSI/MCC-MNC pair string */
+ uint32_t rbid;
+ uint32_t rlc_ciphering_sqn; /* Sequence number where ciphering starts in a given bearer */
rrc_ciphering_info* ciphering_info;
enum rrc_ue_state rrc_state_indicator;
enum rrc_sib_segment_type curr_sib_segment_type;
- guint32 curr_sib_type;
+ uint32_t curr_sib_type;
} umts_rrc_private_data_t;
@@ -106,61 +107,61 @@ static umts_rrc_private_data_t* umts_rrc_get_private_data(asn1_ctx_t *actx)
return (umts_rrc_private_data_t*)actx->private_data;
}
-static guint32 private_data_get_s_rnc_id(asn1_ctx_t *actx)
+static uint32_t private_data_get_s_rnc_id(asn1_ctx_t *actx)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
return private_data->s_rnc_id;
}
-static void private_data_set_s_rnc_id(asn1_ctx_t *actx, guint32 s_rnc_id)
+static void private_data_set_s_rnc_id(asn1_ctx_t *actx, uint32_t s_rnc_id)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
private_data->s_rnc_id = s_rnc_id;
}
-static guint32 private_data_get_s_rnti(asn1_ctx_t *actx)
+static uint32_t private_data_get_s_rnti(asn1_ctx_t *actx)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
return private_data->s_rnti;
}
-static void private_data_set_s_rnti(asn1_ctx_t *actx, guint32 s_rnti)
+static void private_data_set_s_rnti(asn1_ctx_t *actx, uint32_t s_rnti)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
private_data->s_rnti = s_rnti;
}
-static guint32 private_data_get_new_u_rnti(asn1_ctx_t *actx)
+static uint32_t private_data_get_new_u_rnti(asn1_ctx_t *actx)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
return private_data->new_u_rnti;
}
-static void private_data_set_new_u_rnti(asn1_ctx_t *actx, guint32 new_u_rnti)
+static void private_data_set_new_u_rnti(asn1_ctx_t *actx, uint32_t new_u_rnti)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
private_data->new_u_rnti = new_u_rnti;
}
-static guint32 private_data_get_current_u_rnti(asn1_ctx_t *actx)
+static uint32_t private_data_get_current_u_rnti(asn1_ctx_t *actx)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
return private_data->current_u_rnti;
}
-static void private_data_set_current_u_rnti(asn1_ctx_t *actx, guint32 current_u_rnti)
+static void private_data_set_current_u_rnti(asn1_ctx_t *actx, uint32_t current_u_rnti)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
private_data->current_u_rnti = current_u_rnti;
}
-static guint32 private_data_get_scrambling_code(asn1_ctx_t *actx)
+static uint32_t private_data_get_scrambling_code(asn1_ctx_t *actx)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
return private_data->scrambling_code;
}
-static void private_data_set_scrambling_code(asn1_ctx_t *actx, guint32 scrambling_code)
+static void private_data_set_scrambling_code(asn1_ctx_t *actx, uint32_t scrambling_code)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
private_data->scrambling_code = scrambling_code;
@@ -190,13 +191,13 @@ static void private_data_set_digits_strbuf(asn1_ctx_t *actx, wmem_strbuf_t* digi
private_data->digits_strbuf = digits_strbuf;
}
-static gboolean private_data_get_digits_strbuf_parsing_failed_flag(asn1_ctx_t *actx)
+static bool private_data_get_digits_strbuf_parsing_failed_flag(asn1_ctx_t *actx)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
return private_data->digits_strbuf_parsing_failed_flag;
}
-static void private_data_set_digits_strbuf_parsing_failed_flag(asn1_ctx_t *actx, gboolean digits_strbuf_parsing_failed_flag)
+static void private_data_set_digits_strbuf_parsing_failed_flag(asn1_ctx_t *actx, bool digits_strbuf_parsing_failed_flag)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
private_data->digits_strbuf_parsing_failed_flag = digits_strbuf_parsing_failed_flag;
@@ -214,25 +215,25 @@ static void private_data_set_last_mcc_strbuf(asn1_ctx_t *actx, wmem_strbuf_t* la
private_data->last_mcc_strbuf = last_mcc_strbuf;
}
-static guint32 private_data_get_rbid(asn1_ctx_t *actx)
+static uint32_t private_data_get_rbid(asn1_ctx_t *actx)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
return private_data->rbid;
}
-static void private_data_set_rbid(asn1_ctx_t *actx, guint32 rbid)
+static void private_data_set_rbid(asn1_ctx_t *actx, uint32_t rbid)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
private_data->rbid = rbid;
}
-static guint32 private_data_get_rlc_ciphering_sqn(asn1_ctx_t *actx)
+static uint32_t private_data_get_rlc_ciphering_sqn(asn1_ctx_t *actx)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
return private_data->rlc_ciphering_sqn;
}
-static void private_data_set_rlc_ciphering_sqn(asn1_ctx_t *actx, guint32 rlc_ciphering_sqn)
+static void private_data_set_rlc_ciphering_sqn(asn1_ctx_t *actx, uint32_t rlc_ciphering_sqn)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
private_data->rlc_ciphering_sqn = rlc_ciphering_sqn;
@@ -274,13 +275,13 @@ static void private_data_set_curr_sib_segment_type(asn1_ctx_t *actx, enum rrc_si
private_data->curr_sib_segment_type = curr_sib_segment_type;
}
-static guint32 private_data_get_curr_sib_type(asn1_ctx_t *actx)
+static uint32_t private_data_get_curr_sib_type(asn1_ctx_t *actx)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
return private_data->curr_sib_type;
}
-static void private_data_set_curr_sib_type(asn1_ctx_t *actx, guint32 curr_sib_type)
+static void private_data_set_curr_sib_type(asn1_ctx_t *actx, uint32_t curr_sib_type)
{
umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx);
private_data->curr_sib_type = curr_sib_type;
@@ -289,16 +290,16 @@ static void private_data_set_curr_sib_type(asn1_ctx_t *actx, guint32 curr_sib_ty
/*****************************************************************************/
static dissector_handle_t gsm_a_dtap_handle;
-static dissector_handle_t rrc_ue_radio_access_cap_info_handle=NULL;
-static dissector_handle_t rrc_pcch_handle=NULL;
-static dissector_handle_t rrc_ul_ccch_handle=NULL;
-static dissector_handle_t rrc_dl_ccch_handle=NULL;
-static dissector_handle_t rrc_ul_dcch_handle=NULL;
-static dissector_handle_t rrc_dl_dcch_handle=NULL;
-static dissector_handle_t rrc_bcch_fach_handle=NULL;
-static dissector_handle_t lte_rrc_ue_eutra_cap_handle=NULL;
-static dissector_handle_t lte_rrc_dl_dcch_handle=NULL;
-static dissector_handle_t gsm_rlcmac_dl_handle=NULL;
+static dissector_handle_t rrc_ue_radio_access_cap_info_handle;
+static dissector_handle_t rrc_pcch_handle;
+static dissector_handle_t rrc_ul_ccch_handle;
+static dissector_handle_t rrc_dl_ccch_handle;
+static dissector_handle_t rrc_ul_dcch_handle;
+static dissector_handle_t rrc_dl_dcch_handle;
+static dissector_handle_t rrc_bcch_fach_handle;
+static dissector_handle_t lte_rrc_ue_eutra_cap_handle;
+static dissector_handle_t lte_rrc_dl_dcch_handle;
+static dissector_handle_t gsm_rlcmac_dl_handle;
/* Forward declarations */
void proto_register_rrc(void);
@@ -312,7 +313,7 @@ static int dissect_SysInfoType22_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tr
#include "packet-rrc-val.h"
/* Initialize the protocol and registered fields */
-int proto_rrc = -1;
+int proto_rrc;
static int hf_test;
static int hf_urnti;
static int hf_urnti_new;
@@ -320,31 +321,31 @@ static int hf_urnti_current;
#include "packet-rrc-hf.c"
/* Initialize the subtree pointers */
-static int ett_rrc = -1;
+static int ett_rrc;
#include "packet-rrc-ett.c"
-static gint ett_rrc_eutraFeatureGroupIndicators = -1;
-static gint ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo = -1;
-static gint ett_rrc_ims_info = -1;
-static gint ett_rrc_cellIdentity = -1;
-static gint ett_rrc_sib_data_var = -1;
+static int ett_rrc_eutraFeatureGroupIndicators;
+static int ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo;
+static int ett_rrc_ims_info;
+static int ett_rrc_cellIdentity;
+static int ett_rrc_sib_data_var;
-static expert_field ei_rrc_no_hrnti = EI_INIT;
+static expert_field ei_rrc_no_hrnti;
/* Global variables */
static proto_tree *top_tree;
-static int hf_rrc_eutra_feat_group_ind_1 = -1;
-static int hf_rrc_eutra_feat_group_ind_2 = -1;
-static int hf_rrc_eutra_feat_group_ind_3 = -1;
-static int hf_rrc_eutra_feat_group_ind_4 = -1;
-static int hf_rrc_ims_info_atgw_trans_det_cont_type = -1;
-static int hf_rrc_ims_info_atgw_udp_port = -1;
-static int hf_rrc_ims_info_atgw_ipv4 = -1;
-static int hf_rrc_ims_info_atgw_ipv6 = -1;
-static int hf_rrc_cellIdentity_rnc_id = -1;
-static int hf_rrc_cellIdentity_c_id = -1;
+static int hf_rrc_eutra_feat_group_ind_1;
+static int hf_rrc_eutra_feat_group_ind_2;
+static int hf_rrc_eutra_feat_group_ind_3;
+static int hf_rrc_eutra_feat_group_ind_4;
+static int hf_rrc_ims_info_atgw_trans_det_cont_type;
+static int hf_rrc_ims_info_atgw_udp_port;
+static int hf_rrc_ims_info_atgw_ipv4;
+static int hf_rrc_ims_info_atgw_ipv6;
+static int hf_rrc_cellIdentity_rnc_id;
+static int hf_rrc_cellIdentity_c_id;
static const true_false_string rrc_eutra_feat_group_ind_1_val = {
"UTRA CELL_PCH to EUTRA RRC_IDLE cell reselection - Supported",
@@ -372,7 +373,7 @@ static int flowd,type;
/*Stores how many channels we have detected for a HS-DSCH MAC-flow*/
#define RRC_MAX_NUM_HSDHSCH_MACDFLOW 8
-static guint8 num_chans_per_flow[RRC_MAX_NUM_HSDHSCH_MACDFLOW];
+static uint8_t num_chans_per_flow[RRC_MAX_NUM_HSDHSCH_MACDFLOW];
/**
* Return the maximum counter, useful for initiating counters
@@ -380,10 +381,10 @@ static guint8 num_chans_per_flow[RRC_MAX_NUM_HSDHSCH_MACDFLOW];
#if 0
static int get_max_counter(int com_context){
int i;
- guint32 max = 0;
+ uint32_t max = 0;
rrc_ciphering_info * ciphering_info;
- if( (ciphering_info = g_tree_lookup(rrc_ciph_info_tree, GINT_TO_POINTER((gint)com_context))) == NULL ){
+ if( (ciphering_info = g_tree_lookup(rrc_ciph_info_tree, GINT_TO_POINTER((int)com_context))) == NULL ){
return 0;
}
for(i = 0; i<31; i++){
@@ -394,28 +395,28 @@ static int get_max_counter(int com_context){
}
#endif
/** Utility functions used for various comparisons/cleanups in tree **/
-static gint rrc_key_cmp(gconstpointer b_ptr, gconstpointer a_ptr, gpointer ignore _U_){
+static int rrc_key_cmp(const void *b_ptr, const void *a_ptr, void *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);
}
-static void rrc_free_value(gpointer value ){
+static void rrc_free_value(void *value ){
g_free(value);
}
static rrc_ciphering_info*
get_or_create_cipher_info(fp_info *fpinf, rlc_info *rlcinf) {
rrc_ciphering_info *cipher_info = NULL;
- guint32 ueid;
+ uint32_t ueid;
int i;
if (!fpinf || !rlcinf)
return NULL;
ueid = rlcinf->ueid[fpinf->cur_tb];
- cipher_info = (rrc_ciphering_info *)g_tree_lookup(rrc_ciph_info_tree, GINT_TO_POINTER((gint)ueid));
+ cipher_info = (rrc_ciphering_info *)g_tree_lookup(rrc_ciph_info_tree, GINT_TO_POINTER((int)ueid));
if( cipher_info == NULL ){
cipher_info = g_new0(rrc_ciphering_info,1);
@@ -435,16 +436,16 @@ get_or_create_cipher_info(fp_info *fpinf, rlc_info *rlcinf) {
cipher_info->ciphering_algorithm = -1;
cipher_info->integrity_algorithm = -1;
- g_tree_insert(rrc_ciph_info_tree, GINT_TO_POINTER((gint)rlcinf->ueid[fpinf->cur_tb]), cipher_info);
+ g_tree_insert(rrc_ciph_info_tree, GINT_TO_POINTER((int)rlcinf->ueid[fpinf->cur_tb]), cipher_info);
}
return cipher_info;
}
/* Try to find the NBAP C-RNC Context and, if found, pair it with a given U-RNTI */
static void
-rrc_try_map_urnti_to_crncc(guint32 u_rnti, asn1_ctx_t *actx)
+rrc_try_map_urnti_to_crncc(uint32_t u_rnti, asn1_ctx_t *actx)
{
- guint32 scrambling_code, crnc_context;
+ uint32_t scrambling_code, crnc_context;
/* Getting the user's Uplink Scrambling Code*/
scrambling_code = private_data_get_scrambling_code(actx);
if (u_rnti != 0 && scrambling_code != 0) {
@@ -469,22 +470,24 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_item *rrc_item = NULL;
proto_tree *rrc_tree = NULL;
struct rrc_info *rrcinf;
+ fp_info *fpinf;
top_tree = tree;
rrcinf = (struct rrc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_rrc, 0);
+ fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0);
/* 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);
+ memset(num_chans_per_flow,0,sizeof(uint8_t)*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);
- if (rrcinf) {
- switch (rrcinf->msgtype[pinfo->fd->subnum]) {
+ if (rrcinf && fpinf) {
+ switch (rrcinf->msgtype[fpinf->cur_tb]) {
case RRC_MESSAGE_TYPE_PCCH:
call_dissector(rrc_pcch_handle, tvb, pinfo, rrc_tree);
break;
@@ -522,9 +525,6 @@ rrc_init(void) {
NULL, /* data pointer, optional */
NULL,
rrc_free_value);
-
- /* Global U-RNTI / C-RNTI map to be used in RACH channels */
- rrc_global_urnti_crnti_map = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
}
static void
@@ -600,7 +600,7 @@ void proto_register_rrc(void) {
};
/* List of subtrees */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_rrc,
#include "packet-rrc-ettarr.c"
&ett_rrc_eutraFeatureGroupIndicators,
@@ -638,6 +638,9 @@ void proto_register_rrc(void) {
"Show NAS PDU in root packet details",
"Whether the NAS PDU should be shown in the root packet details tree",
&rrc_nas_in_root_tree);
+
+ /* Global U-RNTI / C-RNTI map to be used in RACH channels */
+ rrc_global_urnti_crnti_map = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
}
diff --git a/epan/dissectors/asn1/rrc/packet-rrc-template.h b/epan/dissectors/asn1/rrc/packet-rrc-template.h
index 2b38d273..68be7373 100644
--- a/epan/dissectors/asn1/rrc/packet-rrc-template.h
+++ b/epan/dissectors/asn1/rrc/packet-rrc-template.h
@@ -45,19 +45,19 @@ enum rrc_ue_state {
typedef struct rrc_info
{
enum rrc_message_type msgtype[MAX_RRC_FRAMES];
- guint16 hrnti[MAX_RRC_FRAMES];
+ uint16_t hrnti[MAX_RRC_FRAMES];
} rrc_info;
/*Struct for storing ciphering information*/
typedef struct rrc_ciphering_info
{
int seq_no[31][2]; /*Indicates for each Rbid when ciphering starts - Indexers are [BearerID][Direction]*/
- GTree * /*guint32*/ start_cs; /*Start value for CS counter*/
- GTree * /*guint32*/ start_ps; /*Start value for PS counter*/
- gint32 ciphering_algorithm; /*Indicates which type of ciphering algorithm used*/
- gint32 integrity_algorithm; /*Indicates which type of integrity algorithm used*/
- guint32 setup_frame[2]; /*Store which frame contained this information - Indexer is [Direction]*/
- guint32 ps_conf_counters[31][2]; /*This should also be made for CS*/
+ GTree * /*uint32_t*/ start_cs; /*Start value for CS counter*/
+ GTree * /*uint32_t*/ start_ps; /*Start value for PS counter*/
+ int32_t ciphering_algorithm; /*Indicates which type of ciphering algorithm used*/
+ int32_t integrity_algorithm; /*Indicates which type of integrity algorithm used*/
+ uint32_t setup_frame[2]; /*Store which frame contained this information - Indexer is [Direction]*/
+ uint32_t ps_conf_counters[31][2]; /*This should also be made for CS*/
} rrc_ciphering_info;
diff --git a/epan/dissectors/asn1/rrc/rrc.cnf b/epan/dissectors/asn1/rrc/rrc.cnf
index 381c274c..cae29ba9 100644
--- a/epan/dissectors/asn1/rrc/rrc.cnf
+++ b/epan/dissectors/asn1/rrc/rrc.cnf
@@ -234,7 +234,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
#.FN_BODY CellUpdateConfirm-CCCH
fp_info *fpinf = NULL;
rlc_info *rlcinf = NULL;
- guint32 u_rnti;
+ uint32_t u_rnti;
col_append_str(actx->pinfo->cinfo, COL_INFO, "CellUpdateConfirm-CCCH");
%(DEFAULT_BODY)s
if(PINFO_FD_VISITED(actx->pinfo)) {
@@ -258,7 +258,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
#.FN_BODY CellUpdateConfirm
fp_info *fpinf = NULL;
rlc_info *rlcinf = NULL;
- guint32 u_rnti;
+ uint32_t u_rnti;
col_append_str(actx->pinfo->cinfo, COL_INFO, "CellUpdateConfirm");
%(DEFAULT_BODY)s
if(PINFO_FD_VISITED(actx->pinfo)) {
@@ -386,7 +386,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
#.FN_BODY PhysicalChannelReconfiguration
fp_info *fpinf = NULL;
rlc_info *rlcinf = NULL;
- guint32 u_rnti;
+ uint32_t u_rnti;
col_append_str(actx->pinfo->cinfo, COL_INFO, "PhysicalChannelReconfiguration");
%(DEFAULT_BODY)s
if(PINFO_FD_VISITED(actx->pinfo)) {
@@ -427,7 +427,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
#.FN_BODY RadioBearerReconfiguration
fp_info *fpinf = NULL;
rlc_info *rlcinf = NULL;
- guint32 u_rnti;
+ uint32_t u_rnti;
col_append_str(actx->pinfo->cinfo, COL_INFO, "RadioBearerReconfiguration");
%(DEFAULT_BODY)s
if(PINFO_FD_VISITED(actx->pinfo)) {
@@ -502,7 +502,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
%(DEFAULT_BODY)s
#.FN_BODY RRCConnectionSetup
- guint32 new_u_rnti;
+ uint32_t new_u_rnti;
col_append_str(actx->pinfo->cinfo, COL_INFO, "RRCConnectionSetup");
%(DEFAULT_BODY)s
if (PINFO_FD_VISITED(actx->pinfo)) {
@@ -525,7 +525,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
fp_info *fpinf;
rlc_info *rlcinf;
rrc_ciphering_info *ciphering_info = NULL;
- guint8 direction;
+ uint8_t direction;
col_append_str(actx->pinfo->cinfo, COL_INFO, "SecurityModeCommand");
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_fp, 0);
@@ -546,7 +546,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
fp_info *fpinf;
rlc_info *rlcinf;
rrc_ciphering_info *ciphering_info = NULL;
- guint8 direction;
+ uint8_t direction;
col_append_str(actx->pinfo->cinfo, COL_INFO, "SecurityModeComplete");
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_fp, 0);
@@ -592,7 +592,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
#.FN_BODY TransportChannelReconfiguration
fp_info *fpinf = NULL;
rlc_info *rlcinf = NULL;
- guint32 u_rnti;
+ uint32_t u_rnti;
col_append_str(actx->pinfo->cinfo, COL_INFO, "TransportChannelReconfiguration");
%(DEFAULT_BODY)s
if(PINFO_FD_VISITED(actx->pinfo)) {
@@ -700,7 +700,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
#.FN_BODY HandoverFromUTRANCommand-GSM-r3-IEs/gsm-message/single-GSM-Message single-GSM-Message-r3
tvbuff_t *gsm_message_tvb=NULL;
- guint bits_remaining, whole_octets_remaining;
+ unsigned bits_remaining, whole_octets_remaining;
%(DEFAULT_BODY)s
@@ -715,7 +715,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
}
#.FN_BODY HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Message-r6
tvbuff_t *gsm_message_tvb=NULL;
- guint bits_remaining, whole_octets_remaining;
+ unsigned bits_remaining, whole_octets_remaining;
%(DEFAULT_BODY)s
@@ -734,7 +734,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
%(DEFAULT_BODY)s
if (parameter_tvb){
- guint8 byte = tvb_get_guint8(parameter_tvb, 0);
+ uint8_t byte = tvb_get_uint8(parameter_tvb, 0);
if (byte == 0x06) {
if (gsm_a_dtap_handle) {
call_dissector(gsm_a_dtap_handle, parameter_tvb, actx->pinfo, tree);
@@ -751,7 +751,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
%(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_uint8(parameter_tvb,1), NULL, 0);
}
#.FN_BODY GSM-Classmark3 VAL_PTR = &parameter_tvb
@@ -808,7 +808,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
if(eutraFeatureGroupIndicators_tvb){
/* Dissect eutraFeatureGroupIndicators */
proto_tree *subtree;
- gint curr_bit_offset = 0;
+ int curr_bit_offset = 0;
subtree = proto_item_add_subtree(actx->created_item, ett_rrc_eutraFeatureGroupIndicators);
proto_tree_add_bits_item(subtree, hf_rrc_eutra_feat_group_ind_1, eutraFeatureGroupIndicators_tvb, curr_bit_offset, 1, ENC_BIG_ENDIAN);
curr_bit_offset++;
@@ -822,8 +822,8 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
#.FN_BODY PLMN-Identity
wmem_strbuf_t* mcc_mnc_strbuf;
wmem_strbuf_t* mcc_strbuf;
- guint32 string_len;
- gchar* mcc_mnc_string;
+ uint32_t string_len;
+ char* mcc_mnc_string;
tvbuff_t* mcc_mnc_tvb;
/* Reset the digits string in the private data struct */
@@ -831,7 +831,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
mcc_mnc_strbuf = wmem_strbuf_new_sized(actx->pinfo->pool,7);
private_data_set_digits_strbuf(actx, mcc_mnc_strbuf);
/* Reset parsing failure flag*/
- private_data_set_digits_strbuf_parsing_failed_flag(actx, FALSE);
+ private_data_set_digits_strbuf_parsing_failed_flag(actx, false);
%(DEFAULT_BODY)s
private_data_set_digits_strbuf(actx, NULL);
/* Check for parsing errors */
@@ -840,7 +840,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
}
/* Extracting the string collected in the strbuf */
- string_len = (guint32)wmem_strbuf_get_len(mcc_mnc_strbuf);
+ string_len = (uint32_t)wmem_strbuf_get_len(mcc_mnc_strbuf);
mcc_mnc_string = wmem_strbuf_finalize(mcc_mnc_strbuf);
if(string_len >= 3)
@@ -855,7 +855,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
}
/* Creating TVB from extracted string*/
- mcc_mnc_tvb = tvb_new_child_real_data(tvb, (guint8*)mcc_mnc_string, string_len, string_len);
+ mcc_mnc_tvb = tvb_new_child_real_data(tvb, (uint8_t*)mcc_mnc_string, string_len, string_len);
add_new_data_source(actx->pinfo, mcc_mnc_tvb, "MCC-MNC");
/* Calling E.212 */
@@ -865,8 +865,8 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
wmem_strbuf_t* mcc_mnc_strbuf;
wmem_strbuf_t* temp_strbuf;
wmem_strbuf_t* last_mcc_strbuf;
- guint32 string_len;
- gchar* mcc_mnc_string;
+ uint32_t string_len;
+ char* mcc_mnc_string;
tvbuff_t* mcc_mnc_tvb;
/* Reset the digits string in the private data struct */
@@ -874,7 +874,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
mcc_mnc_strbuf = wmem_strbuf_new_sized(actx->pinfo->pool,7);
private_data_set_digits_strbuf(actx, mcc_mnc_strbuf);
/* Reset parsing failure flag*/
- private_data_set_digits_strbuf_parsing_failed_flag(actx, FALSE);
+ private_data_set_digits_strbuf_parsing_failed_flag(actx, false);
%(DEFAULT_BODY)s
private_data_set_digits_strbuf(actx, NULL);
/* Check for parsing errors */
@@ -883,7 +883,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
}
/* Extracting the string collected in the strbuf */
- string_len = (guint32)wmem_strbuf_get_len(mcc_mnc_strbuf);
+ string_len = (uint32_t)wmem_strbuf_get_len(mcc_mnc_strbuf);
mcc_mnc_string = wmem_strbuf_finalize(mcc_mnc_strbuf);
if (string_len > 3) {
/* 3 MCC digits and at least 1 MNC digit were found, keep MCC for later
@@ -906,7 +906,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
wmem_strbuf_append_printf(temp_strbuf,"%%s",wmem_strbuf_get_str(last_mcc_strbuf));
wmem_strbuf_append_printf(temp_strbuf,"%%s",mcc_mnc_string);
/* Update length of recovered MCC-MNC pair */
- string_len = (guint32)wmem_strbuf_get_len(temp_strbuf);
+ string_len = (uint32_t)wmem_strbuf_get_len(temp_strbuf);
mcc_mnc_string = wmem_strbuf_finalize(temp_strbuf);
}
}
@@ -915,7 +915,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
/* optional MCC was present (or restored above), we can call E.212 dissector */
/* Creating TVB from extracted string*/
- mcc_mnc_tvb = tvb_new_child_real_data(tvb, (guint8*)mcc_mnc_string, string_len, string_len);
+ mcc_mnc_tvb = tvb_new_child_real_data(tvb, (uint8_t*)mcc_mnc_string, string_len, string_len);
add_new_data_source(actx->pinfo, mcc_mnc_tvb, "MCC-MNC");
/* Calling E.212 */
@@ -924,15 +924,15 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
#.FN_BODY IMSI-GSM-MAP
wmem_strbuf_t* imsi_strbuf;
- guint32 string_len;
- gchar* imsi_string;
+ uint32_t string_len;
+ char* imsi_string;
tvbuff_t* imsi_tvb;
/* Reset the digits string in the private data struct */
imsi_strbuf = wmem_strbuf_new_sized(actx->pinfo->pool,16);
private_data_set_digits_strbuf(actx, imsi_strbuf);
/* Reset parsing failure flag*/
- private_data_set_digits_strbuf_parsing_failed_flag(actx, FALSE);
+ private_data_set_digits_strbuf_parsing_failed_flag(actx, false);
%(DEFAULT_BODY)s
private_data_set_digits_strbuf(actx, NULL);
/* Check for parsing errors */
@@ -941,18 +941,18 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
}
/* Extracting the string collected in the strbuf */
- string_len = (guint32)wmem_strbuf_get_len(imsi_strbuf);
+ string_len = (uint32_t)wmem_strbuf_get_len(imsi_strbuf);
imsi_string = wmem_strbuf_finalize(imsi_strbuf);
/* Creating TVB from extracted string*/
- imsi_tvb = tvb_new_child_real_data(tvb, (guint8*)imsi_string, string_len, string_len);
+ imsi_tvb = tvb_new_child_real_data(tvb, (uint8_t*)imsi_string, string_len, string_len);
add_new_data_source(actx->pinfo, imsi_tvb, "IMSI");
/* Calling E.212 */
dissect_e212_utf8_imsi(imsi_tvb,actx->pinfo,tree,0,string_len);
#.FN_BODY Digit VAL_PTR = &digit
- guint32 digit;
+ uint32_t digit;
wmem_strbuf_t* digits_strbuf; /* The string of either an IMSI or a MCC-MNC pair */
%(DEFAULT_BODY)s
@@ -962,15 +962,15 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
digits_strbuf = private_data_get_digits_strbuf(actx);
if (digits_strbuf) {
- gchar digit_char;
+ char digit_char;
if(digit > 9) {
- private_data_set_digits_strbuf_parsing_failed_flag(actx, TRUE);
+ private_data_set_digits_strbuf_parsing_failed_flag(actx, true);
return offset;
}
- /* Converting to the matching gchar */
- digit_char = (gchar)(digit + '0');
+ /* Converting to the matching char */
+ digit_char = (char)(digit + '0');
/* Appending to the digits string */
wmem_strbuf_append_c(digits_strbuf, digit_char);
@@ -982,19 +982,19 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
private_data_set_curr_sib_segment_type(actx,RRC_SIB_SEG_NO_SEGMENT); /* Resetting value */
#.FN_BODY SIB-Type VAL_PTR = &sib_type
- guint32 sib_type;
+ uint32_t sib_type;
%(DEFAULT_BODY)s
private_data_set_curr_sib_type(actx,sib_type);
#.FN_BODY SIB-Data-variable VAL_PTR = &sib_data_tvb
tvbuff_t *sib_data_tvb;
- guint32 sib_type;
+ uint32_t sib_type;
proto_tree *subtree;
- guint32 seg_type;
+ uint32_t seg_type;
%(DEFAULT_BODY)s
- seg_type = (guint32)private_data_get_curr_sib_segment_type(actx);
+ seg_type = (uint32_t)private_data_get_curr_sib_segment_type(actx);
if(seg_type != RRC_SIB_SEG_COMP) {
/* TODO: The Dissector only handles 'complete SIBs' right now.
* Reassembly logic should be implemented, taking into acocunt that
@@ -1118,8 +1118,8 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
Decoding specified in TS 124 237 V11.4.0 Annex D.5.3.3 ATGW transfer details
*/
proto_tree *subtree;
- gint curr_offset = 0;
- guint32 atgw_trans_det_cont;
+ int curr_offset = 0;
+ uint32_t atgw_trans_det_cont;
subtree = proto_item_add_subtree(actx->created_item, ett_rrc_ims_info);
proto_tree_add_item_ret_uint(subtree, hf_rrc_ims_info_atgw_trans_det_cont_type, imsInformation_tvb, curr_offset, 1, ENC_BIG_ENDIAN, &atgw_trans_det_cont);
curr_offset++;
@@ -1149,9 +1149,10 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
actx->created_item = proto_tree_add_item(tree, hf_index, hnbname_tvb, 0, -1, ENC_UTF_8|ENC_NA);
#.FN_BODY CN-DomainIdentity VAL_PTR = &nas_sys_info
- guint32 nas_sys_info;
+ uint32_t nas_sys_info;
%(DEFAULT_BODY)s
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%%s)", val_to_str_const(nas_sys_info,rrc_CN_DomainIdentity_vals,"Unknown"));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%%s)",
+ val_to_str_const(nas_sys_info,rrc_CN_DomainIdentity_vals, "Unknown"));
nas_sys_info++; /* CS = 0, PS = 1 but the enum defines 0 as Unknown and CS = 1, PS = 2 */
private_data_set_cn_domain(actx, (enum nas_sys_info_gsm_map) nas_sys_info);
@@ -1173,7 +1174,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
#.FN_BODY NAS-SystemInformationGSM-MAP VAL_PTR = &nas_sys_info_gsm_map_tvb
tvbuff_t *nas_sys_info_gsm_map_tvb = NULL;
- guint32 length;
+ uint32_t length;
enum nas_sys_info_gsm_map cn_domain;
proto_tree *subtree;
@@ -1220,14 +1221,14 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
#.FN_BODY U-RNTI
private_data_set_s_rnc_id(actx, 0);
private_data_set_s_rnti(actx, 0);
- guint32 s_rnc_id;
- guint32 s_rnti;
- guint32 u_rnti_value;
- guint32 original_offset;
+ uint32_t s_rnc_id;
+ uint32_t s_rnti;
+ uint32_t u_rnti_value;
+ uint32_t original_offset;
proto_item *ti;
- guint32 item_len;
+ uint32_t item_len;
proto_tree *sub_tree;
- gboolean is_new_urnti;
+ bool is_new_urnti;
int generated_field_hf;
original_offset = offset;
%(DEFAULT_BODY)s
@@ -1268,8 +1269,8 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
umts_fp_conversation_info_t *umts_fp_conversation_info = NULL;
fp_fach_channel_info_t *fp_fach_channel_info = NULL;
tvbuff_t * c_rnti_tvb = NULL;
- guint16 c_rnti = 0;
- guint32 u_rnti = 0;
+ uint16_t c_rnti = 0;
+ uint32_t u_rnti = 0;
fp_crnti_allocation_info_t *fp_crnti_allocation_info = NULL;
%(DEFAULT_BODY)s
if (!c_rnti_tvb)
@@ -1331,12 +1332,12 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
wmem_tree_insert32(rrc_global_urnti_crnti_map, c_rnti, (void *)fp_crnti_allocation_info);
#.FN_BODY UL-ScramblingCode VAL_PTR = &scrambling_code
-guint32 scrambling_code;
+uint32_t scrambling_code;
%(DEFAULT_BODY)s
private_data_set_scrambling_code(actx,scrambling_code);
#.FN_BODY RRC-StateIndicator VAL_PTR = &state_dec
-gint32 state_dec = -1;
+int32_t state_dec = -1;
%(DEFAULT_BODY)s
if(state_dec >= 0 && state_dec <= 3) {
state_dec++; /* Encoded values are 0-based, Values in the enum are 1-based*/
@@ -1359,9 +1360,10 @@ if(state_dec >= 0 && state_dec <= 3) {
#.FN_BODY DL-TransportChannelType-r5 VAL_PTR = &type
/*Here we try to figure out which HS-DSCH channels are multiplexed*/
- guint *flowd_p;
- guint *cur_val=NULL;
+ unsigned *flowd_p;
+ unsigned *cur_val=NULL;
struct rrc_info *rrcinf;
+ fp_info *fpinf;
%(DEFAULT_BODY)s
@@ -1371,16 +1373,17 @@ if(state_dec >= 0 && state_dec <= 3) {
if(num_chans_per_flow[flowd] > 1 ){
rrcinf = (rrc_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0);
- if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
+ fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_fp, 0);
+ if((rrcinf == NULL) || (fpinf == NULL) || (rrcinf->hrnti[fpinf->cur_tb] == 0)){
expert_add_info(actx->pinfo, actx->created_item, &ei_rrc_no_hrnti);
}
else{
/*If it doesn't exists, insert it*/
- if( (cur_val=(gint *)g_tree_lookup(hsdsch_muxed_flows, GUINT_TO_POINTER((guint)rrcinf->hrnti[actx->pinfo->fd->subnum]))) == NULL ){
+ if( (cur_val=(int *)g_tree_lookup(hsdsch_muxed_flows, GUINT_TO_POINTER((unsigned)rrcinf->hrnti[fpinf->cur_tb]))) == NULL ){
- flowd_p = g_new0(guint, 1);
+ flowd_p = g_new0(unsigned, 1);
*flowd_p = (1U<<flowd); /*Set the bit to mark it as true*/
- g_tree_insert(hsdsch_muxed_flows, GUINT_TO_POINTER((guint)rrcinf->hrnti[actx->pinfo->fd->subnum]), flowd_p);
+ g_tree_insert(hsdsch_muxed_flows, GUINT_TO_POINTER((unsigned)rrcinf->hrnti[fpinf->cur_tb]), flowd_p);
}else{
*cur_val = (1U<<flowd) | *cur_val;
@@ -1394,9 +1397,10 @@ if(state_dec >= 0 && state_dec <= 3) {
#.FN_BODY DL-TransportChannelType-r7 VAL_PTR = &type
/*Here we try to figure out which HS-DSCH channels are multiplexed*/
- guint *flowd_p;
- guint *cur_val=NULL;
+ unsigned *flowd_p;
+ unsigned *cur_val=NULL;
struct rrc_info *rrcinf;
+ fp_info *fpinf;
%(DEFAULT_BODY)s
@@ -1407,16 +1411,17 @@ if(state_dec >= 0 && state_dec <= 3) {
if(num_chans_per_flow[flowd] > 1 ){
rrcinf = (rrc_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0);
- if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
+ fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_fp, 0);
+ if((rrcinf == NULL) || (fpinf == NULL) || (rrcinf->hrnti[fpinf->cur_tb] == 0)){
expert_add_info(actx->pinfo, actx->created_item, &ei_rrc_no_hrnti);
}
else{
/*If it doesn't exists, insert it*/
- if( (cur_val=(gint *)g_tree_lookup(hsdsch_muxed_flows, GUINT_TO_POINTER((guint)rrcinf->hrnti[actx->pinfo->fd->subnum]))) == NULL ){
+ if( (cur_val=(int *)g_tree_lookup(hsdsch_muxed_flows, GUINT_TO_POINTER((unsigned)rrcinf->hrnti[fpinf->cur_tb]))) == NULL ){
- flowd_p = g_new0(guint, 1);
+ flowd_p = g_new0(unsigned, 1);
*flowd_p = (1U<<flowd); /* Set the bit to mark it as true*/
- g_tree_insert(hsdsch_muxed_flows, GUINT_TO_POINTER((guint)rrcinf->hrnti[actx->pinfo->fd->subnum]), flowd_p);
+ g_tree_insert(hsdsch_muxed_flows, GUINT_TO_POINTER((unsigned)rrcinf->hrnti[fpinf->cur_tb]), flowd_p);
}else{
*cur_val = (1U<<flowd) | *cur_val;
@@ -1434,22 +1439,26 @@ if(state_dec >= 0 && state_dec <= 3) {
#.FN_BODY H-RNTI VAL_PTR = &hrnti_tvb
tvbuff_t *hrnti_tvb;
struct rrc_info *rrcinf;
+ fp_info *fpinf;
%(DEFAULT_BODY)s
#.FN_FTR H-RNTI
rrcinf = (struct rrc_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0);
- if (!rrcinf) {
- rrcinf = wmem_new0(wmem_file_scope(), struct rrc_info);
- p_add_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0, rrcinf);
+ fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_fp, 0);
+ if (fpinf) {
+ if (!rrcinf) {
+ rrcinf = wmem_new0(wmem_file_scope(), struct rrc_info);
+ p_add_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0, rrcinf);
+ }
+ rrcinf->hrnti[fpinf->cur_tb] = tvb_get_ntohs(hrnti_tvb, 0);
}
- rrcinf->hrnti[actx->pinfo->fd->subnum] = tvb_get_ntohs(hrnti_tvb, 0);
#.FN_BODY START-Value VAL_PTR = &start_val
tvbuff_t * start_val;
fp_info *fpinf;
rlc_info *rlcinf;
rrc_ciphering_info * ciphering_info;
- guint32 * start;
+ uint32_t * start;
enum nas_sys_info_gsm_map cn_domain;
%(DEFAULT_BODY)s
@@ -1478,7 +1487,7 @@ if(state_dec >= 0 && state_dec <= 3) {
/*Retrieve and store the value*/
if(ciphering_info && ciphering_info->start_ps) {
- start = g_new(guint32,1);
+ start = g_new(uint32_t,1);
*start = tvb_get_bits32(start_val,0,20,ENC_BIG_ENDIAN);
/*Insert the value based on current frame num since this might vary over time*/
g_tree_insert(ciphering_info->start_ps, GUINT_TO_POINTER(actx->pinfo->num), start);
@@ -1493,9 +1502,9 @@ if(state_dec >= 0 && state_dec <= 3) {
fp_info *fpinf;
rlc_info *rlcinf;
rrc_ciphering_info *ciphering_info;
- guint32 rbid;
- guint32 rlc_ciphering_sqn;
- guint32 direction;
+ uint32_t rbid;
+ uint32_t rlc_ciphering_sqn;
+ uint32_t direction;
fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_fp, 0);
rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_umts_rlc, 0);
@@ -1520,19 +1529,19 @@ if(state_dec >= 0 && state_dec <= 3) {
#.FN_BODY RB-Identity VAL_PTR = &rbid
-guint32 rbid;
+uint32_t rbid;
%(DEFAULT_BODY)s
private_data_set_rbid(actx, rbid);
#.FN_BODY RLC-SequenceNumber VAL_PTR = &rlc_ciphering_sqn
-guint32 rlc_ciphering_sqn;
+uint32_t rlc_ciphering_sqn;
%(DEFAULT_BODY)s
private_data_set_rlc_ciphering_sqn(actx, rlc_ciphering_sqn);
#.FN_BODY CipheringAlgorithm VAL_PTR = &ciphering_algo
rrc_ciphering_info *ciphering_info;
- gint32 ciphering_algo;
+ int32_t ciphering_algo;
%(DEFAULT_BODY)s
@@ -1544,7 +1553,7 @@ private_data_set_rlc_ciphering_sqn(actx, rlc_ciphering_sqn);
#.FN_BODY CipheringAlgorithm-r7 VAL_PTR = &ciphering_algo
rrc_ciphering_info *ciphering_info;
- gint32 ciphering_algo;
+ int32_t ciphering_algo;
%(DEFAULT_BODY)s
@@ -1556,7 +1565,7 @@ private_data_set_rlc_ciphering_sqn(actx, rlc_ciphering_sqn);
#.FN_BODY IntegrityProtectionAlgorithm VAL_PTR = &integrity_algo
rrc_ciphering_info *ciphering_info;
- gint32 integrity_algo;
+ int32_t integrity_algo;
%(DEFAULT_BODY)s
@@ -1568,7 +1577,7 @@ private_data_set_rlc_ciphering_sqn(actx, rlc_ciphering_sqn);
#.FN_BODY IntegrityProtectionAlgorithm-r7 VAL_PTR = &integrity_algo
rrc_ciphering_info *ciphering_info;
- gint32 integrity_algo;
+ int32_t integrity_algo;
%(DEFAULT_BODY)s
@@ -1596,10 +1605,10 @@ private_data_set_rlc_ciphering_sqn(actx, rlc_ciphering_sqn);
%(DEFAULT_BODY)s
#.FN_BODY ReleaseCause VAL_PTR=&value
- guint32 value;
+ uint32_t value;
%(DEFAULT_BODY)s
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " [cause=%%s]",
- val_to_str(value, rrc_ReleaseCause_vals, "Unknown"));
+ val_to_str_const(value, rrc_ReleaseCause_vals, "Unknown"));
#.FN_BODY MasterInformationBlock
col_append_str(actx->pinfo->cinfo, COL_INFO, "MasterInformationBlock");