Starting to add interface apply_traffic_flow_template between NAS and GW.

master
Pedro Alvarez 6 years ago committed by Andre Puschmann
parent 2fcf8c1827
commit a7e0a0624b

@ -97,7 +97,8 @@ public:
class gw_interface_nas class gw_interface_nas
{ {
public: public:
virtual int setup_if_addr(uint32_t lcid, uint8_t pdn_type, uint32_t ip_addr, uint8_t *ipv6_if_id, char *err_str) = 0; virtual int setup_if_addr(uint32_t lcid, uint8_t pdn_type, uint32_t ip_addr, uint8_t* ipv6_if_id, char* err_str) = 0;
virtual int apply_traffic_flow_template(const LIBLTE_MME_TRAFFIC_FLOW_TEMPLATE_STRUCT* tft) = 0;
}; };
// GW interface for RRC // GW interface for RRC

@ -58,7 +58,8 @@ public:
void write_pdu_mch(uint32_t lcid, srslte::unique_byte_buffer_t pdu); void write_pdu_mch(uint32_t lcid, srslte::unique_byte_buffer_t pdu);
// NAS interface // NAS interface
int setup_if_addr(uint32_t lcid, uint8_t pdn_type, uint32_t ip_addr, uint8_t* ipv6_if_addr, char *err_str); int setup_if_addr(uint32_t lcid, uint8_t pdn_type, uint32_t ip_addr, uint8_t* ipv6_if_addr, char* err_str);
int apply_traffic_flow_template(const LIBLTE_MME_TRAFFIC_FLOW_TEMPLATE_STRUCT* tft);
// RRC interface // RRC interface
void add_mch_port(uint32_t lcid, uint32_t port); void add_mch_port(uint32_t lcid, uint32_t port);

@ -220,7 +220,11 @@ int gw::setup_if_addr(uint32_t lcid, uint8_t pdn_type, uint32_t ip_addr, uint8_t
} }
int gw::apply_traffic_flow_template(const LIBLTE_MME_TRAFFIC_FLOW_TEMPLATE_STRUCT* tft)
{
int err;
return SRSLTE_SUCCESS;
}
/******************************************************************************* /*******************************************************************************
RRC interface RRC interface
*******************************************************************************/ *******************************************************************************/

@ -1133,14 +1133,17 @@ void nas::parse_activate_dedicated_eps_bearer_context_request(uint32_t lcid, uni
{ {
LIBLTE_MME_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_MSG_STRUCT request; LIBLTE_MME_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_MSG_STRUCT request;
liblte_mme_unpack_activate_dedicated_eps_bearer_context_request_msg((LIBLTE_BYTE_MSG_STRUCT*)pdu.get(), &request); liblte_mme_unpack_activate_dedicated_eps_bearer_context_request_msg((LIBLTE_BYTE_MSG_STRUCT*)pdu.get(), &request);
nas_log->info( nas_log->info(
"Received Activate Dedicated EPS bearer context request (eps_bearer_id=%d, linked_bearer_id=%d, proc_id=%d)\n", "Received Activate Dedicated EPS bearer context request (eps_bearer_id=%d, linked_bearer_id=%d, proc_id=%d)\n",
request.eps_bearer_id, request.eps_bearer_id,
request.linked_eps_bearer_id, request.linked_eps_bearer_id,
request.proc_transaction_id); request.proc_transaction_id);
ctxt.rx_count++; LIBLTE_MME_TRAFFIC_FLOW_TEMPLATE_STRUCT* tft = &request.tft;
nas_log->info("Traffic Flow Template: TFT OP code 0x%x, Filter list size %d, Parameter list size %d\n",
tft->tft_op_code,
tft->packet_filter_list_size,
tft->parameter_list_size);
// check the a linked default bearer exists // check the a linked default bearer exists
if (eps_bearer.find(request.linked_eps_bearer_id) == eps_bearer.end()) { if (eps_bearer.find(request.linked_eps_bearer_id) == eps_bearer.end()) {
@ -1158,6 +1161,9 @@ void nas::parse_activate_dedicated_eps_bearer_context_request(uint32_t lcid, uni
return; return;
} }
// apply packet filters to GW
gw->apply_traffic_flow_template(tft);
send_activate_dedicated_eps_bearer_context_accept(request.proc_transaction_id, request.eps_bearer_id); send_activate_dedicated_eps_bearer_context_accept(request.proc_transaction_id, request.eps_bearer_id);
} }

@ -143,6 +143,7 @@ class gw_dummy : public gw_interface_nas, public gw_interface_pdcp
{ {
return SRSLTE_SUCCESS; return SRSLTE_SUCCESS;
} }
int apply_traffic_flow_template(const LIBLTE_MME_TRAFFIC_FLOW_TEMPLATE_STRUCT* tft) { return SRSLTE_SUCCESS; }
void write_pdu(uint32_t lcid, unique_byte_buffer_t pdu) {} void write_pdu(uint32_t lcid, unique_byte_buffer_t pdu) {}
void write_pdu_mch(uint32_t lcid, srslte::unique_byte_buffer_t sdu) {} void write_pdu_mch(uint32_t lcid, srslte::unique_byte_buffer_t sdu) {}
}; };

Loading…
Cancel
Save