Commit b6d8faef authored by Navid Nikaein's avatar Navid Nikaein

Wireshark interface for MAC/RLC/PDCP/RRC of lte-softmodem (re-committing)

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7257 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 777aa5bb
...@@ -14,7 +14,7 @@ alias oai1='cd $OPENAIR1_DIR' ...@@ -14,7 +14,7 @@ alias oai1='cd $OPENAIR1_DIR'
alias oai2='cd $OPENAIR2_DIR' alias oai2='cd $OPENAIR2_DIR'
alias oai3='cd $OPENAIR3_DIR' alias oai3='cd $OPENAIR3_DIR'
alias oait='cd $OPENAIR_TARGETS' alias oait='cd $OPENAIR_TARGETS'
alias oaiu='cd $OPENAIR2_DIR/UTIL' alias oailte='cd $OPENAIR_TARGETS/RT/USER'
alias oais='cd $OPENAIR_TARGETS/SIMU/USER' alias oais='cd $OPENAIR_TARGETS/SIMU/USER'
alias oaiex='cd $OPENAIR_TARGETS/SIMU/EXAMPLES' alias oaiex='cd $OPENAIR_TARGETS/SIMU/EXAMPLES'
alias oaicn='cd OPENAIRCN_DIR' alias oaicn='cd OPENAIRCN_DIR'
...@@ -348,7 +348,6 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un ...@@ -348,7 +348,6 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un
((DCI1A_20MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=9; ((DCI1A_20MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=9;
TBsize = 57; TBsize = 57;
} }
break; break;
} }
} }
...@@ -383,9 +382,8 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un ...@@ -383,9 +382,8 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un
memcpy((void*)&eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0][(unsigned char)offset], memcpy((void*)&eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0][(unsigned char)offset],
&eNB->common_channels[CC_id].CCCH_pdu.payload[0], &eNB->common_channels[CC_id].CCCH_pdu.payload[0],
rrc_sdu_length); rrc_sdu_length);
#if defined(USER_MODE) && defined(OAI_EMU)
if (oai_emulation.info.opt_enabled) { if (opt_enabled==1){
trace_pdu(1, (uint8_t *)eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0], trace_pdu(1, (uint8_t *)eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0],
rrc_sdu_length, UE_id, 3, UE_RNTI(module_idP, UE_id), rrc_sdu_length, UE_id, 3, UE_RNTI(module_idP, UE_id),
eNB->subframe,0,0); eNB->subframe,0,0);
...@@ -393,7 +391,6 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un ...@@ -393,7 +391,6 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un
module_idP, frameP, UE_RNTI(module_idP,UE_id), rrc_sdu_length); module_idP, frameP, UE_RNTI(module_idP,UE_id), rrc_sdu_length);
} }
#endif
nprb[CC_id]= nprb[CC_id] + 3; nprb[CC_id]= nprb[CC_id] + 3;
nCCE[CC_id] = nCCE[CC_id] + 4; nCCE[CC_id] = nCCE[CC_id] + 4;
} }
......
...@@ -164,9 +164,7 @@ schedule_SI( ...@@ -164,9 +164,7 @@ schedule_SI(
} }
} }
#if defined(USER_MODE) && defined(OAI_EMU) if (opt_enabled == 1) {
if (oai_emulation.info.opt_enabled) {
trace_pdu(1, trace_pdu(1,
&eNB->common_channels[CC_id].BCCH_pdu.payload[0], &eNB->common_channels[CC_id].BCCH_pdu.payload[0],
bcch_sdu_length, bcch_sdu_length,
...@@ -176,11 +174,9 @@ schedule_SI( ...@@ -176,11 +174,9 @@ schedule_SI(
eNB->subframe, eNB->subframe,
0, 0,
0); 0);
}
LOG_D(OPT,"[eNB %d][BCH] Frame %d trace pdu for rnti %x with size %d\n", LOG_D(OPT,"[eNB %d][BCH] Frame %d trace pdu for rnti %x with size %d\n",
module_idP, frameP, 0xffff, bcch_sdu_length); module_idP, frameP, 0xffff, bcch_sdu_length);
#endif }
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) {
LOG_D(MAC,"[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for SI %d bytes (mcs %d, rb 3, TBS %d)\n", LOG_D(MAC,"[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for SI %d bytes (mcs %d, rb 3, TBS %d)\n",
frameP, frameP,
......
...@@ -1104,17 +1104,13 @@ schedule_ue_spec( ...@@ -1104,17 +1104,13 @@ schedule_ue_spec(
} }
//eNB_mac_inst[0].DLSCH_pdu[0][0].payload[0][offset+sdu_lengths[0]+j] = (char)(taus()&0xff); //eNB_mac_inst[0].DLSCH_pdu[0][0].payload[0][offset+sdu_lengths[0]+j] = (char)(taus()&0xff);
#if defined(USER_MODE) && defined(OAI_EMU) if (opt_enabled == 1){
/* Tracing of PDU is done on UE side */
if (oai_emulation.info.opt_enabled)
trace_pdu(1, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], trace_pdu(1, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
TBS, module_idP, 3, UE_RNTI(module_idP,UE_id), TBS, module_idP, 3, UE_RNTI(module_idP,UE_id),
eNB->subframe,0,0); eNB->subframe,0,0);
LOG_D(OPT,"[eNB %d][DLSCH] Frame %d rnti %x with size %d\n", LOG_D(OPT,"[eNB %d][DLSCH] Frame %d rnti %x with size %d\n",
module_idP, frameP, UE_RNTI(module_idP,UE_id), TBS); module_idP, frameP, UE_RNTI(module_idP,UE_id), TBS);
#endif }
aggregation = process_ue_cqi(module_idP,UE_id); aggregation = process_ue_cqi(module_idP,UE_id);
nCCE[CC_id]-=(1<<aggregation); // adjust the remaining nCCE nCCE[CC_id]-=(1<<aggregation); // adjust the remaining nCCE
nCCE_used[CC_id]+=(1<<aggregation); // adjust the remaining nCCE nCCE_used[CC_id]+=(1<<aggregation); // adjust the remaining nCCE
......
...@@ -619,18 +619,14 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra ...@@ -619,18 +619,14 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra
for (j=0; j<(TBS-sdu_length_total-offset); j++) { for (j=0; j<(TBS-sdu_length_total-offset); j++) {
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.payload[offset+sdu_length_total+j] = (char)(taus()&0xff); eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.payload[offset+sdu_length_total+j] = (char)(taus()&0xff);
} }
#if defined(USER_MODE) && defined(OAI_EMU)
/* Tracing of PDU is done on UE side */ /* Tracing of PDU is done on UE side */
if (oai_emulation.info.opt_enabled) if (opt_enabled ==1 ){
trace_pdu(1, (uint8_t *)eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.payload, trace_pdu(1, (uint8_t *)eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.payload,
TBS, module_idP, 6, 0xffff, // M_RNTI = 6 in wirehsark TBS, module_idP, 6, 0xffff, // M_RNTI = 6 in wirehsark
eNB_mac_inst[module_idP].subframe,0,0); eNB_mac_inst[module_idP].subframe,0,0);
LOG_D(OPT,"[eNB %d][MCH] Frame %d : MAC PDU with size %d\n", LOG_D(OPT,"[eNB %d][MCH] Frame %d : MAC PDU with size %d\n",
module_idP, frameP, TBS); module_idP, frameP, TBS);
#endif }
/* /*
for (j=0;j<sdu_length_total;j++) for (j=0;j<sdu_length_total;j++)
printf("%2x.",eNB_mac_inst[module_idP].MCH_pdu.payload[j+offset]); printf("%2x.",eNB_mac_inst[module_idP].MCH_pdu.payload[j+offset]);
......
...@@ -562,18 +562,18 @@ int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p) ...@@ -562,18 +562,18 @@ int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p)
LOG_D(OPT, "Failed to open file \"%s\" for writing\n", in_path); LOG_D(OPT, "Failed to open file \"%s\" for writing\n", in_path);
return (-1); return (-1);
} }
/* Write the file header */ /* Write the file header */
fwrite(&file_header, sizeof(pcap_hdr_t), 1, file_fd); fwrite(&file_header, sizeof(pcap_hdr_t), 1, file_fd);
break; break;
case OPT_TSHARK: case OPT_TSHARK:
LOG_D(OPT, "Tshark is currently not supported\n"); LOG_W(OPT, "Tshark is currently not supported\n");
opt_type = OPT_NONE; opt_type = OPT_NONE;
break; break;
default: default:
opt_type = OPT_NONE; opt_type = OPT_NONE;
LOG_W(OPT, "supported Option\n");
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment