Commit 445cf84e authored by laurent's avatar laurent

clean up wireshark traces

parent b7908ec2
......@@ -2349,8 +2349,6 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin
dummy[2] = ue->pbch_vars[eNB_id]->decoded_output[0];
trace_pdu( DIRECTION_DOWNLINK, dummy, WS_C_RNTI, ue->Mod_id, 0, 0,
frame_rx, subframe_rx, 0, 0);
LOG_D(OPT,"[UE %d][PBCH] Frame %d trace pdu for PBCH\n",
ue->Mod_id, subframe_rx);
}
if (pbch_tx_ant>2) {
......
......@@ -914,10 +914,10 @@ generate_Msg4(module_id_t module_idP,
T (T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT (module_idP), T_INT (CC_idP), T_INT (ra->rnti), T_INT (frameP), T_INT (subframeP),
T_INT (0 /*harq_pid always 0? */ ), T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].payload[0], ra->msg4_TBsize));
if (opt_enabled == 1) {
trace_pdu (1, (uint8_t *) mac->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char) UE_id].payload[0], ra->msg4_rrc_sdu_length, UE_id, 3, UE_RNTI (module_idP, UE_id), mac->frame, mac->subframe, 0, 0);
LOG_D (OPT, "[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n", module_idP, CC_idP, frameP, UE_RNTI (module_idP, UE_id), ra->msg4_rrc_sdu_length);
}
trace_pdu (DIRECTION_DOWNLINK, (uint8_t *) mac->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char) UE_id].payload[0],
ra->msg4_rrc_sdu_length,
UE_id, 3, UE_RNTI (module_idP, UE_id),
mac->frame, mac->subframe, 0, 0);
} // Msg4 frame/subframe
} // rach_resource_type > 0
else
......@@ -1095,20 +1095,12 @@ generate_Msg4(module_id_t module_idP,
T_BUFFER(&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].
payload[0], ra->msg4_TBsize));
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
trace_pdu(DIRECTION_DOWNLINK,
(uint8_t *) mac->
UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0],
rrc_sdu_length, UE_id, WS_C_RNTI,
UE_RNTI(module_idP, UE_id), mac->frame,
mac->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n",
module_idP, CC_idP, frameP, UE_RNTI(module_idP,
UE_id),
rrc_sdu_length);
}
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR) {
set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti);
}
......
......@@ -281,15 +281,10 @@ schedule_SIB1_MBMS(module_id_t module_idP,
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_BR_pdu[0].payload[0],
bcch_sdu_length,
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
}
if (cc->tdd_Config != NULL) { //TDD
LOG_D(MAC,
"[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (TDD) for CC_id %d SIB1-BR %d bytes\n",
......@@ -509,15 +504,10 @@ schedule_SIB1_BR(module_id_t module_idP,
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_BR_pdu[0].payload[0],
bcch_sdu_length,
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
}
if (cc->tdd_Config != NULL) { //TDD
LOG_D(MAC,
"[eNB] Frame %d : Scheduling BCCH-BR 0->DLSCH (TDD) for CC_id %d SIB1-BR %d bytes\n",
......@@ -709,7 +699,6 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[i+1].payload;
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_BR_pdu[i + 1].payload[0],
bcch_sdu_length,
......@@ -717,9 +706,6 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
WS_SI_RNTI,
0xffff, eNB->frame, eNB->subframe, 0,
0);
LOG_D(OPT, "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
}
if (cc->tdd_Config != NULL) { //TDD
LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-BR %d->DLSCH (TDD) for CC_id %d SI-BR %d bytes\n",
frameP, i, CC_id, bcch_sdu_length);
......@@ -919,17 +905,11 @@ schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_MBMS_pdu.payload, bcch_sdu_length));
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_MBMS_pdu.payload[0],
bcch_sdu_length,
0xffff,
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][BCH-MBMS] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff,
bcch_sdu_length);
}
if (0/*cc->tdd_Config != NULL*/) { //TDD not for FeMBMS
LOG_D(MAC,
"[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n",
......@@ -1224,17 +1204,11 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_pdu.payload, bcch_sdu_length));
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
trace_pdu(DIRECTION_DOWNLINK,
&cc->BCCH_pdu.payload[0],
bcch_sdu_length,
0xffff,
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff,
bcch_sdu_length);
}
if (cc->tdd_Config != NULL) { //TDD
LOG_D(MAC,
"[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for CC_id %d SI %d bytes (mcs %d, rb 3)\n",
......
......@@ -1422,7 +1422,6 @@ schedule_ue_spec(module_id_t module_idP,
dlsch_pdu->payload[0][offset + sdu_length_total + j] = 0;
}
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
(uint8_t *) dlsch_pdu->payload[0],
TBS,
......@@ -1434,14 +1433,6 @@ schedule_ue_spec(module_id_t module_idP,
eNB->subframe,
0,
0);
LOG_D(OPT, "[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n",
module_idP,
CC_id,
frameP,
UE_RNTI(module_idP,
UE_id),
TBS);
}
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA,
T_INT(module_idP),
......@@ -2345,8 +2336,7 @@ schedule_ue_spec_br(module_id_t module_idP,
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset + sdu_length_total + j] = (char)(taus()&0xff);
}
if (opt_enabled == 1) {
trace_pdu(1,
trace_pdu(DIRECTION_DOWNLINK,
(uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
TBS,
module_idP,
......@@ -2356,13 +2346,6 @@ schedule_ue_spec_br(module_id_t module_idP,
mac->subframe,
0,
0);
LOG_D(OPT,"[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n",
module_idP,
CC_id,
frameP,
UE_RNTI(module_idP, UE_id),
TBS);
}
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA,
T_INT(module_idP),
......@@ -2557,7 +2540,6 @@ schedule_ue_spec_br(module_id_t module_idP,
T_INT (0 /* harq_pid always 0? */ ),
T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_id][0][UE_id].payload[0], TX_req->pdu_length));
if (opt_enabled == 1) {
trace_pdu(1,
(uint8_t *) mac->UE_list.DLSCH_pdu[CC_id][0][(unsigned char) UE_id].payload[0],
TX_req->pdu_length,
......@@ -2568,13 +2550,6 @@ schedule_ue_spec_br(module_id_t module_idP,
subframeP,
0,
0);
LOG_D(OPT, "[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n",
module_idP,
CC_id,
frameP,
rnti,
TX_req->pdu_length);
}
} // end else if ((subframeP == 7) && (round_DL < 8))
} // end loop on UE_id
}
......@@ -3180,7 +3155,6 @@ schedule_PCH(module_id_t module_idP,
continue;
}
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK,
&eNB->common_channels[CC_id].PCCH_pdu.payload[0],
pcch_sdu_length,
......@@ -3191,13 +3165,6 @@ schedule_PCH(module_id_t module_idP,
eNB->subframe,
0,
0);
LOG_D(OPT,"[eNB %d][PCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP,
frameP,
CC_id,
0xffff,
pcch_sdu_length);
}
eNB->eNB_stats[CC_id].total_num_pcch_pdu++;
eNB->eNB_stats[CC_id].pcch_buffer = pcch_sdu_length;
......
......@@ -1703,13 +1703,9 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset+sdu_length_total+j] = (char)(taus()&0xff);
}
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
TBS, module_idP, WS_RA_RNTI, UE_RNTI(module_idP, UE_id),
eNB->frame, eNB->subframe,0,0);
LOG_D(OPT,"[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n",
module_idP, CC_id, frameP, UE_RNTI(module_idP, UE_id), TBS);
}
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP),
T_INT(harq_pid), T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], TBS));
......
......@@ -766,14 +766,9 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
}
/* Tracing of PDU is done on UE side */
if (opt_enabled == 1) {
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) cc->MCH_pdu.payload, TBS, module_idP, WS_M_RNTI , 0xffff, // M_RNTI = 6 in wirehsark
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) cc->MCH_pdu.payload, TBS, module_idP, WS_M_RNTI , 0xffff, // M_RNTI = 6 in wirehsark
RC.mac[module_idP]->frame,
RC.mac[module_idP]->subframe, 0, 0);
LOG_D(OPT,
"[eNB %d][MCH] CC_id %d Frame %d : MAC PDU with size %d\n",
module_idP, CC_id, frameP, TBS);
}
/*
for (j=0;j<sdu_length_total;j++)
......
......@@ -144,14 +144,7 @@ rx_sdu(const module_id_t enb_mod_idP,
start_meas(&mac->rx_ulsch_sdu);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU, 1);
if (opt_enabled == 1) {
trace_pdu(DIRECTION_UPLINK, sduP, sdu_lenP, 0, WS_C_RNTI, current_rnti, frameP, subframeP, 0, 0);
LOG_D(OPT, "[eNB %d][ULSCH] Frame %d rnti %x with size %d\n",
enb_mod_idP,
frameP,
current_rnti,
sdu_lenP);
}
if (UE_id != -1) {
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
......
......@@ -256,16 +256,11 @@ Msg1_transmitted(module_id_t module_idP, uint8_t CC_id,
// start contention resolution timer
UE_mac_inst[module_idP].RA_attempt_number++;
if (opt_enabled) {
trace_pdu(DIRECTION_UPLINK, NULL, 0, module_idP, WS_NO_RNTI,
trace_pdu(DIRECTION_UPLINK, NULL, 0, module_idP, WS_NO_RNTI,
UE_mac_inst[module_idP].RA_prach_resources.
ra_PreambleIndex, UE_mac_inst[module_idP].txFrame,
UE_mac_inst[module_idP].txSubframe, 0,
UE_mac_inst[module_idP].RA_attempt_number);
LOG_D(OPT,
"[UE %d][RAPROC] TX MSG1 Frame %d trace pdu for rnti %x with size %d\n",
module_idP, frameP, 1, UE_mac_inst[module_idP].RA_Msg3_size);
}
}
......@@ -281,18 +276,11 @@ Msg3_transmitted(module_id_t module_idP, uint8_t CC_id,
UE_mac_inst[module_idP].RA_contention_resolution_cnt = 0;
UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 1;
if (opt_enabled) { // msg3
trace_pdu(DIRECTION_UPLINK, &UE_mac_inst[module_idP].CCCH_pdu.payload[0],
trace_pdu(DIRECTION_UPLINK, &UE_mac_inst[module_idP].CCCH_pdu.payload[0],
UE_mac_inst[module_idP].RA_Msg3_size, module_idP, WS_C_RNTI,
UE_mac_inst[module_idP].crnti,
UE_mac_inst[module_idP].txFrame,
UE_mac_inst[module_idP].txSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][RAPROC] MSG3 Frame %d trace pdu Preamble %d with size %d\n",
module_idP, frameP, UE_mac_inst[module_idP].crnti
/*UE_mac_inst[module_idP].RA_prach_resources.ra_PreambleIndex */
, UE_mac_inst[module_idP].RA_Msg3_size);
}
}
......
......@@ -95,16 +95,9 @@ fill_rar(const module_id_t module_idP,
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1);
if (opt_enabled) {
trace_pdu(DIRECTION_DOWNLINK , dlsch_buffer, input_buffer_length, module_idP, WS_RA_RNTI , 1,
RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe,
0, 0);
LOG_D(OPT,
"[eNB %d][RAPROC] CC_id %d RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
module_idP, CC_id, frameP, ra->rnti, rarh->RAPID,
input_buffer_length);
}
return (ra->rnti);
}
......@@ -209,7 +202,6 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
ra->preamble_index,
ra->timing_offset);
if (opt_enabled) {
trace_pdu(DIRECTION_DOWNLINK,
dlsch_buffer,
input_buffer_length,
......@@ -221,13 +213,6 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
0,
0);
LOG_D(OPT, "[RAPROC] RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
frameP,
ra->rnti,
rarh->RAPID,
input_buffer_length);
}
return (ra->rnti);
}
#endif
......
......@@ -115,14 +115,9 @@ uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const fra
(uint16_t) rar[5] + (rar[4] << 8));
#endif
if (opt_enabled) {
LOG_D(OPT,
"[UE %d][RAPROC] CC_id %d RAR Frame %d trace pdu for ra-RNTI %x\n",
module_idP, CC_id, frameP, ra_rnti);
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) dlsch_buffer, n_rarh + n_rarpy * 6,
module_idP, WS_RA_RNTI, ra_rnti, UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
}
if (preamble_index == rarh->RAPID) {
*t_crnti = (uint16_t) rar[5] + (rar[4] << 8); //rar->t_crnti;
......
......@@ -403,14 +403,8 @@ ue_send_sdu(module_id_t module_idP,
//LOG_D(MAC,"sdu: %x.%x.%x\n",sdu[0],sdu[1],sdu[2]);
if (opt_enabled) {
trace_pdu(DIRECTION_DOWNLINK, sdu, sdu_len, module_idP, WS_C_RNTI,
UE_mac_inst[module_idP].crnti, frameP, subframeP, 0, 0);
LOG_D(OPT,
"[UE %d][DLSCH] Frame %d trace pdu for rnti %x with size %d\n",
module_idP, frameP, UE_mac_inst[module_idP].crnti, sdu_len);
}
payload_ptr =
parse_header(sdu, &num_ce, &num_sdu, rx_ces, rx_lcids, rx_lengths,
sdu_len);
......@@ -617,7 +611,6 @@ ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
#if UE_TIMING_TRACE
stop_meas(&UE_mac_inst[module_idP].rx_si);
#endif
if (opt_enabled == 1) {
trace_pdu(DIRECTION_UPLINK,
(uint8_t *) pdu,
len,
......@@ -626,10 +619,6 @@ ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
0xffff,
UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, len);
}
}
#endif
......@@ -653,7 +642,6 @@ ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
stop_meas(&UE_mac_inst[module_idP].rx_si);
#endif
if (opt_enabled == 1) {
trace_pdu(DIRECTION_UPLINK,
(uint8_t *) pdu,
len,
......@@ -662,10 +650,6 @@ ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
0xffff,
UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, 0xffff, len);
}
}
void
......@@ -689,7 +673,6 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP,
stop_meas(&UE_mac_inst[module_idP].rx_p);
#endif
if (opt_enabled == 1) {
trace_pdu(DIRECTION_UPLINK,
(uint8_t *) pdu,
len,
......@@ -698,10 +681,6 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP,
P_RNTI,
UE_mac_inst[module_idP].rxFrame,
UE_mac_inst[module_idP].rxSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
module_idP, frameP, CC_id, P_RNTI, len);
}
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
......@@ -2462,16 +2441,10 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
stop_meas(&UE_mac_inst[module_idP].tx_ulsch_sdu);
#endif
if (opt_enabled) {
trace_pdu(DIRECTION_UPLINK, ulsch_buffer, buflen, module_idP, WS_C_RNTI,
UE_mac_inst[module_idP].crnti,
UE_mac_inst[module_idP].txFrame,
UE_mac_inst[module_idP].txSubframe, 0, 0);
LOG_D(OPT,
"[UE %d][ULSCH] Frame %d subframe %d trace pdu for rnti %x with size %d\n",
module_idP, frameP, subframe, UE_mac_inst[module_idP].crnti,
buflen);
}
}
......
......@@ -8,6 +8,11 @@ How to configure wireshark for dissecting LTE protocols:
- select RLC-LTE, and check all the options except the "May see RLC headers only", and set the "call PDCP dissector for DRB PDUs" to "12-bit SN". Optionally you may select the sequence analysis for RLC AM/UM.
How to use
- start eNB or UE with option -W (or -P if you want to make a pcap file)
- start eNB or UE with option --opt.type wireshark
--opt options are:
--opt.type none/wireshark/pcap
--opt.ip 127.0.0.1 to specify the output IP address (default: 127.0.0.1)
output port is always: 9999 (to change it, change constant: PACKET_MAC_LTE_DEFAULT_UDP_PORT in OAI code)
--opt.path file_name to specify the file name (pcap)
- capture on local interface "lo"
- filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp")
......@@ -111,7 +111,10 @@ typedef enum radio_type_e {
* function def
*/
void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
extern int opt_enabled;
#define trace_pdu(x...) if (opt_enabled) trace_pdu_implementation(x)
void trace_pdu_implementation(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
int ueid, int rntiType, int rnti, uint16_t sysFrame, uint8_t subframe,
int oob_event, int oob_event_value);
......@@ -119,7 +122,6 @@ int init_opt(void);
void terminate_opt(void);
extern int opt_enabled;
//double *timing_analyzer(int index, int direction );
#endif /* OPT_H_ */
......@@ -390,11 +390,13 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
extern RAN_CONTEXT_t RC;
#include <openair1/PHY/phy_extern_ue.h>
/* Remote serveraddress (where Wireshark is running) */
void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
void trace_pdu_implementation(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
int ueid, int rntiType, int rnti, uint16_t sysFrameNumber, uint8_t subFrameNumber, int oob_event,
int oob_event_value) {
MAC_Context_Info_t pdu_context;
int radioType=FDD_RADIO;
LOG_D(OPT,"sending packet to wireshark: direction=%s, size: %d, ueid: %d, rnti: %x, frame/sf: %d.%d\n",
direction?"DL":"UL", pdu_buffer_size, ueid, rnti, sysFrameNumber,subFrameNumber);
if (RC.eNB && RC.eNB[0][0]!=NULL)
radioType=RC.eNB[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
......
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