srsue/extnas: write NAS frames to the given PCAP file

extnas/release_20_10
Vadim Yanitskiy 2 years ago
parent fbb2ed3aa9
commit 2df561cfa2
  1. 9
      srsue/src/stack/upper/nas_ext.cc

@ -173,6 +173,9 @@ void nas_ext::handle_rrctl_conn_establish(rrctl::proto::msg_disc disc, const uin
unique_byte_buffer_t nas_pdu = srslte::allocate_unique_buffer(*pool, true);
nas_pdu->append_bytes(pdu, pdu_len);
if (pcap != nullptr)
pcap->write_nas(nas_pdu->msg, nas_pdu->N_bytes);
rrc->connection_request(cause, std::move(nas_pdu));
}
@ -188,6 +191,9 @@ void nas_ext::handle_rrctl_data(rrctl::proto::msg_disc disc, const uint8_t* msg,
unique_byte_buffer_t nas_pdu = srslte::allocate_unique_buffer(*pool, true);
nas_pdu->append_bytes(msg, len);
if (pcap != nullptr)
pcap->write_nas(nas_pdu->msg, nas_pdu->N_bytes);
// Apply pre-configured EEA algorythm (if enabled)
cipher_encrypt(nas_pdu.get());
// Apply pre-configured EIA algorythm (if enabled)
@ -465,6 +471,9 @@ void nas_ext::write_pdu(uint32_t lcid, srslte::unique_byte_buffer_t pdu)
nas_log->error("Received DL NAS PDU with unknown sec_hdr=%02x\n", sec_hdr_type);
}
if (pcap != nullptr)
pcap->write_nas(pdu->msg, pdu->N_bytes);
rrctl::codec::enc_data_ind(msg, pdu->msg, pdu->N_bytes, lcid);
iface->write(msg);
}

Loading…
Cancel
Save