Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AMF
Commits
8da86738
Commit
8da86738
authored
Sep 18, 2021
by
dukl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stateless support
parent
b2a7610d
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
425 additions
and
47 deletions
+425
-47
etc/stateless-amf-1.conf
etc/stateless-amf-1.conf
+135
-0
etc/stateless-amf-2.conf
etc/stateless-amf-2.conf
+9
-7
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+121
-12
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+58
-15
src/amf-app/amf_n11.cpp
src/amf-app/amf_n11.cpp
+26
-3
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+67
-9
src/itti/itti.hpp
src/itti/itti.hpp
+2
-1
src/oai-amf/main.cpp
src/oai-amf/main.cpp
+7
-0
No files found.
etc/stateless-amf-1.conf
0 → 100755
View file @
8da86738
################################################################################
# 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:
# contact@openairinterface.org
################################################################################
AMF
=
{
INSTANCE_ID
=
10
;
# 0 is the default
PID_DIRECTORY
=
"/var/run"
;
# /var/run is the default
AMF_NAME
=
"OAI-AMF"
;
RELATIVE_CAPACITY
=
30
;
# Display statistics about whole system (in seconds)
STATISTICS_TIMER_INTERVAL
=
20
;
# YOUR CONFIG HERE
AMF_ID_REGION
=
11000
;
CORE_CONFIGURATION
:
{
EMERGENCY_SUPPORT
=
"false"
;
};
GUAMI
:
{
MCC
=
"460"
;
MNC
=
"99"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"1"
# YOUR GUAMI CONFIG HERE
}
SERVED_GUAMI_LIST
= (
{
MCC
=
"460"
;
MNC
=
"99"
;
RegionID
=
"128"
;
AMFSetID
=
"1"
;
AMFPointer
=
"0"
}
#48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
#{MCC = "110"; MNC = "11"; RegionID = "10"; AMFSetID = "1"; AMFPointer = "1"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
);
PLMN_SUPPORT_LIST
= (
{
MCC
=
"460"
;
MNC
=
"99"
;
TAC
=
100
;
# YOUR PLMN CONFIG HERE
SLICE_SUPPORT_LIST
= (
{
SST
=
"1"
;
SD
=
"none"
}
# YOUR NSSAI CONFIG HERE
# {SST = "1"; SD = "12"} # YOUR NSSAI CONFIG HERE
)
}
);
INTERFACES
:
{
# AMF binded interface for N1/N2 interface (NGAP)
NGAP_AMF
:
{
INTERFACE_NAME
=
"ens34"
;
# YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"read"
;
PORT
=
9999
;
# YOUR NETWORK CONFIG HERE
PPID
=
60
;
# YOUR NETWORK CONFIG HERE
};
# AMF binded interface for Nausf interface
NAUSF
:
{
INTERFACE_NAME
=
"ens18"
;
# YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"10.103.239.53/16"
;
PORT
=
8383
;
# YOUR NETWORK CONFIG HERE
};
NRF
:
{
IPV4_ADDRESS
=
"10.103.239.54"
;
# YOUR NRF CONFIG HERE
PORT
=
80
;
# YOUR NRF CONFIG HERE (default: 80)
API_VERSION
=
"v1"
;
# YOUR NRF API VERSION FOR SBI CONFIG HERE
};
SUPPORT_FEATURES
:
{
# STRING, {"yes", "no"},
NF_REGISTRATION
=
"yes"
;
# Set to yes if AMF resgisters to an NRF
SMF_SELECTION
=
"no"
;
# Set to yes to enable SMF discovery and selection
EXTERNAL_AUSF
=
"yes"
;
# Set to yes if AMF works with an external AUSF
EXTERNAL_UDM
=
"no"
;
# Set to yes if AMF works with an external UDM
};
# AMF binded interface for N11
N11
:
{
INTERFACE_NAME
=
"ens19"
;
# YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"read"
;
PORT
=
8282
;
# YOUR NETWORK CONFIG HERE
SMF_INSTANCES_POOL
= (
{
SMF_INSTANCE_ID
=
1
;
IPV4_ADDRESS
=
"10.103.239.53"
;
PORT
=
"8889"
;
VERSION
=
"v2"
;
SELECTED
=
"true"
},
# YOUR SMF CONFIG HERE
{
SMF_INSTANCE_ID
=
2
;
IPV4_ADDRESS
=
"192.168.122.2"
;
PORT
=
"80"
;
VERSION
=
"v1"
;
SELECTED
=
"false"
}
# YOUR SMF CONFIG HERE
);
};
};
AUTHENTICATION
:
{
## MySQL mandatory options
MYSQL_server
=
"127.0.0.1"
;
# MySQL Server address
MYSQL_user
=
"witcomm"
;
# Database server login
MYSQL_pass
=
"123456"
;
# Database server password
MYSQL_db
=
"witcomm"
;
# Your database name
## OP
OPERATOR_key
=
"63bfa50ee6523365ff14c1f45f88737d"
;
# OP key matching your database
RANDOM
=
"true"
;
};
NAS
:
{
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST
= [
"NIA1"
,
"NIA1"
,
"NIA1"
];
ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST
= [
"NEA0"
,
"NEA1"
,
"NEA2"
];
};
};
MODULES
=
{
NGAP_MESSAGE
= (
{
MSG_NAME
=
"NGSetupRequest"
;
ProcedureCode
=
21
;
TypeOfMessage
=
"initialMessage"
}
);
};
etc/stateless-amf-2.conf
View file @
8da86738
...
@@ -28,8 +28,10 @@ AMF =
...
@@ -28,8 +28,10 @@ AMF =
RELATIVE_CAPACITY
=
30
;
RELATIVE_CAPACITY
=
30
;
# Display statistics about whole system (in seconds)
# Display statistics about whole system (in seconds)
STATISTICS_TIMER_INTERVAL
=
20
;
# YOUR CONFIG HERE
STATISTICS_TIMER_INTERVAL
=
4
;
# YOUR CONFIG HERE
AMF_ID_REGION
=
4000
;
CORE_CONFIGURATION
:
CORE_CONFIGURATION
:
{
{
EMERGENCY_SUPPORT
=
"false"
;
EMERGENCY_SUPPORT
=
"false"
;
...
@@ -70,7 +72,7 @@ AMF =
...
@@ -70,7 +72,7 @@ AMF =
NAUSF
:
NAUSF
:
{
{
INTERFACE_NAME
=
"ens18"
;
# YOUR NETWORK CONFIG HERE
INTERFACE_NAME
=
"ens18"
;
# YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"
read
"
;
IPV4_ADDRESS
=
"
10.103.239.53/16
"
;
PORT
=
8383
;
# YOUR NETWORK CONFIG HERE
PORT
=
8383
;
# YOUR NETWORK CONFIG HERE
};
};
...
@@ -84,19 +86,19 @@ AMF =
...
@@ -84,19 +86,19 @@ AMF =
{
{
# STRING, {"yes", "no"},
# STRING, {"yes", "no"},
NF_REGISTRATION
=
"yes"
;
# Set to yes if AMF resgisters to an NRF
NF_REGISTRATION
=
"yes"
;
# Set to yes if AMF resgisters to an NRF
SMF_SELECTION
=
"
yes
"
;
# Set to yes to enable SMF discovery and selection
SMF_SELECTION
=
"
no
"
;
# Set to yes to enable SMF discovery and selection
EXTERNAL_AUSF
=
"yes"
;
# Set to yes if AMF works with an external AUSF
EXTERNAL_AUSF
=
"yes"
;
# Set to yes if AMF works with an external AUSF
EXTERNAL_UDM
=
"no"
;
# Set to yes if AMF works with an external UDM
EXTERNAL_UDM
=
"no"
;
# Set to yes if AMF works with an external UDM
};
};
# AMF binded interface for N11
# AMF binded interface for N11
N11
:
N11
:
{
{
INTERFACE_NAME
=
"ens1
9
"
;
# YOUR NETWORK CONFIG HERE
INTERFACE_NAME
=
"ens1
8
"
;
# YOUR NETWORK CONFIG HERE
IPV4_ADDRESS
=
"read"
;
IPV4_ADDRESS
=
"read"
;
PORT
=
828
3
;
# YOUR NETWORK CONFIG HERE
PORT
=
828
2
;
# YOUR NETWORK CONFIG HERE
SMF_INSTANCES_POOL
= (
SMF_INSTANCES_POOL
= (
{
SMF_INSTANCE_ID
=
1
;
IPV4_ADDRESS
=
"10.103.239.53"
;
PORT
=
"8889"
;
VERSION
=
"v2"
;
SELECTED
=
"
fals
e"
},
# YOUR SMF CONFIG HERE
{
SMF_INSTANCE_ID
=
1
;
IPV4_ADDRESS
=
"10.103.239.53"
;
PORT
=
"8889"
;
VERSION
=
"v2"
;
SELECTED
=
"
tru
e"
},
# YOUR SMF CONFIG HERE
{
SMF_INSTANCE_ID
=
2
;
IPV4_ADDRESS
=
"192.168.122.2"
;
PORT
=
"80"
;
VERSION
=
"v1"
;
SELECTED
=
"false"
}
# YOUR SMF CONFIG HERE
{
SMF_INSTANCE_ID
=
2
;
IPV4_ADDRESS
=
"192.168.122.2"
;
PORT
=
"80"
;
VERSION
=
"v1"
;
SELECTED
=
"false"
}
# YOUR SMF CONFIG HERE
);
);
};
};
...
...
src/amf-app/amf_app.cpp
View file @
8da86738
This diff is collapsed.
Click to expand it.
src/amf-app/amf_n1.cpp
View file @
8da86738
This diff is collapsed.
Click to expand it.
src/amf-app/amf_n11.cpp
View file @
8da86738
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
#include "SmContextCreateData.h"
#include "SmContextCreateData.h"
#include "mime_parser.hpp"
#include "mime_parser.hpp"
#include "ue_context.hpp"
#include "ue_context.hpp"
#include <sys/time.h>
extern
"C"
{
extern
"C"
{
#include "dynamic_memory_check.h"
#include "dynamic_memory_check.h"
}
}
...
@@ -65,6 +65,8 @@ extern amf_n1* amf_n1_inst;
...
@@ -65,6 +65,8 @@ extern amf_n1* amf_n1_inst;
extern
amf_n2
*
amf_n2_inst
;
extern
amf_n2
*
amf_n2_inst
;
extern
amf_app
*
amf_app_inst
;
extern
amf_app
*
amf_app_inst
;
extern
statistics
stacs
;
extern
statistics
stacs
;
extern
std
::
vector
<
long
>
delay_nudsf
;
extern
std
::
vector
<
long
>
amf_capability
;
extern
void
msg_str_2_msg_hex
(
std
::
string
msg
,
bstring
&
b
);
extern
void
msg_str_2_msg_hex
(
std
::
string
msg
,
bstring
&
b
);
extern
void
convert_string_2_hex
(
std
::
string
&
input
,
std
::
string
&
output
);
extern
void
convert_string_2_hex
(
std
::
string
&
input
,
std
::
string
&
output
);
...
@@ -108,6 +110,7 @@ void amf_n11_task(void*) {
...
@@ -108,6 +110,7 @@ void amf_n11_task(void*) {
do
{
do
{
std
::
shared_ptr
<
itti_msg
>
shared_msg
=
itti_inst
->
receive_msg
(
task_id
);
std
::
shared_ptr
<
itti_msg
>
shared_msg
=
itti_inst
->
receive_msg
(
task_id
);
auto
*
msg
=
shared_msg
.
get
();
auto
*
msg
=
shared_msg
.
get
();
struct
timeval
tv1
;
struct
timezone
tz1
;
gettimeofday
(
&
tv1
,
&
tz1
);
long
t1
=
tv1
.
tv_sec
*
1000000
+
tv1
.
tv_usec
;
switch
(
msg
->
msg_type
)
{
switch
(
msg
->
msg_type
)
{
case
SMF_SERVICES_CONSUMER
:
{
case
SMF_SERVICES_CONSUMER
:
{
Logger
::
amf_n11
().
info
(
"Running SMF_SERVICES_CONSUMER"
);
Logger
::
amf_n11
().
info
(
"Running SMF_SERVICES_CONSUMER"
);
...
@@ -148,6 +151,8 @@ void amf_n11_task(void*) {
...
@@ -148,6 +151,8 @@ void amf_n11_task(void*) {
"Receive unknown message type %d"
,
msg
->
msg_type
);
"Receive unknown message type %d"
,
msg
->
msg_type
);
}
}
}
}
struct
timeval
tv2
;
struct
timezone
tz2
;
gettimeofday
(
&
tv2
,
&
tz2
);
long
t2
=
tv2
.
tv_sec
*
1000000
+
tv2
.
tv_usec
;
//long one_time = t2 - t1; amf_capability.push_back(one_time);
}
while
(
true
);
}
while
(
true
);
}
}
...
@@ -193,7 +198,10 @@ void amf_n11::handle_itti_message(
...
@@ -193,7 +198,10 @@ void amf_n11::handle_itti_message(
}
}
else
{
else
{
Logger
::
amf_n2
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
Logger
::
amf_n2
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
struct
timeval
tv1
;
struct
timezone
tz1
;
gettimeofday
(
&
tv1
,
&
tz1
);
long
start
=
tv1
.
tv_sec
*
1000000
+
tv1
.
tv_usec
;
nc
.
get
()
->
nas_context_from_json
(
udsf_response
);
nc
.
get
()
->
nas_context_from_json
(
udsf_response
);
struct
timeval
tv2
;
struct
timezone
tz2
;
gettimeofday
(
&
tv2
,
&
tz2
);
long
end
=
tv2
.
tv_sec
*
1000000
+
tv2
.
tv_usec
;
long
one_time
=
end
-
start
;
//delay_nudsf.push_back(one_time);
}
}
std
::
string
supi
=
"imsi-"
+
nc
.
get
()
->
imsi
;
std
::
string
supi
=
"imsi-"
+
nc
.
get
()
->
imsi
;
Logger
::
amf_n11
().
debug
(
Logger
::
amf_n11
().
debug
(
...
@@ -209,7 +217,10 @@ return ;
...
@@ -209,7 +217,10 @@ return ;
}
}
else
{
else
{
Logger
::
amf_n2
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
Logger
::
amf_n2
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
struct
timeval
tv1
;
struct
timezone
tz1
;
gettimeofday
(
&
tv1
,
&
tz1
);
long
start
=
tv1
.
tv_sec
*
1000000
+
tv1
.
tv_usec
;
psc
.
get
()
->
pdu_session_context_from_json
(
udsf_response
);
psc
.
get
()
->
pdu_session_context_from_json
(
udsf_response
);
struct
timeval
tv2
;
struct
timezone
tz2
;
gettimeofday
(
&
tv2
,
&
tz2
);
long
end
=
tv2
.
tv_sec
*
1000000
+
tv2
.
tv_usec
;
long
one_time
=
end
-
start
;
//delay_nudsf.push_back(one_time);
}
}
// std::shared_ptr<nas_context> nc = std::shared_ptr<nas_context>(new nas_context());
// std::shared_ptr<nas_context> nc = std::shared_ptr<nas_context>(new nas_context());
...
@@ -263,7 +274,10 @@ return ;
...
@@ -263,7 +274,10 @@ return ;
smf_addr
=
psc
->
smf_addr
;
smf_addr
=
psc
->
smf_addr
;
std
::
string
smf_ip_addr
,
remote_uri
;
std
::
string
smf_ip_addr
,
remote_uri
;
std
::
shared_ptr
<
pdu_session_context
>
context
=
std
::
shared_ptr
<
pdu_session_context
>
(
new
pdu_session_context
());
std
::
shared_ptr
<
pdu_session_context
>
context
=
std
::
shared_ptr
<
pdu_session_context
>
(
new
pdu_session_context
());
context
.
get
()
->
pdu_session_context_from_json
(
udsf_response
);
struct
timeval
tv1
;
struct
timezone
tz1
;
gettimeofday
(
&
tv1
,
&
tz1
);
long
start
=
tv1
.
tv_sec
*
1000000
+
tv1
.
tv_usec
;
context
.
get
()
->
pdu_session_context_from_json
(
udsf_response
);
struct
timeval
tv2
;
struct
timezone
tz2
;
gettimeofday
(
&
tv2
,
&
tz2
);
long
end
=
tv2
.
tv_sec
*
1000000
+
tv2
.
tv_usec
;
long
one_time
=
end
-
start
;
//delay_nudsf.push_back(one_time);
//context = supi_to_pdu_ctx(supi);
//context = supi_to_pdu_ctx(supi);
// remove http port from the URI if existed
// remove http port from the URI if existed
std
::
size_t
found_port
=
smf_addr
.
find
(
":"
);
std
::
size_t
found_port
=
smf_addr
.
find
(
":"
);
...
@@ -322,7 +336,10 @@ void amf_n11::handle_itti_message(itti_smf_services_consumer& smf) {
...
@@ -322,7 +336,10 @@ void amf_n11::handle_itti_message(itti_smf_services_consumer& smf) {
else
{
else
{
Logger
::
amf_n2
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
Logger
::
amf_n2
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
psc
=
std
::
shared_ptr
<
pdu_session_context
>
(
new
pdu_session_context
());
psc
=
std
::
shared_ptr
<
pdu_session_context
>
(
new
pdu_session_context
());
struct
timeval
tv1
;
struct
timezone
tz1
;
gettimeofday
(
&
tv1
,
&
tz1
);
long
start
=
tv1
.
tv_sec
*
1000000
+
tv1
.
tv_usec
;
psc
.
get
()
->
pdu_session_context_from_json
(
udsf_response
);
psc
.
get
()
->
pdu_session_context_from_json
(
udsf_response
);
struct
timeval
tv2
;
struct
timezone
tz2
;
gettimeofday
(
&
tv2
,
&
tz2
);
long
end
=
tv2
.
tv_sec
*
1000000
+
tv2
.
tv_usec
;
long
one_time
=
end
-
start
;
//delay_nudsf.push_back(one_time);
if
(
psc
.
get
()
->
isn2sm_avaliable
==
false
)
if
(
psc
.
get
()
->
isn2sm_avaliable
==
false
)
{
{
psc
=
std
::
shared_ptr
<
pdu_session_context
>
(
new
pdu_session_context
());
psc
=
std
::
shared_ptr
<
pdu_session_context
>
(
new
pdu_session_context
());
...
@@ -539,7 +556,7 @@ void amf_n11::handle_pdu_session_initial_request(
...
@@ -539,7 +556,7 @@ void amf_n11::handle_pdu_session_initial_request(
// TODO: Remove hardcoded values
// TODO: Remove hardcoded values
std
::
string
remote_uri
=
std
::
string
remote_uri
=
smf_addr
+
"
:8889
/nsmf-pdusession/v2/sm-contexts"
;
smf_addr
+
"/nsmf-pdusession/v2/sm-contexts"
;
nlohmann
::
json
pdu_session_establishment_request
;
nlohmann
::
json
pdu_session_establishment_request
;
pdu_session_establishment_request
[
"supi"
]
=
supi
.
c_str
();
pdu_session_establishment_request
[
"supi"
]
=
supi
.
c_str
();
pdu_session_establishment_request
[
"pei"
]
=
"imei-200000000000001"
;
pdu_session_establishment_request
[
"pei"
]
=
"imei-200000000000001"
;
...
@@ -591,7 +608,10 @@ void amf_n11::handle_itti_message(
...
@@ -591,7 +608,10 @@ void amf_n11::handle_itti_message(
}
}
else
{
else
{
Logger
::
amf_n2
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
Logger
::
amf_n2
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
struct
timeval
tv1
;
struct
timezone
tz1
;
gettimeofday
(
&
tv1
,
&
tz1
);
long
start
=
tv1
.
tv_sec
*
1000000
+
tv1
.
tv_usec
;
psc
.
get
()
->
pdu_session_context_from_json
(
udsf_response
);
psc
.
get
()
->
pdu_session_context_from_json
(
udsf_response
);
struct
timeval
tv2
;
struct
timezone
tz2
;
gettimeofday
(
&
tv2
,
&
tz2
);
long
end
=
tv2
.
tv_sec
*
1000000
+
tv2
.
tv_usec
;
long
one_time
=
end
-
start
;
//delay_nudsf.push_back(one_time);
//psc = std::shared_ptr<pdu_session_context>(psc1);
//psc = std::shared_ptr<pdu_session_context>(psc1);
}
}
//***************************stateless
//***************************stateless
...
@@ -705,7 +725,10 @@ void amf_n11::curl_http_client(
...
@@ -705,7 +725,10 @@ void amf_n11::curl_http_client(
Logger
::
amf_n2
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
Logger
::
amf_n2
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
//psc1->pdu_session_context_from_json(udsf_response);
//psc1->pdu_session_context_from_json(udsf_response);
//psc = std::shared_ptr<pdu_session_context>(psc1);
//psc = std::shared_ptr<pdu_session_context>(psc1);
struct
timeval
tv1
;
struct
timezone
tz1
;
gettimeofday
(
&
tv1
,
&
tz1
);
long
start
=
tv1
.
tv_sec
*
1000000
+
tv1
.
tv_usec
;
psc
.
get
()
->
pdu_session_context_from_json
(
udsf_response
);
psc
.
get
()
->
pdu_session_context_from_json
(
udsf_response
);
struct
timeval
tv2
;
struct
timezone
tz2
;
gettimeofday
(
&
tv2
,
&
tz2
);
long
end
=
tv2
.
tv_sec
*
1000000
+
tv2
.
tv_usec
;
long
one_time
=
end
-
start
;
//delay_nudsf.push_back(one_time);
//***************************stateless
//***************************stateless
// if (is_supi_to_pdu_ctx(supi)) {
// if (is_supi_to_pdu_ctx(supi)) {
...
...
src/amf-app/amf_n2.cpp
View file @
8da86738
This diff is collapsed.
Click to expand it.
src/itti/itti.hpp
View file @
8da86738
...
@@ -124,7 +124,8 @@ class itti_task_ctxt {
...
@@ -124,7 +124,8 @@ class itti_task_ctxt {
};
};
class
itti_mw
{
class
itti_mw
{
private:
//private:
public:
itti_task_ctxt
*
itti_task_ctxts
[
TASK_MAX
];
itti_task_ctxt
*
itti_task_ctxts
[
TASK_MAX
];
/*
/*
...
...
src/oai-amf/main.cpp
View file @
8da86738
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#include "amf_module_from_config.hpp"
#include "amf_module_from_config.hpp"
#include "amf_statistics.hpp"
#include "amf_statistics.hpp"
#include <fstream>
#include <string>
#include <string>
#include <cstring>
#include <cstring>
#include "normalizer.hh"
#include "normalizer.hh"
...
@@ -57,6 +58,10 @@ amf_modules modules;
...
@@ -57,6 +58,10 @@ amf_modules modules;
itti_mw
*
itti_inst
=
nullptr
;
itti_mw
*
itti_inst
=
nullptr
;
amf_app
*
amf_app_inst
=
nullptr
;
amf_app
*
amf_app_inst
=
nullptr
;
statistics
stacs
;
statistics
stacs
;
std
::
vector
<
long
>
delay_nudsf
;
std
::
vector
<
long
>
delay_processing
;
ofstream
timeline
;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
{
int
main
(
int
argc
,
char
**
argv
)
{
...
@@ -67,6 +72,8 @@ int main(int argc, char** argv) {
...
@@ -67,6 +72,8 @@ int main(int argc, char** argv) {
return
1
;
return
1
;
}
}
//timeline.open("stacs.log", ios::app);
Logger
::
init
(
"AMF"
,
Options
::
getlogStdout
(),
Options
::
getlogRotFilelog
());
Logger
::
init
(
"AMF"
,
Options
::
getlogStdout
(),
Options
::
getlogRotFilelog
());
Logger
::
amf_app
().
startup
(
"Options parsed!"
);
Logger
::
amf_app
().
startup
(
"Options parsed!"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment