Starting to add S1AP pcap to EPC.

master
Pedro Alvarez 6 years ago
parent ff49e56871
commit ba5708dc60

@ -31,6 +31,7 @@
#include "srslte/asn1/liblte_mme.h"
#include "srslte/common/common.h"
#include "srslte/common/log.h"
#include "srslte/common/s1ap_pcap.h"
#include <strings.h>
#include <arpa/inet.h>
@ -125,6 +126,9 @@ private:
//FIXME the GTP-C should be moved to the MME class, when the packaging of GTP-C messages is done.
mme_gtpc *m_mme_gtpc;
//PCAP
srslte::s1ap_pcap m_pcap;
};
inline uint32_t

@ -99,6 +99,8 @@ s1ap::init(s1ap_args_t s1ap_args, srslte::log_filter *s1ap_log, hss_interface_s1
//Initialize S1-MME
m_s1mme = enb_listen();
//Init PCAP
m_pcap.open("/tmp/epc.pcap");
m_s1ap_log->info("S1AP Initialized\n");
return 0;
}
@ -130,6 +132,9 @@ s1ap::stop()
s1ap_mngmt_proc::cleanup();
s1ap_nas_transport::cleanup();
s1ap_ctx_mngmt_proc::cleanup();
//PCAP
m_pcap.close();
return;
}
@ -208,6 +213,8 @@ s1ap::handle_s1ap_rx_pdu(srslte::byte_buffer_t *pdu, struct sctp_sndrcvinfo *enb
return false;
}
m_pcap.write_s1ap(pdu->msg,pdu->N_bytes);
switch(rx_pdu.choice_type) {
case LIBLTE_S1AP_S1AP_PDU_CHOICE_INITIATINGMESSAGE:
m_s1ap_log->info("Received initiating PDU\n");

Loading…
Cancel
Save