Introduced function to check whether it is a transmitting or a receiving SDAP entity
This commit is contained in:
@@ -888,13 +888,8 @@ void add_drb(int is_gnb,
|
||||
exit(-1);
|
||||
}
|
||||
pdusession_id = s->cnAssociation->choice.sdap_Config->pdu_Session;
|
||||
if (is_gnb) {
|
||||
has_sdap_rx = s->cnAssociation->choice.sdap_Config->sdap_HeaderUL == NR_SDAP_Config__sdap_HeaderUL_present;
|
||||
has_sdap_tx = s->cnAssociation->choice.sdap_Config->sdap_HeaderDL == NR_SDAP_Config__sdap_HeaderDL_present;
|
||||
} else {
|
||||
has_sdap_tx = s->cnAssociation->choice.sdap_Config->sdap_HeaderUL == NR_SDAP_Config__sdap_HeaderUL_present;
|
||||
has_sdap_rx = s->cnAssociation->choice.sdap_Config->sdap_HeaderDL == NR_SDAP_Config__sdap_HeaderDL_present;
|
||||
}
|
||||
has_sdap_rx = is_sdap_rx(is_gnb, s->cnAssociation->choice.sdap_Config);
|
||||
has_sdap_tx = is_sdap_tx(is_gnb, s->cnAssociation->choice.sdap_Config);
|
||||
is_sdap_DefaultDRB = s->cnAssociation->choice.sdap_Config->defaultDRB == true ? 1 : 0;
|
||||
mappedQFIs2Add = (NR_QFI_t*)s->cnAssociation->choice.sdap_Config->mappedQoS_FlowsToAdd->list.array[0];
|
||||
mappedQFIs2AddCount = s->cnAssociation->choice.sdap_Config->mappedQoS_FlowsToAdd->list.count;
|
||||
|
||||
@@ -37,6 +37,34 @@ static nr_sdap_entity_info sdap_info;
|
||||
|
||||
instance_t *N3GTPUInst = NULL;
|
||||
|
||||
/**
|
||||
* @brief indicates whether it is a receiving SDAP entity
|
||||
* i.e. for UE, header for DL data is present
|
||||
* for gNB, header for UL data is present
|
||||
*/
|
||||
bool is_sdap_rx(bool is_gnb, NR_SDAP_Config_t *sdap_config)
|
||||
{
|
||||
if (is_gnb) {
|
||||
return sdap_config->sdap_HeaderUL == NR_SDAP_Config__sdap_HeaderUL_present;
|
||||
} else {
|
||||
return sdap_config->sdap_HeaderDL == NR_SDAP_Config__sdap_HeaderDL_present;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief indicates whether it is a transmitting SDAP entity
|
||||
* i.e. for UE, header for UL data is present
|
||||
* for gNB, header for DL data is present
|
||||
*/
|
||||
bool is_sdap_tx(bool is_gnb, NR_SDAP_Config_t *sdap_config)
|
||||
{
|
||||
if (is_gnb) {
|
||||
return sdap_config->sdap_HeaderDL == NR_SDAP_Config__sdap_HeaderDL_present;
|
||||
} else {
|
||||
return sdap_config->sdap_HeaderUL == NR_SDAP_Config__sdap_HeaderUL_present;
|
||||
}
|
||||
}
|
||||
|
||||
void nr_pdcp_submit_sdap_ctrl_pdu(ue_id_t ue_id, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu)
|
||||
{
|
||||
|
||||
|
||||
@@ -188,4 +188,19 @@ bool nr_sdap_delete_entity(ue_id_t ue_id, int pdusession_id);
|
||||
* @return True, it deleted at least one entity, false otherwise.
|
||||
*/
|
||||
bool nr_sdap_delete_ue_entities(ue_id_t ue_id);
|
||||
|
||||
/**
|
||||
* @brief indicates whether it is a receiving SDAP entity
|
||||
* i.e. for UE, header for DL data is present
|
||||
* for gNB, header for UL data is present
|
||||
*/
|
||||
bool is_sdap_rx(bool is_gnb, NR_SDAP_Config_t *sdap_config);
|
||||
|
||||
/**
|
||||
* @brief indicates whether it is a transmitting SDAP entity
|
||||
* i.e. for UE, header for UL data is present
|
||||
* for gNB, header for DL data is present
|
||||
*/
|
||||
bool is_sdap_tx(bool is_gnb, NR_SDAP_Config_t *sdap_config);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user