mirror of
https://github.com/open5gs/open5gs.git
synced 2025-11-02 21:13:40 +00:00
Compare commits
111 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6ed13968d | ||
|
|
f15d2c96fe | ||
|
|
508a78d43b | ||
|
|
f250b6e411 | ||
|
|
d17ea0f135 | ||
|
|
b4358fe703 | ||
|
|
e531ccab5a | ||
|
|
a0ebf20c88 | ||
|
|
31cc259ee4 | ||
|
|
e803b01d9c | ||
|
|
0c61e7b70b | ||
|
|
80e337b465 | ||
|
|
6946dc4998 | ||
|
|
7b29cdf898 | ||
|
|
7dd4609c0f | ||
|
|
060d2a08f5 | ||
|
|
c9cfc4cf6e | ||
|
|
a96d3ca0fa | ||
|
|
1238b30526 | ||
|
|
70a7bac6b2 | ||
|
|
b329b09573 | ||
|
|
88346c0141 | ||
|
|
b35eb9fcf4 | ||
|
|
79b0552bb0 | ||
|
|
235a041b8d | ||
|
|
65aea5ebf2 | ||
|
|
4115799c2a | ||
|
|
efd1780745 | ||
|
|
dcec18a3d8 | ||
|
|
371e22c96b | ||
|
|
171f15f684 | ||
|
|
ef3e7b2528 | ||
|
|
7002c1e4b5 | ||
|
|
2392f23d7f | ||
|
|
2bf8d6c3c7 | ||
|
|
191f109f7f | ||
|
|
198abc6e8b | ||
|
|
fb95725ca4 | ||
|
|
41fd851b7f | ||
|
|
d16d295708 | ||
|
|
5999bd22f9 | ||
|
|
33edd12335 | ||
|
|
b2d012c253 | ||
|
|
e5a9156444 | ||
|
|
90123efae3 | ||
|
|
c424796955 | ||
|
|
1c997c4069 | ||
|
|
3be76db08a | ||
|
|
0742c6208c | ||
|
|
2c2b6dfcaf | ||
|
|
0c47098c4a | ||
|
|
1a7b4de7c6 | ||
|
|
19a3680c60 | ||
|
|
520d9cd2c3 | ||
|
|
3c99af7736 | ||
|
|
dcf0a714aa | ||
|
|
e1a2e3803f | ||
|
|
f0b9a35962 | ||
|
|
70f7e2d5d4 | ||
|
|
f4c6791227 | ||
|
|
ee964d825c | ||
|
|
b9fdc0ab44 | ||
|
|
0b2ba07f97 | ||
|
|
fe7525a784 | ||
|
|
d7c188dc00 | ||
|
|
961db54c2f | ||
|
|
1f1a741e53 | ||
|
|
e6e825c6a3 | ||
|
|
cbb3758c9c | ||
|
|
6f11a78079 | ||
|
|
9a1824f6aa | ||
|
|
23e8e6577c | ||
|
|
830587a250 | ||
|
|
f1a207fd9b | ||
|
|
2d3b8eed81 | ||
|
|
18c3a4d5d9 | ||
|
|
8975613ae9 | ||
|
|
621145d8b0 | ||
|
|
5af01d1a71 | ||
|
|
ad85c12513 | ||
|
|
b80554e955 | ||
|
|
13c7f30e39 | ||
|
|
21595426b2 | ||
|
|
d1e643ed6c | ||
|
|
22e98d612a | ||
|
|
48bf4a763a | ||
|
|
3fef5848b8 | ||
|
|
a679ea56a8 | ||
|
|
080c6a9002 | ||
|
|
5fd6dac961 | ||
|
|
f137d1947f | ||
|
|
0ec0b2dc69 | ||
|
|
93312e8f3d | ||
|
|
3cbec5f2e6 | ||
|
|
4f2803c058 | ||
|
|
a470131489 | ||
|
|
aa81bb2c89 | ||
|
|
15e42bc4a9 | ||
|
|
bdeea7ce8b | ||
|
|
39aa726543 | ||
|
|
1bed0d5872 | ||
|
|
c244dcc5e9 | ||
|
|
c052193a37 | ||
|
|
50149dd1a7 | ||
|
|
5bfaac17e0 | ||
|
|
c424099200 | ||
|
|
06ec924466 | ||
|
|
6ff129e9da | ||
|
|
fae76f9e9d | ||
|
|
f294a5f55c | ||
|
|
5c9b3d09d8 |
13
README.md
13
README.md
@@ -2,7 +2,7 @@
|
||||
|
||||
If you find Open5GS useful for work, please consider supporting this Open Source project by [Becoming a sponsor](https://github.com/sponsors/acetcom). To manage the funding transactions transparently, you can donate through [OpenCollective](https://opencollective.com/open5gs).
|
||||
|
||||
<h3 align="center">Special Sponsors</h3>
|
||||
<h3 align="center">Special Sponsor</h3>
|
||||
<!--special start-->
|
||||
|
||||
<p align="center">
|
||||
@@ -20,6 +20,11 @@ If you find Open5GS useful for work, please consider supporting this Open Source
|
||||
<img width="222px" src="https://open5gs.org/assets/img/asLogonew.png">
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://www.wearetriple.com/" target="_blank">
|
||||
<img width="222px" src="https://open5gs.org/assets/img/triple_logo.png">
|
||||
</a>
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://www.accessparks.com/" target="_blank">
|
||||
<img width="222px" src="https://open5gs.org/assets/img/AccessParks.png">
|
||||
@@ -33,9 +38,11 @@ If you find Open5GS useful for work, please consider supporting this Open Source
|
||||
|
||||
If you don't understand something about Open5GS, the [https://open5gs.org/open5gs/docs/](https://open5gs.org/open5gs/docs/) is a great place to look for answers.
|
||||
|
||||
## Technical Discussion
|
||||
## Community
|
||||
|
||||
Problem with Open5GS can be filed as [issues](https://github.com/open5gs/open5gs/issues) in this repository. Voice and text chat available in Open5GS's [Discord](https://discordapp.com/) workspace. Use [this link](https://discord.gg/GreNkuc) to get started.
|
||||
- Problem with Open5GS can be filed as [issues](https://github.com/open5gs/open5gs/issues) in this repository.
|
||||
- Other topics related to this project are happening on the [discussions](https://github.com/open5gs/open5gs/discussions).
|
||||
- Voice and text chat are available in Open5GS's [Discord](https://discordapp.com/) workspace. Use [this link](https://discord.gg/GreNkuc) to get started.
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ parameter:
|
||||
# no_upf: true
|
||||
# no_ausf: true
|
||||
# no_udm: true
|
||||
# no_pcf: true
|
||||
# no_udr: true
|
||||
# no_mme: true
|
||||
# no_sgwc: true
|
||||
@@ -194,7 +195,12 @@ udm:
|
||||
- addr: 127.0.0.12
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
pcf:
|
||||
sbi:
|
||||
- addr: 127.0.0.13
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.20
|
||||
port: 7777
|
||||
|
||||
@@ -9,6 +9,7 @@ parameter:
|
||||
# no_upf: true
|
||||
# no_ausf: true
|
||||
# no_udm: true
|
||||
# no_pcf: true
|
||||
# no_udr: true
|
||||
# no_mme: true
|
||||
# no_sgwc: true
|
||||
@@ -97,9 +98,9 @@ sgwc:
|
||||
- addr: 127.0.0.3
|
||||
|
||||
smf:
|
||||
sbi:
|
||||
- addr: 127.0.0.4
|
||||
port: 7777
|
||||
# sbi:
|
||||
# - addr: 127.0.0.4
|
||||
# port: 7777
|
||||
gtpc:
|
||||
- addr: 127.0.0.4
|
||||
- addr: ::1
|
||||
@@ -211,12 +212,12 @@ pcrf:
|
||||
- identity: smf.localdomain
|
||||
addr: 127.0.0.4
|
||||
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.10
|
||||
- ::1
|
||||
port: 7777
|
||||
#nrf:
|
||||
# sbi:
|
||||
# - addr:
|
||||
# - 127.0.0.10
|
||||
# - ::1
|
||||
# port: 7777
|
||||
|
||||
ausf:
|
||||
sbi:
|
||||
@@ -228,7 +229,12 @@ udm:
|
||||
- addr: 127.0.0.12
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
pcf:
|
||||
sbi:
|
||||
- addr: 127.0.0.13
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.20
|
||||
port: 7777
|
||||
|
||||
@@ -38,6 +38,7 @@ example_conf = '''
|
||||
310014.yaml
|
||||
csfb.yaml
|
||||
volte.yaml
|
||||
vonr.yaml
|
||||
minimal.yaml
|
||||
srslte.yaml
|
||||
sample.yaml
|
||||
|
||||
@@ -9,6 +9,7 @@ parameter:
|
||||
# no_upf: true
|
||||
# no_ausf: true
|
||||
# no_udm: true
|
||||
# no_pcf: true
|
||||
# no_udr: true
|
||||
# no_mme: true
|
||||
# no_sgwc: true
|
||||
@@ -197,7 +198,12 @@ udm:
|
||||
- addr: 127.0.0.12
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
pcf:
|
||||
sbi:
|
||||
- addr: 127.0.0.13
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.20
|
||||
port: 7777
|
||||
|
||||
@@ -260,19 +260,20 @@ max:
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 32768 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 32768
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
@@ -283,17 +284,18 @@ pool:
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Heartbeat (Default : 10 seconds)
|
||||
# o NF Instance Heartbeat (Default : 0)
|
||||
# NFs will not send heart-beat timer in NFProfile
|
||||
# NRF will send heart-beat timer in NFProfile
|
||||
#
|
||||
# o NF Instance Heartbeat (20 seconds)
|
||||
# NFs will send heart-beat timer (20 seconds) in NFProfile
|
||||
# NRF can change heart-beat timer in NFProfile
|
||||
#
|
||||
# o NF Instance Heartbeat (Disabled)
|
||||
# nf_instance:
|
||||
# heartbeat: 0
|
||||
# heartbeat: 20
|
||||
#
|
||||
# o NF Instance Heartbeat (10 seconds)
|
||||
# nf_instance:
|
||||
# heartbeat: 10
|
||||
#
|
||||
# o Message Wait Duration (Default : 2000ms = 2 seconds)
|
||||
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
|
||||
#
|
||||
# o Message Wait Duration (3000 ms)
|
||||
# message:
|
||||
|
||||
@@ -136,19 +136,20 @@ max:
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 32768 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 32768
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
@@ -159,17 +160,18 @@ pool:
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Heartbeat (Default : 10 seconds)
|
||||
# o NF Instance Heartbeat (Default : 0)
|
||||
# NFs will not send heart-beat timer in NFProfile
|
||||
# NRF will send heart-beat timer in NFProfile
|
||||
#
|
||||
# o NF Instance Heartbeat (20 seconds)
|
||||
# NFs will send heart-beat timer (20 seconds) in NFProfile
|
||||
# NRF can change heart-beat timer in NFProfile
|
||||
#
|
||||
# o NF Instance Heartbeat (Disabled)
|
||||
# nf_instance:
|
||||
# heartbeat: 0
|
||||
# heartbeat: 20
|
||||
#
|
||||
# o NF Instance Heartbeat (10 seconds)
|
||||
# nf_instance:
|
||||
# heartbeat: 10
|
||||
#
|
||||
# o Message Wait Duration (Default : 2000ms = 2 seconds)
|
||||
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
|
||||
#
|
||||
# o Message Wait Duration (3000 ms)
|
||||
# message:
|
||||
|
||||
@@ -62,19 +62,20 @@ max:
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 32768 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 32768
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
|
||||
@@ -32,6 +32,7 @@ open5gs_conf = '''
|
||||
ausf.yaml
|
||||
udm.yaml
|
||||
udr.yaml
|
||||
pcf.yaml
|
||||
'''.split()
|
||||
|
||||
foreach file : open5gs_conf
|
||||
|
||||
@@ -349,6 +349,11 @@ smf:
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
# o Use OAI UE
|
||||
# - Remove HashMME in Security-mode command message
|
||||
# - Use the length 1 of EPS network feature support in Attach accept message
|
||||
# use_openair: true
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
@@ -364,19 +369,20 @@ max:
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 32768 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 32768
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
@@ -398,3 +404,13 @@ pool:
|
||||
# o usrsctp_udp_port : 9899
|
||||
#
|
||||
sctp:
|
||||
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
|
||||
#
|
||||
# o Message Wait Duration (3000 ms)
|
||||
# message:
|
||||
# duration: 3000
|
||||
time:
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
@@ -106,19 +108,20 @@ max:
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 32768 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 32768
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
@@ -129,6 +132,16 @@ pool:
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Heartbeat (Default : 10 seconds)
|
||||
#
|
||||
# o NF Instance Heartbeat (Disabled)
|
||||
# nf_instance:
|
||||
# heartbeat: 0
|
||||
#
|
||||
# o NF Instance Heartbeat (5 seconds)
|
||||
# nf_instance:
|
||||
# heartbeat: 5
|
||||
#
|
||||
# o NF Instance Validity (Default : 3600 seconds = 1 hour)
|
||||
#
|
||||
# o NF Instance Validity (10 seconds)
|
||||
@@ -145,7 +158,7 @@ pool:
|
||||
# subscription:
|
||||
# validity: 3600
|
||||
#
|
||||
# o Message Wait Duration (Default : 2000ms = 2 seconds)
|
||||
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
|
||||
#
|
||||
# o Message Wait Duration (3000 ms)
|
||||
# message:
|
||||
|
||||
181
configs/open5gs/pcf.yaml.in
Normal file
181
configs/open5gs/pcf.yaml.in
Normal file
@@ -0,0 +1,181 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
#
|
||||
# logger:
|
||||
#
|
||||
# o Set OGS_LOG_INFO to all domain level
|
||||
# - If `level` is omitted, the default level is OGS_LOG_INFO)
|
||||
# - If `domain` is omitted, the all domain level is set from 'level'
|
||||
# (Nothing is needed)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# level: trace
|
||||
# domain: core,sbi,pcf,event,tlv,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/pcf.log
|
||||
#
|
||||
# pcf:
|
||||
#
|
||||
# <SBI Server>
|
||||
#
|
||||
# o SBI Server(http://<all address available>:80)
|
||||
# sbi:
|
||||
#
|
||||
# o SBI Server(http://<any address>:80)
|
||||
# sbi:
|
||||
# - addr:
|
||||
# - 0.0.0.0
|
||||
# - ::0
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(https://<all address avaiable>:443)
|
||||
# sbi:
|
||||
# tls:
|
||||
# key: pcf.key
|
||||
# pem: pcf.pem
|
||||
#
|
||||
# o SBI Server(https://127.0.0.13:443, http://[::1]:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.13
|
||||
# tls:
|
||||
# key: pcf.key
|
||||
# pem: pcf.pem
|
||||
# - addr: ::1
|
||||
#
|
||||
# o SBI Server(http://pcf.open5gs.org:80)
|
||||
# sbi:
|
||||
# name: pcf.open5gs.org
|
||||
#
|
||||
# o SBI Server(http://127.0.0.13:7777)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.13
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(http://<eth0 IP address>:80)
|
||||
# sbi:
|
||||
# dev: eth0
|
||||
#
|
||||
pcf:
|
||||
sbi:
|
||||
- addr: 127.0.0.13
|
||||
port: 7777
|
||||
|
||||
#
|
||||
# nrf:
|
||||
#
|
||||
# <SBI Client>>
|
||||
#
|
||||
# o SBI Client(http://127.0.0.10:7777)
|
||||
# sbi:
|
||||
# addr: 127.0.0.10
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Client(https://127.0.0.10:443, http://nrf.open5gs.org:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.10
|
||||
# tls:
|
||||
# key: nrf.key
|
||||
# pem: nrf.pem
|
||||
# - name: nrf.open5gs.org
|
||||
#
|
||||
# o SBI Client(http://[fe80::1%@loopback_devname@]:80)
|
||||
# If prefer_ipv4 is true, http://127.0.0.10:80 is selected.
|
||||
#
|
||||
# sbi:
|
||||
# addr:
|
||||
# - 127.0.0.10
|
||||
# - fe80::1%@loopback_devname@
|
||||
#
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.10
|
||||
- ::1
|
||||
port: 7777
|
||||
|
||||
#
|
||||
# parameter:
|
||||
#
|
||||
# o Number of output streams per SCTP associations.
|
||||
# sctp_streams: 30
|
||||
#
|
||||
# o Disable use of IPv4 addresses (only IPv6)
|
||||
# no_ipv4: true
|
||||
#
|
||||
# o Disable use of IPv6 addresses (only IPv4)
|
||||
# no_ipv6: true
|
||||
#
|
||||
# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections.
|
||||
# prefer_ipv4: true
|
||||
#
|
||||
# o Enable Multicast traffic to the UE
|
||||
# multicast: true
|
||||
#
|
||||
# o Disable Stateless Address Autoconfiguration for IPv6
|
||||
# no_slaac: true
|
||||
#
|
||||
parameter:
|
||||
|
||||
#
|
||||
# max:
|
||||
#
|
||||
# o Maximum Number of UE per AMF/MME
|
||||
# ue: 1024
|
||||
# o Maximum Number of gNB/eNB per AMF/MME
|
||||
# gnb: 32
|
||||
#
|
||||
max:
|
||||
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
pool:
|
||||
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Heartbeat (Default : 0)
|
||||
# NFs will not send heart-beat timer in NFProfile
|
||||
# NRF will send heart-beat timer in NFProfile
|
||||
#
|
||||
# o NF Instance Heartbeat (20 seconds)
|
||||
# NFs will send heart-beat timer (20 seconds) in NFProfile
|
||||
# NRF can change heart-beat timer in NFProfile
|
||||
#
|
||||
# nf_instance:
|
||||
# heartbeat: 20
|
||||
#
|
||||
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
|
||||
#
|
||||
# o Message Wait Duration (3000 ms)
|
||||
# message:
|
||||
# duration: 3000
|
||||
time:
|
||||
@@ -61,19 +61,20 @@ max:
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 32768 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 32768
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
|
||||
@@ -143,22 +143,33 @@ max:
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 32768 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 32768
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
pool:
|
||||
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
|
||||
#
|
||||
# o Message Wait Duration (3000 ms)
|
||||
# message:
|
||||
# duration: 3000
|
||||
time:
|
||||
|
||||
@@ -29,18 +29,49 @@ logger:
|
||||
# o GTP-U Server(all address available)
|
||||
# gtpu:
|
||||
#
|
||||
# o Provide custom SGW GTP-U address to be advertised inside S1AP messages
|
||||
# o GTP-U Server(127.0.0.6:2152, [::1]:2152)
|
||||
# gtpu:
|
||||
# addr: 10.4.128.21
|
||||
# advertise_addr: 172.24.15.30
|
||||
# - addr:
|
||||
# - 127.0.0.6
|
||||
# - ::1
|
||||
#
|
||||
# o GTP-U Server(127.0.0.1:2152, [::1]:2152)
|
||||
# gtpu:
|
||||
# - name: localhost
|
||||
#
|
||||
# o User Plane IP Resource information
|
||||
# gtpu:
|
||||
# - addr:
|
||||
# - 127.0.0.6
|
||||
# - ::1
|
||||
# teid_range_indication: 4
|
||||
# teid_range: 10
|
||||
# network_instance: internet
|
||||
# source_interface: 0
|
||||
# - addr: 127.0.10.4
|
||||
# teid_range_indication: 4
|
||||
# teid_range: 5
|
||||
# network_instance: ims
|
||||
# source_interface: 1
|
||||
#
|
||||
# o Provide custom SGW-U GTP-U address to be advertised inside S1AP messages
|
||||
# gtpu:
|
||||
# - addr: 10.4.128.21
|
||||
# advertise_addr: 172.24.15.30
|
||||
#
|
||||
# gtpu:
|
||||
# addr: 10.4.128.21
|
||||
# advertise_name: sgw1.epc.mnc001.mcc001.3gppnetwork.org
|
||||
# - addr: 10.4.128.21
|
||||
# advertise_addr:
|
||||
# - 127.0.0.1
|
||||
# - ::1
|
||||
#
|
||||
# gtpu:
|
||||
# dev: ens3
|
||||
# advertise_name: sgw1.epc.mnc001.mcc001.3gppnetwork.org
|
||||
# - addr: 10.4.128.21
|
||||
# advertise_name: sgw1.epc.mnc001.mcc001.3gppnetwork.org
|
||||
#
|
||||
# gtpu:
|
||||
# - dev: ens3
|
||||
# advertise_name: sgw1.epc.mnc001.mcc001.3gppnetwork.org
|
||||
#
|
||||
# <PFCP Server>
|
||||
#
|
||||
@@ -103,22 +134,33 @@ max:
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 32768 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 32768
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
pool:
|
||||
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
|
||||
#
|
||||
# o Message Wait Duration (3000 ms)
|
||||
# message:
|
||||
# duration: 3000
|
||||
time:
|
||||
|
||||
@@ -98,26 +98,26 @@ logger:
|
||||
# o Specific DNN/APN(e.g 'ims') uses 10.46.0.1/16, cafe:2::1/64
|
||||
# pdn:
|
||||
# - addr: 10.45.0.1/16
|
||||
# apn: internet
|
||||
# dnn: internet
|
||||
# - addr: cafe:1::1/64
|
||||
# apn: internet
|
||||
# dnn: internet
|
||||
# - addr: 10.46.0.1/16
|
||||
# apn: ims
|
||||
# dnn: ims
|
||||
# - addr: cafe:2::1/64
|
||||
# apn: ims
|
||||
# dnn: ims
|
||||
#
|
||||
# o Multiple Devices (default: ogstun)
|
||||
# pdn:
|
||||
# - addr: 10.45.0.1/16
|
||||
# apn: internet
|
||||
# dnn: internet
|
||||
# - addr: cafe:1::1/64
|
||||
# apn: internet
|
||||
# dnn: internet
|
||||
# dev: ogstun2
|
||||
# - addr: 10.46.0.1/16
|
||||
# apn: ims
|
||||
# dnn: ims
|
||||
# dev: ogstun3
|
||||
# - addr: cafe:2::1/64
|
||||
# apn: ims
|
||||
# dnn: ims
|
||||
# dev: ogstun3
|
||||
#
|
||||
# o Pool Range Sample
|
||||
@@ -261,7 +261,7 @@ nrf:
|
||||
# - addr: 127.0.0.7
|
||||
# dnn: ims
|
||||
# - addr: 127.0.0.12
|
||||
# apn: [internet, web]
|
||||
# dnn: [internet, web]
|
||||
#
|
||||
# o UPF selection by CellID(e_cell_id: 28bit, nr_cell_id: 36bit)
|
||||
# (either single enb_id or multiple enb_ids, HEX representation)
|
||||
@@ -313,19 +313,20 @@ max:
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 32768 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 32768
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
@@ -336,17 +337,18 @@ pool:
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Heartbeat (Default : 10 seconds)
|
||||
# o NF Instance Heartbeat (Default : 0)
|
||||
# NFs will not send heart-beat timer in NFProfile
|
||||
# NRF will send heart-beat timer in NFProfile
|
||||
#
|
||||
# o NF Instance Heartbeat (20 seconds)
|
||||
# NFs will send heart-beat timer (20 seconds) in NFProfile
|
||||
# NRF can change heart-beat timer in NFProfile
|
||||
#
|
||||
# o NF Instance Heartbeat (Disabled)
|
||||
# nf_instance:
|
||||
# heartbeat: 0
|
||||
# heartbeat: 20
|
||||
#
|
||||
# o NF Instance Heartbeat (10 seconds)
|
||||
# nf_instance:
|
||||
# heartbeat: 10
|
||||
#
|
||||
# o Message Wait Duration (Default : 2000ms = 2 seconds)
|
||||
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
|
||||
#
|
||||
# o Message Wait Duration (3000 ms)
|
||||
# message:
|
||||
|
||||
@@ -136,19 +136,20 @@ max:
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 32768 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 32768
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
@@ -159,17 +160,18 @@ pool:
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Heartbeat (Default : 10 seconds)
|
||||
# o NF Instance Heartbeat (Default : 0)
|
||||
# NFs will not send heart-beat timer in NFProfile
|
||||
# NRF will send heart-beat timer in NFProfile
|
||||
#
|
||||
# o NF Instance Heartbeat (20 seconds)
|
||||
# NFs will send heart-beat timer (20 seconds) in NFProfile
|
||||
# NRF can change heart-beat timer in NFProfile
|
||||
#
|
||||
# o NF Instance Heartbeat (Disabled)
|
||||
# nf_instance:
|
||||
# heartbeat: 0
|
||||
# heartbeat: 20
|
||||
#
|
||||
# o NF Instance Heartbeat (10 seconds)
|
||||
# nf_instance:
|
||||
# heartbeat: 10
|
||||
#
|
||||
# o Message Wait Duration (Default : 2000ms = 2 seconds)
|
||||
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
|
||||
#
|
||||
# o Message Wait Duration (3000 ms)
|
||||
# message:
|
||||
|
||||
@@ -43,9 +43,9 @@ logger:
|
||||
# key: udr.key
|
||||
# pem: udr.pem
|
||||
#
|
||||
# o SBI Server(https://127.0.0.13:443, http://[::1]:80)
|
||||
# o SBI Server(https://127.0.0.20:443, http://[::1]:80)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.13
|
||||
# - addr: 127.0.0.20
|
||||
# tls:
|
||||
# key: udr.key
|
||||
# pem: udr.pem
|
||||
@@ -55,9 +55,9 @@ logger:
|
||||
# sbi:
|
||||
# name: udr.open5gs.org
|
||||
#
|
||||
# o SBI Server(http://127.0.0.13:7777)
|
||||
# o SBI Server(http://127.0.0.20:7777)
|
||||
# sbi:
|
||||
# - addr: 127.0.0.13
|
||||
# - addr: 127.0.0.20
|
||||
# port: 7777
|
||||
#
|
||||
# o SBI Server(http://<eth0 IP address>:80)
|
||||
@@ -66,7 +66,7 @@ logger:
|
||||
#
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.13
|
||||
- addr: 127.0.0.20
|
||||
port: 7777
|
||||
|
||||
#
|
||||
@@ -138,19 +138,20 @@ max:
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 32768 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 32768
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
@@ -161,7 +162,16 @@ pool:
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o NF Instance Heartbeat (Default : 10 seconds)
|
||||
# o NF Instance Heartbeat (Default : 0)
|
||||
# NFs will not send heart-beat timer in NFProfile
|
||||
# NRF will send heart-beat timer in NFProfile
|
||||
#
|
||||
# o NF Instance Heartbeat (20 seconds)
|
||||
# NFs will send heart-beat timer (20 seconds) in NFProfile
|
||||
# NRF can change heart-beat timer in NFProfile
|
||||
#
|
||||
# nf_instance:
|
||||
# heartbeat: 20
|
||||
#
|
||||
# o NF Instance Heartbeat (Disabled)
|
||||
# nf_instance:
|
||||
@@ -171,7 +181,7 @@ pool:
|
||||
# nf_instance:
|
||||
# heartbeat: 10
|
||||
#
|
||||
# o Message Wait Duration (Default : 2000ms = 2 seconds)
|
||||
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
|
||||
#
|
||||
# o Message Wait Duration (3000 ms)
|
||||
# message:
|
||||
|
||||
@@ -26,19 +26,23 @@ logger:
|
||||
#
|
||||
# <PFCP Server>
|
||||
#
|
||||
# o PFCP Server(127.0.0.7:8805)
|
||||
# o PFCP Server(127.0.0.7:8805, ::1:8805)
|
||||
# pfcp:
|
||||
# addr: 127.0.0.7
|
||||
# - addr: 127.0.0.7
|
||||
# - addr: ::1
|
||||
#
|
||||
# <GTP-U Server>>
|
||||
#
|
||||
# o GTP-U Server(all address available)
|
||||
# gtpu:
|
||||
#
|
||||
# o GTP-U Server(127.0.0.7:2152, [::1]:2152)
|
||||
# gtpu:
|
||||
# - addr:
|
||||
# - 127.0.0.7
|
||||
# - ::1
|
||||
#
|
||||
# o Same configuration(127.0.0.7:2152, [::1]:2152) as below.
|
||||
# o GTP-U Server(127.0.0.1:2152, [::1]:2152)
|
||||
# gtpu:
|
||||
# name: localhost
|
||||
#
|
||||
@@ -57,6 +61,26 @@ logger:
|
||||
# network_instance: ims
|
||||
# source_interface: 1
|
||||
#
|
||||
# o Provide custom UPF GTP-U address to be advertised inside NGAP messages
|
||||
# gtpu:
|
||||
# - addr: 10.4.128.21
|
||||
# advertise_addr: 172.24.15.30
|
||||
#
|
||||
# gtpu:
|
||||
# - addr: 10.4.128.21
|
||||
# advertise_addr:
|
||||
# - 127.0.0.1
|
||||
# - ::1
|
||||
#
|
||||
# gtpu:
|
||||
# - addr: 10.4.128.21
|
||||
# advertise_name: upf1.5gc.mnc001.mcc001.3gppnetwork.org
|
||||
#
|
||||
# gtpu:
|
||||
# - dev: ens3
|
||||
# advertise_name: upf1.5gc.mnc001.mcc001.3gppnetwork.org
|
||||
#
|
||||
#
|
||||
# <PDN Configuration with UE Pool>
|
||||
#
|
||||
# o IPv4 Pool
|
||||
@@ -83,13 +107,13 @@ logger:
|
||||
#
|
||||
# pdn:
|
||||
# - addr: 10.45.0.1/16
|
||||
# apn: internet
|
||||
# dnn: internet
|
||||
# - addr: cafe:1::1/64
|
||||
# apn: internet
|
||||
# dnn: internet
|
||||
# - addr: 10.46.0.1/16
|
||||
# apn: ims
|
||||
# dnn: ims
|
||||
# - addr: cafe:2::1/64
|
||||
# apn: ims
|
||||
# dnn: ims
|
||||
#
|
||||
# o Multiple Devices (default: ogstun)
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
@@ -99,15 +123,15 @@ logger:
|
||||
#
|
||||
# pdn:
|
||||
# - addr: 10.45.0.1/16
|
||||
# apn: internet
|
||||
# dnn: internet
|
||||
# - addr: cafe:1::1/64
|
||||
# apn: internet
|
||||
# dnn: internet
|
||||
# dev: ogstun2
|
||||
# - addr: 10.46.0.1/16
|
||||
# apn: ims
|
||||
# dnn: ims
|
||||
# dev: ogstun3
|
||||
# - addr: cafe:2::1/64
|
||||
# apn: ims
|
||||
# dnn: ims
|
||||
# dev: ogstun3
|
||||
#
|
||||
# o Pool Range Sample
|
||||
@@ -195,22 +219,33 @@ max:
|
||||
#
|
||||
# pool:
|
||||
#
|
||||
# o The Number of Default Memory Pool Size
|
||||
# o The default memory pool size was set assuming 1024 UEs.
|
||||
# To connect more UEs, you need to increase the size further.
|
||||
#
|
||||
# - Pool-size 128 => 32768 Number
|
||||
# - Pool-size 256 => 4096 Number
|
||||
# - Pool-size 512 => 2048 Number
|
||||
# - Pool-size 128 => 65536 Number
|
||||
# - Pool-size 256 => 8192 Number
|
||||
# - Pool-size 512 => 4096 Number
|
||||
# - Pool-size 1024 => 1024 Number
|
||||
# - Pool-size 2048 => 512 Number
|
||||
# - Pool-size 8192 => 128 Number
|
||||
# - Pool-size 1024*1024 => 8 Number
|
||||
#
|
||||
# 128: 32768
|
||||
# 256: 4096
|
||||
# 512: 2048
|
||||
# 128: 65536
|
||||
# 256: 8192
|
||||
# 512: 4096
|
||||
# 1024: 1024
|
||||
# 2048: 512
|
||||
# 8192: 128
|
||||
# big: 8
|
||||
#
|
||||
pool:
|
||||
|
||||
#
|
||||
# time:
|
||||
#
|
||||
# o Message Wait Duration (Default : 10,000 ms = 10 seconds)
|
||||
#
|
||||
# o Message Wait Duration (3000 ms)
|
||||
# message:
|
||||
# duration: 3000
|
||||
time:
|
||||
|
||||
@@ -9,6 +9,7 @@ parameter:
|
||||
# no_upf: true
|
||||
# no_ausf: true
|
||||
# no_udm: true
|
||||
# no_pcf: true
|
||||
# no_udr: true
|
||||
# no_mme: true
|
||||
# no_sgwc: true
|
||||
@@ -194,7 +195,12 @@ udm:
|
||||
- addr: 127.0.0.12
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
pcf:
|
||||
sbi:
|
||||
- addr: 127.0.0.13
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.20
|
||||
port: 7777
|
||||
|
||||
@@ -9,6 +9,7 @@ parameter:
|
||||
# no_upf: true
|
||||
# no_ausf: true
|
||||
# no_udm: true
|
||||
# no_pcf: true
|
||||
# no_udr: true
|
||||
# no_mme: true
|
||||
# no_sgwc: true
|
||||
@@ -63,9 +64,9 @@ sgwc:
|
||||
- addr: 127.0.0.3
|
||||
|
||||
smf:
|
||||
sbi:
|
||||
- addr: 127.0.0.4
|
||||
port: 7777
|
||||
# sbi:
|
||||
# - addr: 127.0.0.4
|
||||
# port: 7777
|
||||
gtpc:
|
||||
- addr: 127.0.0.4
|
||||
- addr: ::1
|
||||
@@ -177,12 +178,12 @@ pcrf:
|
||||
- identity: smf.localdomain
|
||||
addr: 127.0.0.4
|
||||
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.10
|
||||
- ::1
|
||||
port: 7777
|
||||
#nrf:
|
||||
# sbi:
|
||||
# - addr:
|
||||
# - 127.0.0.10
|
||||
# - ::1
|
||||
# port: 7777
|
||||
|
||||
ausf:
|
||||
sbi:
|
||||
@@ -194,7 +195,12 @@ udm:
|
||||
- addr: 127.0.0.12
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
pcf:
|
||||
sbi:
|
||||
- addr: 127.0.0.13
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.20
|
||||
port: 7777
|
||||
|
||||
@@ -27,6 +27,7 @@ systemd_conf_in = '''
|
||||
open5gs-nrfd.service
|
||||
open5gs-ausfd.service
|
||||
open5gs-udmd.service
|
||||
open5gs-pcfd.service
|
||||
open5gs-udrd.service
|
||||
'''.split()
|
||||
|
||||
|
||||
18
configs/systemd/open5gs-pcfd.service.in
Normal file
18
configs/systemd/open5gs-pcfd.service.in
Normal file
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=Open5GS PCF Daemon
|
||||
After=networking.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
|
||||
User=open5gs
|
||||
Group=open5gs
|
||||
|
||||
Restart=always
|
||||
ExecStart=@bindir@/open5gs-pcfd -c @sysconfdir@/open5gs/pcf.yaml
|
||||
RestartSec=2
|
||||
RestartPreventExitStatus=1
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -9,6 +9,7 @@ parameter:
|
||||
# no_upf: true
|
||||
# no_ausf: true
|
||||
# no_udm: true
|
||||
# no_pcf: true
|
||||
# no_udr: true
|
||||
# no_mme: true
|
||||
# no_sgwc: true
|
||||
@@ -63,9 +64,9 @@ sgwc:
|
||||
- addr: 127.0.0.3
|
||||
|
||||
smf:
|
||||
sbi:
|
||||
- addr: 127.0.0.4
|
||||
port: 7777
|
||||
# sbi:
|
||||
# - addr: 127.0.0.4
|
||||
# port: 7777
|
||||
gtpc:
|
||||
- addr: 127.0.0.4
|
||||
- addr: ::1
|
||||
@@ -182,12 +183,12 @@ pcrf:
|
||||
- identity: pcscf.localdomain
|
||||
addr: 127.0.0.1
|
||||
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.10
|
||||
- ::1
|
||||
port: 7777
|
||||
#nrf:
|
||||
# sbi:
|
||||
# - addr:
|
||||
# - 127.0.0.10
|
||||
# - ::1
|
||||
# port: 7777
|
||||
|
||||
ausf:
|
||||
sbi:
|
||||
@@ -199,7 +200,12 @@ udm:
|
||||
- addr: 127.0.0.12
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
pcf:
|
||||
sbi:
|
||||
- addr: 127.0.0.13
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.20
|
||||
port: 7777
|
||||
|
||||
211
configs/vonr.yaml.in
Normal file
211
configs/vonr.yaml.in
Normal file
@@ -0,0 +1,211 @@
|
||||
db_uri: mongodb://localhost/open5gs
|
||||
|
||||
logger:
|
||||
|
||||
parameter:
|
||||
# no_nrf: true
|
||||
# no_amf: true
|
||||
# no_smf: true
|
||||
# no_upf: true
|
||||
# no_ausf: true
|
||||
# no_udm: true
|
||||
# no_pcf: true
|
||||
# no_udr: true
|
||||
# no_mme: true
|
||||
# no_sgwc: true
|
||||
# no_sgwu: true
|
||||
# no_pcrf: true
|
||||
# no_hss: true
|
||||
|
||||
mme:
|
||||
freeDiameter:
|
||||
identity: mme.localdomain
|
||||
realm: localdomain
|
||||
listen_on: 127.0.0.2
|
||||
load_extension:
|
||||
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
|
||||
conf: 0x8888
|
||||
- module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_mip6i.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nasreq.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
connect:
|
||||
- identity: hss.localdomain
|
||||
addr: 127.0.0.8
|
||||
|
||||
s1ap:
|
||||
- addr: 127.0.0.2
|
||||
gtpc:
|
||||
- addr: 127.0.0.2
|
||||
gummei:
|
||||
plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
mme_gid: 2
|
||||
mme_code: 1
|
||||
tai:
|
||||
plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
tac: 1
|
||||
security:
|
||||
integrity_order : [ EIA2, EIA1, EIA0 ]
|
||||
ciphering_order : [ EEA0, EEA1, EEA2 ]
|
||||
|
||||
network_name:
|
||||
full: Open5GS
|
||||
|
||||
sgwc:
|
||||
gtpc:
|
||||
- addr: 127.0.0.3
|
||||
pfcp:
|
||||
- addr: 127.0.0.3
|
||||
|
||||
smf:
|
||||
sbi:
|
||||
- addr: 127.0.0.4
|
||||
port: 7777
|
||||
gtpc:
|
||||
- addr: 127.0.0.4
|
||||
- addr: ::1
|
||||
pfcp:
|
||||
- addr: 127.0.0.4
|
||||
pdn:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
- 2001:4860:4860::8888
|
||||
- 2001:4860:4860::8844
|
||||
p-cscf:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
mtu: 1400
|
||||
freeDiameter:
|
||||
identity: smf.localdomain
|
||||
realm: localdomain
|
||||
listen_on: 127.0.0.4
|
||||
load_extension:
|
||||
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
|
||||
conf: 0x8888
|
||||
- module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_mip6i.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nasreq.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
connect:
|
||||
- identity: pcrf.localdomain
|
||||
addr: 127.0.0.9
|
||||
amf:
|
||||
sbi:
|
||||
- addr: 127.0.0.5
|
||||
port: 7777
|
||||
ngap:
|
||||
- addr: 127.0.0.5
|
||||
guami:
|
||||
- plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
amf_id:
|
||||
region: 2
|
||||
set: 1
|
||||
tai:
|
||||
- plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
tac: 1
|
||||
plmn_support:
|
||||
- plmn_id:
|
||||
mcc: 901
|
||||
mnc: 70
|
||||
s_nssai:
|
||||
- sst: 1
|
||||
security:
|
||||
integrity_order : [ NIA2, NIA1, NIA0 ]
|
||||
ciphering_order : [ NEA0, NEA1, NEA2 ]
|
||||
network_name:
|
||||
full: Open5GS
|
||||
amf_name: open5gs-amf0
|
||||
|
||||
sgwu:
|
||||
gtpu:
|
||||
- addr: 127.0.0.6
|
||||
pfcp:
|
||||
- addr: 127.0.0.6
|
||||
|
||||
upf:
|
||||
pfcp:
|
||||
- addr: 127.0.0.7
|
||||
gtpu:
|
||||
- addr: 127.0.0.7
|
||||
pdn:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
|
||||
hss:
|
||||
freeDiameter:
|
||||
identity: hss.localdomain
|
||||
realm: localdomain
|
||||
listen_on: 127.0.0.8
|
||||
load_extension:
|
||||
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
|
||||
conf: 0x8888
|
||||
- module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_mip6i.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nasreq.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
connect:
|
||||
- identity: mme.localdomain
|
||||
addr: 127.0.0.2
|
||||
pcrf:
|
||||
freeDiameter:
|
||||
identity: pcrf.localdomain
|
||||
realm: localdomain
|
||||
listen_on: 127.0.0.9
|
||||
load_extension:
|
||||
- module: @freediameter_extensions_builddir@/dbg_msg_dumps.fdx
|
||||
conf: 0x8888
|
||||
- module: @freediameter_extensions_builddir@/dict_rfc5777.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_mip6i.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nasreq.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_nas_mipv6.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca.fdx
|
||||
- module: @freediameter_extensions_builddir@/dict_dcca_3gpp.fdx
|
||||
connect:
|
||||
- identity: smf.localdomain
|
||||
addr: 127.0.0.4
|
||||
- identity: pcscf.localdomain
|
||||
addr: 127.0.0.1
|
||||
|
||||
nrf:
|
||||
sbi:
|
||||
- addr:
|
||||
- 127.0.0.10
|
||||
- ::1
|
||||
port: 7777
|
||||
|
||||
ausf:
|
||||
sbi:
|
||||
- addr: 127.0.0.11
|
||||
port: 7777
|
||||
|
||||
udm:
|
||||
sbi:
|
||||
- addr: 127.0.0.12
|
||||
port: 7777
|
||||
|
||||
pcf:
|
||||
sbi:
|
||||
- addr: 127.0.0.13
|
||||
port: 7777
|
||||
|
||||
udr:
|
||||
sbi:
|
||||
- addr: 127.0.0.20
|
||||
port: 7777
|
||||
144
debian/changelog
vendored
144
debian/changelog
vendored
@@ -1,3 +1,147 @@
|
||||
open5gs (2.1.3) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 08 Jan 2021 23:20:33 -0500
|
||||
|
||||
open5gs (2.1.3~bionic1) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 08 Jan 2021 23:19:22 -0500
|
||||
|
||||
open5gs (2.1.3~focal1) focal; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 08 Jan 2021 23:17:48 -0500
|
||||
|
||||
open5gs (2.1.2) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 08 Jan 2021 00:28:16 -0500
|
||||
|
||||
open5gs (2.1.2~bionic1) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 08 Jan 2021 00:27:09 -0500
|
||||
|
||||
open5gs (2.1.2~focal1) focal; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 08 Jan 2021 00:25:31 -0500
|
||||
|
||||
open5gs (2.1.1) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 16 Dec 2020 23:04:41 -0500
|
||||
|
||||
open5gs (2.1.1~bionic) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 16 Dec 2020 23:03:25 -0500
|
||||
|
||||
open5gs (2.1.1~focal) focal; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 16 Dec 2020 23:02:04 -0500
|
||||
|
||||
open5gs (2.1.0) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 11 Dec 2020 14:16:21 -0500
|
||||
|
||||
open5gs (2.1.0~focal) focal; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 11 Dec 2020 14:15:00 -0500
|
||||
|
||||
open5gs (2.1.0~bionic) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 11 Dec 2020 14:13:40 -0500
|
||||
|
||||
open5gs (2.0.22) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Thu, 19 Nov 2020 07:55:27 -0500
|
||||
|
||||
open5gs (2.0.22~bionic) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Thu, 19 Nov 2020 07:54:23 -0500
|
||||
|
||||
open5gs (2.0.22~focal) focal; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Thu, 19 Nov 2020 07:53:15 -0500
|
||||
|
||||
open5gs (2.0.21) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 11 Nov 2020 14:16:54 -0500
|
||||
|
||||
open5gs (2.0.21~focal) focal; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 11 Nov 2020 14:12:36 -0500
|
||||
|
||||
open5gs (2.0.21~bionic) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Wed, 11 Nov 2020 14:11:17 -0500
|
||||
|
||||
open5gs (2.0.20) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 01 Nov 2020 23:05:14 -0500
|
||||
|
||||
open5gs (2.0.20~bionic3) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 01 Nov 2020 23:04:15 -0500
|
||||
|
||||
open5gs (2.0.20~focal3) focal; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 01 Nov 2020 23:03:11 -0500
|
||||
|
||||
open5gs (2.0.19) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 01 Nov 2020 01:49:04 -0400
|
||||
|
||||
open5gs (2.0.19~bionic3) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 01 Nov 2020 01:47:12 -0400
|
||||
|
||||
open5gs (2.0.19~focal3) focal; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Sun, 01 Nov 2020 01:46:05 -0400
|
||||
|
||||
open5gs (2.0.18) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
14
debian/control
vendored
14
debian/control
vendored
@@ -19,6 +19,7 @@ Build-Depends: debhelper (>= 11),
|
||||
libyaml-dev,
|
||||
libmicrohttpd-dev,
|
||||
libcurl4-gnutls-dev,
|
||||
libnghttp2-dev,
|
||||
Standards-Version: 4.3.0
|
||||
Rules-Requires-Root: no
|
||||
Homepage: https://open5gs.org
|
||||
@@ -186,6 +187,18 @@ Description: UDM (Unified Data Management)
|
||||
.
|
||||
This package provides the UDM (Unified Data Managemement)
|
||||
|
||||
Package: open5gs-pcf
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
open5gs-common (= ${binary:Version})
|
||||
Description: PCF (Policy Control Function)
|
||||
Open5GS is a C-language implementation of 5G Core and EPC
|
||||
Packet Core, i.e. the core network of an NR/LTE network (Release-16)
|
||||
.
|
||||
This package provides the PCF (Policy Control Function)
|
||||
|
||||
Package: open5gs-udr
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
@@ -214,6 +227,7 @@ Depends: ${misc:Depends},
|
||||
open5gs-nrf (= ${binary:Version}),
|
||||
open5gs-ausf (= ${binary:Version}),
|
||||
open5gs-udm (= ${binary:Version}),
|
||||
open5gs-pcf (= ${binary:Version}),
|
||||
open5gs-udr (= ${binary:Version})
|
||||
Description: 5G Core and EPC (metapackage)
|
||||
Open5GS is a C-language implementation of 5G Core and EPC
|
||||
|
||||
3
debian/open5gs-pcf.install
vendored
Normal file
3
debian/open5gs-pcf.install
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
usr/bin/open5gs-pcfd
|
||||
configs/open5gs/pcf.yaml etc/open5gs
|
||||
configs/systemd/open5gs-pcfd.service lib/systemd/system
|
||||
2
debian/rules
vendored
2
debian/rules
vendored
@@ -14,4 +14,4 @@ override_dh_install:
|
||||
dh_install --sourcedir=obj-$(DEB_HOST_GNU_TYPE)
|
||||
|
||||
override_dh_auto_test:
|
||||
cd obj-$(DEB_HOST_GNU_TYPE) && meson test --suite unit
|
||||
cd obj-$(DEB_HOST_GNU_TYPE) && meson test -v --suite unit
|
||||
|
||||
@@ -26,4 +26,5 @@ RUN yum -y install \
|
||||
mongo-c-driver-devel \
|
||||
libmicrohttpd-devel \
|
||||
libcurl-devel \
|
||||
libnghttp2-devel \
|
||||
iproute
|
||||
|
||||
@@ -31,6 +31,7 @@ RUN dnf -y install \
|
||||
mongo-c-driver-devel \
|
||||
libmicrohttpd-devel \
|
||||
libcurl-devel \
|
||||
libnghttp2-devel \
|
||||
iproute
|
||||
|
||||
RUN dnf -y install meson
|
||||
|
||||
@@ -3,25 +3,16 @@
|
||||
docker-compose build
|
||||
docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
|
||||
|
||||
TAG=eoan docker-compose build
|
||||
TAG=eoan docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
|
||||
TAG=bionic docker-compose build
|
||||
TAG=bionic docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
|
||||
|
||||
DIST=fedora docker-compose build
|
||||
DIST=fedora docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
|
||||
|
||||
DIST=fedora TAG=29 docker-compose build
|
||||
DIST=fedora TAG=29 docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
|
||||
DIST=fedora TAG=32 docker-compose build
|
||||
DIST=fedora TAG=32 docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
|
||||
|
||||
DIST=centos docker-compose build
|
||||
DIST=centos docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
|
||||
|
||||
DIST=centos TAG=7 docker-compose build
|
||||
DIST=centos TAG=7 docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
|
||||
|
||||
DIST=debian docker-compose build
|
||||
DIST=debian docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
|
||||
|
||||
DIST=debian TAG=stretch docker-compose build
|
||||
DIST=debian TAG=stretch docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test
|
||||
|
||||
docker rm $(docker ps -qa --no-trunc --filter "status=exited")
|
||||
|
||||
@@ -27,6 +27,7 @@ RUN apt-get update && \
|
||||
libyaml-dev \
|
||||
libmicrohttpd-dev \
|
||||
libcurl4-gnutls-dev \
|
||||
libnghttp2-dev \
|
||||
iproute2 \
|
||||
ca-certificates \
|
||||
netbase \
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
stretch
|
||||
@@ -21,6 +21,7 @@ RUN dnf -y install \
|
||||
mongo-c-driver-devel \
|
||||
libmicrohttpd-devel \
|
||||
libcurl-devel \
|
||||
libnghttp2-devel \
|
||||
iproute
|
||||
|
||||
RUN dnf -y install meson
|
||||
|
||||
1
docker/ubuntu/groovy
Symbolic link
1
docker/ubuntu/groovy
Symbolic link
@@ -0,0 +1 @@
|
||||
../debian/latest
|
||||
@@ -27,6 +27,7 @@ RUN apt-get update && \
|
||||
libyaml-dev \
|
||||
libmicrohttpd-dev \
|
||||
libcurl4-gnutls-dev \
|
||||
libnghttp2-dev \
|
||||
iproute2 \
|
||||
ca-certificates \
|
||||
netbase \
|
||||
|
||||
@@ -2,11 +2,72 @@
|
||||
title: Quickstart
|
||||
---
|
||||
|
||||
**Note:** Open5GS supports installation of packages in *Debian/Ubuntu and openSUSE* environments. *CentOS, Fedora, FreeBSD, and Mac OSX* require you to [build with source code]({{ site.url }}{{ site.baseurl }}/docs/guide/02-building-open5gs-from-sources)
|
||||
## 1. Introduction to Open5GS
|
||||
---
|
||||
|
||||
Welcome! If you want to set up your first Open5GS core you have come to the right place. Before we get started, we'll spend a moment to understand the basic architecture of the software.
|
||||
|
||||
**TL;DR:** Open5GS contains a series of software components and network functions that implement the 4G/ 5G NSA and 5G SA core functions. If you know what each of these do already and how they interface with each other, skip to section 2.
|
||||
{: .notice--info}
|
||||
|
||||
<style>
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||

|
||||
|
||||
[[Higher quality PDF diagram available HERE]]({{ site.url }}{{ site.baseurl }}/assets/images/Open5GS_CUPS-01.pdf)
|
||||
|
||||
#### 4G/ 5G NSA Core
|
||||
|
||||
The Open5GS 4G/ 5G NSA Core contains the following components:
|
||||
* MME - Mobility Management Entity
|
||||
* HSS - Home Subscriber Server
|
||||
* PCRF - Policy and Charging Rules Function
|
||||
* SGWC - Serving Gateway Control Plane
|
||||
* SGWU - Serving Gateway User Plane
|
||||
* PGWC/SMF - Packet Gateway Control Plane / (component contained in Open5GS SMF)
|
||||
* PGWU/UPF - Packet Gateway User Plane / (component contained in Open5GS UPF)
|
||||
|
||||
The core has two main planes: the control plane and the user plane. These are physically separated in Open5GS as CUPS (control/ user plane separation) is implemented.
|
||||
|
||||
The MME is the main **control plane** hub of the core. It primarily manages sessions, mobilty, paging and bearers. It links to the HSS, which generates SIM authentication vectors and holds the subscriber profile; and also to the SGWC and PGWC/SMF, which are the control planes of the gateway servers. All the eNBs in the mobile network (4G basestations) connect to the MME. The final element of the control plane is the PCRF, which sits in-between the PGWC/SMF and the HSS, and handles charging and enforces subscriber policies.
|
||||
|
||||
The **user plane** carries user data packets between the eNB/ NSA gNB (5G NSA basestations) and the external WAN. The two user plane core components are the SGWU and PGWU/UPF. Each of these connect back to their control plane counterparts. eNBs/ NSA gNBs connect to the SGWU, which connects to the PGWU/UPF, and on to the WAN. *By having the control and user planes physically separated like this, it means you can deploy multiple user plane servers in the field (eg somewhere with a high speed Internet connection), whilst keeping control functionality centralised. This enables support of MEC use cases, for example.*
|
||||
|
||||
All of these Open5GS components have config files. Each config file contains the component's IP bind addresses/ local Interface names **and** the IP addresses/ DNS names of the other components it needs to connect to. We'll come back to this in Section 3.
|
||||
|
||||
|
||||
#### 5G SA Core
|
||||
|
||||
The Open5GS 5G SA Core contains the following functions:
|
||||
* AMF - Access and Mobility Management Function
|
||||
* SMF - Session Management Function
|
||||
* UPF - User Plane Function
|
||||
* AUSF - Authentication Server Function
|
||||
* NRF - NF Repository Function
|
||||
* UDM - Unified Data Management
|
||||
* UDR - Unified Data Repository
|
||||
* PCF - Policy and Charging Function
|
||||
|
||||
The 5G SA core works in a different way to the 4G core - it uses a **Service Based Architecture** (SBI). **Control plane** functions are configured to register with the NRF, and the NRF then helps them discover the other core functions. Running through the other functions: The AMF handles connection and mobility management; a subset of what the 4G MME is tasked with. gNBs (5G basestations) connect to the AMF. The UDM, AUSF and UDR carry out similar operations as the 4G HSS, generating SIM authentication vectors and holding the subscriber profile. Session management is all handled by the SMF (previously the responsibility of the 4G MME/ SGWC/ PGWC). Finally there is the PCF, used for charging and enforcing subscriber policies.
|
||||
|
||||
The 5G SA core **user plane** is much simpler, as it only contains a single function. The UPF carries user data packets between the gNB and the external WAN. It connects back to the SMF too.
|
||||
|
||||
With the exception of the SMF and UPF, all config files for the 5G SA core functions only contain the function's IP bind addresses/ local Interface names and the IP address/ DNS name of the NRF.
|
||||
|
||||
|
||||
## 2. Install Open5GS with a Package Manager
|
||||
---
|
||||
|
||||
**Note:** Package managers can be used to install Open5GS in *Debian/Ubuntu and openSUSE* environments (for major and minor builds). *CentOS, Fedora, and Mac OSX* require you to [build with source code]({{ site.url }}{{ site.baseurl }}/docs/guide/02-building-open5gs-from-sources).
|
||||
{: .notice--warning}
|
||||
**Note:** Nighly builds are offered by [Osmocom](https://osmocom.org) on [OBS](https://build.opensuse.org/package/show/network:osmocom:nightly/open5gs). Scroll down to use a nightly build package.
|
||||
{: .notice--warning}
|
||||
|
||||
### Install Open5GS with a Package Manager
|
||||
---
|
||||
|
||||
#### Ubuntu
|
||||
|
||||
@@ -48,19 +109,7 @@ https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbunt
|
||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_19.04/
|
||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_19.10/
|
||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_20.04/
|
||||
```
|
||||
|
||||
Nightly package build are provided by [Osmocom](https://osmocom.org) on [OBS](https://build.opensuse.org/package/show/network:osmocom:nightly/open5gs).
|
||||
|
||||
```
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_10/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_Testing/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_Unstable/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Raspbian_10/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_18.04/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_18.10/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_19.04/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_19.10/
|
||||
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_20.10/
|
||||
```
|
||||
|
||||
#### openSUSE
|
||||
@@ -73,134 +122,41 @@ $ sudo zypper install mongodb-server mongodb-shell
|
||||
$ sudo zypper install open5gs
|
||||
```
|
||||
|
||||
### Configure Open5GS
|
||||
---
|
||||
#### Nightly Builds
|
||||
|
||||
##### 5G Core
|
||||
|
||||
Modify [install/etc/open5gs/amf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/amf.yaml.in) to set the NGAP IP address, PLMN ID, TAC and NSSAI.
|
||||
|
||||
```diff
|
||||
$ diff -u /etc/open5gs/amf.yaml.old /etc/open5gs/amf.yaml
|
||||
--- amf.yaml 2020-09-05 20:52:28.652234967 -0400
|
||||
+++ amf.yaml.new 2020-09-05 20:55:07.453114885 -0400
|
||||
@@ -165,23 +165,23 @@
|
||||
- addr: 127.0.0.5
|
||||
port: 7777
|
||||
ngap:
|
||||
- - addr: 127.0.0.5
|
||||
+ - addr: 10.10.0.5
|
||||
guami:
|
||||
- plmn_id:
|
||||
- mcc: 901
|
||||
- mnc: 70
|
||||
+ mcc: 001
|
||||
+ mnc: 01
|
||||
amf_id:
|
||||
region: 2
|
||||
set: 1
|
||||
tai:
|
||||
- plmn_id:
|
||||
- mcc: 901
|
||||
- mnc: 70
|
||||
- tac: 1
|
||||
+ mcc: 001
|
||||
+ mnc: 01
|
||||
+ tac: 2
|
||||
plmn:
|
||||
- plmn_id:
|
||||
- mcc: 901
|
||||
- mnc: 70
|
||||
+ mcc: 001
|
||||
+ mnc: 01
|
||||
s_nssai:
|
||||
- sst: 1
|
||||
security:
|
||||
```
|
||||
|
||||
Modify [install/etc/open5gs/upf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/upf.yaml.in) to set the GTP-U and PFCP IP address.
|
||||
```diff
|
||||
$ diff -u /etc/open5gs/upf.yaml.old /etc/open5gs/upf.yaml
|
||||
--- upf.yaml 2020-09-05 20:52:28.652234967 -0400
|
||||
+++ upf.yaml.new 2020-09-05 20:52:55.279052142 -0400
|
||||
@@ -137,9 +137,7 @@
|
||||
pfcp:
|
||||
- addr: 127.0.0.7
|
||||
gtpu:
|
||||
- - addr:
|
||||
- - 127.0.0.7
|
||||
- - ::1
|
||||
+ - addr: 10.11.0.7
|
||||
pdn:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
```
|
||||
##### 4G EPC
|
||||
|
||||
Modify [install/etc/open5gs/mme.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/mme.yaml.in) to set the S1AP IP address, PLMN ID, and TAC.
|
||||
|
||||
```diff
|
||||
$ diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
|
||||
--- mme.yaml 2020-09-05 20:52:28.648235143 -0400
|
||||
+++ mme.yaml.new 2020-09-05 20:56:05.434484208 -0400
|
||||
@@ -204,20 +204,20 @@
|
||||
mme:
|
||||
freeDiameter: /home/acetcom/Documents/git/open5gs/install/etc/freeDiameter/mme.conf
|
||||
s1ap:
|
||||
- addr: 127.0.0.2
|
||||
+ addr: 10.10.0.2
|
||||
gtpc:
|
||||
addr: 127.0.0.2
|
||||
gummei:
|
||||
plmn_id:
|
||||
- mcc: 901
|
||||
- mnc: 70
|
||||
+ mcc: 001
|
||||
+ mnc: 01
|
||||
mme_gid: 2
|
||||
mme_code: 1
|
||||
tai:
|
||||
plmn_id:
|
||||
- mcc: 901
|
||||
- mnc: 70
|
||||
- tac: 1
|
||||
+ mcc: 001
|
||||
+ mnc: 01
|
||||
+ tac: 2
|
||||
security:
|
||||
integrity_order : [ EIA1, EIA2, EIA0 ]
|
||||
ciphering_order : [ EEA0, EEA1, EEA2 ]
|
||||
```
|
||||
|
||||
Modify [install/etc/open5gs/sgwu.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/sgwu.yaml.in) to set the GTP-U IP address.
|
||||
```diff
|
||||
$ diff -u /etc/open5gs/sgwu.yaml.old /etc/open5gs/sgwu.yaml
|
||||
--- sgwu.yaml 2020-09-05 20:50:39.393022566 -0400
|
||||
+++ sgwu.yaml.new 2020-09-05 20:51:06.667838823 -0400
|
||||
@@ -51,7 +51,7 @@
|
||||
#
|
||||
sgwu:
|
||||
gtpu:
|
||||
- addr: 127.0.0.6
|
||||
+ addr: 10.11.0.6
|
||||
pfcp:
|
||||
addr: 127.0.0.6
|
||||
|
||||
```
|
||||
|
||||
After changing conf files, please restart Open5GS daemons.
|
||||
Nightly bulit package are provided by [Osmocom](https://osmocom.org) on [OBS](https://build.opensuse.org/package/show/network:osmocom:nightly/open5gs). On *Ubuntu 20.04* you can install it like this:
|
||||
|
||||
```bash
|
||||
$ sudo systemctl restart open5gs-amfd.service
|
||||
$ sudo systemctl restart open5gs-upfd.service
|
||||
$ sudo systemctl restart open5gs-mmed.service
|
||||
$ sudo systemctl restart open5gs-sgwud.service
|
||||
$ sudo apt update
|
||||
$ sudo apt install wget gnupg
|
||||
$ wget -qO - https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_20.04/Release.key | sudo apt-key add -
|
||||
$ sudo sh -c "echo 'deb http://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_20.04/ ./' > /etc/apt/sources.list.d/open5gs.list"
|
||||
$ sudo apt update
|
||||
$ sudo apt install open5gs
|
||||
```
|
||||
|
||||
### Install WebUI of Open5GS
|
||||
Other distributions can be installed by changing the path.
|
||||
|
||||
```
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_10/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_Testing/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_Unstable/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/Raspbian_10/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_18.04/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_19.04/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_19.10/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_20.04/
|
||||
https://download.opensuse.org/repositories/network:/osmocom:/nightly/xUbuntu_20.10/
|
||||
```
|
||||
|
||||
|
||||
## 3. Install the WebUI of Open5GS
|
||||
---
|
||||
|
||||
[Node.js](https://nodejs.org/) is required to install WebUI of Open5GS
|
||||
The WebUI allows you to interactively edit subscriber data. While it is not essential to use this, it makes things easier when you are just starting out on your Open5GS adventure. (A [command line tool](https://github.com/{{ site.github_username }}/open5gs/blob/master/misc/db/open5gs-dbctl) is available for advanced users).
|
||||
|
||||
|
||||
[Node.js](https://nodejs.org/) is required to install the WebUI of Open5GS
|
||||
|
||||
1. *Debian and Ubuntu* based Linux distributions can install [Node.js](https://nodejs.org/) as follows:
|
||||
|
||||
@@ -223,7 +179,180 @@ You can now install WebUI of Open5GS.
|
||||
$ curl -sL {{ site.url }}{{ site.baseurl }}/assets/webui/install | sudo -E bash -
|
||||
```
|
||||
|
||||
### Register Subscriber Information
|
||||
## 4. Configure Open5GS
|
||||
---
|
||||
|
||||
Okay - you have installed the software, now what to do with it? Well, there are some tweaks you will need to make to the config files, and you will need to enter subscriber data into your HSS/ UDR. You will also need to set some IP Table rules to bridge the PGWU/UPF to the WAN.
|
||||
|
||||
Out of the box, the default configurations see all of the Open5GS components fully configured for use on a single computer. They are set to communicate with each other using the local loopback address space (`127.0.0.X`). The default addresses for each of the bind interfaces for these components and functions are as follows:
|
||||
|
||||
```
|
||||
MongoDB = 127.0.0.1 (subscriber data) - http://localhost:3000
|
||||
|
||||
MME-s1ap = 127.0.0.2 :36412 for S1-MME
|
||||
MME-gtpc = 127.0.0.2 :2123 for S11
|
||||
MME-frDi = 127.0.0.2 :3868 for S6a auth
|
||||
|
||||
SGWC-gtpc = 127.0.0.3 :2123 for S11
|
||||
SGWC-pfcp = 127.0.0.3 :8805 for Sxa
|
||||
|
||||
SMF-gtpc = 127.0.0.4 :2123 for S5/8c, N11
|
||||
SMF-pfcp = 127.0.0.4 :8805 for N4
|
||||
SMF-frDi = 127.0.0.4 :3868 for Gx auth
|
||||
SMF-sbi = 127.0.0.4 :7777 for 5G SBI (N7,N10,N11)
|
||||
|
||||
AMF-ngap = 127.0.0.5 :38412 for N2
|
||||
AMF-sbi = 127.0.0.5 :7777 for 5G SBI (N8,N12,N11)
|
||||
|
||||
SGWU-pfcp = 127.0.0.6 :8805 for Sxa
|
||||
SGWU-gtpu = 127.0.0.6 :2152 for S1-U, S5/8u
|
||||
|
||||
UPF-pfcp = 127.0.0.7 :8805 for N4
|
||||
UPF-gtpu = 127.0.0.7 :2152 for S5/8u, N3
|
||||
|
||||
HSS-frDi = 127.0.0.8 :3868 for S6a auth
|
||||
|
||||
PCRF-frDi = 127.0.0.9 :3868 for Gx auth
|
||||
|
||||
NRF-sbi = 127.0.0.10:7777 for 5G SBI
|
||||
AUSF-sbi = 127.0.0.11:7777 for 5G SBI
|
||||
UDM-sbi = 127.0.0.12:7777 for 5G SBI
|
||||
PCF-sbi = 127.0.0.13:7777 for 5G SBI
|
||||
UDR-sbi = 127.0.0.20:7777 for 5G SBI
|
||||
```
|
||||
|
||||
#### Setup a 4G/ 5G NSA Core
|
||||
|
||||
You will need to modify your 4G MME config to support your PLMN and TAC. The international test PLMN is 001/01, and the international private network PLMN is 999/99. You should stick to using either of these PLMNs unless you have been issued a PLMN by your national regulator. (This PLMN will need to be configured in your eNB).
|
||||
|
||||
If you are aiming to connect an external eNB to your core, you will also need to change the S1AP bind address of the MME **and** the GTP-U bind address of the SGWU. If you are running an eNB stack locally, you will not need to make these changes.
|
||||
|
||||
|
||||
Modify [/etc/open5gs/mme.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/mme.yaml.in) to set the S1AP IP address, PLMN ID, and TAC.
|
||||
|
||||
```diff
|
||||
$ diff -u /etc/open5gs/mme.yaml.old /etc/open5gs/mme.yaml
|
||||
|
||||
mme:
|
||||
freeDiameter: /etc/freeDiameter/mme.conf
|
||||
s1ap:
|
||||
- addr: 127.0.0.2
|
||||
+ addr: 10.10.0.2 # for external eNB - a local address that can be reached by the eNB
|
||||
gtpc:
|
||||
addr: 127.0.0.2
|
||||
gummei:
|
||||
plmn_id:
|
||||
- mcc: 901
|
||||
- mnc: 70
|
||||
+ mcc: 001 # set your PLMN-MCC
|
||||
+ mnc: 01 # set your PLMN-MNC
|
||||
mme_gid: 2
|
||||
mme_code: 1
|
||||
tai:
|
||||
plmn_id:
|
||||
- mcc: 901
|
||||
- mnc: 70
|
||||
- tac: 1
|
||||
+ mcc: 001 # set your PLMN-MCC
|
||||
+ mnc: 01 # set your PLMN-MNC
|
||||
+ tac: 2 # should match the TAC used by your eNB
|
||||
security:
|
||||
|
||||
```
|
||||
|
||||
Modify [/etc/open5gs/sgwu.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/sgwu.yaml.in) to set the GTP-U IP address.
|
||||
```diff
|
||||
$ diff -u /etc/open5gs/sgwu.yaml.old /etc/open5gs/sgwu.yaml
|
||||
|
||||
sgwu:
|
||||
gtpu:
|
||||
- addr: 127.0.0.6
|
||||
+ addr: 10.11.0.6 # for external eNB - a local address that can be reached by the eNB
|
||||
pfcp:
|
||||
addr: 127.0.0.6
|
||||
|
||||
```
|
||||
|
||||
After changing config files, please restart Open5GS daemons.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl restart open5gs-mmed
|
||||
$ sudo systemctl restart open5gs-sgwud
|
||||
```
|
||||
|
||||
#### Setup a 5G Core
|
||||
|
||||
You will need to modify your 5G AMF config to support your PLMN and TAC. The international test PLMN is 001/01, and the international private network PLMN is 999/99. You should stick to using either of these PLMNs unless you have been issued a PLMN by your national regulator. (This PLMN will need to be configured in your gNB).
|
||||
|
||||
If you are aiming to connect an external gNB to your core, you will also need to change the NGAP bind address of the AMF **and** the GTPU bind address of the UPF. If you are running an gNB stack locally, you will not need to make these changes.
|
||||
|
||||
|
||||
Modify [/etc/open5gs/amf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/amf.yaml.in) to set the NGAP IP address, PLMN ID, TAC and NSSAI.
|
||||
|
||||
```diff
|
||||
$ diff -u /etc/open5gs/amf.yaml.old /etc/open5gs/amf.yaml
|
||||
|
||||
amf:
|
||||
sbi:
|
||||
- addr: 127.0.0.5
|
||||
port: 7777
|
||||
ngap:
|
||||
- - addr: 127.0.0.5
|
||||
+ - addr: 10.10.0.5 # for external gNB - a local address that can be reached by the gNB
|
||||
guami:
|
||||
- plmn_id:
|
||||
- mcc: 901
|
||||
- mnc: 70
|
||||
+ mcc: 001 # set your PLMN-MCC
|
||||
+ mnc: 01 # set your PLMN-MNC
|
||||
amf_id:
|
||||
region: 2
|
||||
set: 1
|
||||
tai:
|
||||
- plmn_id:
|
||||
- mcc: 901
|
||||
- mnc: 70
|
||||
- tac: 1
|
||||
+ mcc: 001 # set your PLMN-MCC
|
||||
+ mnc: 01 # set your PLMN-MNC
|
||||
+ tac: 2 # should match the TAC used by your gNB
|
||||
plmn:
|
||||
- plmn_id:
|
||||
- mcc: 901
|
||||
- mnc: 70
|
||||
+ mcc: 001 # set your PLMN-MCC
|
||||
+ mnc: 01 # set your PLMN-MNC
|
||||
s_nssai:
|
||||
- sst: 1
|
||||
security:
|
||||
|
||||
```
|
||||
|
||||
Modify [/etc/open5gs/upf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/master/configs/open5gs/upf.yaml.in) to set the GTP-U address.
|
||||
```diff
|
||||
$ diff -u /etc/open5gs/upf.yaml.old /etc/open5gs/upf.yaml
|
||||
|
||||
upf:
|
||||
pfcp:
|
||||
- addr: 127.0.0.7
|
||||
gtpu:
|
||||
- - addr: 127.0.0.7
|
||||
+ - addr: 10.11.0.7 # for external gNB - a local address that can be reached by the gNB
|
||||
pdn:
|
||||
- addr: 10.45.0.1/16
|
||||
- addr: cafe::1/64
|
||||
|
||||
```
|
||||
|
||||
After changing config files, please restart Open5GS daemons.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl restart open5gs-amfd
|
||||
$ sudo systemctl restart open5gs-upfd
|
||||
```
|
||||
|
||||
|
||||
#### Register Subscriber Information
|
||||
---
|
||||
|
||||
Connect to `http://localhost:3000` and login with **admin** account.
|
||||
@@ -241,15 +370,21 @@ To add subscriber information, you can do WebUI operations in the following orde
|
||||
3. Fill the IMSI, security context(K, OPc, AMF), and APN of the subscriber.
|
||||
4. Click `SAVE` Button
|
||||
|
||||
**Tip:** This addition immediately affects Open5GS without restaring any daemon.
|
||||
Enter the subscriber details of your SIM cards using this tool, to save the subscriber profile in the HSS and UDR MongoDB database backend. If you are using test SIMs, the details are normally printed on the card.
|
||||
|
||||
**Tip:** Subscribers added with this tool immediately register in the Open5GS HSS/ UDR without the need to restart any daemon.
|
||||
{: .notice--info}
|
||||
|
||||
|
||||
### Adding a route for UE to have Internet connectivity {#UEInternet}
|
||||
#### Adding a route for the UE to have WAN connectivity {#UEInternet}
|
||||
---
|
||||
|
||||
If your phone can connect to internet, you must run the following command in Open5GS-PGW installed host.
|
||||
In order to bridge between the PGWU/UPF and WAN (Internet), you must enable IP forwarding and add a NAT rule to your IP Tables.
|
||||
|
||||
**Note:** For the first run, it makes things simpler if you do not have any rules in the IP/NAT tables. If a program such as docker has already set up a rule, you will need to add rules differently.
|
||||
{: .notice--danger}
|
||||
|
||||
You can check your current IP Table rules with the following commands (these tables are empty):
|
||||
```bash
|
||||
### Check IP Tables
|
||||
$ sudo iptables -L
|
||||
@@ -275,7 +410,10 @@ target prot opt source destination
|
||||
|
||||
Chain POSTROUTING (policy ACCEPT)
|
||||
target prot opt source destination
|
||||
```
|
||||
|
||||
To enable forwarding and add the NAT rule, enter
|
||||
```bash
|
||||
### Enable IPv4 Forwarding
|
||||
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
|
||||
|
||||
@@ -283,19 +421,71 @@ $ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
|
||||
$ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
```
|
||||
|
||||
**Note:** For the first time, it is a good condition if you do not have any rules in the IP/NAT tables. If a program such as docker has already set up a rule, you will need to add a rule differently.
|
||||
{: .notice--danger}
|
||||
|
||||
### Turn on your gNB/eNB and Phone
|
||||
## 5. Turn on your eNB/gNB and UE
|
||||
---
|
||||
- Connect your gNB/eNB to the IP of your server via the standard NGAP/S1AP port of SCTP 38412/36412 (for AMF/MME)
|
||||
- You can see actual traffic through wireshark -- [[srsenb.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/srsenb.pcapng).
|
||||
- You can view the log at `/var/log/open5gs/*.log`.
|
||||
|
||||
First, connect your eNB/gNB to the Open5GS core:
|
||||
* Make sure the PLMN and TAC of the eNB/gNB matches the settings in your MME/AMF
|
||||
* Connect your eNB/gNB to the IP of your server via the standard S1AP/NGAP SCTP port 36412/38412 (for MME/AMF)
|
||||
* Your eNB/gNB should report a successful S1/NG connection - congrats, your core is fully working!
|
||||
* You can see actual traffic through wireshark -- [[srsenb.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/srsenb.pcapng).
|
||||
* You can view the log at `/var/log/open5gs/*.log`, eg:
|
||||
```bash
|
||||
### Watch the live MME log
|
||||
tail -f /var/log/open5gs/mme.log
|
||||
```
|
||||
|
||||
Next, try to attach a UE to the basestation:
|
||||
* Insert your SIM card to the UE
|
||||
* Set the UE's APN to match the APN you configured in the Open5GS WebUI
|
||||
* Toggle the UE in and out of flight mode
|
||||
* If it doesn't automatically connect, try manually searching for a network
|
||||
* If the PLMN set on the SIM card does not match the PLMN being used by the radio, you will need to ensure 'data roaming' on the UE is switched on
|
||||
|
||||
## 6. Starting and Stopping Open5GS
|
||||
---
|
||||
|
||||
When you install the software using the package manager, it is setup to run as a systemd service. You can stop and restart the components and network functions as follows:
|
||||
|
||||
```bash
|
||||
$ sudo systemctl stop open5gs-mmed
|
||||
$ sudo systemctl stop open5gs-sgwcd
|
||||
$ sudo systemctl stop open5gs-smfd
|
||||
$ sudo systemctl stop open5gs-amfd
|
||||
$ sudo systemctl stop open5gs-sgwud
|
||||
$ sudo systemctl stop open5gs-upfd
|
||||
$ sudo systemctl stop open5gs-hssd
|
||||
$ sudo systemctl stop open5gs-pcrfd
|
||||
$ sudo systemctl stop open5gs-nrfd
|
||||
$ sudo systemctl stop open5gs-ausfd
|
||||
$ sudo systemctl stop open5gs-udmd
|
||||
$ sudo systemctl stop open5gs-pcfd
|
||||
$ sudo systemctl stop open5gs-udrd
|
||||
$ sudo systemctl stop open5gs-webui
|
||||
```
|
||||
|
||||
```bash
|
||||
$ sudo systemctl restart open5gs-mmed
|
||||
$ sudo systemctl restart open5gs-sgwcd
|
||||
$ sudo systemctl restart open5gs-smfd
|
||||
$ sudo systemctl restart open5gs-amfd
|
||||
$ sudo systemctl restart open5gs-sgwud
|
||||
$ sudo systemctl restart open5gs-upfd
|
||||
$ sudo systemctl restart open5gs-hssd
|
||||
$ sudo systemctl restart open5gs-pcrfd
|
||||
$ sudo systemctl restart open5gs-nrfd
|
||||
$ sudo systemctl restart open5gs-ausfd
|
||||
$ sudo systemctl restart open5gs-udmd
|
||||
$ sudo systemctl restart open5gs-pcfd
|
||||
$ sudo systemctl restart open5gs-udrd
|
||||
$ sudo systemctl restart open5gs-webui
|
||||
```
|
||||
|
||||
|
||||
### Uninstall Open5GS and WebUI
|
||||
## 7. Uninstall Open5GS and WebUI
|
||||
|
||||
How to remove Open5GS package:
|
||||
To remove the Open5GS packages:
|
||||
|
||||
1. On *Ubuntu/Debian*:
|
||||
|
||||
|
||||
@@ -6,10 +6,14 @@ head_inline: "<style> .blue { color: blue; } </style>"
|
||||
This post explains how to compile and install the source code on **Debian/Ubuntu** based Linux Distribution.
|
||||
{: .blue}
|
||||
|
||||
**Note:** Ubuntu 16.04(xenial) and earlier versions, and Debian 9(stretch) and earlier versions are not supported.
|
||||
{: .notice--danger}
|
||||
|
||||
|
||||
### Getting MongoDB
|
||||
---
|
||||
|
||||
Install MongoDB with package manager. It is used as database for the HSS and PCRF.
|
||||
Install MongoDB with package manager. It is used as database for NRF/PCF/UDR and PCRF/HSS.
|
||||
|
||||
```bash
|
||||
$ sudo apt update
|
||||
@@ -40,7 +44,7 @@ $ sudo ip link set ogstun up
|
||||
Install the dependencies for building the source code.
|
||||
|
||||
```bash
|
||||
$ sudo apt install python3-pip python3-setuptools python3-wheel ninja-build build-essential flex bison git libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libidn11-dev libmongoc-dev libbson-dev libyaml-dev libmicrohttpd-dev libcurl4-gnutls-dev meson
|
||||
$ sudo apt install python3-pip python3-setuptools python3-wheel ninja-build build-essential flex bison git libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libidn11-dev libmongoc-dev libbson-dev libyaml-dev libnghttp2-dev libmicrohttpd-dev libcurl4-gnutls-dev libnghttp2-dev meson
|
||||
```
|
||||
|
||||
Git clone.
|
||||
@@ -74,7 +78,7 @@ $ cd build
|
||||
$ meson test -v
|
||||
```
|
||||
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http`. You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http2.data.data || http2.headers`. You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
|
||||
{: .notice--info}
|
||||
|
||||
You need to perform the **installation process**.
|
||||
@@ -205,33 +209,10 @@ If you modify the config files while Open5GS daemons are running, please restart
|
||||
### Running Open5GS
|
||||
---
|
||||
|
||||
Specify the absolute path to the shared library as follows.
|
||||
|
||||
```bash
|
||||
$ echo $(cd $(dirname ./install/lib/x86_64-linux-gnu/) && pwd -P)/$(basename ./install/lib/x86_64-linux-gnu/)
|
||||
/home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu
|
||||
$ export LD_LIBRARY_PATH=/home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu
|
||||
$ ldd ./install/bin/open5gs-amfd
|
||||
...
|
||||
libogsapp.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogsapp.so.1 (0x00007f161ab51000)
|
||||
libogscore.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogscore.so.1 (0x00007f161a922000)
|
||||
libogssctp.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogssctp.so.1 (0x00007f161a71d000)
|
||||
libogss1ap.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogss1ap.so.1 (0x00007f161a519000)
|
||||
...
|
||||
```
|
||||
|
||||
If you want to set the shared library path permanently, you can use ldconfig.
|
||||
```bash
|
||||
$ sudo sh -c "echo /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu > /etc/ld.so.conf.d/open5gs.conf"
|
||||
$ sudo ldconfig
|
||||
```
|
||||
|
||||
Now let's get started.
|
||||
|
||||
```bash
|
||||
$ cd install/bin/
|
||||
$ ./install/bin/open5gs-mmed
|
||||
Open5GS daemon v1.3.0-213-gd190548+
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:53:47.328: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/mme.yaml' (../src/main.c:54)
|
||||
08/21 22:53:47.328: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/mme.log' (../src/main.c:57)
|
||||
@@ -241,7 +222,7 @@ Open5GS daemon v1.3.0-213-gd190548+
|
||||
08/21 22:53:47.366: [mme] INFO: s1ap_server() [127.0.0.2]:36412 (../src/mme/s1ap-sctp.c:57)
|
||||
|
||||
$ ./install/bin/open5gs-sgwcd
|
||||
Open5GS daemon v1.3.0-213-gd190548+
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:54:43.059: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/sgwc.yaml' (../src/main.c:54)
|
||||
08/21 22:54:43.059: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/sgwc.log' (../src/main.c:57)
|
||||
@@ -251,7 +232,7 @@ Open5GS daemon v1.3.0-213-gd190548+
|
||||
08/21 22:54:43.066: [pfcp] INFO: ogs_pfcp_connect() [127.0.0.6]:8805 (../lib/pfcp/path.c:60)
|
||||
|
||||
$ ./install/bin/open5gs-smfd
|
||||
Open5GS daemon v1.3.0-213-gd190548+
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:54:56.000: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/smf.yaml' (../src/main.c:54)
|
||||
08/21 22:54:56.000: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/smf.log' (../src/main.c:57)
|
||||
@@ -264,7 +245,7 @@ Open5GS daemon v1.3.0-213-gd190548+
|
||||
08/21 22:54:56.051: [sbi] INFO: sbi_server() [127.0.0.4]:7777 (../lib/sbi/server.c:298)
|
||||
|
||||
$ ./install/bin/open5gs-amfd
|
||||
Open5GS daemon v1.3.0-213-gd190548+
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:55:14.015: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/amf.yaml' (../src/main.c:54)
|
||||
08/21 22:55:14.015: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/amf.log' (../src/main.c:57)
|
||||
@@ -273,7 +254,7 @@ Open5GS daemon v1.3.0-213-gd190548+
|
||||
08/21 22:55:14.040: [amf] INFO: ngap_server() [127.0.0.5]:38412 (../src/amf/ngap-sctp.c:56)
|
||||
|
||||
$ ./install/bin/open5gs-sgwud
|
||||
Open5GS daemon v1.3.0-213-gd190548+
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:54:10.357: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/sgwu.yaml' (../src/main.c:54)
|
||||
08/21 22:54:10.357: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/sgwu.log' (../src/main.c:57)
|
||||
@@ -282,7 +263,7 @@ Open5GS daemon v1.3.0-213-gd190548+
|
||||
08/21 22:54:10.361: [gtp] INFO: gtp_server() [127.0.0.6]:2152 (../lib/gtp/path.c:32)
|
||||
|
||||
$ ./install/bin/open5gs-upfd
|
||||
Open5GS daemon v1.3.0-213-gd190548+
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:54:21.596: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/upf.yaml' (../src/main.c:54)
|
||||
08/21 22:54:21.596: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/upf.log' (../src/main.c:57)
|
||||
@@ -292,7 +273,7 @@ Open5GS daemon v1.3.0-213-gd190548+
|
||||
08/21 22:54:21.601: [gtp] INFO: gtp_server() [::1]:2152 (../lib/gtp/path.c:32)
|
||||
|
||||
$ ./install/bin/open5gs-hssd
|
||||
Open5GS daemon v1.3.0-213-gd190548+
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:57:17.450: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/hss.yaml' (../src/main.c:54)
|
||||
08/21 22:57:17.450: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/hss.log' (../src/main.c:57)
|
||||
@@ -300,7 +281,7 @@ Open5GS daemon v1.3.0-213-gd190548+
|
||||
08/21 22:57:17.519: [app] INFO: HSS initialize...done (../src/hss/app-init.c:31)
|
||||
|
||||
$ ./install/bin/open5gs-pcrfd
|
||||
Open5GS daemon v1.3.0-213-gd190548+
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:57:45.894: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/pcrf.yaml' (../src/main.c:54)
|
||||
08/21 22:57:45.894: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/pcrf.log' (../src/main.c:57)
|
||||
@@ -308,7 +289,7 @@ Open5GS daemon v1.3.0-213-gd190548+
|
||||
08/21 22:57:45.997: [app] INFO: PCRF initialize...done (../src/pcrf/app-init.c:31)
|
||||
|
||||
$ ./install/bin/open5gs-nrfd
|
||||
Open5GS daemon v1.3.0-213-gd190548+
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:56:35.472: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/nrf.yaml' (../src/main.c:54)
|
||||
08/21 22:56:35.472: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/nrf.log' (../src/main.c:57)
|
||||
@@ -317,7 +298,7 @@ Open5GS daemon v1.3.0-213-gd190548+
|
||||
08/21 22:56:35.473: [sbi] INFO: sbi_server() [::1]:7777 (../lib/sbi/server.c:298
|
||||
|
||||
$ ./install/bin/open5gs-ausfd
|
||||
Open5GS daemon v1.3.0-213-gd190548+
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:55:41.899: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/ausf.yaml' (../src/main.c:54)
|
||||
08/21 22:55:41.899: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/ausf.log' (../src/main.c:57)
|
||||
@@ -325,15 +306,23 @@ Open5GS daemon v1.3.0-213-gd190548+
|
||||
08/21 22:55:41.900: [sbi] INFO: sbi_server() [127.0.0.11]:7777 (../lib/sbi/server.c:298)
|
||||
|
||||
$ ./install/bin/open5gs-udmd
|
||||
Open5GS daemon v1.3.0-213-gd190548+
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:56:02.154: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/udm.yaml' (../src/main.c:54)
|
||||
08/21 22:56:02.154: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/udm.log' (../src/main.c:57)
|
||||
08/21 22:56:02.155: [app] INFO: UDM initialize...done (../src/udm/app.c:31)
|
||||
08/21 22:56:02.155: [sbi] INFO: sbi_server() [127.0.0.12]:7777 (../lib/sbi/server.c:298)
|
||||
|
||||
$ ./install/bin/open5gs-pcfd
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:56:02.154: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/pcf.yaml' (../src/main.c:54)
|
||||
08/21 22:56:02.154: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/pcf.log' (../src/main.c:57)
|
||||
08/21 22:56:02.155: [app] INFO: PCF initialize...done (../src/pcf/app.c:31)
|
||||
08/21 22:56:02.155: [sbi] INFO: sbi_server() [127.0.0.12]:7777 (../lib/sbi/server.c:298)
|
||||
|
||||
$ ./install/bin/open5gs-udrd
|
||||
Open5GS daemon v1.3.0-213-gd190548+
|
||||
Open5GS daemon v2.1.0
|
||||
|
||||
08/21 22:56:15.810: [app] INFO: Configuration: '/home/acetcom/Documents/git/open5gs/install/etc/open5gs/udr.yaml' (../src/main.c:54)
|
||||
08/21 22:56:15.810: [app] INFO: File Logging: '/home/acetcom/Documents/git/open5gs/install/var/log/open5gs/udr.log' (../src/main.c:57)
|
||||
@@ -366,9 +355,9 @@ $ cp open5gs* /usr/bin/
|
||||
|
||||
For convenience, you can execute all NFs at once by using the following command.
|
||||
```bash
|
||||
$ ./build/tests/app/5gc ## 5G Core Only with ./build/config/sample.yaml
|
||||
$ ./build/tests/app/epc -c ./build/config/srslte.yaml ## EPC Only with ./build/config/srslte.yaml
|
||||
$ ./build/tests/app/app ## Both 5G Core and EPC with ./build/config/sample.yaml
|
||||
$ ./build/tests/app/5gc ## 5G Core Only with ./build/configs/sample.yaml
|
||||
$ ./build/tests/app/epc -c ./build/configs/srslte.yaml ## EPC Only with ./build/configs/srslte.yaml
|
||||
$ ./build/tests/app/app ## Both 5G Core and EPC with ./build/configs/sample.yaml
|
||||
```
|
||||
|
||||
### Building the WebUI of Open5GS
|
||||
@@ -395,10 +384,17 @@ The WebUI runs as an [npm](https://www.npmjs.com/) script.
|
||||
$ npm run dev
|
||||
```
|
||||
|
||||
Server listening can be changed by setting the environment variable HOSTNAME or PORT as below.
|
||||
|
||||
```bash
|
||||
$ HOSTNAME=192.168.0.11 npm run dev
|
||||
$ PORT=7777 npm run dev
|
||||
```
|
||||
|
||||
### Register Subscriber Information
|
||||
---
|
||||
|
||||
Connect to `http://localhost:3000` and login with **admin** account.
|
||||
Connect to `http://127.0.0.1:3000` and login with **admin** account.
|
||||
|
||||
> Username : admin
|
||||
> Password : 1423
|
||||
|
||||
@@ -33,7 +33,8 @@ PCRF-frDi = 127.0.0.9 :3868 for Gx auth
|
||||
NRF-sbi = 127.0.0.10:7777 for 5G SBI
|
||||
AUSF-sbi = 127.0.0.11:7777 for 5G SBI
|
||||
UDM-sbi = 127.0.0.12:7777 for 5G SBI
|
||||
UDR-sbi = 127.0.0.13:7777 for 5G SBI
|
||||
PCF-sbi = 127.0.0.12:7777 for 5G SBI
|
||||
UDR-sbi = 127.0.0.20:7777 for 5G SBI
|
||||
```
|
||||
|
||||
_Cloud Userplane Server (to host IMS etc)_
|
||||
|
||||
50
docs/_docs/hardware/01-genodebs.md
Normal file
50
docs/_docs/hardware/01-genodebs.md
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
title: eNodeBs / gNodeBs tested on Open5GS
|
||||
head_inline: "<style> .blue { color: blue; } .bold { font-weight: bold; } </style>"
|
||||
---
|
||||
|
||||
This page lists Radio hardware that has been tested by members of the Open5GS community,
|
||||
|
||||
Listed eNodeBs have at a minimum connected to Open5GS. This does not mean all functionality (dedicated bearers, GBRs, etc) has been tested.
|
||||
|
||||
If you have tested radio hardware from a vendor not listed with Open5GS, please add it to this page [by creating a PR on GitHub.](https://github.com/open5gs/open5gs)
|
||||
|
||||
### Commercial Macro BTS
|
||||
---
|
||||
|
||||
* Huawei BTS 3900 (S/W version V100R011C10SPC230)
|
||||
|
||||
### Small Cells
|
||||
---
|
||||
|
||||
* Baicells Neutrino
|
||||
* Baicells Nova 243
|
||||
* Baicells Nova 246
|
||||
* Baicells Nova 436Q
|
||||
* Baicells Nova 227 (EBS & CBRS)
|
||||
* Baicells Nova 233
|
||||
* Airspan AirSpeed 1030
|
||||
* Airspan AirHarmony 1000
|
||||
* AirHarmony 4000
|
||||
* AirHarmony 4200
|
||||
* AirHarmony 4400
|
||||
* Gemtek WLTGFC-101 (S/W version 2.1.1746.1116)
|
||||
* NOKIA FW2PC BC28 Flexi Zone G2 Outdoor Micro FDD LTE 700 MHz High Power
|
||||
* NOKIA FWH1 B38 Flexi Zone Outdoor Micro TD LTE 2600 MHz
|
||||
|
||||
### OpenRAN Hardware
|
||||
---
|
||||
|
||||
|
||||
### 4G/5G Software Stacks + SDRs
|
||||
---
|
||||
|
||||
* [srsLTE / srsENB](https://github.com/srsLTE/srsLTE) + LimeSDR, USRP, BladeRF x40 (BladeRF Not stable)
|
||||
* [Amarisoft](https://www.amarisoft.com/) + LimeSDR, USRP, Amarisoft PCI Express Card
|
||||
|
||||
### Misc Radio Hardware
|
||||
---
|
||||
* [OsmoBTS](https://osmocom.org/projects/osmobts/wiki) controlled ip.access NanoBTS (Used for CSFB with Osmocom)
|
||||
* [UERANSIM](https://github.com/aligungr/UERANSIM) 5G RAN Simulator
|
||||
* [OpenAirInterface v1.0.3](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/v1.0.3) 4G RAN Simulator
|
||||
|
||||
@@ -6,10 +6,85 @@ head_inline: "<style> .blue { color: blue; } </style>"
|
||||
This guide is based on **CentOS 8** Distribution.
|
||||
{: .blue}
|
||||
|
||||
### Getting MongoDB
|
||||
## Install **CentOS 8** from Vagrant box (optional)
|
||||
---
|
||||
Vagrant provides a simple way to create and deploy Virtual Machines from
|
||||
pre-built images using VirtualBox, libvirt, or VMWare as a hypervisor engine.
|
||||
This allows the user to quickly create a virtual machine without the hassle
|
||||
of installing the operating system by hand.
|
||||
|
||||
### Install Vagrant
|
||||
---
|
||||
|
||||
Create the MongoDB repository file.
|
||||
The instructions to install Vagrant are provided at
|
||||
[vagrantup.com](https://www.vagrantup.com/).
|
||||
|
||||
|
||||
### Create a CentOS 8 Virtual Machine using Vagrant
|
||||
---
|
||||
|
||||
Use the supplied `Vagrantfile` in the `vagrant` directory to create the
|
||||
virtual machine.
|
||||
|
||||
Note that this Vagrantfile is identical to the base CentOS 8 box, with
|
||||
the exception that the amount of virtual memory has been increased to 1GB:
|
||||
|
||||
```bash
|
||||
cd vagrant/centos
|
||||
vagrant up --provider virtualbox
|
||||
```
|
||||
|
||||
### Log into the newly created CentOS VM
|
||||
---
|
||||
|
||||
Use SSH to log into the CentOS 8 VM:
|
||||
|
||||
```bash
|
||||
vagrant ssh
|
||||
```
|
||||
|
||||
Note that the Open5GS source is *not* copied into the VM. The instructions
|
||||
below provide the step by step instructions for setting up Open5GS for
|
||||
either a bare metal or virtual CentOS 8 system.
|
||||
|
||||
The rest of the commands below are performed inside the CentOS VM as the
|
||||
user 'vagrant', or on your bare metal CentOS 8 system as any normal user.
|
||||
|
||||
## Install prerequisite packages to build and run Open5GS
|
||||
---
|
||||
|
||||
### Enable CentOS 8 PowerTools repository
|
||||
---
|
||||
|
||||
```bash
|
||||
$ sudo dnf install 'dnf-command(config-manager)'
|
||||
$ sudo dnf config-manager --set-enabled PowerTools
|
||||
```
|
||||
|
||||
### Enable the Extra Packages for Enterprise Linux
|
||||
---
|
||||
|
||||
Enable the Extra Packages for Enterprise Linux repo by installing the
|
||||
``epel-release`` package:
|
||||
```bash
|
||||
$ sudo dnf install epel-release
|
||||
```
|
||||
|
||||
### Enable [ELRepo](https://elrepo.org)
|
||||
---
|
||||
|
||||
Enable the ELRepo repo (with testing enabled):
|
||||
|
||||
```bash
|
||||
$ sudo dnf install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
|
||||
$ sudo dnf config-manager --set-enabled elrepo-testing
|
||||
```
|
||||
|
||||
### Install MongoDB using the package manager:
|
||||
---
|
||||
|
||||
Create a repository file to install the MongoDB packages:
|
||||
|
||||
```bash
|
||||
$ sudo sh -c 'cat << EOF > /etc/yum.repos.d/mongodb-org-3.4.repo
|
||||
[mongodb-org-3.4]
|
||||
@@ -21,28 +96,128 @@ gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
|
||||
EOF'
|
||||
```
|
||||
|
||||
Install MongoDB with Package Manager.
|
||||
Install MongoDB using the package manager:
|
||||
|
||||
```bash
|
||||
sudo dnf -y install mongodb-org
|
||||
$ sudo dnf -y install mongodb-org
|
||||
```
|
||||
|
||||
Run MongoDB server.
|
||||
### Install the dependencies for building the source code.
|
||||
---
|
||||
Open5GS requires several packages which are not installed by default in
|
||||
a base CentOS 8 installation.
|
||||
|
||||
|
||||
```bash
|
||||
$ mkdir -p ./data/db
|
||||
$ mongod --dbpath ./data/db
|
||||
$ sudo dnf install python3 meson ninja-build gcc flex bison git lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel mongo-c-driver-devel libmicrohttpd-devel libcurl-devel libnghttp2-devel
|
||||
```
|
||||
|
||||
### Setting up TUN device (No persistent after rebooting)
|
||||
### Install the SCTP kernel module in kernel-modules-extra.
|
||||
---
|
||||
|
||||
Create the TUN device. Interface name will be `ogstun`.
|
||||
```bash
|
||||
$ sudo yum -y install iproute
|
||||
$ sudo dnf install kernel-modules-extra
|
||||
```
|
||||
|
||||
### Install iproute IP interface tools.
|
||||
---
|
||||
|
||||
```bash
|
||||
$ sudo dnf install iproute
|
||||
```
|
||||
|
||||
### Update all installed packages to the latest versions.
|
||||
---
|
||||
|
||||
This will update all of the installed packages to the latest versions from
|
||||
all of the repos that we enabled above.
|
||||
|
||||
```bash
|
||||
$ sudo dnf update
|
||||
```
|
||||
|
||||
Note that this may update the kernel version so you may need to reboot
|
||||
after this step to ensure that you are running this new kernel version.
|
||||
This is important when you try to load the SCTP kernel module later.
|
||||
|
||||
```bash
|
||||
[vm] $ sudo reboot
|
||||
[host] $ # ssh back into the VM after it reboots...
|
||||
[host] $ vagrant ssh
|
||||
```
|
||||
|
||||
## Build Open5GS from Source
|
||||
---
|
||||
|
||||
### Git clone the Open5GS source code.
|
||||
---
|
||||
|
||||
Clone a copy of the open5GS source code from github:
|
||||
|
||||
```bash
|
||||
$ cd ~
|
||||
$ git clone https://github.com/{{ site.github_username }}/open5gs
|
||||
```
|
||||
|
||||
### Compile the Open5GS source.
|
||||
---
|
||||
|
||||
Compile the source using `meson`. Note that this sets the installation prefix
|
||||
to `~/open5gs/install`:
|
||||
|
||||
```bash
|
||||
$ cd ~/open5gs
|
||||
$ meson build --prefix=`pwd`/install
|
||||
$ ninja -C build
|
||||
```
|
||||
|
||||
## Run and Test Open5GS
|
||||
---
|
||||
|
||||
### Start MongoDB
|
||||
---
|
||||
|
||||
After installing the MongoDB server, it will be started automatically
|
||||
when the machine is rebooted. You can check the status using `systemctl`:
|
||||
|
||||
```bash
|
||||
$ sudo systemctl status mongod.service
|
||||
● mongod.service - MongoDB Database Server
|
||||
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
|
||||
Active: active (running) since Fri 2020-11-20 09:46:40 UTC; 10h ago
|
||||
Docs: https://docs.mongodb.org/manual
|
||||
Process: 779 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=0/SUCCESS)
|
||||
Process: 775 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS)
|
||||
Process: 770 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS)
|
||||
Process: 732 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS)
|
||||
Main PID: 781 (mongod)
|
||||
Memory: 99.7M
|
||||
CGroup: /system.slice/mongod.service
|
||||
└─781 /usr/bin/mongod -f /etc/mongod.conf
|
||||
```
|
||||
|
||||
If it has not started, then it can be started using `systemctl`:
|
||||
|
||||
```bash
|
||||
$ sudo systemctl enable mongod.service
|
||||
$ sudo systemctl start mongod.service
|
||||
```
|
||||
|
||||
The default database location is `/var/log/mongodb/mongod.log`. This can
|
||||
be adjusted in `/etc/mongod.conf`.
|
||||
|
||||
### Set up a TUN interface
|
||||
---
|
||||
|
||||
Create a TUN/TAP interface. The interface name will be `ogstun`.
|
||||
```bash
|
||||
$ sudo ip tuntap add name ogstun mode tun
|
||||
$ ip link show
|
||||
```
|
||||
|
||||
Then, to support IPv6-enabled UEs, you must configure your TUN device to support IPv6.
|
||||
To support IPv6-enabled UEs, you must configure the `ogstun` interface
|
||||
to support IPv6. This is done by setting the `diable_ipv6` option for
|
||||
`ogstun` to 0 (false):
|
||||
|
||||
```bash
|
||||
$ sysctl -n net.ipv6.conf.ogstun.disable_ipv6
|
||||
@@ -54,10 +229,10 @@ $ sysctl -n net.ipv6.conf.ogstun.disable_ipv6
|
||||
0
|
||||
```
|
||||
|
||||
**Note:** If your TUN device already supports IPv6, you can skip this steps above.
|
||||
{: .notice--warning}
|
||||
**Note:** If your TUN interface already supports IPv6, you can skip this steps above.
|
||||
{: .notice--info}
|
||||
|
||||
You are now ready to set the IP address on TUN device.
|
||||
Set the IP address on the `ogstun` TUN interface.
|
||||
|
||||
```bash
|
||||
$ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
@@ -70,92 +245,102 @@ $ sudo ip link set ogstun up
|
||||
$ ip link show
|
||||
```
|
||||
|
||||
**Tip:** The script provided in [$GIT_REPO/misc/netconf.sh](https://github.com/{{ site.github_username }}/open5gs/blob/master/misc/netconf.sh) makes it easy to configure the TUN device as follows:
|
||||
**Notice:** This configuration is not persistent after rebooting. The
|
||||
script provided in [$GIT_REPO/misc/netconf.sh](https://github.com/{{
|
||||
site.github_username }}/open5gs/blob/master/misc/netconf.sh) makes it easy
|
||||
to configure the TUN device as follows:
|
||||
`$ sudo ./misc/netconf.sh`
|
||||
{: .notice--info}
|
||||
|
||||
### Building Open5GS
|
||||
### Install the SCTP kernel module
|
||||
---
|
||||
Open5GS requires the Linux SCTP kernel module to be loaded in the kernel.
|
||||
In the CentOS 8 Vagrant box SCTP is not loaded into the kernel automatically
|
||||
so must be installed as follows:
|
||||
|
||||
```bash
|
||||
$ sudo modprobe sctp
|
||||
$ # Check that SCTP was loaded successfully:
|
||||
$ sudo dmesg | grep sctp
|
||||
[ 639.971360] sctp: Hash tables configured (bind 256/256)
|
||||
```
|
||||
|
||||
## Testing Open5GS
|
||||
---
|
||||
|
||||
Configure EPEL package.
|
||||
### Run Individual Open5GS tests.
|
||||
----
|
||||
Open5GS test applications are created in the `~/open5gs/build/tests` directory.
|
||||
|
||||
```bash
|
||||
$ sudo dnf install epel-release
|
||||
```
|
||||
$ cd ~/open5gs
|
||||
|
||||
Enable PowerTools.
|
||||
```bash
|
||||
$ sudo dnf install 'dnf-command(config-manager)'
|
||||
$ sudo dnf config-manager --set-enabled PowerTools
|
||||
$ sudo update
|
||||
```
|
||||
|
||||
Configure ELRepo(with testing) package.
|
||||
```bash
|
||||
$ sudo dnf install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
|
||||
$ sudo dnf config-manager --set-enabled elrepo-testing
|
||||
$ sudo dnf update
|
||||
```
|
||||
|
||||
Install the depedencies for building the source code.
|
||||
```bash
|
||||
$ sudo dnf install python3 ninja-build gcc flex bison git lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel mongo-c-driver-devel libmicrohttpd-devel libcurl-devel iproute
|
||||
```
|
||||
|
||||
Install Meson
|
||||
```bash
|
||||
$ sudo dnf install meson
|
||||
```
|
||||
|
||||
Git clone.
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/{{ site.github_username }}/open5gs
|
||||
```
|
||||
|
||||
To compile with meson:
|
||||
|
||||
```bash
|
||||
$ cd open5gs
|
||||
$ meson build --prefix=`pwd`/install
|
||||
$ ninja -C build
|
||||
```
|
||||
|
||||
Check whether the compilation is correct.
|
||||
```bash
|
||||
$ ./build/tests/attach/attach ## EPC Only
|
||||
s1setup-test : SUCCESS
|
||||
guti-test : SUCCESS
|
||||
auth-test : SUCCESS
|
||||
idle-test : SUCCESS
|
||||
emm-status-test : SUCCESS
|
||||
ue-context-test : SUCCESS
|
||||
reset-test : SUCCESS
|
||||
All tests passed.
|
||||
|
||||
$ ./build/tests/registration/registration ## 5G Core Only
|
||||
guti-test : SUCCESS
|
||||
auth-test : SUCCESS
|
||||
idle-test : SUCCESS
|
||||
dereg-test : SUCCESS
|
||||
identity-test : SUCCESS
|
||||
gmm-status-test : SUCCESS
|
||||
ue-context-test : SUCCESS
|
||||
All tests passed.
|
||||
|
||||
```
|
||||
|
||||
Run all test programs as below.
|
||||
### Run all Open5GS tests.
|
||||
----
|
||||
|
||||
Run all Open5GS test programs:
|
||||
```bash
|
||||
$ cd ~/open5gs
|
||||
$ cd build
|
||||
$ meson test -v
|
||||
```
|
||||
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http`. You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
|
||||
**Tip:** You can also check the result of `meson test -v` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http`. You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
|
||||
{: .notice--info}
|
||||
|
||||
You need to perform the **installation process**.
|
||||
|
||||
### Installing Open5GS.
|
||||
----
|
||||
|
||||
Open5GS can be installed using meson as well. This will install the
|
||||
product to `$(HOME)/open5gs/install` if the `prefix` was set as shown above.
|
||||
|
||||
```bash
|
||||
$ cd ~/open5gs
|
||||
$ cd build
|
||||
$ ninja install
|
||||
$ cd ../
|
||||
$ ls install/bin
|
||||
open5gs-amfd open5gs-hssd open5gs-nrfd open5gs-sgwcd open5gs-smfd open5gs-udrd
|
||||
open5gs-ausfd open5gs-mmed open5gs-pcrfd open5gs-sgwud open5gs-udmd open5gs-pcfd
|
||||
open5gs-upfd
|
||||
```
|
||||
|
||||
### Building WebUI of Open5GS
|
||||
## Building WebUI of Open5GS
|
||||
---
|
||||
|
||||
[Node.js](https://nodejs.org/) is required to build WebUI of Open5GS
|
||||
|
||||
Install Node.js:
|
||||
```bash
|
||||
$ curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
|
||||
$ sudo yum -y install nodejs
|
||||
$ sudo dnf install nodejs
|
||||
```
|
||||
|
||||
Install the dependencies to run WebUI
|
||||
|
||||
```bash
|
||||
$ cd ~/open5gs
|
||||
$ cd webui
|
||||
$ npm install
|
||||
```
|
||||
|
||||
@@ -3,9 +3,12 @@ title: Fedora
|
||||
head_inline: "<style> .blue { color: blue; } </style>"
|
||||
---
|
||||
|
||||
This guide is based on **Fedora 31** Distribution.
|
||||
This guide is based on **Fedora 33** Distribution.
|
||||
{: .blue}
|
||||
|
||||
**Note:** Fedora 33 is not working
|
||||
{: .notice--danger}
|
||||
|
||||
### Getting MongoDB
|
||||
---
|
||||
|
||||
@@ -67,7 +70,7 @@ $ ip link show
|
||||
|
||||
Install the depedencies for building the source code.
|
||||
```bash
|
||||
$ sudo dnf install python3 ninja-build gcc flex bison git lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel mongo-c-driver-devel libmicrohttpd-devel libcurl-devel iproute
|
||||
$ sudo dnf install python3 ninja-build gcc flex bison git lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel mongo-c-driver-devel libmicrohttpd-devel libcurl-devel libnghttp2-devel iproute
|
||||
```
|
||||
|
||||
Install Meson
|
||||
@@ -101,7 +104,7 @@ $ cd build
|
||||
$ meson test -v
|
||||
```
|
||||
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http`. You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http2.data.data || http2.headers`. You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
|
||||
{: .notice--info}
|
||||
|
||||
You need to perform the **installation process**.
|
||||
|
||||
@@ -97,7 +97,7 @@ $ cd build
|
||||
$ sudo meson test -v
|
||||
```
|
||||
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http`. You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http2.data.data || http2.headers`. You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
|
||||
{: .notice--info}
|
||||
|
||||
You need to perform the **installation process**.
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Mac OS X
|
||||
head_inline: "<style> .blue { color: blue; } </style>"
|
||||
---
|
||||
|
||||
This guide is based on **macOS Catalina 10.15**.
|
||||
This guide is based on **macOS Big Sur 11.0.1**.
|
||||
{: .blue}
|
||||
|
||||
### Installing Homebrew
|
||||
@@ -72,7 +72,13 @@ $ sudo pfctl -e -f /etc/pf.anchors/org.open5gs
|
||||
|
||||
Install the depedencies for building the source code.
|
||||
```bash
|
||||
$ brew install mongo-c-driver gnutls libgcrypt libidn libyaml libmicrohttpd curl pkg-config
|
||||
$ brew install mongo-c-driver gnutls libgcrypt libidn libyaml libmicrohttpd nghttp2 pkg-config
|
||||
```
|
||||
|
||||
Install Bison and Create soft link.
|
||||
```bash
|
||||
$ brew install bison
|
||||
$ export PATH="/usr/local/opt/bison/bin:$PATH"
|
||||
```
|
||||
|
||||
Install Meson using Homebrew.
|
||||
@@ -114,7 +120,7 @@ $ cd build
|
||||
$ sudo meson test -v
|
||||
```
|
||||
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http`. You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
|
||||
**Tip:** You can also check the result of `ninja -C build test` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || pfcp || diameter || gtp || ngap || http2.data.data || http2.headers`. You can see the virtually created packets. [testattach.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testattach.pcapng)/[testregistration.pcapng]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testregistration.pcapng)
|
||||
{: .notice--info}
|
||||
|
||||
You need to perform the **installation process**.
|
||||
|
||||
@@ -23,10 +23,11 @@ open5gs 27366 0.0 0.0 2890772 14380 ? Ssl 12:13 0:00 /usr/bin/open5g
|
||||
open5gs 27485 0.0 0.0 243816 15064 ? Ssl 12:13 0:00 /usr/bin/open5gs-nrfd -c /etc/open5gs/nrf.yaml
|
||||
open5gs 27543 0.0 0.0 222416 9672 ? Ssl 12:13 0:00 /usr/bin/open5gs-ausfd -c /etc/open5gs/ausf.yaml
|
||||
open5gs 27600 0.0 0.0 222328 9668 ? Ssl 12:13 0:00 /usr/bin/open5gs-udmd -c /etc/open5gs/udm.yaml
|
||||
open5gs 27600 0.0 0.0 222329 9669 ? Ssl 12:13 0:00 /usr/bin/open5gs-pcfd -c /etc/open5gs/pcf.yaml
|
||||
open5gs 27697 0.0 0.0 243976 13716 ? Ssl 12:13 0:00 /usr/bin/open5gs-udrd -c /etc/open5gs/udr.yaml
|
||||
```
|
||||
|
||||
You should see each of the above services, MME, SGW-C, SMF, AMF, SGW-U, UPF, HSS, PCRF, NRF, AUSF, UDM & UDR are all running.
|
||||
You should see each of the above services, MME, SGW-C, SMF, AMF, SGW-U, UPF, HSS, PCRF, NRF, AUSF, UDM, PCF & UDR are all running.
|
||||
|
||||
If your instance doesn't show this make sure you're started each service:
|
||||
```bash
|
||||
@@ -41,6 +42,7 @@ $ systemctl start open5gs-pcrfd.service
|
||||
$ systemctl start open5gs-nrfd.service
|
||||
$ systemctl start open5gs-ausfd.service
|
||||
$ systemctl start open5gs-udmd.service
|
||||
$ systemctl start open5gs-pcfd.service
|
||||
$ systemctl start open5gs-udrd.service
|
||||
```
|
||||
|
||||
|
||||
@@ -3,6 +3,122 @@ title: Now in the Github Issue
|
||||
head_inline: "<style> .blue { color: blue; } </style>"
|
||||
---
|
||||
|
||||
<style>
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
#### Cannot open shared object file when running daemon
|
||||
|
||||
An error occurred when running as follows.
|
||||
|
||||
```
|
||||
$ ./install/bin/open5gs-nrfd
|
||||
./install/bin/open5gs-nrfd: error while loading shared libraries: libogscrypt.so.2: cannot open shared object file: No such file or directory
|
||||
```
|
||||
|
||||
You need to specify the absolute path to the shared library as follows.
|
||||
|
||||
```bash
|
||||
$ echo $(cd $(dirname ./install/lib/x86_64-linux-gnu/) && pwd -P)/$(basename ./install/lib/x86_64-linux-gnu/)
|
||||
/home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu
|
||||
$ export LD_LIBRARY_PATH=/home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu
|
||||
$ ldd ./install/bin/open5gs-amfd
|
||||
...
|
||||
libogsapp.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogsapp.so.1 (0x00007f161ab51000)
|
||||
libogscore.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogscore.so.1 (0x00007f161a922000)
|
||||
libogssctp.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogssctp.so.1 (0x00007f161a71d000)
|
||||
libogss1ap.so.1 => /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu/libogss1ap.so.1 (0x00007f161a519000)
|
||||
...
|
||||
```
|
||||
|
||||
If you want to set the shared library path permanently, you can use ldconfig.
|
||||
```bash
|
||||
$ sudo sh -c "echo /home/acetcom/Documents/git/open5gs/install/lib/x86_64-linux-gnu > /etc/ld.so.conf.d/open5gs.conf"
|
||||
$ sudo ldconfig
|
||||
```
|
||||
|
||||
#### Can I disable specific services if 5G functionally is not needed?
|
||||
|
||||
|
||||
From v2.0.x, SGW was divided into SGW-C and SGW-U, and PGW function was seperated into SMF and UPF.
|
||||
|
||||
In order to use 4G only, you need to run the process below.
|
||||
```bash
|
||||
$ open5gs-mmed
|
||||
$ open5gs-sgwcd
|
||||
$ open5gs-smfd
|
||||
$ open5gs-sgwud
|
||||
$ open5gs-upfd
|
||||
$ open5gs-hssd
|
||||
$ open5gs-pcrfd
|
||||
```
|
||||
|
||||
And the process below is only used in 5G, so there is no need to run it.
|
||||
|
||||
```bash
|
||||
$ open5gs-nrfd
|
||||
$ open5gs-amfd
|
||||
$ open5gs-ausfd
|
||||
$ open5gs-udmd
|
||||
$ open5gs-pcfd
|
||||
$ open5gs-udrd
|
||||
```
|
||||
|
||||
However, among these, SMF and UPF are used by both 4G EPC and 5G Core. And SMF has a protocol stack to interact with 5G NRF. Therefore, if you run SMF without running 5G NRF, the following WARNING occurs in SMF.
|
||||
|
||||
```
|
||||
10/08 14:44:03.045: [sbi] WARNING: [7] Failed to connect to ::1 port 7777: Connection refused (../lib/sbi/client.c:450)
|
||||
10/08 14:44:03.045: [smf] INFO: PFCP associated (../src/smf/pfcp-sm.c:174)
|
||||
10/08 14:44:03.046: [diam] INFO: CONNECTED TO 'pcrf.localdomain' (SCTP,soc#16): (../lib/diameter/common/logger.c:108)
|
||||
10/08 14:44:06.046: [smf] WARNING: [3c85dd06-0996-41eb-a985-476fa905aefc] Retry to registration with NRF (../src/smf/nf-sm.c:161)
|
||||
10/08 14:44:06.047: [sbi] WARNING: [7] Failed to connect to ::1 port 7777: Connection refused (../lib/sbi/client.c:450)
|
||||
```
|
||||
|
||||
To prevent SMF from attempting to access the 5G NRF, you need to modify the SMF configuration file as below.
|
||||
|
||||
```diff
|
||||
$ diff -u ./install/etc/open5gs/smf.yaml.old ./install/etc/open5gs/smf.yaml
|
||||
--- ./install/etc/open5gs/smf.yaml.old 2020-10-08 14:43:20.599734045 -0400
|
||||
+++ ./install/etc/open5gs/smf.yaml 2020-10-08 14:44:21.864952687 -0400
|
||||
@@ -168,9 +168,9 @@
|
||||
# - ::1
|
||||
#
|
||||
smf:
|
||||
- sbi:
|
||||
- - addr: 127.0.0.4
|
||||
- port: 7777
|
||||
+# sbi:
|
||||
+# - addr: 127.0.0.4
|
||||
+# port: 7777
|
||||
gtpc:
|
||||
- addr: 127.0.0.4
|
||||
- addr: ::1
|
||||
@@ -214,12 +214,12 @@
|
||||
# - 127.0.0.10
|
||||
# - fe80::1%lo
|
||||
#
|
||||
-nrf:
|
||||
- sbi:
|
||||
- - addr:
|
||||
- - 127.0.0.10
|
||||
- - ::1
|
||||
- port: 7777
|
||||
+#nrf:
|
||||
+# sbi:
|
||||
+# - addr:
|
||||
+# - 127.0.0.10
|
||||
+# - ::1
|
||||
+# port: 7777
|
||||
|
||||
#
|
||||
# upf:
|
||||
```
|
||||
|
||||
If you set as above and run SMF, you do not need to run NRF. Seven daemons operate in 4G only state.
|
||||
|
||||
#### How to change UE IP Pool
|
||||
|
||||
The Open5GS package contains a systemd-networkd configuration file for `ogstun`. Therefore, you must first modify the configuration file as follows.
|
||||
@@ -67,15 +183,15 @@ $ sudo systemctl restart open5gs-upfd.service
|
||||
|
||||
By default, wireshark cannot decode NAS-5GS message when the security header type is "Integrity protected and ciphered".
|
||||
|
||||
{: height="100%" width="100%"}
|
||||

|
||||
|
||||
You need to turn on "Try to detect and decode 5G-EA0 ciphered messages" in the wireshark perference menu.
|
||||
|
||||
{: height="100%" width="100%"}
|
||||

|
||||
|
||||
Now, you can see the NAS-5GS message in the wireshark.
|
||||
|
||||
{: height="100%" width="100%"}
|
||||

|
||||
|
||||
#### Test failed (e.g. `meson test -v`)
|
||||
|
||||
@@ -146,6 +262,7 @@ $ sudo pkill -9 open5gs-pcrfd
|
||||
$ sudo pkill -9 open5gs-nrfd
|
||||
$ sudo pkill -9 open5gs-ausfd
|
||||
$ sudo pkill -9 open5gs-udmd
|
||||
$ sudo pkill -9 open5gs-pcfd
|
||||
$ sudo pkill -9 open5gs-udrd
|
||||
```
|
||||
|
||||
@@ -352,9 +469,9 @@ $ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
|
||||
$ sudo iptables -t nat -A POSTROUTING -s 10.45.0.0/16 ! -o ogstun -j MASQUERADE
|
||||
```
|
||||
|
||||
#### How to use a different APN for each SMF
|
||||
#### How to use a different DNN/APN for each SMF
|
||||
|
||||
By default, MME selects the SMF as the first SMF node. To use a different APN for each SMF, specify gtpc.apn as the APN name. If the HSS uses WebUI to set the SMF IP for each UE, you can use a specific SMF node for each UE.
|
||||
By default, MME selects the SMF as the first SMF node. To use a different DNN/APN for each SMF, specify gtpc.dnn as the DNN/APN name. If the HSS uses WebUI to set the SMF IP for each UE, you can use a specific SMF node for each UE.
|
||||
|
||||
See the following example.
|
||||
|
||||
@@ -366,40 +483,41 @@ See the following example.
|
||||
# <GTP-C Client>
|
||||
#
|
||||
# o By default, the SMF uses the first SMF node.
|
||||
# - To use a different APN for each SMF, specify gtpc.apn as the APN name.
|
||||
# - To use a different DNN/APN for each SMF, specify gtpc.dnn
|
||||
# as the DNN/APN name.
|
||||
# - If the HSS uses WebUI to set the SMF IP for each UE,
|
||||
# you can use a specific SMF node for each UE.
|
||||
#
|
||||
# o Two SMF are defined. 127.0.0.4:2123 is used.
|
||||
# [fe80::3%@loopback_devname@]:2123 is ignored.
|
||||
# [fe80::3%lo]:2123 is ignored.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.4
|
||||
# - addr: fe80::3%@loopback_devname@
|
||||
# - addr: fe80::3%lo
|
||||
#
|
||||
# o One SMF is defined. if prefer_ipv4 is not true,
|
||||
# [fe80::3%@loopback_devname@] is selected.
|
||||
# [fe80::3%lo] is selected.
|
||||
# gtpc:
|
||||
# - addr:
|
||||
# - 127.0.0.4
|
||||
# - fe80::3%@loopback_devname@
|
||||
# - fe80::3%lo
|
||||
#
|
||||
# o Two SMF are defined with a different APN.
|
||||
# o Two SMF are defined with a different DNN/APN.
|
||||
# - Note that if SMF IP for UE is configured in HSS,
|
||||
# the following configurion for this UE is ignored.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.4
|
||||
# apn: internet
|
||||
# dnn: internet
|
||||
# - addr: 127.0.0.5
|
||||
# apn: volte
|
||||
# dnn: volte
|
||||
#
|
||||
# o If APN is omitted, the default APN uses the first SMF node.
|
||||
# o If DNN/APN is omitted, the default DNN/APN uses the first SMF node.
|
||||
# gtpc:
|
||||
# - addr: 127.0.0.4
|
||||
# - addr: 127.0.0.5
|
||||
# apn: volte
|
||||
# dnn: volte
|
||||
```
|
||||
|
||||
The IP address of the UE can also use a different UE pool depending on the APN.
|
||||
The IP address of the UE can also use a different UE pool depending on the DNN/APN.
|
||||
|
||||
```
|
||||
### For reference, see `smf.yaml`
|
||||
@@ -420,8 +538,8 @@ The IP address of the UE can also use a different UE pool depending on the APN.
|
||||
# - addr: cafe:1::1/64
|
||||
#
|
||||
#
|
||||
# o Specific APN(e.g 'volte') uses 10.46.0.1/16, cafe:2::1/64
|
||||
# All other APNs use 10.45.0.1/16, cafe:1::1/64
|
||||
# o Specific DNN/APN(e.g 'volte') uses 10.46.0.1/16, cafe:2::1/64
|
||||
# All other DNNs/APNs use 10.45.0.1/16, cafe:1::1/64
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add 10.46.0.1/16 dev ogstun
|
||||
# $ sudo ip addr add cafe:1::1/64 dev ogstun
|
||||
@@ -431,9 +549,9 @@ The IP address of the UE can also use a different UE pool depending on the APN.
|
||||
# - addr: 10.45.0.1/16
|
||||
# - addr: cafe:1::1/64
|
||||
# - addr: 10.46.0.1/16
|
||||
# apn: volte
|
||||
# dnn: volte
|
||||
# - addr: cafe:2::1/64
|
||||
# apn: volte
|
||||
# dnn: volte
|
||||
#
|
||||
# o Multiple Devices (default: ogstun)
|
||||
# $ sudo ip addr add 10.45.0.1/16 dev ogstun
|
||||
@@ -446,10 +564,10 @@ The IP address of the UE can also use a different UE pool depending on the APN.
|
||||
# - addr: cafe:1::1/64
|
||||
# dev: ogstun2
|
||||
# - addr: 10.46.0.1/16
|
||||
# apn: volte
|
||||
# dnn: volte
|
||||
# dev: ogstun3
|
||||
# - addr: cafe:2::1/64
|
||||
# apn: volte
|
||||
# dnn: volte
|
||||
# dev: ogstun3
|
||||
#
|
||||
# o Pool Range Sample
|
||||
@@ -612,7 +730,8 @@ Currently, the number of UE is limited to `128*128`.
|
||||
* NRF : 127.0.0.10
|
||||
* AUSF : 127.0.0.11
|
||||
* UDM : 127.0.0.12
|
||||
* UDR : 127.0.0.13
|
||||
* PCF : 127.0.0.13
|
||||
* UDR : 127.0.0.20
|
||||
```
|
||||
|
||||
- AMF_ID, TAC and S_NSSAI
|
||||
|
||||
@@ -13,8 +13,8 @@ Open5GS is a C-language Open Source implementation of 5GC and EPC, i.e. the core
|
||||
- AES, Snow3G, ZUC algorithms for encryption
|
||||
- Support of USIM cards using Milenage
|
||||
- IPv6 support
|
||||
- Multiple PDU session resource(EPC only)
|
||||
- S1/X2 Handover(EPC only)
|
||||
- Multiple PDU session
|
||||
- S1/X2 and Xn Handover
|
||||
- CSFB(Circuit Switched Fall Back) and SMSoS(SMS Over SGs)
|
||||
- VoLTE(Voice over LTE)
|
||||
|
||||
|
||||
@@ -12,8 +12,14 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
|
||||
- Tutorials
|
||||
- [Your First LTE](tutorial/01-your-first-lte)
|
||||
- [EPC Advanced Example with OpenAirInterface UE/RAN](https://github.com/s5uishida/open5gs_epc_oai_sample_config)
|
||||
- [VoLTE Setup with Kamailio IMS and Open5GS](tutorial/02-VoLTE-setup)
|
||||
- [Dockerized VoLTE Setup](tutorial/03-VoLTE-dockerized)
|
||||
- [My first 5G Core : Open5GS and UERANSIM](http://nickvsnetworking.com/my-first-5g-core-open5gs-and-ueransim/)
|
||||
- [5GC Advanced Example with UERANSIM](https://github.com/s5uishida/open5gs_5gc_ueransim_sample_config)
|
||||
- [Sending SMS in Open5GS LTE Networks using the SGs Interface and OsmoMSC](https://nickvsnetworking.com/sending-sms-in-open5gs-lte-networks-using-the-sgs-interface-and-osmomsc-with-smsos/)
|
||||
- [OsmoMSC and Open5GS MME – SGs Interface for CSCF / InterRAT Handover](https://nickvsnetworking.com/osmomsc-and-open5gs-mme-sgs-interface-for-cscf-interran-handover/)
|
||||
- [Static IPs for UEs](http://nickvsnetworking.com/open5gs-epc-static-ip-addresses-for-ues-apns-subscribers/)
|
||||
- [Kubernetes Open5GS Deployment](https://dev.to/infinitydon/virtual-4g-simulation-using-kubernetes-and-gns3-3b7k?fbclid=IwAR1p99h13a-mCfejanbBQe0H0-jp5grXkn5mWf1WrTHf47UtegB2-UHGGZQ)
|
||||
|
||||
- Troubleshooting
|
||||
@@ -24,5 +30,8 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
- [Debian/Ubuntu](platform/01-debian-ubuntu)
|
||||
- [CentOS](platform/02-centos)
|
||||
- [Fedora](platform/03-fedora)
|
||||
- [FreeBSD](platform/04-freebsd)
|
||||
- [MacOSX](platform/05-macosx)
|
||||
|
||||
- Hardware Specific Notes
|
||||
- [Tested e/gNodeBs](hardware/01-genodebs)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "v2.0.17 - 100+ UEs tested"
|
||||
date: 2020-10-08 23:12:00 -0400
|
||||
title: "v2.0.18 - 250+ UEs tested"
|
||||
date: 2020-10-09 07:53:00 -0400
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
@@ -28,5 +28,5 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
- Fix PDN connectivity request in PDN DISCONNECT ESM-state([#486](https://github.com/open5gs/open5gs/issues/486)) -- [yc541](https://github.com/yc541)
|
||||
- Fix SEMANTIC ERROR in PACKET FILTER ([#338](https://github.com/open5gs/open5gs/issues/338)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
|
||||
Download -- [v2.0.17.tar.gz](https://github.com/open5gs/open5gs/archive/v2.0.17.tar.gz)
|
||||
Download -- [v2.0.18.tar.gz](https://github.com/open5gs/open5gs/archive/v2.0.18.tar.gz)
|
||||
{: .notice--info}
|
||||
40
docs/_posts/2020-11-19-release-v2.0.22.md
Normal file
40
docs/_posts/2020-11-19-release-v2.0.22.md
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: "v2.0.22 - Running for 1 Month"
|
||||
date: 2020-11-19 09:35:00 -0500
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
- News
|
||||
- Release
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
---
|
||||
|
||||
#### Enhancement
|
||||
- Add information of the used APN in the SMF log file ([#674](https://github.com/open5gs/open5gs/pull/674)) -- [medeiros405](https://github.com/medeiros405)
|
||||
- Use buffering method when sending packet through stream socket ([6f11a780](https://github.com/open5gs/open5gs/commit/6f11a780792ff0d695d9f735c84e5bff3ee1804b))
|
||||
- Support VoLTE service in IDLE state ([#627](https://github.com/open5gs/open5gs/issues/627)) -- [kuanghanqian](https://github.com/kuanghanqian)
|
||||
- F-TEID Allocation and Release by the UP function ([a470131](https://github.com/open5gs/open5gs/commit/a470131489231bff384d54561f66b937328d2e2d))
|
||||
- Network Restorations from GTP-U Error Indication ([1bed0d5](https://github.com/open5gs/open5gs/commit/1bed0d587275ad105c5fe6f0d9ca4ef1508a74e0))
|
||||
- Work around SCTP_EVENTS broken - copy blindly from Osmocom's libosmo-netif ([f137d194](https://github.com/open5gs/open5gs/commit/f137d1947f0afaaf0a3ec37b35ff1ce99c757ded))
|
||||
|
||||
#### Re-adding features
|
||||
- Support OAI UE/RAN ([#651](https://github.com/open5gs/open5gs/issues/651), [#584](https://github.com/open5gs/open5gs/issues/584)) -- [asoltanian1979](https://github.com/asoltanian1979), [s5uishida](https://github.com/s5uishida)
|
||||
- Provide SGW GTP(S1) address to be advertised inside S1AP messages ([#367](https://github.com/open5gs/open5gs/pull/367)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
|
||||
#### Bug Fixes
|
||||
- Resolves an issues with DL data traffic not working in v2.0.20 and v2.0.21 ([#672](https://github.com/open5gs/open5gs/issues/672)) -- [CarlosYLee](https://github.com/CarlosYLee)
|
||||
- Fix the select/kqueue bug in Win32/MacOSX [23e8e657](https://github.com/open5gs/open5gs/commit/23e8e6577c3bc4f785e797084b66fef707bfa450)
|
||||
- Fix the possible vulnerabilities [830587a2](https://github.com/open5gs/open5gs/commit/830587a250fb22f01327a14812d778d2a51bc5b9)
|
||||
- Fix MME crash if SGs interface is DOWN ([#448](https://github.com/open5gs/open5gs/issues/448), [#628](https://github.com/open5gs/open5gs/issues/628)) -- [nickvsnetworking](https://github.com/nickvsnetworking), [kbarlee](https://github.com/kbarlee)
|
||||
- Add `rpath` to required shared library ([#535](https://github.com/open5gs/open5gs/issues/535), [#595](https://github.com/open5gs/open5gs/issues/595)) -- [kuanghanqian](https://github.com/kuanghanqian), [RafalArciszewski](https://github.com/RafalArciszewski)
|
||||
- Change not to remove UE context when receiving Extended Service Request without MSC/VLC ([#627](https://github.com/open5gs/open5gs/issues/627)) -- [kuanghanqian](https://github.com/kuanghanqian)
|
||||
- Case-insensitive APN/DNN check ([#617](https://github.com/open5gs/open5gs/issues/617)) -- [RafalArciszewski](https://github.com/RafalArciszewski)
|
||||
- Fix the bug for Update-Type in Tracking area update accept ([#568](https://github.com/open5gs/open5gs/issues/568)) -- [cecrevier](https://github.com/cecrevier)
|
||||
- Only Send PDN connectivity reject if APN is mismatch ([#568](https://github.com/open5gs/open5gs/issues/568)) -- [cecrevier](https://github.com/cecrevier)
|
||||
- Fix the bug for S1-reset or eNB restart ([#627](https://github.com/open5gs/open5gs/issues/627)) -- [kuanghanqian](https://github.com/kuanghanqian)
|
||||
- Fix MME crash when VoLTE is enabled ([#619](https://github.com/open5gs/open5gs/issues/619)) -- [kuanghanqian](https://github.com/kuanghanqian)
|
||||
- Fix the DIAMETER_MISSING_AVP on Rx ([#610](https://github.com/open5gs/open5gs/issues/610)) -- [RafalArciszewski](https://github.com/RafalArciszewski)
|
||||
- Make WebUI listen on 0.0.0.0:3000 ([#587](https://github.com/open5gs/open5gs/pull/587)) -- [bjoern-r](https://github.com/bjoern-r)
|
||||
|
||||
Download -- [v2.0.22.tar.gz](https://github.com/open5gs/open5gs/archive/v2.0.22.tar.gz)
|
||||
{: .notice--info}
|
||||
32
docs/_posts/2020-12-11-release-v2.1.0.md
Normal file
32
docs/_posts/2020-12-11-release-v2.1.0.md
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
title: "v2.1.0 - More Feature in 5G Core"
|
||||
date: 2020-12-11 14:20:00 -0500
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
- News
|
||||
- Release
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
---
|
||||
|
||||
#### Add PCF(Policy Control Function)
|
||||
|
||||
#### Use HTTP/2 instead of HTTP/1.1 in 5G Core SBI
|
||||
|
||||
#### PFCP Update
|
||||
- Flow-Description use 'to assigned' in Gx Interface
|
||||
- Support SDF Filter ID
|
||||
- Support F-TEID's Choose
|
||||
- BAR(Buffering) is added in PFCP session
|
||||
- Default Apply Action uses NOCP+BUFF
|
||||
|
||||
#### Enhancement
|
||||
- Add parameter 'use_openair' for legacy UE ([#688](https://github.com/open5gs/open5gs/issues/688)) -- [s5uishida](https://github.com/s5uishida)
|
||||
- Add CentOS vagrant ([#684](https://github.com/open5gs/open5gs/pull/684)) -- [danielgora](https://github.com/danielgora)
|
||||
|
||||
#### Bug Fixes
|
||||
- SCTP workaround for PEER_ADDR_PARAMS ([#707](https://github.com/open5gs/open5gs/issues/707)) -- [infinitydon](https://github.com/infinitydon)
|
||||
- Fix UPF for Landslide ([#685](https://github.com/open5gs/open5gs/issues/685)) -- [valenciakarlos](https://github.com/valenciakarlos)
|
||||
|
||||
Download -- [v2.1.0.tar.gz](https://github.com/open5gs/open5gs/archive/v2.1.0.tar.gz)
|
||||
{: .notice--info}
|
||||
16
docs/_posts/2020-12-16-release-v2.1.1.md
Normal file
16
docs/_posts/2020-12-16-release-v2.1.1.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
title: "v2.1.1 - 4G EPC Hotfix"
|
||||
date: 2020-12-16 11:08:00 -0500
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
- News
|
||||
- Release
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
---
|
||||
|
||||
#### Bug Fixes
|
||||
- Fix the assertion BUG with Unexpected PDN Type ([#721](https://github.com/open5gs/open5gs/issues/721)) -- [cecrevier](https://github.com/cecrevier)
|
||||
|
||||
Download -- [v2.1.1.tar.gz](https://github.com/open5gs/open5gs/archive/v2.1.1.tar.gz)
|
||||
{: .notice--info}
|
||||
35
docs/_posts/2021-01-08-release-v2.1.3.md
Normal file
35
docs/_posts/2021-01-08-release-v2.1.3.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
title: "v2.1.3 - 5GC improvements"
|
||||
date: 2021-01-08 22:50:00 -0500
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
- News
|
||||
- Release
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
||||
---
|
||||
|
||||
#### New features
|
||||
- [5GC] Dedicated QoS flow & Multiple PDU session ([235a041](https://github.com/open5gs/open5gs/commit/235a041b8d7638db931114ace49e4f771508830f), [a96d3ca](https://github.com/open5gs/open5gs/commit/a96d3ca0fa88828f4efb1135ebcb8a88d8bdc66c))
|
||||
- [5GC] Xn Handover ([#726](https://github.com/open5gs/open5gs/pull/726)) -- [lester-001](https://github.com/lester-001)
|
||||
|
||||
#### Test
|
||||
- [5GC] 1024 UEs Registration ([#753](https://github.com/open5gs/open5gs/issues/753)) -- [mmailand](https://github.com/mmailand)
|
||||
|
||||
#### Enhancement
|
||||
- [AMF] Handling UEContextRequest of InitialUEMessage ([7b29cdf](https://github.com/open5gs/open5gs/commit/7b29cdf89871be0a00c0dd907ae5da7bcf88e305))
|
||||
|
||||
#### Bug Fixes
|
||||
- [SBI] Time string conversion error on 32bit machine ([a0ebf20](https://github.com/open5gs/open5gs/commit/e531ccab5a82698dad46d5d9d41a0e0c496b5ed6))
|
||||
- [MME] Add handler for NAS EPS activate_dedicated EPS bearer context reject ([#755](https://github.com/open5gs/open5gs/pull/755)) -- [herlesupreeth](https://github.com/herlesupreeth)
|
||||
- [PFCP] Remvoe repeated QER in handling Create-PDR ([#749](https://github.com/open5gs/open5gs/pull/749)) -- [zhonglin6666](https://github.com/zhonglin6666)
|
||||
- [AMF] Re-add SCTP ppid and stream-no ([#743](https://github.com/open5gs/open5gs/issues/743)) -- [aligungr](https://github.com/aligungr)
|
||||
- [5GC] Fix wrong usage of SBI heartbeat timer ([#741](https://github.com/open5gs/open5gs/issues/741)) -- [fatihozer90](https://github.com/fatihozer90)
|
||||
- [5GC] Fix the problem of receiving large HTTP2 message(Max: 8,192 bytes) ([#738](https://github.com/open5gs/open5gs/issues/738)) -- [fatihozer90](https://github.com/fatihozer90)
|
||||
- [NRF] Support subscrCond ([#730](https://github.com/open5gs/open5gs/issues/730)) -- [fatihozer90](https://github.com/fatihozer90)
|
||||
- [NRF] Many BUG fixes ([#727](https://github.com/open5gs/open5gs/issues/727), [#728](https://github.com/open5gs/open5gs/issues/728), [#729](https://github.com/open5gs/open5gs/issues/729), [#737](https://github.com/open5gs/open5gs/issues/737)) -- [fatihozer90](https://github.com/fatihozer90)
|
||||
- [AMF] AMF sets default DNN if UE does not sent it
|
||||
- [MME] Fix the MME crash ([#708](https://github.com/open5gs/open5gs/issues/708), [#721](https://github.com/open5gs/open5gs/issues/721)) -- [cecrevier](https://github.com/cecrevier)
|
||||
|
||||
Download -- [v2.1.3.tar.gz](https://github.com/open5gs/open5gs/archive/v2.1.3.tar.gz)
|
||||
{: .notice--info}
|
||||
BIN
docs/assets/images/Open5GS_CUPS-01.jpg
Normal file
BIN
docs/assets/images/Open5GS_CUPS-01.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 300 KiB |
1336
docs/assets/images/Open5GS_CUPS-01.pdf
Normal file
1336
docs/assets/images/Open5GS_CUPS-01.pdf
Normal file
File diff suppressed because one or more lines are too long
@@ -75,6 +75,9 @@ void udm_terminate(void);
|
||||
int ausf_initialize(void);
|
||||
void ausf_terminate(void);
|
||||
|
||||
int pcf_initialize(void);
|
||||
void pcf_terminate(void);
|
||||
|
||||
int upf_initialize(void);
|
||||
void upf_terminate(void);
|
||||
|
||||
|
||||
@@ -183,8 +183,8 @@ static void app_context_prepare(void)
|
||||
|
||||
recalculate_pool_size();
|
||||
|
||||
/* 10 second */
|
||||
self.time.nf_instance.heartbeat_interval = 10;
|
||||
/* <Heartbeat Checking Interval>
|
||||
* Heartbeat Interval(e.g: 10 seconds) + No Heartbeat Margin(1 second) */
|
||||
self.time.nf_instance.no_heartbeat_margin = 1;
|
||||
|
||||
/* 3600 seconds = 1 hour */
|
||||
@@ -193,8 +193,15 @@ static void app_context_prepare(void)
|
||||
/* 86400 seconds = 1 day */
|
||||
self.time.subscription.validity_duration = 86400;
|
||||
|
||||
/* Message Wait Duration : 2 seconds */
|
||||
self.time.message.duration = ogs_time_from_sec(2);
|
||||
/*
|
||||
* Message Wait Duration : 10 seconds (Default)
|
||||
*
|
||||
* The paging retry timer is 2 seconds and the retry count is 3.
|
||||
*
|
||||
* It is recomended to set at least 9 seconds to reflect
|
||||
* the paging failure result to GTPv2-C or HTTP2(SBI).
|
||||
*/
|
||||
self.time.message.duration = ogs_time_from_sec(10);
|
||||
|
||||
regenerate_all_timer_duration();
|
||||
}
|
||||
@@ -296,6 +303,9 @@ int ogs_app_context_parse_config(void)
|
||||
} else if (!strcmp(parameter_key, "no_udm")) {
|
||||
self.parameter.no_udm =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else if (!strcmp(parameter_key, "no_pcf")) {
|
||||
self.parameter.no_pcf =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else if (!strcmp(parameter_key, "no_udr")) {
|
||||
self.parameter.no_udr =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
@@ -314,6 +324,9 @@ int ogs_app_context_parse_config(void)
|
||||
} else if (!strcmp(parameter_key, "no_slaac")) {
|
||||
self.parameter.no_slaac =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else if (!strcmp(parameter_key, "use_openair")) {
|
||||
self.parameter.use_openair =
|
||||
ogs_yaml_iter_bool(¶meter_iter);
|
||||
} else
|
||||
ogs_warn("unknown key `%s`", parameter_key);
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct ogs_app_context_s {
|
||||
const char *version;
|
||||
|
||||
const char *file;
|
||||
void *document;
|
||||
|
||||
@@ -60,6 +62,7 @@ typedef struct ogs_app_context_s {
|
||||
int no_upf;
|
||||
int no_ausf;
|
||||
int no_udm;
|
||||
int no_pcf;
|
||||
int no_udr;
|
||||
int no_nrf;
|
||||
|
||||
@@ -69,6 +72,8 @@ typedef struct ogs_app_context_s {
|
||||
int prefer_ipv4;
|
||||
int multicast;
|
||||
int no_slaac;
|
||||
|
||||
int use_openair;
|
||||
} parameter;
|
||||
|
||||
ogs_sockopt_t sockopt;
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
|
||||
int __ogs_app_domain;
|
||||
|
||||
int ogs_app_initialize(const char *default_config, const char *const argv[])
|
||||
int ogs_app_initialize(
|
||||
const char *version, const char *default_config,
|
||||
const char *const argv[])
|
||||
{
|
||||
int rv, opt;
|
||||
ogs_getopt_t options;
|
||||
@@ -39,6 +41,7 @@ int ogs_app_initialize(const char *default_config, const char *const argv[])
|
||||
ogs_app_setup_log();
|
||||
|
||||
ogs_app_context_init();
|
||||
ogs_app()->version = version;
|
||||
|
||||
/**************************************************************************
|
||||
* Stage 1 : Command Line Options
|
||||
@@ -117,7 +120,27 @@ int ogs_app_initialize(const char *default_config, const char *const argv[])
|
||||
ogs_app()->db_uri = ogs_env_get("DB_URI");
|
||||
|
||||
/**************************************************************************
|
||||
* Stage 6 : Queue, Timer and Poll
|
||||
* Stage 6 : Print Banner
|
||||
*/
|
||||
if (ogs_app()->version) {
|
||||
ogs_log_print(OGS_LOG_INFO,
|
||||
"Open5GS daemon %s\n\n", ogs_app()->version);
|
||||
|
||||
ogs_info("Configuration: '%s'", ogs_app()->file);
|
||||
|
||||
if (ogs_app()->logger.file) {
|
||||
ogs_info("File Logging: '%s'", ogs_app()->logger.file);
|
||||
|
||||
if (ogs_app()->logger.level)
|
||||
ogs_info("LOG-LEVEL: '%s'", ogs_app()->logger.level);
|
||||
|
||||
if (ogs_app()->logger.domain)
|
||||
ogs_info("LOG-DOMAIN: '%s'", ogs_app()->logger.domain);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Stage 7 : Queue, Timer and Poll
|
||||
*/
|
||||
ogs_app()->queue = ogs_queue_create(ogs_app()->pool.event);
|
||||
ogs_assert(ogs_app()->queue);
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
int ogs_app_initialize(const char *default_config, const char *const argv[]);
|
||||
int ogs_app_initialize(
|
||||
const char *version, const char *default_config,
|
||||
const char *const argv[]);
|
||||
void ogs_app_terminate(void);
|
||||
|
||||
int ogs_app_config_read(void);
|
||||
|
||||
@@ -138,7 +138,7 @@ typedef asn_type_selector_result_t(asn_type_selector_f)(
|
||||
const void *parent_structure_ptr);
|
||||
|
||||
/*
|
||||
* Generalized functions for dealing with the speciic type.
|
||||
* Generalized functions for dealing with the specific type.
|
||||
* May be directly invoked by applications.
|
||||
*/
|
||||
typedef struct asn_TYPE_operation_s {
|
||||
|
||||
@@ -41,7 +41,7 @@ ogs_pkbuf_t *ogs_asn_encode(const asn_TYPE_descriptor_t *td, void *sptr)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ogs_pkbuf_trim(pkbuf, (enc_ret.encoded >> 3));
|
||||
ogs_pkbuf_trim(pkbuf, ((enc_ret.encoded + 7) >> 3));
|
||||
|
||||
return pkbuf;
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ char *ogs_s_nssai_sd_to_string(ogs_uint24_t sd)
|
||||
if (sd.v == OGS_S_NSSAI_NO_SD_VALUE)
|
||||
return NULL;
|
||||
|
||||
return ogs_uint24_to_string(sd);
|
||||
return ogs_uint24_to_0string(sd);
|
||||
}
|
||||
|
||||
ogs_uint24_t ogs_s_nssai_sd_from_string(const char *hex)
|
||||
@@ -472,3 +472,13 @@ char *ogs_ipv6_to_string(uint8_t *addr6)
|
||||
|
||||
return (char *)OGS_INET6_NTOP(addr6, buf);
|
||||
}
|
||||
|
||||
void ogs_session_data_free(ogs_session_data_t *session_data)
|
||||
{
|
||||
int i;
|
||||
|
||||
ogs_assert(session_data);
|
||||
|
||||
for (i = 0; i < session_data->num_of_pcc_rule; i++)
|
||||
OGS_PCC_RULE_FREE(&session_data->pcc_rule[i]);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,8 @@ extern "C" {
|
||||
|
||||
#define OGS_MAX_NUM_OF_CELL_ID 16
|
||||
#define OGS_MAX_NUM_OF_ENB_ID 16
|
||||
#define OGS_MAX_NUM_OF_APN 16
|
||||
#define OGS_MAX_NUM_OF_DNN 16
|
||||
#define OGS_MAX_NUM_OF_APN OGS_MAX_NUM_OF_DNN
|
||||
#define OGS_MAX_NUM_OF_HOSTNAME 16
|
||||
#define OGS_MAX_DNN_LEN 100
|
||||
#define OGS_MAX_APN_LEN OGS_MAX_DNN_LEN
|
||||
@@ -227,6 +228,12 @@ ED2(uint8_t spare:5;,
|
||||
#define OGS_PFCP_PDN_TYPE_IPV6 OGS_PDU_SESSION_TYPE_IPV6
|
||||
#define OGS_PFCP_PDN_TYPE_IPV4V6 OGS_PDU_SESSION_TYPE_IPV4V6
|
||||
#define OGS_PFCP_PDN_TYPE_NONIP OGS_PDU_SESSION_TYPE_NONIP
|
||||
|
||||
#define OGS_GTP_PDN_TYPE_IS_VALID(x) \
|
||||
((x) == OGS_GTP_PDN_TYPE_IPV4 || \
|
||||
(x) == OGS_GTP_PDN_TYPE_IPV6 || \
|
||||
(x) == OGS_GTP_PDN_TYPE_IPV4V6) \
|
||||
|
||||
uint8_t pdn_type:3;)
|
||||
union {
|
||||
/* GTP_PDN_TYPE_IPV4 */
|
||||
@@ -323,8 +330,8 @@ typedef struct ogs_pcc_rule_s {
|
||||
#define OGS_PCC_RULE_TYPE_REMOVE 2
|
||||
uint8_t type;
|
||||
|
||||
#define OGS_MAX_PCC_RULE_NAME_LEN 256
|
||||
char *name;
|
||||
char *id; /* 5GC */
|
||||
char *name; /* EPC */
|
||||
|
||||
/* Num of Flow per PCC Rule */
|
||||
#define OGS_MAX_NUM_OF_FLOW 8
|
||||
@@ -352,8 +359,11 @@ typedef struct ogs_pcc_rule_s {
|
||||
if ((__sRC)->name) { \
|
||||
(__dST)->name = ogs_strdup((__sRC)->name); \
|
||||
ogs_assert((__dST)->name); \
|
||||
} else \
|
||||
ogs_assert_if_reached(); \
|
||||
} \
|
||||
if ((__sRC)->id) { \
|
||||
(__dST)->id = ogs_strdup((__sRC)->id); \
|
||||
ogs_assert((__dST)->id); \
|
||||
} \
|
||||
for (__iNDEX = 0; __iNDEX < (__sRC)->num_of_flow; __iNDEX++) { \
|
||||
(__dST)->flow[__iNDEX].direction = (__sRC)->flow[__iNDEX].direction; \
|
||||
(__dST)->flow[__iNDEX].description = \
|
||||
@@ -370,6 +380,8 @@ typedef struct ogs_pcc_rule_s {
|
||||
do { \
|
||||
int __pCCrULE_iNDEX; \
|
||||
ogs_assert((__pCCrULE)); \
|
||||
if ((__pCCrULE)->id) \
|
||||
ogs_free((__pCCrULE)->id); \
|
||||
if ((__pCCrULE)->name) \
|
||||
ogs_free((__pCCrULE)->name); \
|
||||
for (__pCCrULE_iNDEX = 0; \
|
||||
@@ -500,6 +512,15 @@ typedef struct ogs_subscription_data_s {
|
||||
} msisdn[OGS_MAX_NUM_OF_MSISDN];
|
||||
} ogs_subscription_data_t;
|
||||
|
||||
typedef struct ogs_session_data_s {
|
||||
ogs_pdn_t pdn;
|
||||
#define OGS_MAX_NUM_OF_PCC_RULE 8 /* Num of PCC Rule */
|
||||
ogs_pcc_rule_t pcc_rule[OGS_MAX_NUM_OF_PCC_RULE];
|
||||
int num_of_pcc_rule;
|
||||
} ogs_session_data_t;
|
||||
|
||||
void ogs_session_data_free(ogs_session_data_t *session_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#include "ogs-core.h"
|
||||
|
||||
void *ogs_ascii_to_hex(char *in, int in_len, void *out, int out_len)
|
||||
@@ -156,64 +160,73 @@ char ogs_from_hex(char ch)
|
||||
return isdigit(ch) ? ch - '0' : tolower(ch) - 'a' + 10;
|
||||
}
|
||||
|
||||
char *ogs_uint24_to_string(ogs_uint24_t x)
|
||||
char *ogs_uint24_to_0string(ogs_uint24_t x)
|
||||
{
|
||||
return ogs_msprintf("%06x", x.v);
|
||||
}
|
||||
|
||||
char *ogs_uint28_to_string(uint32_t x)
|
||||
char *ogs_uint28_to_0string(uint32_t x)
|
||||
{
|
||||
return ogs_msprintf("%07x", x);
|
||||
}
|
||||
|
||||
char *ogs_uint32_to_string(uint32_t x)
|
||||
char *ogs_uint32_to_0string(uint32_t x)
|
||||
{
|
||||
return ogs_msprintf("%08x", x);
|
||||
}
|
||||
|
||||
char *ogs_uint36_to_string(uint64_t x)
|
||||
char *ogs_uint36_to_0string(uint64_t x)
|
||||
{
|
||||
return ogs_msprintf("%09llx", (long long)x);
|
||||
}
|
||||
|
||||
char *ogs_uint64_to_0string(uint64_t x)
|
||||
{
|
||||
return ogs_msprintf("%016llx", (long long)x);
|
||||
}
|
||||
|
||||
char *ogs_uint64_to_string(uint64_t x)
|
||||
{
|
||||
char *str, *p;
|
||||
|
||||
str = ogs_uint64_to_0string(x);
|
||||
ogs_assert(str);
|
||||
|
||||
p = ogs_left_trimcharacter(str, '0');
|
||||
ogs_assert(p);
|
||||
|
||||
ogs_free(str);
|
||||
return ogs_strdup(p);
|
||||
}
|
||||
|
||||
ogs_uint24_t ogs_uint24_from_string(char *str)
|
||||
{
|
||||
ogs_uint24_t x;
|
||||
|
||||
ogs_assert(str);
|
||||
ogs_ascii_to_hex(str, strlen(str), &x, 3);
|
||||
return ogs_be24toh(x);
|
||||
|
||||
x.v = ogs_uint64_from_string(str);
|
||||
return x;
|
||||
}
|
||||
|
||||
uint32_t ogs_uint28_from_string(char *str)
|
||||
{
|
||||
uint32_t x;
|
||||
|
||||
ogs_assert(str);
|
||||
|
||||
x = 0;
|
||||
ogs_ascii_to_hex(str, strlen(str), &x, 4);
|
||||
|
||||
return be32toh(x) >> 4;
|
||||
}
|
||||
|
||||
uint32_t ogs_uint32_from_string(char *str)
|
||||
{
|
||||
uint32_t x;
|
||||
|
||||
ogs_assert(str);
|
||||
ogs_ascii_to_hex(str, strlen(str), &x, 4);
|
||||
return be32toh(x);
|
||||
}
|
||||
|
||||
uint64_t ogs_uint36_from_string(char *str)
|
||||
uint64_t ogs_uint64_from_string(char *str)
|
||||
{
|
||||
uint64_t x;
|
||||
|
||||
ogs_assert(str);
|
||||
|
||||
x = 0;
|
||||
ogs_ascii_to_hex(str, strlen(str), &x, 5);
|
||||
if (strlen(str) == 0)
|
||||
return 0;
|
||||
|
||||
return be64toh(x) >> 28;
|
||||
errno = 0;
|
||||
x = strtoll(str, NULL, 16);
|
||||
|
||||
if ((errno == ERANGE && (x == LONG_MAX || x == LONG_MIN)) ||
|
||||
(errno != 0 && x == 0)) {
|
||||
ogs_log_message(OGS_LOG_FATAL, ogs_errno, "strtoll()) failed [%lld]",
|
||||
(long long)x);
|
||||
ogs_assert_if_reached();
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
@@ -39,15 +39,15 @@ void *ogs_buffer_to_bcd(uint8_t *in, int in_len, void *out);
|
||||
|
||||
char ogs_from_hex(char ch);
|
||||
|
||||
char *ogs_uint24_to_string(ogs_uint24_t x);
|
||||
char *ogs_uint28_to_string(uint32_t x);
|
||||
char *ogs_uint32_to_string(uint32_t x);
|
||||
char *ogs_uint36_to_string(uint64_t x);
|
||||
char *ogs_uint24_to_0string(ogs_uint24_t x);
|
||||
char *ogs_uint28_to_0string(uint32_t x);
|
||||
char *ogs_uint32_to_0string(uint32_t x);
|
||||
char *ogs_uint36_to_0string(uint64_t x);
|
||||
char *ogs_uint64_to_0string(uint64_t x);
|
||||
char *ogs_uint64_to_string(uint64_t x);
|
||||
|
||||
ogs_uint24_t ogs_uint24_from_string(char *str);
|
||||
uint32_t ogs_uint28_from_string(char *str);
|
||||
uint32_t ogs_uint32_from_string(char *str);
|
||||
uint64_t ogs_uint36_from_string(char *str);
|
||||
uint64_t ogs_uint64_from_string(char *str);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ typedef DWORD ogs_err_t;
|
||||
#define OGS_EACCES ERROR_ACCESS_DENIED
|
||||
#define OGS_EEXIST ERROR_ALREADY_EXISTS
|
||||
#define OGS_EEXIST_FILE ERROR_FILE_EXISTS
|
||||
#define OGS_ECONNRESET WSAECONNRESET
|
||||
#define OGS_ETIMEDOUT WSAETIMEDOUT
|
||||
#define OGS_ECONNREFUSED WSAECONNREFUSED
|
||||
#define OGS_EBADF WSAEBADF
|
||||
@@ -54,6 +55,7 @@ typedef int ogs_err_t;
|
||||
#define OGS_EACCES EACCES
|
||||
#define OGS_EEXIST EEXIST
|
||||
#define OGS_EEXIST_FILE EEXIST
|
||||
#define OGS_ECONNRESET ECONNRESET
|
||||
#define OGS_ETIMEDOUT ETIMEDOUT
|
||||
#define OGS_ECONNREFUSED ECONNREFUSED
|
||||
#define OGS_EBADF EBADF
|
||||
|
||||
@@ -1,20 +1,33 @@
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
* The code is stolen from optparse
|
||||
* https://github.com/skeeto/optparse
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This is free and unencumbered software released into the public domain.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
* distribute this software, either in source code form or as a compiled
|
||||
* binary, for any purpose, commercial or non-commercial, and by any
|
||||
* means.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* In jurisdictions that recognize copyright laws, the author or authors
|
||||
* of this software dedicate any and all copyright interest in the
|
||||
* software to the public domain. We make this dedication for the benefit
|
||||
* of the public at large and to the detriment of our heirs and
|
||||
* successors. We intend this dedication to be an overt act of
|
||||
* relinquishment in perpetuity of all present and future rights to this
|
||||
* software under copyright law.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* For more information, please refer to <http://unlicense.org/>
|
||||
*/
|
||||
|
||||
#include "ogs-getopt.h"
|
||||
|
||||
@@ -1,20 +1,33 @@
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
* The code is stolen from optparse
|
||||
* https://github.com/skeeto/optparse
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This is free and unencumbered software released into the public domain.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
* distribute this software, either in source code form or as a compiled
|
||||
* binary, for any purpose, commercial or non-commercial, and by any
|
||||
* means.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* In jurisdictions that recognize copyright laws, the author or authors
|
||||
* of this software dedicate any and all copyright interest in the
|
||||
* software to the public domain. We make this dedication for the benefit
|
||||
* of the public at large and to the detriment of our heirs and
|
||||
* successors. We intend this dedication to be an overt act of
|
||||
* relinquishment in perpetuity of all present and future rights to this
|
||||
* software under copyright law.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* For more information, please refer to <http://unlicense.org/>
|
||||
*/
|
||||
|
||||
#if !defined(OGS_CORE_INSIDE) && !defined(OGS_CORE_COMPILATION)
|
||||
@@ -24,11 +37,6 @@
|
||||
#ifndef OGS_GETOPT_H
|
||||
#define OGS_GETOPT_H
|
||||
|
||||
/*
|
||||
* The following code is stolen from optparse
|
||||
* https://github.com/skeeto/optparse
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "ogs-core.h"
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(OGS_CORE_INSIDE) && !defined(OGS_CORE_COMPILATION)
|
||||
|
||||
@@ -137,6 +137,7 @@ static int kqueue_add(ogs_poll_t *poll)
|
||||
return kqueue_set(poll, filter, EV_ADD|EV_ENABLE);
|
||||
}
|
||||
|
||||
#if 0 /* ogs_pollset_remove() is not working, SHOULD remove the below code */
|
||||
static int kqueue_remove(ogs_poll_t *poll)
|
||||
{
|
||||
ogs_pollset_t *pollset = NULL;
|
||||
@@ -165,6 +166,22 @@ static int kqueue_remove(ogs_poll_t *poll)
|
||||
|
||||
return OGS_OK;
|
||||
}
|
||||
#else /* New approach : ogs_pollset_remove() is properly working. */
|
||||
|
||||
static int kqueue_remove(ogs_poll_t *poll)
|
||||
{
|
||||
int filter = 0;
|
||||
|
||||
if (poll->when & OGS_POLLIN) {
|
||||
filter = EVFILT_READ;
|
||||
}
|
||||
if (poll->when & OGS_POLLOUT) {
|
||||
filter = EVFILT_WRITE;
|
||||
}
|
||||
|
||||
return kqueue_set(poll, filter, EV_DELETE);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int kqueue_process(ogs_pollset_t *pollset, ogs_time_t timeout)
|
||||
{
|
||||
@@ -187,6 +204,9 @@ static int kqueue_process(ogs_pollset_t *pollset, ogs_time_t timeout)
|
||||
n = kevent(context->kqueue,
|
||||
context->change_list, context->nchanges,
|
||||
context->event_list, context->nevents, tp);
|
||||
|
||||
context->nchanges = 0;
|
||||
|
||||
if (n < 0) {
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, "kqueue failed");
|
||||
return OGS_ERROR;
|
||||
@@ -199,7 +219,70 @@ static int kqueue_process(ogs_pollset_t *pollset, ogs_time_t timeout)
|
||||
short when = 0;
|
||||
|
||||
if (context->event_list[i].flags & EV_ERROR) {
|
||||
ogs_warn("kevent() error = 0x%x", context->event_list[i].flags);
|
||||
switch (context->event_list[i].data) {
|
||||
|
||||
/* Can occur on delete if we are not currently
|
||||
* watching any events on this fd. That can
|
||||
* happen when the fd was closed and another
|
||||
* file was opened with that fd. */
|
||||
case ENOENT:
|
||||
/* Can occur for reasons not fully understood
|
||||
* on FreeBSD. */
|
||||
case EINVAL:
|
||||
continue;
|
||||
#if defined(__FreeBSD__)
|
||||
/*
|
||||
* This currently occurs if an FD is closed
|
||||
* before the EV_DELETE makes it out via kevent().
|
||||
* The FreeBSD capabilities code sees the blank
|
||||
* capability set and rejects the request to
|
||||
* modify an event.
|
||||
*
|
||||
* To be strictly correct - when an FD is closed,
|
||||
* all the registered events are also removed.
|
||||
* Queuing EV_DELETE to a closed FD is wrong.
|
||||
* The event(s) should just be deleted from
|
||||
* the pending changelist.
|
||||
*/
|
||||
case ENOTCAPABLE:
|
||||
continue;
|
||||
#endif
|
||||
|
||||
/* Can occur on a delete if the fd is closed. */
|
||||
case EBADF:
|
||||
/* XXXX On NetBSD, we can also get EBADF if we
|
||||
* try to add the write side of a pipe, but
|
||||
* the read side has already been closed.
|
||||
* Other BSDs call this situation 'EPIPE'. It
|
||||
* would be good if we had a way to report
|
||||
* this situation. */
|
||||
continue;
|
||||
/* These two can occur on an add if the fd was one side
|
||||
* of a pipe, and the other side was closed. */
|
||||
case EPERM:
|
||||
case EPIPE:
|
||||
/* Report read events, if we're listening for
|
||||
* them, so that the user can learn about any
|
||||
* add errors. (If the operation was a
|
||||
* delete, then udata should be cleared.) */
|
||||
if (context->event_list[i].udata) {
|
||||
/* The operation was an add:
|
||||
* report the error as a read. */
|
||||
when |= OGS_POLLIN;
|
||||
break;
|
||||
} else {
|
||||
/* The operation was a del:
|
||||
* report nothing. */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Other errors shouldn't occur. */
|
||||
default:
|
||||
ogs_error("kevent() error : flags = 0x%x, errno = %d",
|
||||
context->event_list[i].flags,
|
||||
(int)context->event_list[i].data);
|
||||
return OGS_ERROR;
|
||||
}
|
||||
} else if (context->event_list[i].filter == EVFILT_READ) {
|
||||
when |= OGS_POLLIN;
|
||||
} else if (context->event_list[i].filter == EVFILT_WRITE) {
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "ogs-core.h"
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(OGS_CORE_INSIDE) && !defined(OGS_CORE_COMPILATION)
|
||||
|
||||
@@ -92,9 +92,9 @@ void ogs_pkbuf_default_init(ogs_pkbuf_config_t *config)
|
||||
ogs_assert(config);
|
||||
memset(config, 0, sizeof *config);
|
||||
|
||||
config->cluster_128_pool = 32768;
|
||||
config->cluster_256_pool = 4096;
|
||||
config->cluster_512_pool = 2048;
|
||||
config->cluster_128_pool = 65536;
|
||||
config->cluster_256_pool = 8192;
|
||||
config->cluster_512_pool = 4096;
|
||||
config->cluster_1024_pool = 1024;
|
||||
config->cluster_2048_pool = 512;
|
||||
config->cluster_8192_pool = 128;
|
||||
@@ -339,13 +339,16 @@ static void cluster_free(ogs_pkbuf_pool_t *pool, ogs_cluster_t *cluster)
|
||||
ogs_pool_free(&pool->cluster_512, (ogs_cluster_512_t*)cluster->buffer);
|
||||
break;
|
||||
case OGS_CLUSTER_1024_SIZE:
|
||||
ogs_pool_free(&pool->cluster_1024, (ogs_cluster_1024_t*)cluster->buffer);
|
||||
ogs_pool_free(
|
||||
&pool->cluster_1024, (ogs_cluster_1024_t*)cluster->buffer);
|
||||
break;
|
||||
case OGS_CLUSTER_2048_SIZE:
|
||||
ogs_pool_free(&pool->cluster_2048, (ogs_cluster_2048_t*)cluster->buffer);
|
||||
ogs_pool_free(
|
||||
&pool->cluster_2048, (ogs_cluster_2048_t*)cluster->buffer);
|
||||
break;
|
||||
case OGS_CLUSTER_8192_SIZE:
|
||||
ogs_pool_free(&pool->cluster_8192, (ogs_cluster_8192_t*)cluster->buffer);
|
||||
ogs_pool_free(
|
||||
&pool->cluster_8192, (ogs_cluster_8192_t*)cluster->buffer);
|
||||
break;
|
||||
case OGS_CLUSTER_BIG_SIZE:
|
||||
ogs_pool_free(&pool->cluster_big, (ogs_cluster_big_t*)cluster->buffer);
|
||||
@@ -356,4 +359,3 @@ static void cluster_free(ogs_pkbuf_pool_t *pool, ogs_cluster_t *cluster)
|
||||
|
||||
ogs_pool_free(&pool->cluster, cluster);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,11 @@ typedef struct ogs_cluster_s {
|
||||
|
||||
typedef struct ogs_pkbuf_pool_s ogs_pkbuf_pool_t;
|
||||
typedef struct ogs_pkbuf_s {
|
||||
ogs_lnode_t lnode;
|
||||
|
||||
/* Currently it is used in SCTP stream number and PPID. */
|
||||
uint64_t param[2];
|
||||
|
||||
ogs_cluster_t *cluster;
|
||||
|
||||
unsigned int len;
|
||||
@@ -110,6 +115,20 @@ static ogs_inline void ogs_pkbuf_put_u8(ogs_pkbuf_t *pkbuf, uint8_t val)
|
||||
*(uint8_t *)ogs_pkbuf_put(pkbuf, 1) = val;
|
||||
}
|
||||
|
||||
static ogs_inline void ogs_pkbuf_put_u16(ogs_pkbuf_t *pkbuf, uint16_t val)
|
||||
{
|
||||
uint8_t *p = ogs_pkbuf_put(pkbuf, 2);
|
||||
uint16_t tmp = htobe16(val);
|
||||
memcpy(p, &tmp, 2);
|
||||
}
|
||||
|
||||
static ogs_inline void ogs_pkbuf_put_u32(ogs_pkbuf_t *pkbuf, uint32_t val)
|
||||
{
|
||||
uint8_t *p = ogs_pkbuf_put(pkbuf, 4);
|
||||
uint32_t tmp = htobe32(val);
|
||||
memcpy(p, &tmp, 4);
|
||||
}
|
||||
|
||||
static ogs_inline void *ogs_pkbuf_push(ogs_pkbuf_t *pkbuf, unsigned int len)
|
||||
{
|
||||
pkbuf->data -= len;
|
||||
|
||||
@@ -27,6 +27,8 @@ extern const ogs_pollset_actions_t ogs_kqueue_actions;
|
||||
extern const ogs_pollset_actions_t ogs_epoll_actions;
|
||||
extern const ogs_pollset_actions_t ogs_select_actions;
|
||||
|
||||
static void *self_handler_data = NULL;
|
||||
|
||||
ogs_pollset_actions_t ogs_pollset_actions;
|
||||
bool ogs_pollset_actions_initialized = false;
|
||||
|
||||
@@ -41,9 +43,9 @@ ogs_pollset_t *ogs_pollset_create(unsigned int capacity)
|
||||
|
||||
if (ogs_pollset_actions_initialized == false) {
|
||||
#if defined(HAVE_KQUEUE)
|
||||
ogs_pollset_actions = ogs_kqueue_actions;;
|
||||
ogs_pollset_actions = ogs_kqueue_actions;
|
||||
#elif defined(HAVE_EPOLL)
|
||||
ogs_pollset_actions = ogs_epoll_actions;;
|
||||
ogs_pollset_actions = ogs_epoll_actions;
|
||||
#else
|
||||
ogs_pollset_actions = ogs_select_actions;
|
||||
#endif
|
||||
@@ -87,7 +89,11 @@ ogs_poll_t *ogs_pollset_add(ogs_pollset_t *pollset, short when,
|
||||
poll->when = when;
|
||||
poll->fd = fd;
|
||||
poll->handler = handler;
|
||||
poll->data = data;
|
||||
|
||||
if (data == &self_handler_data)
|
||||
poll->data = poll;
|
||||
else
|
||||
poll->data = data;
|
||||
|
||||
poll->pollset = pollset;
|
||||
|
||||
@@ -117,3 +123,14 @@ void ogs_pollset_remove(ogs_poll_t *poll)
|
||||
|
||||
ogs_pool_free(&pollset->pool, poll);
|
||||
}
|
||||
|
||||
ogs_poll_t *ogs_pollset_cycle(ogs_pollset_t *pollset, ogs_poll_t *poll)
|
||||
{
|
||||
ogs_assert(pollset);
|
||||
return ogs_pool_cycle(&pollset->pool, poll);
|
||||
}
|
||||
|
||||
void *ogs_pollset_self_handler_data(void)
|
||||
{
|
||||
return &self_handler_data;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,9 @@ ogs_poll_t *ogs_pollset_add(ogs_pollset_t *pollset, short when,
|
||||
ogs_socket_t fd, ogs_poll_handler_f handler, void *data);
|
||||
void ogs_pollset_remove(ogs_poll_t *poll);
|
||||
|
||||
ogs_poll_t *ogs_pollset_cycle(ogs_pollset_t *pollset, ogs_poll_t *poll);
|
||||
void *ogs_pollset_self_handler_data(void);
|
||||
|
||||
typedef struct ogs_pollset_actions_s {
|
||||
void (*init)(ogs_pollset_t *pollset);
|
||||
void (*cleanup)(ogs_pollset_t *pollset);
|
||||
|
||||
@@ -1,20 +1,33 @@
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
* The code is stolen from process.h
|
||||
* https://github.com/sheredom/process.h
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This is free and unencumbered software released into the public domain.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
* distribute this software, either in source code form or as a compiled
|
||||
* binary, for any purpose, commercial or non-commercial, and by any
|
||||
* means.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* In jurisdictions that recognize copyright laws, the author or authors
|
||||
* of this software dedicate any and all copyright interest in the
|
||||
* software to the public domain. We make this dedication for the benefit
|
||||
* of the public at large and to the detriment of our heirs and
|
||||
* successors. We intend this dedication to be an overt act of
|
||||
* relinquishment in perpetuity of all present and future rights to this
|
||||
* software under copyright law.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* For more information, please refer to <http://unlicense.org/>
|
||||
*/
|
||||
|
||||
#include "core-config-private.h"
|
||||
|
||||
@@ -1,20 +1,33 @@
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
* The code is stolen from process.h
|
||||
* https://github.com/sheredom/process.h
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* This is free and unencumbered software released into the public domain.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
* distribute this software, either in source code form or as a compiled
|
||||
* binary, for any purpose, commercial or non-commercial, and by any
|
||||
* means.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* In jurisdictions that recognize copyright laws, the author or authors
|
||||
* of this software dedicate any and all copyright interest in the
|
||||
* software to the public domain. We make this dedication for the benefit
|
||||
* of the public at large and to the detriment of our heirs and
|
||||
* successors. We intend this dedication to be an overt act of
|
||||
* relinquishment in perpetuity of all present and future rights to this
|
||||
* software under copyright law.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* For more information, please refer to <http://unlicense.org/>
|
||||
*/
|
||||
|
||||
#if !defined(OGS_CORE_INSIDE) && !defined(OGS_CORE_COMPILATION)
|
||||
@@ -28,11 +41,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following code is stolen from process.h
|
||||
* https://github.com/sheredom/process.h
|
||||
*/
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef struct _PROCESS_INFORMATION *LPPROCESS_INFORMATION;
|
||||
typedef struct _SECURITY_ATTRIBUTES *LPSECURITY_ATTRIBUTES;
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "ogs-core.h"
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(OGS_CORE_INSIDE) && !defined(OGS_CORE_COMPILATION)
|
||||
|
||||
@@ -139,7 +139,7 @@ static int select_remove(ogs_poll_t *poll)
|
||||
static int select_process(ogs_pollset_t *pollset, ogs_time_t timeout)
|
||||
{
|
||||
struct select_context_s *context = NULL;
|
||||
ogs_poll_t *poll = NULL;
|
||||
ogs_poll_t *poll = NULL, *next_poll = NULL;
|
||||
int rc;
|
||||
struct timeval tv, *tp;
|
||||
|
||||
@@ -181,13 +181,15 @@ static int select_process(ogs_pollset_t *pollset, ogs_time_t timeout)
|
||||
return OGS_TIMEUP;
|
||||
}
|
||||
|
||||
ogs_list_for_each(&context->list, poll) {
|
||||
ogs_list_for_each_safe(&context->list, next_poll, poll) {
|
||||
short when = 0;
|
||||
if (FD_ISSET(poll->fd, &context->work_read_fd_set)) {
|
||||
if ((poll->when & OGS_POLLIN) &&
|
||||
FD_ISSET(poll->fd, &context->work_read_fd_set)) {
|
||||
when |= OGS_POLLIN;
|
||||
}
|
||||
|
||||
if (FD_ISSET(poll->fd, &context->work_write_fd_set)) {
|
||||
if ((poll->when & OGS_POLLOUT) &&
|
||||
FD_ISSET(poll->fd, &context->work_write_fd_set)) {
|
||||
when |= OGS_POLLOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "core-config-private.h"
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(OGS_CORE_INSIDE) && !defined(OGS_CORE_COMPILATION)
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "core-config-private.h"
|
||||
@@ -300,7 +315,7 @@ const char *ogs_inet_ntop(void *sa, char *buf, int buflen)
|
||||
ogs_assert(buflen >= OGS_ADDRSTRLEN);
|
||||
|
||||
family = sockaddr->ogs_sa_family;
|
||||
switch(family) {
|
||||
switch (family) {
|
||||
case AF_INET:
|
||||
return inet_ntop(family, &sockaddr->sin.sin_addr, buf,
|
||||
INET_ADDRSTRLEN);
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(OGS_CORE_INSIDE) && !defined(OGS_CORE_COMPILATION)
|
||||
|
||||
@@ -173,7 +173,6 @@ ogs_sock_t *ogs_sock_accept(ogs_sock_t *sock)
|
||||
|
||||
new_fd = accept(sock->fd, &addr.sa, &addrlen);
|
||||
if (new_fd < 0) {
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, "accept failed");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -185,37 +184,21 @@ ogs_sock_t *ogs_sock_accept(ogs_sock_t *sock)
|
||||
|
||||
memcpy(&new_sock->remote_addr, &addr, sizeof(new_sock->remote_addr));
|
||||
|
||||
return new_sock;;
|
||||
return new_sock;
|
||||
}
|
||||
|
||||
ssize_t ogs_write(ogs_socket_t fd, const void *buf, size_t len)
|
||||
{
|
||||
ssize_t size;
|
||||
|
||||
ogs_assert(fd != INVALID_SOCKET);
|
||||
|
||||
size = write(fd, buf, len);
|
||||
if (size < 0) {
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno,
|
||||
"ogs_write(len:%d) failed", (int)size);
|
||||
}
|
||||
|
||||
return size;
|
||||
return write(fd, buf, len);
|
||||
}
|
||||
|
||||
ssize_t ogs_read(ogs_socket_t fd, void *buf, size_t len)
|
||||
{
|
||||
ssize_t size;
|
||||
|
||||
ogs_assert(fd != INVALID_SOCKET);
|
||||
|
||||
size = read(fd, buf, len);
|
||||
if (size < 0) {
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno,
|
||||
"ogs_read(len:%d) failed", (int)size);
|
||||
}
|
||||
|
||||
return size;
|
||||
return read(fd, buf, len);
|
||||
}
|
||||
|
||||
ssize_t ogs_send(ogs_socket_t fd, const void *buf, size_t len, int flags)
|
||||
@@ -241,36 +224,20 @@ ssize_t ogs_sendto(ogs_socket_t fd,
|
||||
|
||||
ssize_t ogs_recv(ogs_socket_t fd, void *buf, size_t len, int flags)
|
||||
{
|
||||
ssize_t size;
|
||||
|
||||
ogs_assert(fd != INVALID_SOCKET);
|
||||
|
||||
size = recv(fd, buf, len, flags);
|
||||
if (size < 0) {
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno,
|
||||
"recv(len:%d) failed", (int)len);
|
||||
}
|
||||
|
||||
return size;
|
||||
return recv(fd, buf, len, flags);
|
||||
}
|
||||
|
||||
ssize_t ogs_recvfrom(ogs_socket_t fd,
|
||||
void *buf, size_t len, int flags, ogs_sockaddr_t *from)
|
||||
{
|
||||
ssize_t size;
|
||||
socklen_t addrlen = sizeof(struct sockaddr_storage);
|
||||
|
||||
ogs_assert(fd != INVALID_SOCKET);
|
||||
ogs_assert(from);
|
||||
|
||||
memset(from, 0, sizeof *from);
|
||||
size = recvfrom(fd, buf, len, flags, &from->sa, &addrlen);
|
||||
if (size < 0) {
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno,
|
||||
"recvfrom(len:%d) failed", (int)len);
|
||||
}
|
||||
|
||||
return size;
|
||||
return recvfrom(fd, buf, len, flags, &from->sa, &addrlen);
|
||||
}
|
||||
|
||||
int ogs_closesocket(ogs_socket_t fd)
|
||||
@@ -330,15 +297,15 @@ int ogs_closeonexec(ogs_socket_t fd)
|
||||
int flags;
|
||||
|
||||
ogs_assert(fd != INVALID_SOCKET);
|
||||
flags = fcntl(fd, F_GETFL, NULL);
|
||||
flags = fcntl(fd, F_GETFD, NULL);
|
||||
if (flags < 0) {
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, "F_GETFL failed");
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, "F_GETFD failed");
|
||||
return OGS_ERROR;
|
||||
}
|
||||
if (!(flags & FD_CLOEXEC)) {
|
||||
rc = fcntl(fd, F_SETFL, (flags | FD_CLOEXEC));
|
||||
rc = fcntl(fd, F_SETFD, (flags | FD_CLOEXEC));
|
||||
if (rc != OGS_OK) {
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, "F_SETFL failed");
|
||||
ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, "F_SETFD failed");
|
||||
return OGS_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,36 @@
|
||||
/**
|
||||
*
|
||||
* Orcania library
|
||||
*
|
||||
* Different functions for different purposes but that can be shared between
|
||||
* other projects
|
||||
*
|
||||
* orcania.c: main functions definitions
|
||||
*
|
||||
* Copyright 2015-2020 Nicolas Mora <mail@babelouest.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation;
|
||||
* version 2.1 of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU GENERAL PUBLIC LICENSE for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
@@ -27,6 +53,10 @@
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_CTYPE_H
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
#include "ogs-core.h"
|
||||
|
||||
int ogs_vsnprintf(char *str, size_t size, const char *format, va_list ap)
|
||||
@@ -228,3 +258,64 @@ char *ogs_mstrcatf(char *source, const char *message, ...)
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
char *ogs_trimwhitespace(char *str)
|
||||
{
|
||||
char *end;
|
||||
|
||||
if (str == NULL) {
|
||||
return NULL;
|
||||
} else if (*str == 0) {
|
||||
return str;
|
||||
}
|
||||
|
||||
while (isspace((unsigned char)*str)) str++;
|
||||
|
||||
end = str + strlen(str) - 1;
|
||||
while(end > str && isspace((unsigned char)*end)) {
|
||||
end--;
|
||||
}
|
||||
|
||||
*(end+1) = 0;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
char *ogs_left_trimcharacter(char *str, char to_remove)
|
||||
{
|
||||
if (str == NULL) {
|
||||
return NULL;
|
||||
} else if (*str == 0) {
|
||||
return str;
|
||||
}
|
||||
|
||||
while(*str == to_remove) str++;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
char *ogs_right_trimcharacter(char *str, char to_remove)
|
||||
{
|
||||
char *end;
|
||||
|
||||
if (str == NULL) {
|
||||
return NULL;
|
||||
} else if (*str == 0) {
|
||||
return str;
|
||||
}
|
||||
|
||||
end = str + strlen(str) - 1;
|
||||
while(end > str && (*end == to_remove)) {
|
||||
end--;
|
||||
}
|
||||
|
||||
*(end+1) = 0;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
char *ogs_trimcharacter(char *str, char to_remove)
|
||||
{
|
||||
return ogs_right_trimcharacter(
|
||||
ogs_left_trimcharacter(str, to_remove), to_remove);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,36 @@
|
||||
/**
|
||||
*
|
||||
* Orcania library
|
||||
*
|
||||
* Different functions for different purposes but that can be shared between
|
||||
* other projects
|
||||
*
|
||||
* orcania.c: main functions definitions
|
||||
*
|
||||
* Copyright 2015-2020 Nicolas Mora <mail@babelouest.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation;
|
||||
* version 2.1 of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU GENERAL PUBLIC LICENSE for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
@@ -55,11 +81,27 @@ void *ogs_memdup(const void *m, size_t n);
|
||||
|
||||
char *ogs_cpystrn(char *dst, const char *src, size_t dst_size);
|
||||
|
||||
/*
|
||||
* char *ogs_msprintf(const char *message, ...)
|
||||
* char *mstrcatf(char *source, const char *message, ...)
|
||||
*
|
||||
* Orcania library
|
||||
* Copyright 2015-2018 Nicolas Mora <mail@babelouest.org>
|
||||
* License: LGPL-2.1
|
||||
*
|
||||
* https://github.com/babelouest/orcania.git
|
||||
*/
|
||||
char *ogs_msprintf(const char *message, ...)
|
||||
OGS_GNUC_PRINTF(1, 2);
|
||||
char *ogs_mstrcatf(char *source, const char *message, ...)
|
||||
OGS_GNUC_PRINTF(2, 3);
|
||||
|
||||
char *ogs_trimwhitespace(char *str);
|
||||
|
||||
char *ogs_left_trimcharacter(char *str, char to_remove);
|
||||
char *ogs_right_trimcharacter(char *str, char to_remove);
|
||||
char *ogs_trimcharacter(char *str, char to_remove);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,20 +1,59 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright 2013 MongoDB, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright Beman Dawes 2008
|
||||
* Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
@@ -1,20 +1,59 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright 2013 MongoDB, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright Beman Dawes 2008
|
||||
* Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* See http://www.boost.org/LICENSE_1_0.txt
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(OGS_CORE_INSIDE) && !defined(OGS_CORE_COMPILATION)
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "core-config-private.h"
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(OGS_CORE_INSIDE) && !defined(OGS_CORE_COMPILATION)
|
||||
|
||||
@@ -1,21 +1,30 @@
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "ogs-crypt.h"
|
||||
|
||||
#if (OGS_AES_BLOCK_SIZE != 16)
|
||||
|
||||
@@ -1,20 +1,28 @@
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(OGS_CRYPT_INSIDE) && !defined(OGS_CRYPT_COMPILATION)
|
||||
|
||||
@@ -1,20 +1,28 @@
|
||||
/*
|
||||
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
* Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019-2020 by Sukchan Lee <acetcom@gmail.com>
|
||||
*
|
||||
* This file is part of Open5GS.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "ogs-crypt.h"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user