lte/gateway/c/core/oai/tasks/amf/amf_smf_send.cpp
/***************************************************************************
**                                                                        **
** Name:    amf_validate_dnn()                                            **
**                                                                        **
** Description:                                                           **
** This function validates the DNN string received from UE or from        **
** mme.yml againt apn stored in amf_context for a particular imsi.        **
***************************************************************************/


This function validates the DNN string received from UE or from
mme.yml againt apn stored in amf_context for a particular imsi.
This function validates the DNN string received from UE or from mme . yml againt apn stored in amf_context for a particular imsi .
int amf_validate_dnn(
    const amf_context_s* amf_ctxt_p, std::string dnn_string, int* index,
    bool ue_sent_dnn) {
  if (dnn_string.empty()) {
    return RETURNok;
  }
  for (uint8_t i = 0; i < amf_ctxt_p->apn_config_profile.nb_apns; i++) {
    if (strcmp(
            amf_ctxt_p->apn_config_profile.apn_configuration[i]
                .service_selection,
            dnn_string.c_str()) == 0) {
      *index = i;
      return RETURNok;
    }
  }
  *index = 0;
  return ue_sent_dnn ? RETURNerror : RETURNok;
}
int amf_validate_dnn ( const amf_context_s * amf_ctxt_p , std :: string dnn_string , int * index , bool ue_sent_dnn ) { if ( dnn_string . empty ( ) ) { return RETURNok ; } for ( uint8_t i = 0 ; i < amf_ctxt_p -> apn_config_profile . nb_apns ; i ++ ) { if ( strcmp ( amf_ctxt_p -> apn_config_profile . apn_configuration [ i ] . service_selection , dnn_string . c_str ( ) ) == 0 ) { * index = i ; return RETURNok ; } } * index = 0 ; return ue_sent_dnn ? RETURNerror : RETURNok ; }
Name:    amf_validate_dnn()
Name : amf_validate_dnn ()
// Validating apn_configuration_s