From Jacob Nordgren and Rishie Sharma:
- FP: added header CRC validation, added crc11.c and crc11.h in wsutil/ for EDCH 11 bit CRC, fixed bug in RRC, And also smaller bugfixes in umts_fp and rrc. svn path=/trunk/; revision=44349
This commit is contained in:
parent
e0e533d643
commit
a1218c94c9
|
@ -722,7 +722,7 @@ transportFormatSet_type = NBAP_CPCH;
|
|||
umts_fp_conversation_info->rlc_mode = FP_RLC_MODE_UNKNOWN;
|
||||
|
||||
/*Save unique UE-identifier */
|
||||
umts_fp_conversation_info->com_context_id = crcn_context_present ? 1337 : 1;
|
||||
umts_fp_conversation_info->com_context_id = crcn_context_present ? com_context_id : 1;
|
||||
|
||||
/* DCH's in this flow */
|
||||
umts_fp_conversation_info->dch_crc_present = g_nbap_msg_info_for_fp.dch_crc_present;
|
||||
|
@ -1672,6 +1672,7 @@ umts_fp_conversation_info_t *umts_fp_conversation_info = NULL;
|
|||
address null_addr;
|
||||
conversation_t *conversation = NULL;
|
||||
int i;
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
/*Find the conversations assoicated with the HS-DSCH flows in this packet and set proper H-RNTI*/
|
||||
|
|
|
@ -27,6 +27,12 @@
|
|||
* Ref: 3GPP TS 25.331 V10.7.0 (2012-03)
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* TODO:
|
||||
* - Fix ciphering information for circuit switched stuff
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
@ -57,7 +63,8 @@
|
|||
extern int proto_fp; /*Handler to FP*/
|
||||
|
||||
GTree * hsdsch_muxed_flows;
|
||||
|
||||
GTree * rrc_ciph_inf;
|
||||
static int msg_type _U_;
|
||||
|
||||
static dissector_handle_t gsm_a_dtap_handle;
|
||||
static dissector_handle_t rrc_ue_radio_access_cap_info_handle=NULL;
|
||||
|
@ -129,11 +136,49 @@ static const true_false_string rrc_eutra_feat_group_ind_4_val = {
|
|||
static int flowd,type;
|
||||
|
||||
static tvbuff_t * hrnti;
|
||||
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 MAX_NUM_HSDHSCH_MACDFLOW 8
|
||||
static guint8 num_chans_per_flow[MAX_NUM_HSDHSCH_MACDFLOW];
|
||||
#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
|
||||
*/
|
||||
#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;
|
||||
}
|
||||
#endif
|
||||
/** Utility functions used for various comparions/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);
|
||||
}
|
||||
void rrc_free_key(gpointer key _U_){
|
||||
/*Key's should be de allocated elsewhere.*/
|
||||
|
||||
}
|
||||
void rrc_free_value(gpointer value ){
|
||||
g_free(value);
|
||||
}
|
||||
#include "packet-rrc-fn.c"
|
||||
|
||||
#include "packet-rrc.h"
|
||||
|
@ -184,30 +229,30 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
}
|
||||
}
|
||||
gint rrc_key_cmp(gconstpointer a_ptr, gconstpointer b_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);
|
||||
}
|
||||
void rrc_free_key(gpointer key _U_){
|
||||
/*Key's should be de allocated elsewhere.*/
|
||||
|
||||
}
|
||||
void rrc_free_value(gpointer value ){
|
||||
g_free(value);
|
||||
}
|
||||
|
||||
|
||||
void rrc_init(void){
|
||||
|
||||
/*Cleanup*/
|
||||
if(hsdsch_muxed_flows){
|
||||
g_tree_destroy(hsdsch_muxed_flows);
|
||||
}
|
||||
/*Initialize*/
|
||||
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,
|
||||
NULL, /* data pointer, optional */
|
||||
NULL,
|
||||
rrc_free_value);
|
||||
|
||||
}
|
||||
/*--- proto_register_rrc -------------------------------------------*/
|
||||
void proto_register_rrc(void) {
|
||||
|
|
|
@ -46,6 +46,20 @@ typedef struct rrc_info
|
|||
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*/
|
||||
|
||||
} rrc_ciphering_info;
|
||||
|
||||
extern GTree * hsdsch_muxed_flows;
|
||||
extern GTree * rrc_ciph_inf;
|
||||
|
||||
#endif /* PACKET_RRC_H */
|
||||
|
|
213
asn1/rrc/rrc.cnf
213
asn1/rrc/rrc.cnf
|
@ -1,6 +1,6 @@
|
|||
# rrc.cnf
|
||||
# rrc conformation file
|
||||
# Copyright 2006 Anders Broman
|
||||
# Copyright 2006 Anders Broman
|
||||
# $Id$
|
||||
|
||||
#.OPT
|
||||
|
@ -391,9 +391,19 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
|
|||
%(DEFAULT_BODY)s
|
||||
|
||||
#.FN_BODY SecurityModeComplete
|
||||
rrc_ciphering_info * c_inf ;
|
||||
fp_info *fpinf ;
|
||||
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "SecurityModeComplete");
|
||||
|
||||
%(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;
|
||||
}
|
||||
|
||||
|
||||
#.FN_BODY SecurityModeFailure
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "SecurityModeFailure");
|
||||
%(DEFAULT_BODY)s
|
||||
|
@ -500,7 +510,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
|
|||
|
||||
#.FN_BODY GSM-MessageList/_item VAL_PTR = &gsm_messagelist_tvb
|
||||
tvbuff_t *gsm_messagelist_tvb=NULL;
|
||||
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
if (gsm_messagelist_tvb)
|
||||
|
@ -514,7 +524,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
|
|||
|
||||
bits_remaining = 8*tvb_length(tvb) - offset;
|
||||
whole_octets_remaining = bits_remaining / 8;
|
||||
|
||||
|
||||
gsm_message_tvb = tvb_new_octet_aligned(tvb, offset, 8*whole_octets_remaining);
|
||||
|
||||
if (gsm_message_tvb) {
|
||||
|
@ -529,7 +539,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
|
|||
|
||||
bits_remaining = 8*tvb_length(tvb) - offset;
|
||||
whole_octets_remaining = bits_remaining / 8;
|
||||
|
||||
|
||||
gsm_message_tvb = tvb_new_octet_aligned(tvb, offset, 8*whole_octets_remaining);
|
||||
|
||||
if (gsm_message_tvb) {
|
||||
|
@ -657,69 +667,196 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
|
|||
rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
|
||||
|
||||
/*Here we try to figure out which HS-DSCH channels are multiplexed*/
|
||||
/*TODO: Should this also be made under r7?*/
|
||||
#.FN_BODY DL-TransportChannelType-r5 VAL_PTR = &type
|
||||
|
||||
gint *flowd_p;
|
||||
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]++;
|
||||
|
||||
|
||||
/*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,FALSE);
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
||||
/*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
|
||||
|
||||
/*Here we try to figure out which HS-DSCH channels are multiplexed*/
|
||||
#.FN_BODY DL-TransportChannelType-r7 VAL_PTR = &type
|
||||
|
||||
gint *flowd_p;
|
||||
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 ){
|
||||
|
||||
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
|
||||
|
||||
#.FN_BODY LogicalChannelIdentity
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
|
||||
#.FN_BODY MAC-d-FlowIdentity VAL_PTR = &flowd
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
|
||||
#.FN_BODY SRB-InformationSetupList2-r6
|
||||
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
/*Clear memory*/
|
||||
memset(num_chans_per_flow,0,sizeof(guint8));
|
||||
|
||||
#.FN_BODY H-RNTI VAL_PTR = &hrnti
|
||||
|
||||
|
||||
|
||||
#.FN_BODY H-RNTI VAL_PTR = &hrnti
|
||||
%(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;
|
||||
|
||||
#.FN_BODY RB-ActivationTimeInfo
|
||||
fp_info *fpinf;
|
||||
rrc_ciphering_info * c_inf;
|
||||
|
||||
|
||||
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;
|
||||
|
||||
|
||||
#.FN_BODY RB-Identity VAL_PTR = &rbid
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
|
||||
|
||||
#.FN_BODY RLC-SequenceNumber VAL_PTR = &activation_frame
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
#.FN_BODY DL-DCCH-MessageType VAL_PTR = &msg_type
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
#.END
|
||||
|
||||
|
|
|
@ -10272,6 +10272,7 @@ umts_fp_conversation_info_t *umts_fp_conversation_info = NULL;
|
|||
address null_addr;
|
||||
conversation_t *conversation = NULL;
|
||||
int i;
|
||||
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
0U, 65535U, &hrnti, FALSE);
|
||||
|
||||
|
@ -32278,7 +32279,7 @@ transportFormatSet_type = NBAP_CPCH;
|
|||
umts_fp_conversation_info->rlc_mode = FP_RLC_MODE_UNKNOWN;
|
||||
|
||||
/*Save unique UE-identifier */
|
||||
umts_fp_conversation_info->com_context_id = crcn_context_present ? 1337 : 1;
|
||||
umts_fp_conversation_info->com_context_id = crcn_context_present ? com_context_id : 1;
|
||||
|
||||
/* DCH's in this flow */
|
||||
umts_fp_conversation_info->dch_crc_present = g_nbap_msg_info_for_fp.dch_crc_present;
|
||||
|
|
|
@ -35,6 +35,12 @@
|
|||
* Ref: 3GPP TS 25.331 V10.7.0 (2012-03)
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* TODO:
|
||||
* - Fix ciphering information for circuit switched stuff
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
@ -65,7 +71,8 @@
|
|||
extern int proto_fp; /*Handler to FP*/
|
||||
|
||||
GTree * hsdsch_muxed_flows;
|
||||
|
||||
GTree * rrc_ciph_inf;
|
||||
static int msg_type _U_;
|
||||
|
||||
static dissector_handle_t gsm_a_dtap_handle;
|
||||
static dissector_handle_t rrc_ue_radio_access_cap_info_handle=NULL;
|
||||
|
@ -262,7 +269,7 @@ static int dissect_SysInfoType11bis_PDU(tvbuff_t *tvb, packet_info *pinfo, proto
|
|||
#define maxURNTI_Group 8
|
||||
|
||||
/*--- End of included file: packet-rrc-val.h ---*/
|
||||
#line 91 "../../asn1/rrc/packet-rrc-template.c"
|
||||
#line 98 "../../asn1/rrc/packet-rrc-template.c"
|
||||
|
||||
/* Initialize the protocol and registered fields */
|
||||
int proto_rrc = -1;
|
||||
|
@ -9145,7 +9152,7 @@ static int hf_rrc_GsmSecurityCapability_a5_2 = -1;
|
|||
static int hf_rrc_GsmSecurityCapability_a5_1 = -1;
|
||||
|
||||
/*--- End of included file: packet-rrc-hf.c ---*/
|
||||
#line 96 "../../asn1/rrc/packet-rrc-template.c"
|
||||
#line 103 "../../asn1/rrc/packet-rrc-template.c"
|
||||
|
||||
/* Initialize the subtree pointers */
|
||||
static int ett_rrc = -1;
|
||||
|
@ -14764,7 +14771,7 @@ static gint ett_rrc_UE_RadioAccessCapability_r6 = -1;
|
|||
static gint ett_rrc_UL_RFC3095_Context = -1;
|
||||
|
||||
/*--- End of included file: packet-rrc-ett.c ---*/
|
||||
#line 101 "../../asn1/rrc/packet-rrc-template.c"
|
||||
#line 108 "../../asn1/rrc/packet-rrc-template.c"
|
||||
|
||||
static gint ett_rrc_eutraFeatureGroupIndicators = -1;
|
||||
static gint ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo = -1;
|
||||
|
@ -14796,11 +14803,49 @@ static const true_false_string rrc_eutra_feat_group_ind_4_val = {
|
|||
static int flowd,type;
|
||||
|
||||
static tvbuff_t * hrnti;
|
||||
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 MAX_NUM_HSDHSCH_MACDFLOW 8
|
||||
static guint8 num_chans_per_flow[MAX_NUM_HSDHSCH_MACDFLOW];
|
||||
#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
|
||||
*/
|
||||
#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;
|
||||
}
|
||||
#endif
|
||||
/** Utility functions used for various comparions/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);
|
||||
}
|
||||
void rrc_free_key(gpointer key _U_){
|
||||
/*Key's should be de allocated elsewhere.*/
|
||||
|
||||
}
|
||||
void rrc_free_value(gpointer value ){
|
||||
g_free(value);
|
||||
}
|
||||
|
||||
/*--- Included file: packet-rrc-fn.c ---*/
|
||||
#line 1 "../../asn1/rrc/packet-rrc-fn.c"
|
||||
|
@ -15043,8 +15088,15 @@ dissect_rrc_ActivationTime(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
|
|||
|
||||
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 849 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
1U, 32U, NULL, FALSE);
|
||||
1U, 32U, &rbid, FALSE);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -15053,8 +15105,13 @@ dissect_rrc_RB_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
|
|||
|
||||
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 855 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
0U, 4095U, NULL, FALSE);
|
||||
0U, 4095U, &activation_frame, FALSE);
|
||||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -15068,9 +15125,31 @@ static const per_sequence_t RB_ActivationTimeInfo_sequence[] = {
|
|||
|
||||
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 828 "../../asn1/rrc/rrc.cnf"
|
||||
fp_info *fpinf;
|
||||
rrc_ciphering_info * c_inf;
|
||||
|
||||
|
||||
fpinf = p_get_proto_data(actx->pinfo->fd, proto_fp);
|
||||
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_RB_ActivationTimeInfo, RB_ActivationTimeInfo_sequence);
|
||||
|
||||
|
||||
/*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;
|
||||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -15196,7 +15275,7 @@ dissect_rrc_PLMN_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
|
|||
|
||||
static int
|
||||
dissect_rrc_NAS_SystemInformationGSM_MAP(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 629 "../../asn1/rrc/rrc.cnf"
|
||||
#line 639 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *nas_sys_info_gsm_map_tvb = NULL;
|
||||
guint32 length;
|
||||
proto_item *item;
|
||||
|
@ -15230,7 +15309,6 @@ dissect_rrc_NAS_SystemInformationGSM_MAP(tvbuff_t *tvb _U_, int offset _U_, asn1
|
|||
rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
|
||||
|
||||
/*Here we try to figure out which HS-DSCH channels are multiplexed*/
|
||||
/*TODO: Should this also be made under r7?*/
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -15240,7 +15318,7 @@ dissect_rrc_NAS_SystemInformationGSM_MAP(tvbuff_t *tvb _U_, int offset _U_, asn1
|
|||
|
||||
static int
|
||||
dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 613 "../../asn1/rrc/rrc.cnf"
|
||||
#line 623 "../../asn1/rrc/rrc.cnf"
|
||||
rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
|
||||
offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index);
|
||||
|
||||
|
@ -15260,7 +15338,7 @@ static const value_string rrc_CN_DomainIdentity_vals[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_CN_DomainIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 610 "../../asn1/rrc/rrc.cnf"
|
||||
#line 620 "../../asn1/rrc/rrc.cnf"
|
||||
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
|
||||
2, &rrc_nas_sys_info_gsm_map_type, FALSE, 0, NULL);
|
||||
|
||||
|
@ -19125,10 +19203,11 @@ dissect_rrc_T_r3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_
|
|||
|
||||
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 721 "../../asn1/rrc/rrc.cnf"
|
||||
#line 770 "../../asn1/rrc/rrc.cnf"
|
||||
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
|
||||
16, 16, FALSE, &hrnti);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -19148,7 +19227,7 @@ dissect_rrc_E_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
|
|||
|
||||
static int
|
||||
dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 617 "../../asn1/rrc/rrc.cnf"
|
||||
#line 627 "../../asn1/rrc/rrc.cnf"
|
||||
rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
|
||||
offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index);
|
||||
|
||||
|
@ -32393,12 +32472,12 @@ dissect_rrc_UL_TransportChannelType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_
|
|||
|
||||
static int
|
||||
dissect_rrc_LogicalChannelIdentity(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 757 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
1U, 15U, NULL, FALSE);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -38302,11 +38381,11 @@ dissect_rrc_RLC_Info_r5(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
|
|||
|
||||
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 712 "../../asn1/rrc/rrc.cnf"
|
||||
#line 761 "../../asn1/rrc/rrc.cnf"
|
||||
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
|
||||
0U, 7U, &flowd, FALSE);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -38350,48 +38429,48 @@ static const per_choice_t DL_TransportChannelType_r5_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_DL_TransportChannelType_r5(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 662 "../../asn1/rrc/rrc.cnf"
|
||||
#line 671 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
gint *flowd_p;
|
||||
gint *cur_val=NULL;
|
||||
guint16 hr=0;
|
||||
|
||||
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_DL_TransportChannelType_r5, DL_TransportChannelType_r5_choice,
|
||||
&type);
|
||||
|
||||
|
||||
|
||||
/*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 ){
|
||||
|
||||
|
||||
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,FALSE);
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
||||
/*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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*Here we try to figure out which HS-DSCH channels are multiplexed*/
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -38406,12 +38485,12 @@ static const per_sequence_t DL_LogicalChannelMapping_r5_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_DL_LogicalChannelMapping_r5(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 701 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
#line 750 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_DL_LogicalChannelMapping_r5, DL_LogicalChannelMapping_r5_sequence);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -41833,9 +41912,50 @@ static const per_choice_t DL_TransportChannelType_r7_choice[] = {
|
|||
|
||||
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_) {
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
#line 710 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
gint *flowd_p;
|
||||
gint *cur_val=NULL;
|
||||
guint16 hr=0;
|
||||
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_DL_TransportChannelType_r7, DL_TransportChannelType_r7_choice,
|
||||
NULL);
|
||||
&type);
|
||||
|
||||
|
||||
/*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 ){
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -41849,8 +41969,8 @@ static const per_sequence_t DL_LogicalChannelMapping_r7_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_DL_LogicalChannelMapping_r7(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 705 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
#line 754 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_DL_LogicalChannelMapping_r7, DL_LogicalChannelMapping_r7_sequence);
|
||||
|
||||
|
@ -51489,7 +51609,7 @@ static const per_sequence_t T_single_GSM_Message_r3_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_T_single_GSM_Message_r3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 510 "../../asn1/rrc/rrc.cnf"
|
||||
#line 520 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *gsm_message_tvb=NULL;
|
||||
guint bits_remaining, whole_octets_remaining;
|
||||
|
||||
|
@ -51499,7 +51619,7 @@ dissect_rrc_T_single_GSM_Message_r3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_
|
|||
|
||||
bits_remaining = 8*tvb_length(tvb) - offset;
|
||||
whole_octets_remaining = bits_remaining / 8;
|
||||
|
||||
|
||||
gsm_message_tvb = tvb_new_octet_aligned(tvb, offset, 8*whole_octets_remaining);
|
||||
|
||||
if (gsm_message_tvb) {
|
||||
|
@ -51515,9 +51635,9 @@ dissect_rrc_T_single_GSM_Message_r3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_
|
|||
|
||||
static int
|
||||
dissect_rrc_GSM_MessageList_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 502 "../../asn1/rrc/rrc.cnf"
|
||||
#line 512 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *gsm_messagelist_tvb=NULL;
|
||||
|
||||
|
||||
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
|
||||
1, 512, FALSE, &gsm_messagelist_tvb);
|
||||
|
||||
|
@ -51775,7 +51895,7 @@ static const per_sequence_t T_single_GSM_Message_r6_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_T_single_GSM_Message_r6(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 525 "../../asn1/rrc/rrc.cnf"
|
||||
#line 535 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *gsm_message_tvb=NULL;
|
||||
guint bits_remaining, whole_octets_remaining;
|
||||
|
||||
|
@ -51785,7 +51905,7 @@ dissect_rrc_T_single_GSM_Message_r6(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_
|
|||
|
||||
bits_remaining = 8*tvb_length(tvb) - offset;
|
||||
whole_octets_remaining = bits_remaining / 8;
|
||||
|
||||
|
||||
gsm_message_tvb = tvb_new_octet_aligned(tvb, offset, 8*whole_octets_remaining);
|
||||
|
||||
if (gsm_message_tvb) {
|
||||
|
@ -73565,7 +73685,7 @@ static const per_choice_t SignallingConnectionRelease_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_SignallingConnectionRelease(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 402 "../../asn1/rrc/rrc.cnf"
|
||||
#line 412 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "SignallingConnectionRelease");
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_SignallingConnectionRelease, SignallingConnectionRelease_choice,
|
||||
|
@ -75204,7 +75324,7 @@ static const per_choice_t TransportChannelReconfiguration_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_TransportChannelReconfiguration(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 422 "../../asn1/rrc/rrc.cnf"
|
||||
#line 432 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "TransportChannelReconfiguration");
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_TransportChannelReconfiguration, TransportChannelReconfiguration_choice,
|
||||
|
@ -75349,7 +75469,7 @@ static const per_sequence_t TransportFormatCombinationControl_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_TransportFormatCombinationControl(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 434 "../../asn1/rrc/rrc.cnf"
|
||||
#line 444 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "TransportFormatCombinationControl");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_TransportFormatCombinationControl, TransportFormatCombinationControl_sequence);
|
||||
|
@ -75715,7 +75835,7 @@ static const per_choice_t UECapabilityEnquiry_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_UECapabilityEnquiry(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 442 "../../asn1/rrc/rrc.cnf"
|
||||
#line 452 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "UECapabilityEnquiry");
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_UECapabilityEnquiry, UECapabilityEnquiry_choice,
|
||||
|
@ -75873,7 +75993,7 @@ static const per_choice_t UECapabilityInformationConfirm_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_UECapabilityInformationConfirm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 450 "../../asn1/rrc/rrc.cnf"
|
||||
#line 460 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "UECapabilityInformationConfirm");
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_UECapabilityInformationConfirm, UECapabilityInformationConfirm_choice,
|
||||
|
@ -76637,7 +76757,7 @@ static const per_choice_t UplinkPhysicalChannelControl_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_UplinkPhysicalChannelControl(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 466 "../../asn1/rrc/rrc.cnf"
|
||||
#line 476 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "UplinkPhysicalChannelControl");
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_UplinkPhysicalChannelControl, UplinkPhysicalChannelControl_choice,
|
||||
|
@ -76980,7 +77100,7 @@ static const per_choice_t URAUpdateConfirm_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_URAUpdateConfirm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 474 "../../asn1/rrc/rrc.cnf"
|
||||
#line 484 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "URAUpdateConfirm");
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_URAUpdateConfirm, URAUpdateConfirm_choice,
|
||||
|
@ -77443,7 +77563,7 @@ dissect_rrc_UE_ConnTimersAndConstants(tvbuff_t *tvb _U_, int offset _U_, asn1_ct
|
|||
|
||||
static int
|
||||
dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo_02(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 621 "../../asn1/rrc/rrc.cnf"
|
||||
#line 631 "../../asn1/rrc/rrc.cnf"
|
||||
rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
|
||||
offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index);
|
||||
|
||||
|
@ -78447,7 +78567,7 @@ static const per_choice_t UTRANMobilityInformation_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_UTRANMobilityInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 482 "../../asn1/rrc/rrc.cnf"
|
||||
#line 492 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "UTRANMobilityInformation");
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_UTRANMobilityInformation, UTRANMobilityInformation_choice,
|
||||
|
@ -79167,7 +79287,7 @@ dissect_rrc_ETWSPrimaryNotificationWithSecurity(tvbuff_t *tvb _U_, int offset _U
|
|||
|
||||
static int
|
||||
dissect_rrc_T_eutra_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 570 "../../asn1/rrc/rrc.cnf"
|
||||
#line 580 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *eutra_message_tvb = NULL;
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
NO_BOUND, NO_BOUND, FALSE, &eutra_message_tvb);
|
||||
|
@ -79398,7 +79518,7 @@ static const per_sequence_t UEInformationRequest_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_UEInformationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 454 "../../asn1/rrc/rrc.cnf"
|
||||
#line 464 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "UEInformationRequest");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_UEInformationRequest, UEInformationRequest_sequence);
|
||||
|
@ -79979,9 +80099,13 @@ static const per_choice_t DL_DCCH_MessageType_choice[] = {
|
|||
|
||||
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 859 "../../asn1/rrc/rrc.cnf"
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_DL_DCCH_MessageType, DL_DCCH_MessageType_choice,
|
||||
NULL);
|
||||
&msg_type);
|
||||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -80005,8 +80129,64 @@ dissect_rrc_DL_DCCH_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
|
|||
|
||||
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_) {
|
||||
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
|
||||
20, 20, FALSE, NULL);
|
||||
#line 773 "../../asn1/rrc/rrc.cnf"
|
||||
fp_info *fpinf;
|
||||
rrc_ciphering_info * c_inf;
|
||||
int i;
|
||||
guint32 * start;
|
||||
|
||||
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
|
||||
20, 20, FALSE, &start_val);
|
||||
|
||||
|
||||
/*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;
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -81654,7 +81834,7 @@ dissect_rrc_HandoverFromUtranFailure_v590ext_IEs(tvbuff_t *tvb _U_, int offset _
|
|||
|
||||
static int
|
||||
dissect_rrc_T_eutra_Message_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 576 "../../asn1/rrc/rrc.cnf"
|
||||
#line 586 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *eutra_message_tvb = NULL;
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
NO_BOUND, NO_BOUND, FALSE, &eutra_message_tvb);
|
||||
|
@ -88137,7 +88317,7 @@ dissect_rrc_UE_RadioAccessCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx
|
|||
|
||||
static int
|
||||
dissect_rrc_GSM_Classmark2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 540 "../../asn1/rrc/rrc.cnf"
|
||||
#line 550 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *parameter_tvb=NULL;
|
||||
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
|
@ -88156,7 +88336,7 @@ tvbuff_t *parameter_tvb=NULL;
|
|||
|
||||
static int
|
||||
dissect_rrc_GSM_Classmark3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 548 "../../asn1/rrc/rrc.cnf"
|
||||
#line 558 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *parameter_tvb=NULL;
|
||||
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
|
@ -89858,11 +90038,21 @@ static const per_sequence_t SecurityModeComplete_sequence[] = {
|
|||
static int
|
||||
dissect_rrc_SecurityModeComplete(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 394 "../../asn1/rrc/rrc.cnf"
|
||||
rrc_ciphering_info * c_inf ;
|
||||
fp_info *fpinf ;
|
||||
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "SecurityModeComplete");
|
||||
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_SecurityModeComplete, SecurityModeComplete_sequence);
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return offset;
|
||||
|
@ -89906,7 +90096,7 @@ static const per_sequence_t SecurityModeFailure_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_SecurityModeFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 398 "../../asn1/rrc/rrc.cnf"
|
||||
#line 408 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "SecurityModeFailure");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_SecurityModeFailure, SecurityModeFailure_sequence);
|
||||
|
@ -89999,7 +90189,7 @@ static const per_sequence_t SignallingConnectionReleaseIndication_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_SignallingConnectionReleaseIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 406 "../../asn1/rrc/rrc.cnf"
|
||||
#line 416 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "SignallingConnectionReleaseIndication");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_SignallingConnectionReleaseIndication, SignallingConnectionReleaseIndication_sequence);
|
||||
|
@ -90097,7 +90287,7 @@ static const per_sequence_t TransportChannelReconfigurationComplete_sequence[] =
|
|||
|
||||
static int
|
||||
dissect_rrc_TransportChannelReconfigurationComplete(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 426 "../../asn1/rrc/rrc.cnf"
|
||||
#line 436 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "TransportChannelReconfigurationComplete");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_TransportChannelReconfigurationComplete, TransportChannelReconfigurationComplete_sequence);
|
||||
|
@ -90146,7 +90336,7 @@ static const per_sequence_t TransportChannelReconfigurationFailure_sequence[] =
|
|||
|
||||
static int
|
||||
dissect_rrc_TransportChannelReconfigurationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 430 "../../asn1/rrc/rrc.cnf"
|
||||
#line 440 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "TransportChannelReconfigurationFailure");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_TransportChannelReconfigurationFailure, TransportChannelReconfigurationFailure_sequence);
|
||||
|
@ -90195,7 +90385,7 @@ static const per_sequence_t TransportFormatCombinationControlFailure_sequence[]
|
|||
|
||||
static int
|
||||
dissect_rrc_TransportFormatCombinationControlFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 438 "../../asn1/rrc/rrc.cnf"
|
||||
#line 448 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "TransportFormatCombinationControlFailure");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_TransportFormatCombinationControlFailure, TransportFormatCombinationControlFailure_sequence);
|
||||
|
@ -90471,7 +90661,7 @@ static const per_sequence_t UECapabilityInformation_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_UECapabilityInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 446 "../../asn1/rrc/rrc.cnf"
|
||||
#line 456 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "UECapabilityInformation");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_UECapabilityInformation, UECapabilityInformation_sequence);
|
||||
|
@ -90608,7 +90798,7 @@ static const per_sequence_t UplinkDirectTransfer_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_UplinkDirectTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 462 "../../asn1/rrc/rrc.cnf"
|
||||
#line 472 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "UplinkDirectTransfer");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_UplinkDirectTransfer, UplinkDirectTransfer_sequence);
|
||||
|
@ -90748,7 +90938,7 @@ static const per_sequence_t UTRANMobilityInformationConfirm_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_UTRANMobilityInformationConfirm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 486 "../../asn1/rrc/rrc.cnf"
|
||||
#line 496 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "UTRANMobilityInformationConfirm");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_UTRANMobilityInformationConfirm, UTRANMobilityInformationConfirm_sequence);
|
||||
|
@ -90797,7 +90987,7 @@ static const per_sequence_t UTRANMobilityInformationFailure_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_UTRANMobilityInformationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 490 "../../asn1/rrc/rrc.cnf"
|
||||
#line 500 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "UTRANMobilityInformationFailure");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_UTRANMobilityInformationFailure, UTRANMobilityInformationFailure_sequence);
|
||||
|
@ -91575,7 +91765,7 @@ static const per_sequence_t UEInformationResponse_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_UEInformationResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 458 "../../asn1/rrc/rrc.cnf"
|
||||
#line 468 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "UEInformationResponse");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_UEInformationResponse, UEInformationResponse_sequence);
|
||||
|
@ -94053,15 +94243,15 @@ static const per_sequence_t SRB_InformationSetupList2_r6_sequence_of[1] = {
|
|||
|
||||
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 715 "../../asn1/rrc/rrc.cnf"
|
||||
|
||||
#line 764 "../../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;
|
||||
|
@ -95444,7 +95634,7 @@ static const per_choice_t URAUpdateConfirm_CCCH_choice[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_URAUpdateConfirm_CCCH(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 478 "../../asn1/rrc/rrc.cnf"
|
||||
#line 488 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "URAUpdateConfirm-CCCH");
|
||||
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_URAUpdateConfirm_CCCH, URAUpdateConfirm_CCCH_choice,
|
||||
|
@ -97154,7 +97344,7 @@ static const per_sequence_t URAUpdate_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_URAUpdate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 470 "../../asn1/rrc/rrc.cnf"
|
||||
#line 480 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "URAUpdate");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_URAUpdate, URAUpdate_sequence);
|
||||
|
@ -98160,7 +98350,7 @@ static const per_sequence_t SystemInformation_FACH_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_SystemInformation_FACH(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 414 "../../asn1/rrc/rrc.cnf"
|
||||
#line 424 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "SystemInformation-FACH");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_SystemInformation_FACH, SystemInformation_FACH_sequence);
|
||||
|
@ -98237,7 +98427,7 @@ static const per_sequence_t SystemInformationChangeIndication_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_SystemInformationChangeIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 418 "../../asn1/rrc/rrc.cnf"
|
||||
#line 428 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "SystemInformationChangeIndication");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_SystemInformationChangeIndication, SystemInformationChangeIndication_sequence);
|
||||
|
@ -98418,7 +98608,7 @@ static const per_sequence_t SystemInformation_BCH_sequence[] = {
|
|||
|
||||
static int
|
||||
dissect_rrc_SystemInformation_BCH(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 410 "../../asn1/rrc/rrc.cnf"
|
||||
#line 420 "../../asn1/rrc/rrc.cnf"
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, "SystemInformation-BCH");
|
||||
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
|
||||
ett_rrc_SystemInformation_BCH, SystemInformation_BCH_sequence);
|
||||
|
@ -110636,7 +110826,7 @@ dissect_rrc_T_supportOfInterRATHOToEUTRATDD(tvbuff_t *tvb _U_, int offset _U_, a
|
|||
|
||||
static int
|
||||
dissect_rrc_T_eutraFeatureGroupIndicators(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 582 "../../asn1/rrc/rrc.cnf"
|
||||
#line 592 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *eutraFeatureGroupIndicators_tvb=NULL;
|
||||
offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
|
||||
4, 4, FALSE, &eutraFeatureGroupIndicators_tvb);
|
||||
|
@ -111864,7 +112054,7 @@ dissect_rrc_UE_RadioAccessCapability_v860ext_IEs(tvbuff_t *tvb _U_, int offset _
|
|||
|
||||
static int
|
||||
dissect_rrc_T_ue_EUTRA_Capability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 564 "../../asn1/rrc/rrc.cnf"
|
||||
#line 574 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *ue_eutra_cap_tvb = NULL;
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
NO_BOUND, NO_BOUND, FALSE, &ue_eutra_cap_tvb);
|
||||
|
@ -121099,7 +121289,7 @@ dissect_rrc_ExtSIBTypeInfoSchedulingInfo_List2(tvbuff_t *tvb _U_, int offset _U_
|
|||
|
||||
static int
|
||||
dissect_rrc_HNBName(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 603 "../../asn1/rrc/rrc.cnf"
|
||||
#line 613 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *hnbname_tvb = NULL;
|
||||
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, -1,
|
||||
|
@ -121378,7 +121568,7 @@ dissect_rrc_SIB_ReferenceList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
|
|||
|
||||
static int
|
||||
dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo_03(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 625 "../../asn1/rrc/rrc.cnf"
|
||||
#line 635 "../../asn1/rrc/rrc.cnf"
|
||||
rrc_nas_sys_info_gsm_map_type = RRC_NAS_SYS_INFO_CN_COMMON;
|
||||
offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index);
|
||||
|
||||
|
@ -125491,7 +125681,7 @@ dissect_rrc_UE_HistoryInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
|
|||
|
||||
static int
|
||||
dissect_rrc_T_interRATHandoverInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 556 "../../asn1/rrc/rrc.cnf"
|
||||
#line 566 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *parameter_tvb=NULL;
|
||||
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
|
@ -130160,7 +130350,7 @@ dissect_rrc_ToTargetRNC_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
|
|||
|
||||
static int
|
||||
dissect_rrc_T_dL_DCCHmessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 494 "../../asn1/rrc/rrc.cnf"
|
||||
#line 504 "../../asn1/rrc/rrc.cnf"
|
||||
tvbuff_t *dl_dcch_message_tvb=NULL;
|
||||
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
|
@ -130912,7 +131102,7 @@ static int dissect_MeasurementReport_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _
|
|||
|
||||
|
||||
/*--- End of included file: packet-rrc-fn.c ---*/
|
||||
#line 138 "../../asn1/rrc/packet-rrc-template.c"
|
||||
#line 183 "../../asn1/rrc/packet-rrc-template.c"
|
||||
|
||||
#include "packet-rrc.h"
|
||||
|
||||
|
@ -130962,30 +131152,30 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
}
|
||||
}
|
||||
gint rrc_key_cmp(gconstpointer a_ptr, gconstpointer b_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);
|
||||
}
|
||||
void rrc_free_key(gpointer key _U_){
|
||||
/*Key's should be de allocated elsewhere.*/
|
||||
|
||||
}
|
||||
void rrc_free_value(gpointer value ){
|
||||
g_free(value);
|
||||
}
|
||||
|
||||
|
||||
void rrc_init(void){
|
||||
|
||||
/*Cleanup*/
|
||||
if(hsdsch_muxed_flows){
|
||||
g_tree_destroy(hsdsch_muxed_flows);
|
||||
}
|
||||
/*Initialize*/
|
||||
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,
|
||||
NULL, /* data pointer, optional */
|
||||
NULL,
|
||||
rrc_free_value);
|
||||
|
||||
}
|
||||
/*--- proto_register_rrc -------------------------------------------*/
|
||||
void proto_register_rrc(void) {
|
||||
|
@ -166486,7 +166676,7 @@ void proto_register_rrc(void) {
|
|||
NULL, HFILL }},
|
||||
|
||||
/*--- End of included file: packet-rrc-hfarr.c ---*/
|
||||
#line 219 "../../asn1/rrc/packet-rrc-template.c"
|
||||
#line 264 "../../asn1/rrc/packet-rrc-template.c"
|
||||
{ &hf_test,
|
||||
{ "RAB Test", "rrc.RAB.test",
|
||||
FT_UINT8, BASE_DEC, NULL, 0,
|
||||
|
@ -172126,7 +172316,7 @@ void proto_register_rrc(void) {
|
|||
&ett_rrc_UL_RFC3095_Context,
|
||||
|
||||
/*--- End of included file: packet-rrc-ettarr.c ---*/
|
||||
#line 245 "../../asn1/rrc/packet-rrc-template.c"
|
||||
#line 290 "../../asn1/rrc/packet-rrc-template.c"
|
||||
&ett_rrc_eutraFeatureGroupIndicators,
|
||||
&ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo,
|
||||
};
|
||||
|
@ -172206,7 +172396,7 @@ void proto_register_rrc(void) {
|
|||
|
||||
|
||||
/*--- End of included file: packet-rrc-dis-reg.c ---*/
|
||||
#line 259 "../../asn1/rrc/packet-rrc-template.c"
|
||||
#line 304 "../../asn1/rrc/packet-rrc-template.c"
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -70,6 +70,20 @@ typedef struct rrc_info
|
|||
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*/
|
||||
|
||||
} rrc_ciphering_info;
|
||||
|
||||
extern GTree * hsdsch_muxed_flows;
|
||||
extern GTree * rrc_ciph_inf;
|
||||
|
||||
#endif /* PACKET_RRC_H */
|
||||
|
|
|
@ -32,8 +32,9 @@
|
|||
#include <epan/prefs.h>
|
||||
#include <epan/conversation.h>
|
||||
#include <glib.h>
|
||||
#include <wsutil/crc7.h>
|
||||
#include <wsutil/crc16-plain.h>
|
||||
#include <wsutil/crc7.h> /* For FP data header and control frame CRC. */
|
||||
#include <wsutil/crc16-plain.h> /* For FP Payload CRC. */
|
||||
#include <wsutil/crc11.h> /* For FP EDCH header CRC. */
|
||||
|
||||
#include "packet-umts_mac.h"
|
||||
#include "packet-rlc.h"
|
||||
|
@ -47,7 +48,6 @@
|
|||
*
|
||||
* TODO:
|
||||
* - IUR interface-specific formats
|
||||
* - verify header CRCs
|
||||
* - do CRC verification before further parsing
|
||||
* - Set the logical channel properly for non multiplexed, channels
|
||||
* for channels that doesn't have the C/T flag! This should be based
|
||||
|
@ -226,6 +226,7 @@ static proto_tree *top_level_tree = NULL;
|
|||
static gboolean preferences_call_mac_dissectors = TRUE;
|
||||
static gboolean preferences_show_release_info = TRUE;
|
||||
static gboolean preferences_payload_checksum = TRUE;
|
||||
static gboolean preferences_header_checksum = TRUE;
|
||||
|
||||
/* E-DCH (T1) channel header information */
|
||||
struct edch_t1_subframe_info
|
||||
|
@ -536,7 +537,7 @@ static void dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_
|
|||
static void dissect_e_dch_t2_or_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||
int offset, struct fp_info *p_fp_info,
|
||||
int number_of_subframes,
|
||||
gboolean is_common);
|
||||
gboolean is_common, guint16 header_crc, proto_item * header_crc_pi);
|
||||
|
||||
/* Main dissection function */
|
||||
static void dissect_fp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
||||
|
@ -566,6 +567,64 @@ get_tb_count(struct fp_info *p_fp_info)
|
|||
return tb_count;
|
||||
}
|
||||
|
||||
static gboolean verify_control_frame_crc(tvbuff_t * tvb, packet_info * pinfo, proto_item * pi, guint16 frame_crc)
|
||||
{
|
||||
guint8 crc = 0;
|
||||
guint8 * data = NULL;
|
||||
/* Get data. */
|
||||
data = tvb_get_ephemeral_string(tvb, 0, tvb_length(tvb));
|
||||
/* Include only FT flag bit in CRC calculation. */
|
||||
data[0] = data[0] & 1;
|
||||
/* Calculate crc7 sum. */
|
||||
crc = crc7update(0, data, tvb_length(tvb));
|
||||
crc = crc7finalize(crc); /* finalize crc */
|
||||
if (frame_crc == crc) {
|
||||
proto_item_append_text(pi, " [correct]");
|
||||
return TRUE;
|
||||
} else {
|
||||
proto_item_append_text(pi, " [incorrect, should be 0x%x]", crc);
|
||||
expert_add_info_format(pinfo, pi, PI_CHECKSUM, PI_WARN, "Bad header checksum.");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
static gboolean verify_header_crc(tvbuff_t * tvb, packet_info * pinfo, proto_item * pi, guint16 header_crc, guint header_length)
|
||||
{
|
||||
guint8 crc = 0;
|
||||
guint8 * data = NULL;
|
||||
/* Get data of header with first byte removed. */
|
||||
data = tvb_get_ephemeral_string(tvb, 1, header_length-1);
|
||||
/* Calculate crc7 sum. */
|
||||
crc = crc7update(0, data, header_length-1);
|
||||
crc = crc7finalize(crc); /* finalize crc */
|
||||
if (header_crc == crc) {
|
||||
proto_item_append_text(pi, " [correct]");
|
||||
return TRUE;
|
||||
} else {
|
||||
proto_item_append_text(pi, " [incorrect, should be 0x%x]", crc);
|
||||
expert_add_info_format(pinfo, pi, PI_CHECKSUM, PI_WARN, "Bad header checksum.");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
static gboolean verify_header_crc_edch(tvbuff_t * tvb, packet_info * pinfo, proto_item * pi, guint16 header_crc, guint header_length)
|
||||
{
|
||||
guint16 crc = 0;
|
||||
guint8 * data = NULL;
|
||||
/* First create new subset of header with first byte removed. */
|
||||
tvbuff_t * headtvb = tvb_new_subset(tvb, 1, header_length-1, header_length-1);
|
||||
/* Get data of header with first byte removed. */
|
||||
data = tvb_get_ephemeral_string(headtvb, 0, header_length-1);
|
||||
/* Remove first 4 bits of the remaining data which are Header CRC cont. */
|
||||
data[0] = data[0] & 0x0f;
|
||||
crc = crc11_307_noreflect_noxor(data, header_length-1);
|
||||
if (header_crc == crc) {
|
||||
proto_item_append_text(pi, " [correct]");
|
||||
return TRUE;
|
||||
} else {
|
||||
proto_item_append_text(pi, " [incorrect, should be 0x%x]", crc);
|
||||
expert_add_info_format(pinfo, pi, PI_CHECKSUM, PI_WARN, "Bad header checksum.");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Dissect the TBs of a UL data frame*/
|
||||
static int
|
||||
|
@ -633,7 +692,7 @@ dissect_tb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
chan+1, n+1, p_fp_info->chan_tf_size[chan]);
|
||||
}
|
||||
|
||||
if (preferences_call_mac_dissectors && !rlc_is_ciphered(pinfo) && data_handle &&
|
||||
if (preferences_call_mac_dissectors /*&& !rlc_is_ciphered(pinfo)*/ && data_handle &&
|
||||
(p_fp_info->chan_tf_size[chan] > 0)) {
|
||||
tvbuff_t *next_tvb;
|
||||
proto_item *item;
|
||||
|
@ -642,12 +701,12 @@ dissect_tb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
|
||||
|
||||
if( p_fp_info->channel == CHANNEL_RACH_FDD){ /*In RACH we don't have any QE field, hence go back 8 bits.*/
|
||||
crci_bit = tvb_get_bits8(tvb,crci_bit_offset+(n/8)-8,1);
|
||||
item = proto_tree_add_item(data_tree, hf_fp_crci[n%8], tvb, (crci_bit_offset/8)+(n/8)-8, 1, ENC_BIG_ENDIAN);
|
||||
crci_bit = tvb_get_bits8(tvb,crci_bit_offset+n-8,1);
|
||||
item = proto_tree_add_item(data_tree, hf_fp_crci[n%8], tvb, (crci_bit_offset+n-8)/8, 1, ENC_BIG_ENDIAN);
|
||||
PROTO_ITEM_SET_GENERATED(item);
|
||||
}else{
|
||||
crci_bit = tvb_get_bits8(tvb,crci_bit_offset+(n/8),1);
|
||||
item = proto_tree_add_item(data_tree, hf_fp_crci[n%8], tvb, (crci_bit_offset/8)+(n/8), 1, ENC_BIG_ENDIAN);
|
||||
crci_bit = tvb_get_bits8(tvb,crci_bit_offset+n,1);
|
||||
item = proto_tree_add_item(data_tree, hf_fp_crci[n%8], tvb, (crci_bit_offset+n)/8, 1, ENC_BIG_ENDIAN);
|
||||
PROTO_ITEM_SET_GENERATED(item);
|
||||
}
|
||||
}
|
||||
|
@ -812,7 +871,7 @@ dissect_macd_pdu_data_type_2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
|
||||
}
|
||||
|
||||
if (preferences_call_mac_dissectors && !rlc_is_ciphered(pinfo)) {
|
||||
if (preferences_call_mac_dissectors /*&& !rlc_is_ciphered(pinfo)*/) {
|
||||
|
||||
tvbuff_t *next_tvb = tvb_new_subset(tvb, offset, length, -1);
|
||||
|
||||
|
@ -917,13 +976,14 @@ dissect_spare_extension_and_crc(tvbuff_t *tvb, packet_info *pinfo,
|
|||
ENC_BIG_ENDIAN);
|
||||
if (preferences_payload_checksum) {
|
||||
guint16 calc_crc, read_crc;
|
||||
calc_crc = crc16_8005_noreflect_noxor(tvb_get_string(tvb, header_length, offset-header_length), offset-header_length);
|
||||
guint8 * data = tvb_get_ephemeral_string(tvb, header_length, offset-header_length);
|
||||
calc_crc = crc16_8005_noreflect_noxor(data, offset-header_length);
|
||||
read_crc = tvb_get_bits16(tvb, offset*8, 16, FALSE);
|
||||
|
||||
if (calc_crc == read_crc) {
|
||||
proto_item_append_text(pi, " [correct]");
|
||||
} else {
|
||||
proto_item_append_text(pi, " [incorrect, should be %x]", calc_crc);
|
||||
proto_item_append_text(pi, " [incorrect, should be 0x%x]", calc_crc);
|
||||
expert_add_info_format(pinfo, pi, PI_CHECKSUM, PI_WARN, "Bad payload checksum.");
|
||||
}
|
||||
}
|
||||
|
@ -1363,9 +1423,13 @@ dissect_rach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
int offset, struct fp_info *p_fp_info)
|
||||
{
|
||||
gboolean is_control_frame;
|
||||
guint16 header_crc = 0;
|
||||
proto_item * header_crc_pi = NULL;
|
||||
guint header_length = 0;
|
||||
|
||||
/* Header CRC */
|
||||
proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
header_crc = tvb_get_bits8(tvb, 0, 7);
|
||||
header_crc_pi = proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
/* Frame Type */
|
||||
is_control_frame = tvb_get_guint8(tvb, offset) & 0x01;
|
||||
|
@ -1376,6 +1440,11 @@ dissect_rach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
|
||||
if (is_control_frame) {
|
||||
dissect_common_control(tvb, pinfo, tree, offset, p_fp_info);
|
||||
/* For control frame the header CRC is actually frame CRC covering all
|
||||
* bytes except the first */
|
||||
if (preferences_header_checksum) {
|
||||
verify_control_frame_crc(tvb, pinfo, header_crc_pi, header_crc);
|
||||
}
|
||||
}
|
||||
else {
|
||||
guint8 cfn;
|
||||
|
@ -1385,7 +1454,6 @@ dissect_rach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
proto_item *received_sync_ul_timing_deviation_ti = NULL;
|
||||
proto_item *rx_timing_deviation_ti = NULL;
|
||||
guint16 rx_timing_deviation = 0;
|
||||
guint header_length = 0;
|
||||
|
||||
/* DATA */
|
||||
|
||||
|
@ -1594,7 +1662,9 @@ dissect_rach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
offset += 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (preferences_header_checksum) {
|
||||
verify_header_crc(tvb, pinfo, header_crc_pi, header_crc, header_length);
|
||||
}
|
||||
/* Spare Extension and Payload CRC */
|
||||
dissect_spare_extension_and_crc(tvb, pinfo, tree, 1, offset,header_length);
|
||||
}
|
||||
|
@ -1608,9 +1678,13 @@ dissect_fach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
int offset, struct fp_info *p_fp_info)
|
||||
{
|
||||
gboolean is_control_frame;
|
||||
guint16 header_crc = 0;
|
||||
proto_item * header_crc_pi = NULL;
|
||||
guint header_length = 0;
|
||||
|
||||
/* Header CRC */
|
||||
proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
header_crc = tvb_get_bits8(tvb, 0, 7);
|
||||
header_crc_pi = proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
/* Frame Type */
|
||||
is_control_frame = tvb_get_guint8(tvb, offset) & 0x01;
|
||||
|
@ -1621,11 +1695,14 @@ dissect_fach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
|
||||
if (is_control_frame) {
|
||||
dissect_common_control(tvb, pinfo, tree, offset, p_fp_info);
|
||||
/* For control frame the header CRC is actually frame CRC covering all
|
||||
* bytes except the first */
|
||||
if (preferences_header_checksum) {
|
||||
verify_control_frame_crc(tvb, pinfo, header_crc_pi, header_crc);
|
||||
}
|
||||
}
|
||||
else {
|
||||
guint8 cfn;
|
||||
guint header_length = 0;
|
||||
|
||||
/* DATA */
|
||||
|
||||
/* CFN */
|
||||
|
@ -1661,7 +1738,9 @@ dissect_fach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
offset += 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (preferences_header_checksum) {
|
||||
verify_header_crc(tvb, pinfo, header_crc_pi, header_crc, header_length);
|
||||
}
|
||||
/* Spare Extension and Payload CRC */
|
||||
dissect_spare_extension_and_crc(tvb, pinfo, tree, 1, offset, header_length);
|
||||
}
|
||||
|
@ -1841,9 +1920,12 @@ dissect_pch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
gboolean is_control_frame;
|
||||
guint16 pch_cfn;
|
||||
gboolean paging_indication;
|
||||
guint16 header_crc = 0;
|
||||
proto_item * header_crc_pi = NULL;
|
||||
|
||||
/* Header CRC */
|
||||
proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
header_crc = tvb_get_bits8(tvb, 0, 7);
|
||||
header_crc_pi = proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
/* Frame Type */
|
||||
is_control_frame = tvb_get_guint8(tvb, offset) & 0x01;
|
||||
|
@ -1854,6 +1936,11 @@ dissect_pch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
|
||||
if (is_control_frame) {
|
||||
dissect_common_control(tvb, pinfo, tree, offset, p_fp_info);
|
||||
/* For control frame the header CRC is actually frame CRC covering all
|
||||
* bytes except the first */
|
||||
if (preferences_header_checksum) {
|
||||
verify_control_frame_crc(tvb, pinfo, header_crc_pi, header_crc);
|
||||
}
|
||||
}
|
||||
else {
|
||||
guint header_length = 0;
|
||||
|
@ -1889,6 +1976,9 @@ dissect_pch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
/* TB data */
|
||||
offset = dissect_tb_data(tvb, pinfo, tree, offset, p_fp_info, &mac_fdd_pch_handle);
|
||||
|
||||
if (preferences_header_checksum) {
|
||||
verify_header_crc(tvb, pinfo, header_crc_pi, header_crc, header_length);
|
||||
}
|
||||
/* Spare Extension and Payload CRC */
|
||||
dissect_spare_extension_and_crc(tvb, pinfo, tree, 1, offset, header_length);
|
||||
}
|
||||
|
@ -2354,9 +2444,13 @@ dissect_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
gboolean is_control_frame;
|
||||
guint8 cfn;
|
||||
guint header_length = 0;
|
||||
guint16 header_crc = 0;
|
||||
proto_item * header_crc_pi = NULL;
|
||||
|
||||
/* Header CRC */
|
||||
proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
header_crc = tvb_get_bits8(tvb, 0, 7);
|
||||
header_crc_pi = proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
/* Frame Type */
|
||||
is_control_frame = tvb_get_guint8(tvb, offset) & 0x01;
|
||||
proto_tree_add_item(tree, hf_fp_ft, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
@ -2370,6 +2464,11 @@ dissect_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
if (is_control_frame) {
|
||||
/* DCH control frame */
|
||||
dissect_dch_control_frame(tree, pinfo, tvb, offset, p_fp_info);
|
||||
/* For control frame the header CRC is actually frame CRC covering all
|
||||
* bytes except the first */
|
||||
if (preferences_header_checksum) {
|
||||
verify_control_frame_crc(tvb, pinfo, header_crc_pi, header_crc);
|
||||
}
|
||||
}else{
|
||||
/************************/
|
||||
/* DCH data here */
|
||||
|
@ -2400,15 +2499,15 @@ dissect_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
if (p_fp_info->is_uplink) {
|
||||
offset = dissect_crci_bits(tvb, pinfo, tree, p_fp_info, offset);
|
||||
}
|
||||
|
||||
if (preferences_header_checksum) {
|
||||
verify_header_crc(tvb, pinfo, header_crc_pi, header_crc, header_length);
|
||||
}
|
||||
/* Spare extension and payload CRC (optional) */
|
||||
dissect_spare_extension_and_crc(tvb, pinfo, tree,
|
||||
p_fp_info->dch_crc_present, offset, header_length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* Dissect an E-DCH channel */
|
||||
static void
|
||||
|
@ -2421,35 +2520,61 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
guint8 cfn;
|
||||
int n;
|
||||
struct edch_t1_subframe_info subframes[16];
|
||||
guint16 header_crc = 0;
|
||||
proto_item * header_crc_pi = NULL;
|
||||
guint header_length = 0;
|
||||
|
||||
if (p_fp_info->edch_type == 1) {
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " (T2)");
|
||||
}
|
||||
|
||||
/* Header CRC */
|
||||
proto_tree_add_item(tree, hf_fp_edch_header_crc, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
/* the bitmask doesn't properly handle this delicate case, do manually */
|
||||
header_crc = (tvb_get_bits8(tvb, offset*8, 7) << 4) + tvb_get_bits8(tvb, offset*8+8, 4);
|
||||
|
||||
/* Frame Type */
|
||||
is_control_frame = tvb_get_guint8(tvb, offset) & 0x01;
|
||||
proto_tree_add_item(tree, hf_fp_ft, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
|
||||
col_append_str(pinfo->cinfo, COL_INFO, is_control_frame ? " [Control] " : " [Data] ");
|
||||
|
||||
if (is_control_frame) {
|
||||
/* DCH control frame */
|
||||
|
||||
/* For control frame the header CRC is actually frame CRC covering all
|
||||
* bytes except the first */
|
||||
header_crc = tvb_get_bits8(tvb, 0, 7);
|
||||
header_crc_pi = proto_tree_add_item(tree, hf_fp_header_crc, tvb, 0, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tree, hf_fp_ft, tvb, 0, 1, ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
if (preferences_header_checksum) {
|
||||
verify_control_frame_crc(tvb, pinfo, header_crc_pi, header_crc);
|
||||
}
|
||||
dissect_dch_control_frame(tree, pinfo, tvb, offset, p_fp_info);
|
||||
}
|
||||
else {
|
||||
/********************************/
|
||||
/* E-DCH data here */
|
||||
|
||||
guint bit_offset = 0;
|
||||
guint total_pdus = 0;
|
||||
guint total_bits = 0;
|
||||
gboolean dissected = FALSE;
|
||||
guint header_length = 0;
|
||||
|
||||
header_crc_pi = proto_tree_add_uint_format(tree, hf_fp_edch_header_crc, tvb,
|
||||
offset, 2, header_crc,
|
||||
"%u%u%u%u%u%u%u.%u%u%u%u.... = E-DCH Header CRC: 0x%x",
|
||||
(header_crc >> 10) & 1,
|
||||
(header_crc >> 9) & 1,
|
||||
(header_crc >> 8) & 1,
|
||||
(header_crc >> 7) & 1,
|
||||
(header_crc >> 6) & 1,
|
||||
(header_crc >> 5) & 1,
|
||||
(header_crc >> 4) & 1,
|
||||
(header_crc >> 3) & 1,
|
||||
(header_crc >> 2) & 1,
|
||||
(header_crc >> 1) & 1,
|
||||
(header_crc >> 0) & 1, header_crc);
|
||||
proto_tree_add_item(tree, hf_fp_ft, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
/* FSN */
|
||||
proto_tree_add_item(tree, hf_fp_edch_fsn, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
|
@ -2480,7 +2605,7 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
/* Remainder of T2 or common data frames differ here... */
|
||||
if (p_fp_info->edch_type == 1) {
|
||||
dissect_e_dch_t2_or_common_channel_info(tvb, pinfo, tree, offset, p_fp_info,
|
||||
number_of_subframes, is_common);
|
||||
number_of_subframes, is_common, header_crc, header_crc_pi);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2647,7 +2772,7 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
}
|
||||
for (macd_idx = 0; macd_idx < subframes[n].number_of_mac_d_pdus[i]; macd_idx++) {
|
||||
|
||||
if (preferences_call_mac_dissectors && !rlc_is_ciphered(pinfo)) {
|
||||
if (preferences_call_mac_dissectors /*&& !rlc_is_ciphered(pinfo)*/) {
|
||||
tvbuff_t *next_tvb;
|
||||
pinfo->fd->subnum = macd_idx; /* set subframe number to current TB */
|
||||
/* create new TVB and pass further on */
|
||||
|
@ -2667,7 +2792,14 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
/*g_warning("========Setting RBID:%d for lchid:%d",subframes[n].ddi[i],lchid);*/
|
||||
/* rlcinf->mode[0] = RLC_AM;*/
|
||||
rlcinf->li_size[macd_idx] = RLC_LI_7BITS;
|
||||
rlcinf->ciphered[macd_idx] = FALSE;
|
||||
|
||||
/*If this entry exists, SECRUITY_MODE is completed*/
|
||||
if( rrc_ciph_inf && g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)p_fp_info->com_context_id)) ){
|
||||
rlcinf->ciphered[macd_idx] = TRUE;
|
||||
}else{
|
||||
rlcinf->ciphered[macd_idx] = FALSE;
|
||||
}
|
||||
|
||||
rlcinf->deciphered[macd_idx] = FALSE;
|
||||
p_fp_info->cur_tb = macd_idx; /*Set the transport block index (NOTE: This and not subnum is used in MAC dissector!)*/
|
||||
|
||||
|
@ -2718,7 +2850,12 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
" CFN = %03u (%u bits in %u pdus in %u subframes)",
|
||||
cfn, total_bits, total_pdus, number_of_subframes);
|
||||
}
|
||||
|
||||
/* Add data summary to info column */
|
||||
/*col_append_fstr(pinfo->cinfo, COL_INFO, " (%u bytes in %u SDUs in %u MAC-is PDUs in %u subframes)",
|
||||
total_bytes, macis_sdus_found, macis_pdus, number_of_subframes);*/
|
||||
if (preferences_header_checksum) {
|
||||
verify_header_crc_edch(tvb, pinfo, header_crc_pi, header_crc, header_length);
|
||||
}
|
||||
/* Spare extension and payload CRC (optional) */
|
||||
dissect_spare_extension_and_crc(tvb, pinfo, tree,
|
||||
p_fp_info->dch_crc_present, offset, header_length);
|
||||
|
@ -2729,14 +2866,13 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
static void
|
||||
dissect_e_dch_t2_or_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||
int offset, struct fp_info *p_fp_info,
|
||||
int number_of_subframes, gboolean is_common)
|
||||
int number_of_subframes, gboolean is_common, guint16 header_crc, proto_item * header_crc_pi)
|
||||
{
|
||||
int n;
|
||||
int pdu_no;
|
||||
guint64 total_macis_sdus;
|
||||
guint16 macis_sdus_found = 0;
|
||||
guint16 macis_pdus = 0;
|
||||
/*guint32 total_bytes = 0;*/
|
||||
gboolean F = TRUE; /* We want to continue loop if get E-RNTI indication... */
|
||||
gint bit_offset;
|
||||
proto_item *subframe_macis_descriptors_ti = NULL;
|
||||
|
@ -2913,11 +3049,9 @@ dissect_e_dch_t2_or_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Add data summary to info column */
|
||||
/*col_append_fstr(pinfo->cinfo, COL_INFO, " (%u bytes in %u SDUs in %u MAC-is PDUs in %u subframes)",
|
||||
total_bytes, macis_sdus_found, macis_pdus, number_of_subframes);*/
|
||||
|
||||
if (preferences_header_checksum) {
|
||||
verify_header_crc_edch(tvb, pinfo, header_crc_pi, header_crc, header_length);
|
||||
}
|
||||
/* Spare extension and payload CRC (optional) */
|
||||
dissect_spare_extension_and_crc(tvb, pinfo, tree,
|
||||
p_fp_info->dch_crc_present, offset, header_length);
|
||||
|
@ -2935,9 +3069,12 @@ dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
{
|
||||
gboolean is_control_frame;
|
||||
guint header_length = 0;
|
||||
guint16 header_crc = 0;
|
||||
proto_item * header_crc_pi = NULL;
|
||||
|
||||
/* Header CRC */
|
||||
proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
header_crc = tvb_get_bits8(tvb, 0, 7);
|
||||
header_crc_pi = proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
/* Frame Type */
|
||||
is_control_frame = tvb_get_guint8(tvb, offset) & 0x01;
|
||||
|
@ -2948,6 +3085,11 @@ dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
|
||||
if (is_control_frame) {
|
||||
dissect_common_control(tvb, pinfo, tree, offset, p_fp_info);
|
||||
/* For control frame the header CRC is actually frame CRC covering all
|
||||
* bytes except the first */
|
||||
if (preferences_header_checksum) {
|
||||
verify_control_frame_crc(tvb, pinfo, header_crc_pi, header_crc);
|
||||
}
|
||||
}
|
||||
else {
|
||||
guint8 number_of_pdus;
|
||||
|
@ -3085,7 +3227,9 @@ dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
offset += 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (preferences_header_checksum) {
|
||||
verify_header_crc(tvb, pinfo, header_crc_pi, header_crc, header_length);
|
||||
}
|
||||
/* Spare Extension and Payload CRC */
|
||||
dissect_spare_extension_and_crc(tvb, pinfo, tree, 1, offset, header_length);
|
||||
}
|
||||
|
@ -3102,9 +3246,13 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
int offset, struct fp_info *p_fp_info)
|
||||
{
|
||||
gboolean is_control_frame;
|
||||
guint16 header_crc = 0;
|
||||
proto_item * header_crc_pi = NULL;
|
||||
guint16 header_length = 0;
|
||||
|
||||
/* Header CRC */
|
||||
proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
header_crc = tvb_get_bits8(tvb, 0, 7);
|
||||
header_crc_pi = proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
/* Frame Type */
|
||||
is_control_frame = tvb_get_guint8(tvb, offset) & 0x01;
|
||||
|
@ -3115,13 +3263,17 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
|
||||
if (is_control_frame) {
|
||||
dissect_common_control(tvb, pinfo, tree, offset, p_fp_info);
|
||||
/* For control frame the header CRC is actually frame CRC covering all
|
||||
* bytes except the first */
|
||||
if (preferences_header_checksum) {
|
||||
verify_control_frame_crc(tvb, pinfo, header_crc_pi, header_crc);
|
||||
}
|
||||
}
|
||||
else {
|
||||
guint8 number_of_pdu_blocks;
|
||||
gboolean drt_present = FALSE;
|
||||
gboolean fach_present = FALSE;
|
||||
guint16 user_buffer_size;
|
||||
guint16 header_length = 0;
|
||||
int n;
|
||||
guint j;
|
||||
|
||||
|
@ -3284,13 +3436,22 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
/*Figure out RLC_MODE based on MACd-flow-ID, basically MACd-flow-ID = 0 then its SRB0 == UM else AM*/
|
||||
rlcinf->mode[j] = lchId_rlc_map[lchid[n]+1];/*hsdsch_macdflow_id_rlc_map[p_fp_info->hsdsch_macflowd_id];*/
|
||||
|
||||
macinf->ctmux[n] = FALSE;
|
||||
/*FIXMED: We should also configure stuff like encypriont here, basically all the stuff RLC needs*/
|
||||
macinf->ctmux[n] = FALSE;
|
||||
|
||||
rlcinf->li_size[j] = RLC_LI_7BITS;
|
||||
rlcinf->ciphered[j] = FALSE;
|
||||
|
||||
/** Configure ciphering **/
|
||||
/*If this entry exists, SECRUITY_MODE is completed*/
|
||||
if( rrc_ciph_inf && g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)p_fp_info->com_context_id)) ){
|
||||
rlcinf->ciphered[j] = TRUE;
|
||||
}else{
|
||||
rlcinf->ciphered[j] = FALSE;
|
||||
}
|
||||
|
||||
rlcinf->deciphered[j] = FALSE;
|
||||
rlcinf->rbid[j] = (guint8)lchid[n]+1;
|
||||
rlcinf->urnti[j] = p_fp_info->com_context_id; /*We need to fake urnti*/
|
||||
|
||||
rlcinf->urnti[j] = p_fp_info->com_context_id; /*Set URNIT to comuncation context id*/
|
||||
}
|
||||
|
||||
/* Add PDU block header subtree */
|
||||
|
@ -3298,7 +3459,9 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
(guint16)pdu_length[n],
|
||||
(guint16)no_of_pdus[n],p_fp_info);
|
||||
}
|
||||
|
||||
if (preferences_header_checksum) {
|
||||
verify_header_crc(tvb, pinfo, header_crc_pi, header_crc, header_length);
|
||||
}
|
||||
/* Spare Extension and Payload CRC */
|
||||
dissect_spare_extension_and_crc(tvb, pinfo, tree, 1, offset, header_length);
|
||||
}
|
||||
|
@ -3320,10 +3483,14 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
static
|
||||
void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||
int offset, struct fp_info *p_fp_info){
|
||||
gboolean is_control_frame;
|
||||
gboolean is_control_frame;
|
||||
guint16 header_crc = 0;
|
||||
proto_item * header_crc_pi = NULL;
|
||||
guint header_length = 0;
|
||||
|
||||
/* Header CRC */
|
||||
proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
header_crc = tvb_get_bits8(tvb, 0, 7);
|
||||
header_crc_pi = proto_tree_add_item(tree, hf_fp_header_crc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
/* Frame Type */
|
||||
is_control_frame = tvb_get_guint8(tvb, offset) & 0x01;
|
||||
|
@ -3334,6 +3501,11 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto
|
|||
|
||||
if (is_control_frame) {
|
||||
dissect_common_control(tvb, pinfo, tree, offset, p_fp_info);
|
||||
/* For control frame the header CRC is actually frame CRC covering all
|
||||
* bytes except the first */
|
||||
if (preferences_header_checksum) {
|
||||
verify_control_frame_crc(tvb, pinfo, header_crc_pi, header_crc);
|
||||
}
|
||||
}
|
||||
else {
|
||||
guint8 number_of_pdu_blocks;
|
||||
|
@ -3347,7 +3519,6 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto
|
|||
guint64 lchid[MAX_PDU_BLOCKS];
|
||||
guint64 pdu_length[MAX_PDU_BLOCKS];
|
||||
guint64 no_of_pdus[MAX_PDU_BLOCKS];
|
||||
guint header_length = 0;
|
||||
guint8 newieflags = 0;
|
||||
|
||||
umts_mac_info *macinf;
|
||||
|
@ -3468,10 +3639,10 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto
|
|||
offset - block_header_start_offset);
|
||||
}
|
||||
}
|
||||
|
||||
if (header_length == 0) {
|
||||
header_length = offset;
|
||||
}
|
||||
|
||||
/**********************************************/
|
||||
/* Optional fields indicated by earlier flags */
|
||||
if (drt_present) {
|
||||
|
@ -3512,6 +3683,11 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto
|
|||
macinf->lchid[j] = (guint8)lchid[n]+1; /*Add 1 since it is zero indexed? */
|
||||
macinf->macdflow_id[j] = p_fp_info->hsdsch_macflowd_id;
|
||||
macinf->ctmux[j] = FALSE;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rlcinf->li_size[j] = RLC_LI_7BITS;
|
||||
/*rlcinf->ciphered[j] = FALSE;*/
|
||||
rlcinf->deciphered[j] = FALSE;
|
||||
|
@ -3521,6 +3697,9 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto
|
|||
next_tvb = tvb_new_subset(tvb, offset, (gint)pdu_length[n], (gint)pdu_length[n]);
|
||||
call_dissector(mac_fdd_hsdsch_handle, next_tvb, pinfo, top_level_tree);
|
||||
|
||||
|
||||
|
||||
|
||||
offset += (gint)pdu_length[n];
|
||||
}
|
||||
}
|
||||
|
@ -3531,18 +3710,21 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto
|
|||
/* If newieflags == 0000 0010 then this indicates that there is a
|
||||
* HS-DSCH physical layer category and no other New IE flags. */
|
||||
if (newieflags == 2) {
|
||||
guint8 hsdsch_physical_layer_category = 0;
|
||||
/* HS-DSCH physical layer category presence bit. */
|
||||
proto_tree_add_uint(tree, hf_fp_hsdsch_new_ie_flag[6], tvb, offset, 1, newieflags);
|
||||
offset++;
|
||||
/* HS-DSCH physical layer category. */
|
||||
hsdsch_physical_layer_category = tvb_get_bits8(tvb, offset*8, 6);
|
||||
proto_tree_add_bits_item(tree, hf_fp_hsdsch_physical_layer_category, tvb, offset*8, 6, ENC_BIG_ENDIAN);
|
||||
offset++;
|
||||
}
|
||||
|
||||
if (preferences_header_checksum) {
|
||||
verify_header_crc(tvb, pinfo, header_crc_pi, header_crc, header_length);
|
||||
}
|
||||
/* Spare Extension and Payload CRC */
|
||||
dissect_spare_extension_and_crc(tvb, pinfo, tree, 1, offset, header_length);
|
||||
}
|
||||
|
||||
}
|
||||
static gboolean
|
||||
heur_dissect_fp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
|
@ -3597,15 +3779,16 @@ heur_dissect_fp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
dissect_fp(tvb, pinfo, tree);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static guint8 fakes = 5; /*[] ={1,5,8};*/
|
||||
static guint8 fakes =5; /*[] ={1,5,8};*/
|
||||
static guint8 fake_map[31];
|
||||
/*
|
||||
|
||||
/*
|
||||
* TODO: This need to be fixed!
|
||||
* Basically you would want the actual RRC messages, that sooner or later maps
|
||||
* transport channel id's to logical id's or RAB IDs
|
||||
* to set the proper logical channel/RAB ID, but for now we make syntethic ones.
|
||||
* */
|
||||
|
||||
static guint8
|
||||
make_fake_lchid(packet_info *pinfo _U_, gint trchld)
|
||||
{
|
||||
|
@ -3684,7 +3867,6 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
|
|||
if((cur_val=g_tree_lookup(hsdsch_muxed_flows, GINT_TO_POINTER((gint)p_conv_data->hrnti))) != NULL){
|
||||
j = 1 << i;
|
||||
fpi->hsdhsch_macfdlow_is_mux[i] = j & *cur_val;
|
||||
/*g_warning("setting more %d val: %d curval: %d ", i,fpi->hsdhsch_macfdlow_is_mux[i],*cur_val);*/
|
||||
}else{
|
||||
fpi->hsdhsch_macfdlow_is_mux[i] = FALSE;
|
||||
}
|
||||
|
@ -3710,7 +3892,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
|
|||
break;
|
||||
}*/
|
||||
/* rbid[MAX_RLC_CHANS] */
|
||||
/* For RLC re-assembly to work we need to fake urnti */
|
||||
/* For RLC re-assembly to work we urnti signaled from NBAP */
|
||||
rlcinf->urnti[0] = fpi->com_context_id;
|
||||
rlcinf->li_size[0] = RLC_LI_7BITS;
|
||||
rlcinf->ciphered[0] = FALSE;
|
||||
|
@ -3720,7 +3902,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
|
|||
return fpi;
|
||||
|
||||
case CHANNEL_EDCH:
|
||||
|
||||
/*Most configuration is now done in the actual dissecting function*/
|
||||
macinf = se_new0(umts_mac_info);
|
||||
rlcinf = se_new0(rlc_info);
|
||||
fpi->no_ddi_entries = p_conv_data->no_ddi_entries;
|
||||
|
@ -3739,7 +3921,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
|
|||
p_add_proto_data(pinfo->fd, proto_umts_mac, macinf);
|
||||
|
||||
|
||||
/* For RLC re-assembly to work we need to fake urnti */
|
||||
/* For RLC re-assembly to work we need a urnti signaled from NBAP */
|
||||
rlcinf->urnti[0] = fpi->com_context_id;
|
||||
/* rlcinf->mode[0] = RLC_AM;*/
|
||||
rlcinf->li_size[0] = RLC_LI_7BITS;
|
||||
|
@ -3831,7 +4013,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
|
|||
rlcinf->mode[j+chan] = lchId_rlc_map[c_t+1]; /*Based RLC mode on logical channel id*/
|
||||
}
|
||||
}else{
|
||||
fake_lchid = make_fake_lchid(pinfo,p_conv_data->dchs_in_flow_list[chan]);
|
||||
fake_lchid = make_fake_lchid(pinfo,p_conv_data->dchs_in_flow_list[chan]);
|
||||
macinf->ctmux[j+chan] = FALSE;/*Set TRUE if this channel is multiplexed (ie. C/T flag exists)*/
|
||||
/*macinf->content[j+chan] = MAC_CONTENT_CS_DTCH;*/
|
||||
macinf->content[j+chan] = lchId_type_table[fake_lchid];
|
||||
|
@ -3850,8 +4032,16 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
|
|||
/*** Set rlc info ***/
|
||||
rlcinf->urnti[j+chan] = p_conv_data->com_context_id;
|
||||
rlcinf->li_size[j+chan] = RLC_LI_7BITS;
|
||||
rlcinf->deciphered[j+chan] = FALSE;
|
||||
|
||||
/*If this entry exists, SECRUITY_MODE is completed (signled by RRC)*/
|
||||
if( rrc_ciph_inf && g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)p_conv_data->com_context_id)) != NULL ){
|
||||
rlcinf->ciphered[j+chan] = TRUE;
|
||||
}else{
|
||||
rlcinf->ciphered[j+chan] = FALSE;
|
||||
}
|
||||
|
||||
rlcinf->deciphered[j+chan] = FALSE;
|
||||
rlcinf->rbid[j+chan] = macinf->lchid[j+chan];
|
||||
|
||||
|
||||
/*Step over this TB and it's C/T flag.*/
|
||||
|
@ -4179,9 +4369,10 @@ dissect_fp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
break;
|
||||
case CHANNEL_HSDSCH_COMMON:
|
||||
expert_add_info_format(pinfo, NULL, PI_DEBUG, PI_WARN, "HSDSCH COMMON - Experimental support!");
|
||||
expert_add_info_format(pinfo, NULL, PI_DEBUG, PI_WARN, "HSDSCH COMMON - Experimental support!");
|
||||
/*if(FALSE)*/
|
||||
dissect_hsdsch_common_channel_info(tvb,pinfo, fp_tree, offset, p_fp_info);
|
||||
|
||||
break;
|
||||
case CHANNEL_HSDSCH_COMMON_T3:
|
||||
expert_add_info_format(pinfo, NULL, PI_DEBUG, PI_ERROR, "HSDSCH COMMON T3 - Not implemeneted!");
|
||||
|
@ -4488,7 +4679,7 @@ void proto_register_fp(void)
|
|||
},
|
||||
{ &hf_fp_edch_header_crc,
|
||||
{ "E-DCH Header CRC",
|
||||
"fp.edch.header-crc", FT_UINT16, BASE_HEX, 0, 0xfef0,
|
||||
"fp.edch.header-crc", FT_UINT16, BASE_HEX, 0, 0,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -5180,13 +5371,18 @@ void proto_register_fp(void)
|
|||
"Validate FP payload checksums",
|
||||
"Validate FP payload checksums",
|
||||
&preferences_payload_checksum);
|
||||
/* Determines whether or not to validate FP header checksums */
|
||||
prefs_register_bool_preference(fp_module, "header_checksum",
|
||||
"Validate FP header checksums",
|
||||
"Validate FP header checksums",
|
||||
&preferences_header_checksum);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void proto_reg_handoff_fp(void)
|
||||
{
|
||||
rlc_bcch_handle = find_dissector("rlc.bcch");
|
||||
rlc_bcch_handle = find_dissector("rlc.bcch");
|
||||
mac_fdd_rach_handle = find_dissector("mac.fdd.rach");
|
||||
mac_fdd_fach_handle = find_dissector("mac.fdd.fach");
|
||||
mac_fdd_pch_handle = find_dissector("mac.fdd.pch");
|
||||
|
|
|
@ -240,7 +240,7 @@ static guint16 tree_add_common_dcch_dtch_fields(tvbuff_t *tvb, packet_info *pinf
|
|||
}
|
||||
proto_tree_add_bits_item(tree, hf_mac_ct, tvb, bitoffs, 4, ENC_BIG_ENDIAN);
|
||||
bitoffs += 4;
|
||||
if(rlcinf){
|
||||
if(rlcinf){
|
||||
temp = proto_tree_add_uint(tree, hf_mac_lch_id, tvb, 0, 0, rlcinf->rbid[fpinf->cur_tb]);
|
||||
PROTO_ITEM_SET_GENERATED(temp);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue