diff options
-rw-r--r-- | asn1/rrc/packet-rrc-template.c | 3 | ||||
-rw-r--r-- | asn1/rrc/packet-rrc-template.h | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-rlc.c | 20 | ||||
-rw-r--r-- | epan/dissectors/packet-rlc.h | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-rrc.c | 11 | ||||
-rw-r--r-- | epan/dissectors/packet-rrc.h | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-umts_fp.c | 92 |
7 files changed, 70 insertions, 68 deletions
diff --git a/asn1/rrc/packet-rrc-template.c b/asn1/rrc/packet-rrc-template.c index 85a7f131ca..26517f4702 100644 --- a/asn1/rrc/packet-rrc-template.c +++ b/asn1/rrc/packet-rrc-template.c @@ -127,6 +127,9 @@ static const true_false_string rrc_eutra_feat_group_ind_4_val = { static int flowd,type; static tvbuff_t * hrnti; +/*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]; #include "packet-rrc-fn.c" diff --git a/asn1/rrc/packet-rrc-template.h b/asn1/rrc/packet-rrc-template.h index ea21f0ffe6..b8c81d00f9 100644 --- a/asn1/rrc/packet-rrc-template.h +++ b/asn1/rrc/packet-rrc-template.h @@ -45,9 +45,7 @@ typedef struct rrc_info { enum rrc_message_type msgtype[MAX_RRC_FRAMES]; } rrc_info; -/*Stores how many channels we have detected for a HS-DSCH MAC-flow*/ -#define MAX_NUM_HSDHSCH_MACDFLOW 8 -guint8 num_chans_per_flow[MAX_NUM_HSDHSCH_MACDFLOW]; + GTree * hsdsch_muxed_flows; #endif /* PACKET_RRC_H */ diff --git a/epan/dissectors/packet-rlc.c b/epan/dissectors/packet-rlc.c index ab3dc0d3c8..46db8eb4cc 100644 --- a/epan/dissectors/packet-rlc.c +++ b/epan/dissectors/packet-rlc.c @@ -62,8 +62,8 @@ static gboolean global_rlc_headers_expected = FALSE; /* Heuristic dissection */ static gboolean global_rlc_heur = FALSE; -/* Preferences to expect chipered data*/ -static gboolean global_rlc_chipered = FALSE; +/* Preferences to expect ciphered data*/ +static gboolean global_rlc_ciphered = FALSE; /* Stop trying to do reassembly if this is true. */ static gboolean fail = FALSE; @@ -1465,7 +1465,7 @@ dissect_rlc_um(enum rlc_channel_type channel, tvbuff_t *tvb, packet_info *pinfo, return; } pos = fpinf->cur_tb; - if (rlcinf->ciphered[pos] == TRUE && rlcinf->deciphered[pos] == FALSE) { + if (global_rlc_ciphered) { proto_tree_add_text(tree, tvb, 0, -1, "Cannot dissect RLC frame because it is ciphered"); col_append_str(pinfo->cinfo, COL_INFO, "[Ciphered Data]"); @@ -1882,7 +1882,7 @@ dissect_rlc_am(enum rlc_channel_type channel, tvbuff_t *tvb, packet_info *pinfo, return; } pos = fpinf->cur_tb; - if (rlcinf->ciphered[pos] == TRUE && rlcinf->deciphered[pos] == FALSE) { + if (global_rlc_ciphered) { proto_tree_add_text(tree, tvb, 0, -1, "Cannot dissect RLC frame because it is ciphered"); col_append_str(pinfo->cinfo, COL_INFO, "[Ciphered Data]"); @@ -2286,10 +2286,10 @@ dissect_rlc_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) return TRUE; } -gboolean rlc_is_chipered(packet_info * pinfo){ +gboolean rlc_is_ciphered(packet_info * pinfo){ int i; i = pinfo->fd->num; - return global_rlc_chipered; + return global_rlc_ciphered; } void @@ -2479,10 +2479,10 @@ proto_register_rlc(void) &global_rlc_headers_expected); - prefs_register_bool_preference(rlc_module, "chipered_data", - "Chipered data", - "When enabled, rlc will assume all data is chipered and won't process it ", - &global_rlc_chipered); + prefs_register_bool_preference(rlc_module, "ciphered_data", + "Ciphered data", + "When enabled, rlc will assume all data is ciphered and won't process it ", + &global_rlc_ciphered); register_init_routine(fragment_table_init); } diff --git a/epan/dissectors/packet-rlc.h b/epan/dissectors/packet-rlc.h index 152dc753e7..8be8b1ac2a 100644 --- a/epan/dissectors/packet-rlc.h +++ b/epan/dissectors/packet-rlc.h @@ -115,6 +115,6 @@ typedef struct rlc_info #define RLC_PAYLOAD_TAG 0x01 -/*Tells other functions if this packet i chipered or not*/ -gboolean rlc_is_chipered(packet_info * pinfo); +/*Tells other functions if this packet i ciphered or not*/ +gboolean rlc_is_ciphered(packet_info * pinfo); diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c index 7a58f72971..dbe5d4f015 100644 --- a/epan/dissectors/packet-rrc.c +++ b/epan/dissectors/packet-rrc.c @@ -14794,6 +14794,9 @@ static const true_false_string rrc_eutra_feat_group_ind_4_val = { static int flowd,type; static tvbuff_t * hrnti; +/*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]; /*--- Included file: packet-rrc-fn.c ---*/ @@ -130896,7 +130899,7 @@ static int dissect_MeasurementReport_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _ /*--- End of included file: packet-rrc-fn.c ---*/ -#line 132 "../../asn1/rrc/packet-rrc-template.c" +#line 135 "../../asn1/rrc/packet-rrc-template.c" #include "packet-rrc.h" @@ -166470,7 +166473,7 @@ void proto_register_rrc(void) { NULL, HFILL }}, /*--- End of included file: packet-rrc-hfarr.c ---*/ -#line 213 "../../asn1/rrc/packet-rrc-template.c" +#line 216 "../../asn1/rrc/packet-rrc-template.c" { &hf_test, { "RAB Test", "rrc.RAB.test", FT_UINT8, BASE_DEC, NULL, 0, @@ -172110,7 +172113,7 @@ void proto_register_rrc(void) { &ett_rrc_UL_RFC3095_Context, /*--- End of included file: packet-rrc-ettarr.c ---*/ -#line 239 "../../asn1/rrc/packet-rrc-template.c" +#line 242 "../../asn1/rrc/packet-rrc-template.c" &ett_rrc_eutraFeatureGroupIndicators, &ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, }; @@ -172190,7 +172193,7 @@ void proto_register_rrc(void) { /*--- End of included file: packet-rrc-dis-reg.c ---*/ -#line 253 "../../asn1/rrc/packet-rrc-template.c" +#line 256 "../../asn1/rrc/packet-rrc-template.c" diff --git a/epan/dissectors/packet-rrc.h b/epan/dissectors/packet-rrc.h index dcaf5808f5..714dba38bf 100644 --- a/epan/dissectors/packet-rrc.h +++ b/epan/dissectors/packet-rrc.h @@ -69,9 +69,7 @@ typedef struct rrc_info { enum rrc_message_type msgtype[MAX_RRC_FRAMES]; } rrc_info; -/*Stores how many channels we have detected for a HS-DSCH MAC-flow*/ -#define MAX_NUM_HSDHSCH_MACDFLOW 8 -guint8 num_chans_per_flow[MAX_NUM_HSDHSCH_MACDFLOW]; + GTree * hsdsch_muxed_flows; #endif /* PACKET_RRC_H */ diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c index 74664cb28a..942e1f8798 100644 --- a/epan/dissectors/packet-umts_fp.c +++ b/epan/dissectors/packet-umts_fp.c @@ -634,7 +634,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_chipered(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,7 +642,7 @@ dissect_tb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if(p_fp_info->is_uplink){ item = proto_tree_add_item(data_tree, hf_fp_crci[n%8], tvb, (crci_bit_offset/8)+(n/8), 1, ENC_BIG_ENDIAN); PROTO_ITEM_SET_GENERATED(item); - + 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); }else{ @@ -669,8 +669,8 @@ dissect_tb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } /*Encrypted data, show message*/ - else if(rlc_is_chipered(pinfo)){ - expert_add_info_format(pinfo,tree_ti,PI_UNDECODED,PI_NOTE,"Chipered data, dissection stopped."); + else if(rlc_is_ciphered(pinfo)){ + expert_add_info_format(pinfo,tree_ti,PI_UNDECODED,PI_NOTE,"Ciphered data, dissection stopped."); } num_tbs++; @@ -743,15 +743,15 @@ dissect_macd_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ENC_NA); proto_item_set_text(pdu_ti, "MAC-d PDU (PDU %u)", pdu+1); } - if (preferences_call_mac_dissectors && !rlc_is_chipered(pinfo)) { + if (preferences_call_mac_dissectors && !rlc_is_ciphered(pinfo)) { tvbuff_t *next_tvb; next_tvb = tvb_new_subset(tvb, offset + bit_offset/8, ((bit_offset % 8) + length + 7)/8, -1); call_dissector(mac_fdd_hsdsch_handle, next_tvb, pinfo, top_level_tree); dissected = TRUE; } /*Encrypted data, show message*/ - else if(rlc_is_chipered(pinfo)){ - expert_add_info_format(pinfo,pdus_ti,PI_UNDECODED,PI_NOTE,"Chipered data, dissection stopped."); + else if(rlc_is_ciphered(pinfo)){ + expert_add_info_format(pinfo,pdus_ti,PI_UNDECODED,PI_NOTE,"Ciphered data, dissection stopped."); } /* Advance bit offset */ @@ -809,19 +809,19 @@ dissect_macd_pdu_data_type_2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree proto_item_set_text(pdu_ti, "MAC-d PDU (PDU %u)", pdu+1); } - - if (preferences_call_mac_dissectors && !rlc_is_chipered(pinfo)) { - + + if (preferences_call_mac_dissectors && !rlc_is_ciphered(pinfo)) { + tvbuff_t *next_tvb = tvb_new_subset(tvb, offset, length, -1); - - + + fpi->cur_tb = pdu; /*Set proper pdu index for MAC and higher layers*/ call_dissector(mac_fdd_hsdsch_handle, next_tvb, pinfo, top_level_tree); dissected = TRUE; } /*Encrypted data, show message*/ - else if(rlc_is_chipered(pinfo)){ - expert_add_info_format(pinfo,pdus_ti,PI_UNDECODED,PI_NOTE,"Chipered data, dissection stopped."); + else if(rlc_is_ciphered(pinfo)){ + expert_add_info_format(pinfo,pdus_ti,PI_UNDECODED,PI_NOTE,"Ciphered data, dissection stopped."); } /* Advance offset */ offset += length; @@ -1384,7 +1384,7 @@ dissect_rach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *rx_timing_deviation_ti = NULL; guint16 rx_timing_deviation = 0; guint header_length = 0; - + /* DATA */ /* CFN */ @@ -1421,9 +1421,9 @@ dissect_rach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree_add_item(tree, hf_fp_received_sync_ul_timing_deviation, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; } - + header_length = offset; - + /* TB data */ offset = dissect_tb_data(tvb, pinfo, tree, offset, p_fp_info, &mac_fdd_rach_handle); @@ -1623,7 +1623,7 @@ dissect_fach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, else { guint8 cfn; guint header_length = 0; - + /* DATA */ /* CFN */ @@ -1642,7 +1642,7 @@ dissect_fach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, (float)(int)(tvb_get_guint8(tvb, offset)) / 10); offset++; header_length = offset; - + /* TB data */ offset = dissect_tb_data(tvb, pinfo, tree, offset, p_fp_info, &mac_fdd_fach_handle); @@ -1690,7 +1690,7 @@ dissect_dsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, else { guint8 cfn; guint header_length = 0; - + /* DATA */ /* CFN */ @@ -1776,7 +1776,7 @@ dissect_usch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 rx_timing_deviation; proto_item *rx_timing_deviation_ti; guint header_length = 0; - + /* DATA */ /* CFN */ @@ -2481,7 +2481,7 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, number_of_subframes, is_common); return; } - + header_length = offset; /* EDCH subframe header list */ for (n=0; n < number_of_subframes; n++) { @@ -2646,7 +2646,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_chipered(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 */ @@ -2677,8 +2677,8 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } else { /*Encrypted data, show message*/ - if(rlc_is_chipered(pinfo)){ - expert_add_info_format(pinfo,tree,PI_UNDECODED,PI_NOTE,"Chipered data, dissection stopped."); + if(rlc_is_ciphered(pinfo)){ + expert_add_info_format(pinfo,tree,PI_UNDECODED,PI_NOTE,"Ciphered data, dissection stopped."); } /* Just add as a MAC-d PDU */ proto_tree_add_item(maces_tree, hf_fp_mac_d_pdu, tvb, @@ -3092,13 +3092,13 @@ dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, macinf->macdflow_id[i] = p_fp_info->hsdsch_macflowd_id; /*Save the flow ID (+1 to make it human readable (its zero indexed!))*/ /*Figure out RLC_MODE based on MACd-flow-ID, basically MACd-flow-ID = 0 then its SRB0 == UM else AM*/ rlcinf->mode[i] = hsdsch_macdflow_id_rlc_map[p_fp_info->hsdsch_macflowd_id]; - - + + /*Check if this is multiplexed (signaled by RRC)*/ - if( !rlc_is_chipered(pinfo) && p_fp_info->hsdhsch_macfdlow_is_mux[p_fp_info->hsdsch_macflowd_id] ){ + if( !rlc_is_ciphered(pinfo) && p_fp_info->hsdhsch_macfdlow_is_mux[p_fp_info->hsdsch_macflowd_id] ){ macinf->ctmux[i] = TRUE; }else if(p_fp_info->hsdsch_macflowd_id == 0){ /*MACd-flow = 0 is often SRB */ - expert_add_info_format(pinfo,NULL,PI_PROTOCOL,PI_NOTE,"Found MACd-Flow = 0 and not MUX detected. (This might be SRB)"); + expert_add_info_format(pinfo,NULL,PI_PROTOCOL,PI_NOTE,"Found MACd-Flow = 0 and not MUX detected. (This might be SRB)"); }else{ macinf->ctmux[i] = FALSE; /*Either it's multiplexed and not signled or its not MUX*/ } @@ -3369,7 +3369,7 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree rlcinf->rbid[j] = (guint8)lchid[n]+1; rlcinf->urnti[j] = p_fp_info->channel; /*We need to fake urnti*/ } - + /* Add PDU block header subtree */ offset = dissect_macd_pdu_data_type_2(tvb, pinfo, tree, offset, (guint16)pdu_length[n], @@ -3567,7 +3567,7 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto /* Now read the MAC-d/c PDUs for each block using info from headers */ for (n=0; n < number_of_pdu_blocks; n++) { for(j=0;j<no_of_pdus[n];j++){ - + if(lchid[n] == 0xF){ /*If all bits are set, then this is BCCH or PCCH according to: 25.435 paragraph: 6.2.7.31*/ /*BCCH, then we have a MAC-ehs header*/ /*PCCH then we don't have any MAC-c header */ @@ -3578,33 +3578,33 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto /*Configure (signal to lower layers) the PDU!*/ macinf->content[j] = lchId_type_table[lchid[n]+1];/*hsdsch_macdflow_id_mac_content_map[p_fp_info->hsdsch_macflowd_id];*/ /*MAC_CONTENT_PS_DTCH;*/ macinf->lchid[j] = (guint8)lchid[n]+1; /*Add 1 since C/T is zero indexed? ie C/T =0 => L-CHID = 1*/ - + macinf->macdflow_id[j] = p_fp_info->hsdsch_macflowd_id; - + /*Figure out RLC_MODE based on MACd-flow-ID, basically MACd-flow-ID = 0 then its SRB0 == UM else AM*/ - + rlcinf->mode[j] = RLC_TM;/*lchId_rlc_map[lchid[n]+1];*//*hsdsch_macdflow_id_rlc_map[p_fp_info->hsdsch_macflowd_id];*/ - + macinf->ctmux[n] = TRUE; /*This is handled already in FP*/ rlcinf->li_size[j] = RLC_LI_7BITS; /*rlcinf->ciphered[j] = FALSE;*/ rlcinf->deciphered[j] = FALSE; rlcinf->rbid[j] = (guint8)lchid[n]+1; rlcinf->urnti[j] = p_fp_info->channel; /*We need to fake urnti*/ - + } /* Add PDU block header subtree */ offset = dissect_macd_pdu_data_type_2(tvb, pinfo, tree, offset, (guint16)pdu_length[n], (guint16)no_of_pdus[n],p_fp_info); - - + + } /* Spare Extension and Payload CRC */ dissect_spare_extension_and_crc(tvb, pinfo, tree, 1, offset,0); } - + } static gboolean heur_dissect_fp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) @@ -3698,7 +3698,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, rlc_info *rlcinf; guint8 fake_lchid=0; gint *cur_val=NULL; - + fpi = se_new0(fp_info); p_add_proto_data(pinfo->fd, proto_fp, fpi); @@ -3739,7 +3739,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, /*Figure out RLC_MODE based on MACd-flow-ID, basically MACd-flow-ID = 0 then its SRB0 == UM else AM*/ rlcinf->mode[0] = hsdsch_macdflow_id_rlc_map[p_conv_data->hsdsch_macdflow_id]; - + if(fpi->hsdsch_entity == hs){ for(i=0; i<MAX_NUM_HSDHSCH_MACDFLOW; i++){ if((cur_val=g_tree_lookup(hsdsch_muxed_flows, GINT_TO_POINTER((gint)p_conv_data->hrnti))) != NULL){ @@ -3749,7 +3749,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, }else{ fpi->hsdhsch_macfdlow_is_mux[i] = FALSE; } - + } } /* Make configurable ?(available in NBAP?) */ @@ -3954,7 +3954,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, rlcinf->deciphered[0] = FALSE; p_add_proto_data(pinfo->fd, proto_rlc, rlcinf); break; - + case CHANNEL_RACH_FDD: fpi->num_chans = p_conv_data->num_dch_in_flow; if (is_control_frame) { @@ -5248,9 +5248,9 @@ void proto_register_fp(void) "Call MAC dissector for payloads", "Call MAC dissector for payloads", &preferences_call_mac_dissectors); - /* Determines whether or not to validate FP payload checksums */ - prefs_register_bool_preference(fp_module, "payload_checksum", - "Validate FP payload checksums", + /* Determines whether or not to validate FP payload checksums */ + prefs_register_bool_preference(fp_module, "payload_checksum", + "Validate FP payload checksums", "Validate FP payload checksums", &preferences_payload_checksum); |