%(DEFAULT_BODY)s
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) ){
+ if(fpinf && ((c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) != NULL) ){
c_inf->setup_frame = actx->pinfo->fd->num;
}
gint *flowd_p;
gint *cur_val=NULL;
- guint16 hr=0;
+ struct rrc_info *rrcinf;
%(DEFAULT_BODY)s
num_chans_per_flow[flowd]++;
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 ");
+ rrcinf = p_get_proto_data(actx->pinfo->fd, proto_rrc);
+ if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
+ expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "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( (cur_val=g_tree_lookup(hsdsch_muxed_flows, GUINT_TO_POINTER(rrcinf->hrnti[actx->pinfo->fd->subnum]))) == 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);
+ g_tree_insert(hsdsch_muxed_flows, GUINT_TO_POINTER(rrcinf->hrnti[actx->pinfo->fd->subnum]), flowd_p);
}else{
*cur_val = (1<<flowd) | *cur_val;
gint *flowd_p;
gint *cur_val=NULL;
- guint16 hr=0;
+ struct rrc_info *rrcinf;
%(DEFAULT_BODY)s
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 ");
+ rrcinf = p_get_proto_data(actx->pinfo->fd, proto_rrc);
+ if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
+ expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "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( (cur_val=g_tree_lookup(hsdsch_muxed_flows, GUINT_TO_POINTER(rrcinf->hrnti[actx->pinfo->fd->subnum]))) == 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);
+ g_tree_insert(hsdsch_muxed_flows, GUINT_TO_POINTER(rrcinf->hrnti[actx->pinfo->fd->subnum]), flowd_p);
}else{
*cur_val = (1<<flowd) | *cur_val;
#.FN_BODY MAC-d-FlowIdentity VAL_PTR = &flowd
%(DEFAULT_BODY)s
-#.FN_BODY H-RNTI VAL_PTR = &hrnti
+#.FN_BODY H-RNTI VAL_PTR = &hrnti_tvb
+ tvbuff_t *hrnti_tvb;
+ struct rrc_info *rrcinf;
%(DEFAULT_BODY)s
+#.FN_FTR H-RNTI
+ rrcinf = p_get_proto_data(actx->pinfo->fd, proto_rrc);
+ if (!rrcinf) {
+ rrcinf = se_alloc0(sizeof(struct rrc_info));
+ p_add_proto_data(actx->pinfo->fd, proto_rrc, rrcinf);
+ }
+ 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;
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 ){
+ if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) == NULL ){
c_inf = g_malloc0(sizeof(rrc_ciphering_info));
/*Initiate tree with START_PS values.*/
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);
+ g_tree_insert(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id), c_inf);
}
/*Retrieve and store the value*/
*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);
+ g_tree_insert(c_inf->start_ps, GUINT_TO_POINTER(actx->pinfo->fd->num), start);
break;
default:
return offset;
}
/*This should not happen*/
- if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)fpinf->com_context_id))) == NULL ){
+ if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) == NULL ){
return offset;
}
/*Set the ciphering activation frame information*/
#.FN_BODY DL-DCCH-Message
%(DEFAULT_BODY)s
- hrnti = NULL;
#.FN_BODY HandoverToUTRANCommand
%(DEFAULT_BODY)s
- hrnti = NULL;
#.END
};
static int flowd,type;
-static tvbuff_t * hrnti = NULL;
static int cipher_start_val[2] _U_;
/*Stores how many channels we have detected for a HS-DSCH MAC-flow*/
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 830 "../../asn1/rrc/rrc.cnf"
+#line 834 "../../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 836 "../../asn1/rrc/rrc.cnf"
+#line 840 "../../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 809 "../../asn1/rrc/rrc.cnf"
+#line 813 "../../asn1/rrc/rrc.cnf"
fp_info *fpinf;
rrc_ciphering_info * c_inf;
return offset;
}
/*This should not happen*/
- if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)fpinf->com_context_id))) == NULL ){
+ if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) == NULL ){
return offset;
}
/*Set the ciphering activation frame information*/
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 750 "../../asn1/rrc/rrc.cnf"
+#line 744 "../../asn1/rrc/rrc.cnf"
+ tvbuff_t *hrnti_tvb;
+ struct rrc_info *rrcinf;
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
- 16, 16, FALSE, &hrnti);
+ 16, 16, FALSE, &hrnti_tvb);
+
+#line 749 "../../asn1/rrc/rrc.cnf"
+ rrcinf = p_get_proto_data(actx->pinfo->fd, proto_rrc);
+ if (!rrcinf) {
+ rrcinf = se_alloc0(sizeof(struct rrc_info));
+ p_add_proto_data(actx->pinfo->fd, proto_rrc, rrcinf);
+ }
+ rrcinf->hrnti[actx->pinfo->fd->subnum] = tvb_get_ntohs(hrnti_tvb, 0);
+
return offset;
}
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 747 "../../asn1/rrc/rrc.cnf"
+#line 741 "../../asn1/rrc/rrc.cnf"
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
0U, 7U, &flowd, FALSE);
gint *flowd_p;
gint *cur_val=NULL;
- guint16 hr=0;
+ struct rrc_info *rrcinf;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
ett_rrc_DL_TransportChannelType_r5, DL_TransportChannelType_r5_choice,
num_chans_per_flow[flowd]++;
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 ");
+ rrcinf = p_get_proto_data(actx->pinfo->fd, proto_rrc);
+ if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
+ expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "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( (cur_val=g_tree_lookup(hsdsch_muxed_flows, GUINT_TO_POINTER(rrcinf->hrnti[actx->pinfo->fd->subnum]))) == 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);
+ g_tree_insert(hsdsch_muxed_flows, GUINT_TO_POINTER(rrcinf->hrnti[actx->pinfo->fd->subnum]), flowd_p);
}else{
*cur_val = (1<<flowd) | *cur_val;
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 708 "../../asn1/rrc/rrc.cnf"
+#line 705 "../../asn1/rrc/rrc.cnf"
gint *flowd_p;
gint *cur_val=NULL;
- guint16 hr=0;
+ struct rrc_info *rrcinf;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
ett_rrc_DL_TransportChannelType_r7, DL_TransportChannelType_r7_choice,
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 ");
+ rrcinf = p_get_proto_data(actx->pinfo->fd, proto_rrc);
+ if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
+ expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "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( (cur_val=g_tree_lookup(hsdsch_muxed_flows, GUINT_TO_POINTER(rrcinf->hrnti[actx->pinfo->fd->subnum]))) == 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);
+ g_tree_insert(hsdsch_muxed_flows, GUINT_TO_POINTER(rrcinf->hrnti[actx->pinfo->fd->subnum]), flowd_p);
}else{
*cur_val = (1<<flowd) | *cur_val;
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 840 "../../asn1/rrc/rrc.cnf"
+#line 844 "../../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_DL_DCCH_Message(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 847 "../../asn1/rrc/rrc.cnf"
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_rrc_DL_DCCH_Message, DL_DCCH_Message_sequence);
- hrnti = NULL;
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 753 "../../asn1/rrc/rrc.cnf"
+#line 757 "../../asn1/rrc/rrc.cnf"
tvbuff_t * start_val;
fp_info *fpinf;
rrc_ciphering_info * c_inf;
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 ){
+ if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) == NULL ){
c_inf = g_malloc0(sizeof(rrc_ciphering_info));
/*Initiate tree with START_PS values.*/
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);
+ g_tree_insert(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id), c_inf);
}
/*Retrieve and store the value*/
*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);
+ g_tree_insert(c_inf->start_ps, GUINT_TO_POINTER(actx->pinfo->fd->num), start);
break;
default:
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) ){
+ if(fpinf && ((c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) != NULL) ){
c_inf->setup_frame = actx->pinfo->fd->num;
}
static int
dissect_rrc_HandoverToUTRANCommand(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 850 "../../asn1/rrc/rrc.cnf"
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
ett_rrc_HandoverToUTRANCommand, HandoverToUTRANCommand_choice,
NULL);
- hrnti = NULL;
/*--- End of included file: packet-rrc-fn.c ---*/
-#line 180 "../../asn1/rrc/packet-rrc-template.c"
+#line 179 "../../asn1/rrc/packet-rrc-template.c"
#include "packet-rrc.h"
NULL, HFILL }},
/*--- End of included file: packet-rrc-hfarr.c ---*/
-#line 260 "../../asn1/rrc/packet-rrc-template.c"
+#line 259 "../../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 286 "../../asn1/rrc/packet-rrc-template.c"
+#line 285 "../../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 300 "../../asn1/rrc/packet-rrc-template.c"
+#line 299 "../../asn1/rrc/packet-rrc-template.c"