Stripping GTP-U header at the S-GW and writting it to the TUN SGi interface. First over-the-air ping between the SP-GW and the UE.

master
Pedro Alvarez 7 years ago
parent c183ac509d
commit 0a4e256fec

@ -365,6 +365,19 @@ void
spgw::handle_s1u_pdu(srslte::byte_buffer_t *msg) spgw::handle_s1u_pdu(srslte::byte_buffer_t *msg)
{ {
m_spgw_log->console("Received PDU from S1-U. Bytes=%d\n",msg->N_bytes); m_spgw_log->console("Received PDU from S1-U. Bytes=%d\n",msg->N_bytes);
srslte::gtpu_header_t header;
srslte::gtpu_read_header(msg, &header);
m_spgw_log->console("TEID 0x%x. Bytes=%d\n", header.teid, msg->N_bytes);
int n = write(m_sgi_if, msg->msg, msg->N_bytes);
if(n<0)
{
m_spgw_log->error("Could not write to TUN interface.\n",n);
}
else
{
m_spgw_log->console("Forwarded packet to TUN interface\n");
}
return; return;
} }
uint64_t uint64_t

Loading…
Cancel
Save