int main(int argc, char *argv[])
{

  CHECK_INIT_RETURN(itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX,
                              tasks_info, messages_info, messages_definition_xml,
                              mme_config.itti_config.log_file));
  /* Parse the command line for options and set the mme_config accordingly. */
  CHECK_INIT_RETURN(config_parse_opt_line(argc, argv, &mme_config) < 0);
  MSC_INIT(MSC_MME_GW, THREAD_MAX+TASK_MAX);

  /* Calling each layer init function */
  CHECK_INIT_RETURN(log_init(&mme_config, oai_epc_log_specific));
  CHECK_INIT_RETURN(nas_init(&mme_config));
  CHECK_INIT_RETURN(sctp_init(&mme_config));
  CHECK_INIT_RETURN(udp_init(&mme_config));
  CHECK_INIT_RETURN(gtpv1u_init(&mme_config));
  CHECK_INIT_RETURN(s1ap_mme_init(&mme_config));
  CHECK_INIT_RETURN(mme_app_init(&mme_config));
  CHECK_INIT_RETURN(s6a_init(&mme_config));
  CHECK_INIT_RETURN(sgw_lite_init(mme_config.config_file));
  /* Handle signals here */
  itti_wait_tasks_end();

  return 0;
}
Exemple #2
0
/*------------------------------------------------------------------------------*/
int
main (int argc, char **argv) {

    int32_t i;
    // pointers signal buffers (s = transmit, r,r0 = receive)
    clock_t t;

    //FILE *SINRpost;
    //char SINRpost_fname[512];
    // sprintf(SINRpost_fname,"postprocSINR.m");
    //SINRpost = fopen(SINRpost_fname,"w");
    // variables/flags which are set by user on command-line


    //Default values if not changed by the user in get_simulation_options();

#if !defined(ENABLE_ITTI)
    pthread_t tid;
    int err;

    if ((err = pthread_sigmask (SIG_BLOCK, &sigblock, NULL)) != 0) {
        printf ("SIG_BLOCK error\n");
        return -1;
    }
    if (pthread_create (&tid, NULL, sigh, NULL)) {
        printf ("Pthread for tracing Signals is not created!\n");
        return -1;
    } else {
        printf ("Pthread for tracing Signals is created!\n");
    }
#endif

    LOG_N(EMU,
          ">>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU initialization done <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n");

#if defined(ENABLE_ITTI)
    // Handle signals until all tasks are terminated
    if (create_phani_tasks(oai_emulation.info.nb_enb_local, oai_emulation.info.nb_ue_local) >= 0) {
        itti_wait_tasks_end();
    } else {
        exit(-1); // need a softer mode
    }
#endif
    LOG_N(EMU,
          ">>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU Ending <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n");

    raise (SIGINT);
    oai_shutdown ();

    return (0);
}
Exemple #3
0
int main(int argc, char *argv[])
{
    /* Parse the command line for options and set the mme_config accordingly. */
    CHECK_INIT_RETURN(config_parse_opt_line(argc, argv, &mme_config));

    /* Calling each layer init function */
    CHECK_INIT_RETURN(log_init(&mme_config, oai_sgw_log_specific));
    CHECK_INIT_RETURN(itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL));

    CHECK_INIT_RETURN(udp_init(&mme_config));
    CHECK_INIT_RETURN(s11_sgw_init(&mme_config));
    CHECK_INIT_RETURN(gtpv1u_init(&mme_config));
    CHECK_INIT_RETURN(sgi_init(&spgw_config.pgw_config));

    CHECK_INIT_RETURN(sgw_lite_init(mme_config.config_file));

    /* Handle signals here */
    itti_wait_tasks_end();

    return 0;
}