Commit f93345d8 authored by wu.jing's avatar wu.jing

update oai-nrue on arm

parent 6421754b
......@@ -936,7 +936,7 @@ void *nas_nrue_task(void *args_p)
LOG_I(NAS, "Received PDU Session Establishment Accept, UE IP: %d.%d.%d.%d\n",
*(payload_container+offset+3), *(payload_container+offset+4),
*(payload_container+offset+5), *(payload_container+offset+6));
nas_config(1,third_octet,fourth_octet,"oaitun_ue");
nas_config(1,third_octet,fourth_octet,"openxgtun_ue");
break;
}
}
......@@ -1008,7 +1008,7 @@ void *nas_nrue_task(void *args_p)
LOG_I(NAS, "Received PDU Session Establishment Accept, UE IP: %d.%d.%d.%d\n",
*(payload_container+offset+3), *(payload_container+offset+4),
*(payload_container+offset+5), *(payload_container+offset+6));
nas_config(1,third_octet,fourth_octet,"oaitun_ue");
nas_config(1,third_octet,fourth_octet,"openxgtun_ue");
break;
}
}
......
......@@ -262,11 +262,11 @@ int esm_ebr_context_create(
"ip rule add to %s/32 table %d && "
"ip route add default dev %s%d table %d",
ipv4_addr, netmask, broadcast,
UE_NAS_USE_TUN ? "oaitun_ue" : "oip", ueid + 1,
UE_NAS_USE_TUN ? "oaitun_ue" : "oip", ueid + 1,
UE_NAS_USE_TUN ? "openxgtun_ue" : "oip", ueid + 1,
UE_NAS_USE_TUN ? "openxgtun_ue" : "oip", ueid + 1,
ipv4_addr, ueid + 10000,
ipv4_addr, ueid + 10000,
UE_NAS_USE_TUN ? "oaitun_ue" : "oip",
UE_NAS_USE_TUN ? "openxgtun_ue" : "oip",
ueid + 1, ueid + 10000);
if (!get_softmodem_params()->nsa)
{
......@@ -277,11 +277,11 @@ int esm_ebr_context_create(
"ip rule add to %s/32 table %d && "
"ip route add default dev %s%d table %d",
ipv4_addr, netmask, broadcast,
UE_NAS_USE_TUN ? "oaitun_ue" : "oip", ueid + 1,
UE_NAS_USE_TUN ? "oaitun_ue" : "oip", ueid + 1,
UE_NAS_USE_TUN ? "openxgtun_ue" : "oip", ueid + 1,
UE_NAS_USE_TUN ? "openxgtun_ue" : "oip", ueid + 1,
ipv4_addr, ueid + 10000,
ipv4_addr, ueid + 10000,
UE_NAS_USE_TUN ? "oaitun_ue" : "oip",
UE_NAS_USE_TUN ? "openxgtun_ue" : "oip",
ueid + 1, ueid + 10000);
if ( res<0 ) {
......@@ -314,11 +314,11 @@ int esm_ebr_context_create(
"ip rule add to %s/32 table %d && "
"ip route add default dev %s%d table %d",
ipv4_addr, netmask, broadcast,
UE_NAS_USE_TUN ? "oaitun_nru" : "oip", ueid + 1,
UE_NAS_USE_TUN ? "oaitun_nru" : "oip", ueid + 1,
UE_NAS_USE_TUN ? "openxgtun_nru" : "oip", ueid + 1,
UE_NAS_USE_TUN ? "openxgtun_nru" : "oip", ueid + 1,
ipv4_addr, ueid + 10000,
ipv4_addr, ueid + 10000,
UE_NAS_USE_TUN ? "oaitun_nru" : "oip",
UE_NAS_USE_TUN ? "openxgtun_nru" : "oip",
ueid + 1, ueid + 10000);
if ( res<0 ) {
......
......@@ -92,10 +92,10 @@ int netlink_init_mbms_tun(char *ifprefix, int id) {//for UE, id = 1, 2, ...,
char ifname[64];
if (id > 0) {
sprintf(ifname, "oaitun_%.3s%d", ifprefix, id-1);
sprintf(ifname, "openxgtun_%.3s%d", ifprefix, id-1);
}
else {
sprintf(ifname, "oaitun_%.3s1", ifprefix); // added "1": for historical reasons
sprintf(ifname, "openxgtun_%.3s1", ifprefix); // added "1": for historical reasons
}
nas_sock_mbms_fd = tun_alloc(ifname);
......@@ -131,7 +131,7 @@ int netlink_init_tun(char *ifprefix, int num_if, int id) {//for UE, id = 1, 2, .
int begx = (id == 0) ? 0 : id - 1;
int endx = (id == 0) ? num_if : id;
for (int i = begx; i < endx; i++) {
sprintf(ifname, "oaitun_%.3s%d",ifprefix,i+1);
sprintf(ifname, "openxgtun_%.3s%d",ifprefix,i+1);
nas_sock_fd[i] = tun_alloc(ifname);
if (nas_sock_fd[i] == -1) {
......
......@@ -234,7 +234,7 @@ int nas_config_mbms(int interface_id, int thirdOctet, int fourthOctet, char *ifn
sprintf(ipAddress, "%s.%d.%d",baseNetAddress,thirdOctet,fourthOctet);
sprintf(broadcastAddress, "%s.%d.255",baseNetAddress, thirdOctet);
sprintf(interfaceName, "%s%s%d", (UE_NAS_USE_TUN || ENB_NAS_USE_TUN)?"oaitun_":ifname,
sprintf(interfaceName, "%s%s%d", (UE_NAS_USE_TUN || ENB_NAS_USE_TUN)?"openxgtun_":ifname,
UE_NAS_USE_TUN?ifname/*"ue"*/: (ENB_NAS_USE_TUN?ifname/*"enb"*/:""),interface_id);
bringInterfaceUp(interfaceName, 0);
// sets the machine address
......@@ -273,7 +273,7 @@ int nas_config_mbms_s1(int interface_id, int thirdOctet, int fourthOctet, char *
sprintf(ipAddress, "%s.%d.%d","10.0",thirdOctet,fourthOctet);
sprintf(broadcastAddress, "%s.%d.255","10.0", thirdOctet);
sprintf(interfaceName, "%s%s%d", "oaitun_",ifname,interface_id);
sprintf(interfaceName, "%s%s%d", "openxgtun_",ifname,interface_id);
bringInterfaceUp(interfaceName, 0);
// sets the machine address
returnValue= setInterfaceParameter(interfaceName, ipAddress,SIOCSIFADDR);
......@@ -312,7 +312,7 @@ int nas_config(int interface_id, int thirdOctet, int fourthOctet, char *ifname)
int returnValue;
sprintf(ipAddress, "%s.%d.%d", baseNetAddress,thirdOctet,fourthOctet);
sprintf(broadcastAddress, "%s.%d.255",baseNetAddress, thirdOctet);
sprintf(interfaceName, "%s%s%d", (UE_NAS_USE_TUN || ENB_NAS_USE_TUN)?"oaitun_":ifname,
sprintf(interfaceName, "%s%s%d", (UE_NAS_USE_TUN || ENB_NAS_USE_TUN)?"openxgtun_":ifname,
UE_NAS_USE_TUN?"ue": (ENB_NAS_USE_TUN?"enb":""),interface_id);
bringInterfaceUp(interfaceName, 0);
// sets the machine address
......@@ -344,7 +344,7 @@ int nas_config(int interface_id, int thirdOctet, int fourthOctet, char *ifname)
"ip route add default dev %s%d table %d",
ipAddress, interface_id - 1 + 10000,
ipAddress, interface_id - 1 + 10000,
UE_NAS_USE_TUN ? "oaitun_ue" : "oip",
UE_NAS_USE_TUN ? "openxgtun_ue" : "oip",
interface_id, interface_id - 1 + 10000);
if (res < 0) {
......@@ -413,7 +413,7 @@ int main(int argc,char **argv)
char ipAddress[100];
char networkMask[100];
char broadcastAddress[100];
strcpy(interfaceName, "oai0");
strcpy(interfaceName, "openxg0");
strcpy(ipAddress, "10.0.1.1");
strcpy(networkMask, "255.255.255.0");
broadcastAddress[0]='\0';
......
......@@ -103,6 +103,7 @@ endif()
# So, here are some hacks here. Hope this gets fixed in future!
if(EXISTS "/usr/include/atlas/cblas.h" OR EXISTS "/usr/include/cblas.h")
include_directories("/usr/include/atlas")
include_directories("/usr/include/lapacke")
LINK_DIRECTORIES("/usr/lib/lapack")
LINK_DIRECTORIES("/usr/lib64")
LINK_DIRECTORIES("/usr/lib64/atlas") #Added because atlas libraries in CentOS 7 are here!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment