src/oai_sgw/s11/s11_sgw.c
static nw_rc_t s11_sgw_ulp_process_stack_req_cb (nw_gtpv2c_ulp_handle_t hUlp, nw_gtpv2c_ulp_api_t * pUlpApi)
{
  int                                     ret = 0;

  DevAssert (pUlpApi );

  switch (pUlpApi->apiType) {
    case NW_GTPV2C_ULP_API_INITIAL_REQ_IND:
      OAILOG_DEBUG (LOG_S11, "Received initial req indication\n");

      switch (pUlpApi->u_api_info.initialReqIndInfo.msgType) {
        case NW_GTP_CREATE_SESSION_REQ:
          ret = s11_sgw_handle_create_session_request (&s11_sgw_stack_handle, pUlpApi);
          break;

        case NW_GTP_MODIFY_BEARER_REQ:
          ret = s11_sgw_handle_modify_bearer_request (&s11_sgw_stack_handle, pUlpApi);
          break;

        case NW_GTP_DELETE_SESSION_REQ:
          ret = s11_sgw_handle_delete_session_request (&s11_sgw_stack_handle, pUlpApi);
          break;

        case NW_GTP_RELEASE_ACCESS_BEARERS_REQ:
          ret = s11_sgw_handle_release_access_bearers_request (&s11_sgw_stack_handle, pUlpApi);
          break;

        case NW_GTP_DOWNLINK_DATA_NOTIFICATION_FAILURE_IND:
          ret = s11_sgw_handle_downlink_data_notification_failure_ind (&s11_sgw_stack_handle, pUlpApi);
          break;

        default:
          OAILOG_WARNING (LOG_S11,  "Received unhandled initial request message type %d\n", pUlpApi->u_api_info.initialReqIndInfo.msgType);
          break;
      }
      break;

      case NW_GTPV2C_ULP_API_RSP_FAILURE_IND:
        OAILOG_WARNING (LOG_S11, "Received response failure indication from ULP API\n");
        break;

      case NW_GTPV2C_ULP_API_TRIGGERED_RSP_IND:
        OAILOG_WARNING (LOG_S11, "Received response indication from ULP API\n");
        switch (pUlpApi->u_api_info.triggeredRspIndInfo.msgType) {
        case NW_GTP_CREATE_BEARER_RSP:
          ret = s11_sgw_handle_create_bearer_response (&s11_sgw_stack_handle, pUlpApi);
          break;

        case NW_GTP_DOWNLINK_DATA_NOTIFICATION_ACK:
          ret = s11_sgw_handle_downlink_data_notification_ack (&s11_sgw_stack_handle, pUlpApi);
          break;


          default:
            OAILOG_WARNING (LOG_S11,  "Received unhandled response message type %d\n", pUlpApi->u_api_info.triggeredRspIndInfo.msgType);
            break;
        }
        break;

    default:
      OAILOG_ERROR (LOG_S11, "Received unknown stack req message %d\n", pUlpApi->apiType);
      break;
  }

  return ret == -1 ? NW_FAILURE : NW_OK;
}
/* ULP callback for the GTPv2-C stack */
//------------------------------------------------------------------------------
ULP callback for the GTPv2-C stack
ULP callback for the GTPv2 - C stack
static nw_rc_t s11_sgw_ulp_process_stack_req_cb (nw_gtpv2c_ulp_handle_t hUlp, nw_gtpv2c_ulp_api_t * pUlpApi)
{
  int                                     ret = 0;
  DevAssert (pUlpApi );
  switch (pUlpApi->apiType) {
    case NW_GTPV2C_ULP_API_INITIAL_REQ_IND:
      OAILOG_DEBUG (LOG_S11, "Received initial req indication\n");
      switch (pUlpApi->u_api_info.initialReqIndInfo.msgType) {
        case NW_GTP_CREATE_SESSION_REQ:
          ret = s11_sgw_handle_create_session_request (&s11_sgw_stack_handle, pUlpApi);
          break;
        case NW_GTP_MODIFY_BEARER_REQ:
          ret = s11_sgw_handle_modify_bearer_request (&s11_sgw_stack_handle, pUlpApi);
          break;
        case NW_GTP_DELETE_SESSION_REQ:
          ret = s11_sgw_handle_delete_session_request (&s11_sgw_stack_handle, pUlpApi);
          break;
        case NW_GTP_RELEASE_ACCESS_BEARERS_REQ:
          ret = s11_sgw_handle_release_access_bearers_request (&s11_sgw_stack_handle, pUlpApi);
          break;
        case NW_GTP_DOWNLINK_DATA_NOTIFICATION_FAILURE_IND:
          ret = s11_sgw_handle_downlink_data_notification_failure_ind (&s11_sgw_stack_handle, pUlpApi);
          break;
        default:
          OAILOG_WARNING (LOG_S11,  "Received unhandled initial request message type %d\n", pUlpApi->u_api_info.initialReqIndInfo.msgType);
          break;
      }
      break;
      case NW_GTPV2C_ULP_API_RSP_FAILURE_IND:
        OAILOG_WARNING (LOG_S11, "Received response failure indication from ULP API\n");
        break;
      case NW_GTPV2C_ULP_API_TRIGGERED_RSP_IND:
        OAILOG_WARNING (LOG_S11, "Received response indication from ULP API\n");
        switch (pUlpApi->u_api_info.triggeredRspIndInfo.msgType) {
        case NW_GTP_CREATE_BEARER_RSP:
          ret = s11_sgw_handle_create_bearer_response (&s11_sgw_stack_handle, pUlpApi);
          break;
        case NW_GTP_DOWNLINK_DATA_NOTIFICATION_ACK:
          ret = s11_sgw_handle_downlink_data_notification_ack (&s11_sgw_stack_handle, pUlpApi);
          break;
          default:
            OAILOG_WARNING (LOG_S11,  "Received unhandled response message type %d\n", pUlpApi->u_api_info.triggeredRspIndInfo.msgType);
            break;
        }
        break;
    default:
      OAILOG_ERROR (LOG_S11, "Received unknown stack req message %d\n", pUlpApi->apiType);
      break;
  }
  return ret == -1 ? NW_FAILURE : NW_OK;
}
static nw_rc_t s11_sgw_ulp_process_stack_req_cb ( nw_gtpv2c_ulp_handle_t hUlp , nw_gtpv2c_ulp_api_t * pUlpApi ) { int ret = 0 ; DevAssert ( pUlpApi ) ; switch ( pUlpApi -> apiType ) { case NW_GTPV2C_ULP_API_INITIAL_REQ_IND : OAILOG_DEBUG ( LOG_S11 , " \n " ) ; switch ( pUlpApi -> u_api_info . initialReqIndInfo . msgType ) { case NW_GTP_CREATE_SESSION_REQ : ret = s11_sgw_handle_create_session_request ( & s11_sgw_stack_handle , pUlpApi ) ; break ; case NW_GTP_MODIFY_BEARER_REQ : ret = s11_sgw_handle_modify_bearer_request ( & s11_sgw_stack_handle , pUlpApi ) ; break ; case NW_GTP_DELETE_SESSION_REQ : ret = s11_sgw_handle_delete_session_request ( & s11_sgw_stack_handle , pUlpApi ) ; break ; case NW_GTP_RELEASE_ACCESS_BEARERS_REQ : ret = s11_sgw_handle_release_access_bearers_request ( & s11_sgw_stack_handle , pUlpApi ) ; break ; case NW_GTP_DOWNLINK_DATA_NOTIFICATION_FAILURE_IND : ret = s11_sgw_handle_downlink_data_notification_failure_ind ( & s11_sgw_stack_handle , pUlpApi ) ; break ; default : OAILOG_WARNING ( LOG_S11 , " \n " , pUlpApi -> u_api_info . initialReqIndInfo . msgType ) ; break ; } break ; case NW_GTPV2C_ULP_API_RSP_FAILURE_IND : OAILOG_WARNING ( LOG_S11 , " \n " ) ; break ; case NW_GTPV2C_ULP_API_TRIGGERED_RSP_IND : OAILOG_WARNING ( LOG_S11 , " \n " ) ; switch ( pUlpApi -> u_api_info . triggeredRspIndInfo . msgType ) { case NW_GTP_CREATE_BEARER_RSP : ret = s11_sgw_handle_create_bearer_response ( & s11_sgw_stack_handle , pUlpApi ) ; break ; case NW_GTP_DOWNLINK_DATA_NOTIFICATION_ACK : ret = s11_sgw_handle_downlink_data_notification_ack ( & s11_sgw_stack_handle , pUlpApi ) ; break ; default : OAILOG_WARNING ( LOG_S11 , " \n " , pUlpApi -> u_api_info . triggeredRspIndInfo . msgType ) ; break ; } break ; default : OAILOG_ERROR ( LOG_S11 , " \n " , pUlpApi -> apiType ) ; break ; } return ret == -1 ? NW_FAILURE : NW_OK ; }
ULP callback for the GTPv2-C stack
ULP callback for the GTPv2 - C stack