-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ecaa05
commit e01ac9f
Showing
20 changed files
with
6,404 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[submodule "libs/flexric"] | ||
[submodule "flexric"] | ||
path = libs/flexric | ||
url = https://gitlab.eurecom.fr/mosaic5g/flexric.git | ||
branch = dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a workaround to enable compilation without path errors. :( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
/* | ||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The OpenAirInterface Software Alliance licenses this file to You under | ||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file | ||
* except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.openairinterface.org/?page_id=698 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*------------------------------------------------------------------------------- | ||
* For more information about the OpenAirInterface (OAI) Software Alliance: | ||
* [email protected] | ||
*/ | ||
|
||
#include "fill_rnd_data_e2_setup_req.h" | ||
#include "../../src/lib/e2ap/e2ap_node_comp_interface_type_wrapper.h" | ||
#include "../../src/util/byte_array.h" | ||
#include <assert.h> | ||
#include <stdlib.h> | ||
#include <stdint.h> | ||
|
||
#ifdef E2AP_V1 | ||
|
||
#elif defined(E2AP_V2) || defined(E2AP_V3) | ||
|
||
e2ap_node_component_config_add_t fill_ngap_e2ap_node_component_config_add(void) | ||
{ | ||
e2ap_node_component_config_add_t dst = {0}; | ||
|
||
// Mandatory | ||
// 9.2.26 | ||
dst.e2_node_comp_interface_type = NG_E2AP_NODE_COMP_INTERFACE_TYPE; | ||
// Bug!! Optional in the standard, mandatory in ASN.1 | ||
// 9.2.32 | ||
dst.e2_node_comp_id.type = NG_E2AP_NODE_COMP_INTERFACE_TYPE; | ||
|
||
const char ng_msg[] = "Dummy message"; | ||
dst.e2_node_comp_id.ng_amf_name = cp_str_to_ba(ng_msg); | ||
|
||
// Mandatory | ||
// 9.2.27 | ||
const char req[] = "NGAP Request Message sent"; | ||
const char res[] = "NGAP Response Message reveived"; | ||
|
||
dst.e2_node_comp_conf.request = cp_str_to_ba(req); | ||
dst.e2_node_comp_conf.response = cp_str_to_ba(res); | ||
return dst; | ||
} | ||
|
||
// F1AP | ||
e2ap_node_component_config_add_t fill_f1ap_e2ap_node_component_config_add(void) | ||
{ | ||
e2ap_node_component_config_add_t dst = {0}; | ||
|
||
// Mandatory | ||
// 9.2.26 | ||
dst.e2_node_comp_interface_type = F1_E2AP_NODE_COMP_INTERFACE_TYPE; | ||
// Bug!! Optional in the standard, mandatory in ASN.1 | ||
// 9.2.32 | ||
dst.e2_node_comp_id.type = F1_E2AP_NODE_COMP_INTERFACE_TYPE; | ||
|
||
dst.e2_node_comp_id.f1_gnb_du_id = 1023; | ||
|
||
// Mandatory | ||
// 9.2.27 | ||
const char req[] = "F1AP Request Message sent"; | ||
const char res[] = "F1AP Response Message reveived"; | ||
|
||
dst.e2_node_comp_conf.request = cp_str_to_ba(req); | ||
dst.e2_node_comp_conf.response = cp_str_to_ba(res); | ||
return dst; | ||
} | ||
// E1AP | ||
e2ap_node_component_config_add_t fill_e1ap_e2ap_node_component_config_add(void) | ||
{ | ||
e2ap_node_component_config_add_t dst = {0}; | ||
|
||
// Mandatory | ||
// 9.2.26 | ||
dst.e2_node_comp_interface_type = E1_E2AP_NODE_COMP_INTERFACE_TYPE; | ||
// Bug!! Optional in the standard, mandatory in ASN.1 | ||
// 9.2.32 | ||
dst.e2_node_comp_id.type = E1_E2AP_NODE_COMP_INTERFACE_TYPE; | ||
|
||
dst.e2_node_comp_id.e1_gnb_cu_up_id = 1025; | ||
|
||
// Mandatory | ||
// 9.2.27 | ||
const char req[] = "E1AP Request Message sent"; | ||
const char res[] = "E1AP Response Message reveived"; | ||
|
||
dst.e2_node_comp_conf.request = cp_str_to_ba(req); | ||
dst.e2_node_comp_conf.response = cp_str_to_ba(res); | ||
return dst; | ||
} | ||
|
||
// S1AP | ||
e2ap_node_component_config_add_t fill_s1ap_e2ap_node_component_config_add(void) | ||
{ | ||
e2ap_node_component_config_add_t dst = {0}; | ||
|
||
// Mandatory | ||
// 9.2.26 | ||
dst.e2_node_comp_interface_type = S1_E2AP_NODE_COMP_INTERFACE_TYPE; | ||
// Bug!! Optional in the standard, mandatory in ASN.1 | ||
// 9.2.32 | ||
dst.e2_node_comp_id.type = S1_E2AP_NODE_COMP_INTERFACE_TYPE; | ||
|
||
const char str[] = "S1 NAME"; | ||
dst.e2_node_comp_id.s1_mme_name = cp_str_to_ba(str); | ||
|
||
// Mandatory | ||
// 9.2.27 | ||
const char req[] = "S1AP Request Message sent"; | ||
const char res[] = "S1AP Response Message reveived"; | ||
|
||
dst.e2_node_comp_conf.request = cp_str_to_ba(req); | ||
dst.e2_node_comp_conf.response = cp_str_to_ba(res); | ||
return dst; | ||
} | ||
|
||
|
||
|
||
#else | ||
static_assert(0!=0, "Unknown E2AP version"); | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The OpenAirInterface Software Alliance licenses this file to You under | ||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file | ||
* except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.openairinterface.org/?page_id=698 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*------------------------------------------------------------------------------- | ||
* For more information about the OpenAirInterface (OAI) Software Alliance: | ||
* [email protected] | ||
*/ | ||
|
||
#include "../../src/lib/e2ap/e2ap_node_component_config_add_wrapper.h" | ||
|
||
#ifdef E2AP_V1 | ||
|
||
#elif defined(E2AP_V2) || defined(E2AP_V3) | ||
|
||
e2ap_node_component_config_add_t fill_ngap_e2ap_node_component_config_add(void); | ||
|
||
e2ap_node_component_config_add_t fill_f1ap_e2ap_node_component_config_add(void); | ||
|
||
e2ap_node_component_config_add_t fill_e1ap_e2ap_node_component_config_add(void); | ||
|
||
e2ap_node_component_config_add_t fill_s1ap_e2ap_node_component_config_add(void); | ||
|
||
#else | ||
static_assert(0!=0, "Unknown E2AP version"); | ||
#endif | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The OpenAirInterface Software Alliance licenses this file to You under | ||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file | ||
* except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.openairinterface.org/?page_id=698 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*------------------------------------------------------------------------------- | ||
* For more information about the OpenAirInterface (OAI) Software Alliance: | ||
* [email protected] | ||
*/ | ||
|
||
#include "fill_rnd_data_gtp.h" | ||
#include "../../src/util/time_now_us.h" | ||
|
||
#include <assert.h> | ||
#include <stdlib.h> | ||
#include <time.h> | ||
|
||
void fill_gtp_ind_data(gtp_ind_data_t* ind) | ||
{ | ||
assert(ind != NULL); | ||
|
||
srand(time(0)); | ||
|
||
int const mod = 1024; | ||
|
||
// Get indication message | ||
gtp_ind_msg_t* ind_msg = &ind->msg; | ||
|
||
// Set time now | ||
ind_msg->tstamp = time_now_us(); | ||
|
||
// Set random number of messages | ||
ind_msg->len = rand()%4; | ||
if(ind_msg->len > 0 ){ | ||
ind_msg->ngut = calloc(ind_msg->len, sizeof(gtp_ngu_t_stats_t) ); | ||
assert(ind_msg->ngut != NULL); | ||
} | ||
|
||
for(uint32_t i = 0; i < ind_msg->len; ++i){ | ||
gtp_ngu_t_stats_t* ngut = &ind_msg->ngut[i]; | ||
|
||
// Fill dummy data in your data structure | ||
ngut->rnti=abs(rand()%mod) ; | ||
ngut->qfi=abs(rand()%mod); | ||
ngut->teidgnb=abs(rand()%mod); | ||
ngut->teidupf=abs(rand()%mod); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The OpenAirInterface Software Alliance licenses this file to You under | ||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file | ||
* except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.openairinterface.org/?page_id=698 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*------------------------------------------------------------------------------- | ||
* For more information about the OpenAirInterface (OAI) Software Alliance: | ||
* [email protected] | ||
*/ | ||
|
||
#ifndef FILL_RND_DATA_GTP_H | ||
#define FILL_RND_DATA_GTP_H | ||
|
||
#include "../../src/sm/gtp_sm/ie/gtp_data_ie.h" | ||
|
||
void fill_gtp_ind_data(gtp_ind_data_t* ind); | ||
|
||
#endif | ||
|
||
|
Oops, something went wrong.