lte/gateway/c/core/oai/tasks/amf/prepare_request_for_smf.cpp
/***************************************************************************
**                                                                        **
** Name:    amf_smf_create_ipv4_session_grpc_req()                        **
**                                                                        **
** Description: Fill session establishment gRPC request to SMF            **
**                                                                        **
**                                                                        **
***************************************************************************/


Fill session establishment gRPC request to SMF
Fill session establishment gRPC request to SMF
int amf_smf_create_ipv4_session_grpc_req(
    char* imsi, uint8_t* apn, uint32_t pdu_session_id,
    uint32_t pdu_session_type, uint32_t gnb_gtp_teid, uint8_t pti,
    uint8_t* gnb_gtp_teid_ip_addr, char* ipv4_addr, const ambr_t& state_ambr) {
  imsi64_t imsi64                   = INVALID_IMSI64;
  ue_m5gmm_context_s* ue_mm_context = NULL;
  amf_context_t* amf_ctxt_p         = NULL;
  OAILOG_INFO(
      LOG_AMF_APP,
      "Sending msg(grpc) to :[sessiond] for ue: [%s] pdu session: [%u]\n", imsi,
      pdu_session_id);
  IMSI_STRING_TO_IMSI64((char*) imsi, &imsi64);
  ue_mm_context = lookup_ue_ctxt_by_imsi(imsi64);
  if (ue_mm_context) {
    amf_ctxt_p = &ue_mm_context->amf_context;
  }
  if (!(amf_ctxt_p)) {
    OAILOG_ERROR(LOG_NAS_AMF, "IMSI is invalid\n");
    OAILOG_FUNC_RETURN(LOG_NAS_AMF, RETURNerror);
  }
  return AMFClientServicer::getInstance().amf_smf_create_pdu_session_ipv4(
      imsi, apn, pdu_session_id, pdu_session_type, gnb_gtp_teid, pti,
      gnb_gtp_teid_ip_addr, ipv4_addr, VERSION_0, state_ambr);
}
int amf_smf_create_ipv4_session_grpc_req ( char * imsi , uint8_t * apn , uint32_t pdu_session_id , uint32_t pdu_session_type , uint32_t gnb_gtp_teid , uint8_t pti , uint8_t * gnb_gtp_teid_ip_addr , char * ipv4_addr , const ambr_t & state_ambr ) { imsi64_t imsi64 = INVALID_IMSI64 ; ue_m5gmm_context_s * ue_mm_context = NULL ; amf_context_t * amf_ctxt_p = NULL ; OAILOG_INFO ( LOG_AMF_APP , " \n " , imsi , pdu_session_id ) ; IMSI_STRING_TO_IMSI64 ( ( char * ) imsi , & imsi64 ) ; ue_mm_context = lookup_ue_ctxt_by_imsi ( imsi64 ) ; if ( ue_mm_context ) { amf_ctxt_p = & ue_mm_context -> amf_context ; } if ( ! ( amf_ctxt_p ) ) { OAILOG_ERROR ( LOG_NAS_AMF , " \n " ) ; OAILOG_FUNC_RETURN ( LOG_NAS_AMF , RETURNerror ) ; } return AMFClientServicer :: getInstance ( ) . amf_smf_create_pdu_session_ipv4 ( imsi , apn , pdu_session_id , pdu_session_type , gnb_gtp_teid , pti , gnb_gtp_teid_ip_addr , ipv4_addr , VERSION_0 , state_ambr ) ; }
Name:    amf_smf_create_ipv4_session_grpc_req()
Name : amf_smf_create_ipv4_session_grpc_req ()