forked from acouzens/open5gs
Compare commits
107 Commits
daniel/wip
...
main
Author | SHA1 | Date |
---|---|---|
Pau Espin | c6c73c1f70 | |
Pau Espin | f401e7df14 | |
Sukchan Lee | 87d9cdf569 | |
Sukchan Lee | 02d302b15a | |
Sukchan Lee | 15ff23de75 | |
Sukchan Lee | b1bf2b10e2 | |
Sukchan Lee | bd4d925f0f | |
Sukchan Lee | 5f425445a8 | |
Sukchan Lee | 05deed616c | |
Sukchan Lee | 4599b273fa | |
Sukchan Lee | bba0ebe6a4 | |
Sukchan Lee | 80ab4c4a1b | |
Sukchan Lee | 95de14c72b | |
Sukchan Lee | 7a9fea8aec | |
Sukchan Lee | 9d8d560be7 | |
Daniel Willmann | eb28c514ea | |
Pau Espin | f16f6e3c6c | |
Pau Espin | 190b39a75c | |
Sukchan Lee | 87b4e4535c | |
Sukchan Lee | b57722178a | |
Sukchan Lee | 7ea82cb87b | |
Sukchan Lee | e89aa79efe | |
Sukchan Lee | 048a74005b | |
Sukchan Lee | f6c0ded7b4 | |
Sukchan Lee | 819861be2f | |
Sukchan Lee | 4c00edd839 | |
Sukchan Lee | 426fa3f84a | |
Pau Espin | c0a520f32a | |
Sukchan Lee | d14304461b | |
Sukchan Lee | a9b1b116b3 | |
Oliver Smith | 4ab22dc98e | |
Oliver Smith | 8abd35580b | |
Oliver Smith | 7973e45d16 | |
Sukchan Lee | f960047ccb | |
Sukchan Lee | a6830b30a0 | |
Sukchan Lee | 2b6369e9d9 | |
Sukchan Lee | 3cfa8ba301 | |
Sukchan Lee | cd76dc641d | |
Sukchan Lee | 09410eba08 | |
Sukchan Lee | 6814de5c57 | |
Pau Espin | 34b930b4e5 | |
Sukchan Lee | 3b820b1dbe | |
Sukchan Lee | 01ef8ea6f2 | |
Pau Espin | d3a779e715 | |
Pau Espin | 253b09f589 | |
Pau Espin | cfd4f28f8a | |
Pau Espin | b30604b289 | |
Sukchan Lee | bbdfca29bf | |
Pau Espin | e078b33f0c | |
Sukchan Lee | 8484a5af60 | |
Pau Espin | 990bfe96a8 | |
gstaa | eb2b19b39c | |
Pau Espin | 3ee4bb7d3c | |
Pau Espin | 74fcd9b9c6 | |
Sukchan Lee | da5d424ed9 | |
Sukchan Lee | d32cc14a71 | |
Sukchan Lee | e8a3b76af3 | |
Oliver Smith | be7d08bffc | |
Sukchan Lee | 581d255c53 | |
Sukchan Lee | 390a9dd637 | |
Sukchan Lee | 7c14073533 | |
Sukchan Lee | cf4ad1f248 | |
Sukchan Lee | a667525041 | |
Sukchan Lee | 1dc4300203 | |
Pau Espin | 3b5e851f5d | |
Pau Espin | d0b31177cc | |
Pau Espin | 6420e80fe6 | |
Pau Espin | ca5a29dbe3 | |
Pau Espin | 12158eebb8 | |
Matej Gradišar | e1820e4e54 | |
Pau Espin | ea122da9fc | |
Pau Espin | 32a275b9a8 | |
Pau Espin | 10a0647f09 | |
Bostjan Meglic | f66c65b9cf | |
Sukchan Lee | 4ee3ea08c4 | |
Sukchan Lee | 7063d853e7 | |
Sukchan Lee | a1a0a8c0a6 | |
Pau Espin | a1bd80515b | |
Pau Espin | b31fc343d1 | |
mitmitmitm | a2b0284172 | |
Pau Espin | 054323ba8d | |
Sukchan Lee | 322719f3e7 | |
Sukchan Lee | 199f4c7add | |
Sukchan Lee | 152b4400f8 | |
Sukchan Lee | 2ceca49161 | |
Matej Gradisar | 24b9150c15 | |
Sukchan Lee | 4d7f2fb661 | |
Pau Espin | 32de75b1a5 | |
Pau Espin | 4aaac999f7 | |
Sukchan Lee | 0dd2ad6557 | |
Sukchan Lee | 9a515e9b1d | |
Sukchan Lee | 41d8934677 | |
Sukchan Lee | 843c4950ac | |
Sukchan Lee | 94bd68aa7b | |
Sukchan Lee | 290df460ef | |
Sukchan Lee | 82398811db | |
Sukchan Lee | 8762425fbc | |
Sukchan Lee | 7e8f145973 | |
Sukchan Lee | d1d3ec6fcb | |
Sukchan Lee | be12610fb6 | |
Sukchan Lee | 47419be650 | |
Sukchan Lee | 3f0979dab2 | |
Sukchan Lee | 93110d011e | |
Pau Espin | 88a77f7bc5 | |
Pau Espin | a613be8c4c | |
Pau Espin | d95c82b21c | |
Pau Espin | a5feccf4c8 |
|
@ -2,51 +2,51 @@ name: Meson Continuous Integration
|
|||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
macos-latest:
|
||||
name: Build and Test on MacOS Latest
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
# - name: Install MongoDB with Package Manager
|
||||
# macos-latest:
|
||||
# name: Build and Test on MacOS Latest
|
||||
# runs-on: macos-latest
|
||||
# steps:
|
||||
## - name: Install MongoDB with Package Manager
|
||||
## run: |
|
||||
## brew tap mongodb/brew
|
||||
## brew install mongodb-community
|
||||
## brew services start mongodb-community
|
||||
# - name: Create the TUN device with the interface name `ogstun`.
|
||||
# run: |
|
||||
# brew tap mongodb/brew
|
||||
# brew install mongodb-community
|
||||
# brew services start mongodb-community
|
||||
- name: Create the TUN device with the interface name `ogstun`.
|
||||
run: |
|
||||
sudo ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.4 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.6 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.7 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.8 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.9 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.10 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.11 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.12 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.13 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.14 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.15 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.16 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.17 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.18 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.19 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.0.20 netmask 255.255.255.255
|
||||
sudo ifconfig lo0 alias 127.0.1.10 netmask 255.255.255.255
|
||||
- name: Install the dependencies for building the source code.
|
||||
run: brew install mongo-c-driver libidn libmicrohttpd nghttp2 bison libusrsctp libtins talloc meson
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@main
|
||||
- name: Setup Meson Build
|
||||
run: PATH="/usr/local/opt/bison/bin:$PATH" PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH" meson setup build
|
||||
env:
|
||||
CC: gcc
|
||||
- name : Build Open5GS
|
||||
run: ninja -C build
|
||||
- name: Test Open5GS
|
||||
run: sudo meson test -C build -v crypt unit
|
||||
|
||||
# sudo ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.4 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.6 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.7 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.8 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.9 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.10 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.11 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.12 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.13 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.14 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.15 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.16 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.17 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.18 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.19 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.0.20 netmask 255.255.255.255
|
||||
# sudo ifconfig lo0 alias 127.0.1.10 netmask 255.255.255.255
|
||||
# - name: Install the dependencies for building the source code.
|
||||
# run: brew install mongo-c-driver libidn libmicrohttpd nghttp2 bison libusrsctp libtins talloc meson
|
||||
# - name: Check out repository code
|
||||
# uses: actions/checkout@main
|
||||
# - name: Setup Meson Build
|
||||
# run: PATH="/usr/local/opt/bison/bin:$PATH" PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH" meson setup build
|
||||
# env:
|
||||
# CC: gcc
|
||||
# - name : Build Open5GS
|
||||
# run: ninja -C build
|
||||
# - name: Test Open5GS
|
||||
# run: sudo meson test -C build -v crypt unit
|
||||
#
|
||||
ubuntu-latest:
|
||||
name: Build and Test on Ubuntu Latest
|
||||
runs-on: ubuntu-latest
|
||||
|
|
10
README.md
10
README.md
|
@ -8,6 +8,16 @@ Please follow the [documentation](https://open5gs.org/open5gs/docs/) at [open5gs
|
|||
|
||||
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).
|
||||
|
||||
<p align="center">
|
||||
<h3 align="center">Special Sponsor</h3>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a target="_blank" href="https://mobi.com">
|
||||
<img alt="special sponsor mobi" src="https://open5gs.org/assets/img/mobi-open5GS.png" width="400">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a target="_blank" href="https://open5gs.org/#sponsors">
|
||||
<img alt="sponsors" src="https://open5gs.org/assets/img/sponsors.svg">
|
||||
|
|
|
@ -109,8 +109,10 @@ smf:
|
|||
server:
|
||||
- address: 127.0.0.4
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -189,8 +191,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -142,8 +142,10 @@ smf:
|
|||
server:
|
||||
- address: 127.0.0.4
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -219,8 +221,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -112,8 +112,10 @@ smf:
|
|||
- address: 127.0.1.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -207,8 +209,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.1.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.1.7
|
||||
|
|
|
@ -112,8 +112,10 @@ smf:
|
|||
- address: 127.0.2.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.46.0.1/16
|
||||
- subnet: 2001:db8:babe::1/48
|
||||
- subnet: 10.46.0.0/16
|
||||
gateway: 10.46.0.1
|
||||
- subnet: 2001:db8:babe::/48
|
||||
gateway: 2001:db8:babe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -207,9 +209,11 @@ upf:
|
|||
server:
|
||||
- address: 127.0.2.7
|
||||
session:
|
||||
- subnet: 10.46.0.1/16
|
||||
- subnet: 10.46.0.0/16
|
||||
gateway: 10.46.0.1
|
||||
dev: ogstun2
|
||||
- subnet: 2001:db8:babe::1/48
|
||||
- subnet: 2001:db8:babe::/48
|
||||
gateway: 2001:db8:babe::1
|
||||
dev: ogstun2
|
||||
metrics:
|
||||
server:
|
||||
|
|
|
@ -112,8 +112,10 @@ smf:
|
|||
- address: 127.0.3.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.47.0.1/16
|
||||
- subnet: 2001:db8:face::1/48
|
||||
- subnet: 10.47.0.0/16
|
||||
gateway: 10.47.0.1
|
||||
- subnet: 2001:db8:face::/48
|
||||
gateway: 2001:db8:face::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -207,9 +209,11 @@ upf:
|
|||
server:
|
||||
- address: 127.0.3.7
|
||||
session:
|
||||
- subnet: 10.47.0.1/16
|
||||
- subnet: 10.47.0.0/16
|
||||
gateway: 10.47.0.1
|
||||
dev: ogstun3
|
||||
- subnet: 2001:db8:face::1/48
|
||||
- subnet: 2001:db8:face::/48
|
||||
gateway: 2001:db8:face::1
|
||||
dev: ogstun3
|
||||
metrics:
|
||||
server:
|
||||
|
|
|
@ -113,8 +113,10 @@ smf:
|
|||
- address: 127.0.1.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -208,8 +210,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.1.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.1.7
|
||||
|
|
|
@ -113,8 +113,10 @@ smf:
|
|||
- address: 127.0.2.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.46.0.1/16
|
||||
- subnet: 2001:db8:babe::1/48
|
||||
- subnet: 10.46.0.0/16
|
||||
gateway: 10.46.0.1
|
||||
- subnet: 2001:db8:babe::/48
|
||||
gateway: 2001:db8:babe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -208,9 +210,11 @@ upf:
|
|||
server:
|
||||
- address: 127.0.2.7
|
||||
session:
|
||||
- subnet: 10.46.0.1/16
|
||||
- subnet: 10.46.0.0/16
|
||||
gateway: 10.46.0.1
|
||||
dev: ogstun2
|
||||
- subnet: 2001:db8:babe::1/48
|
||||
- subnet: 2001:db8:babe::/48
|
||||
gateway: 2001:db8:babe::1
|
||||
dev: ogstun2
|
||||
metrics:
|
||||
server:
|
||||
|
|
|
@ -113,8 +113,10 @@ smf:
|
|||
- address: 127.0.3.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.47.0.1/16
|
||||
- subnet: 2001:db8:face::1/48
|
||||
- subnet: 10.47.0.0/16
|
||||
gateway: 10.47.0.1
|
||||
- subnet: 2001:db8:face::/48
|
||||
gateway: 2001:db8:face::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -208,9 +210,11 @@ upf:
|
|||
server:
|
||||
- address: 127.0.3.7
|
||||
session:
|
||||
- subnet: 10.47.0.1/16
|
||||
- subnet: 10.47.0.0/16
|
||||
gateway: 10.47.0.1
|
||||
dev: ogstun3
|
||||
- subnet: 2001:db8:face::1/48
|
||||
- subnet: 2001:db8:face::/48
|
||||
gateway: 2001:db8:face::1
|
||||
dev: ogstun3
|
||||
metrics:
|
||||
server:
|
||||
|
|
|
@ -118,8 +118,10 @@ smf:
|
|||
- address: 127.0.0.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -203,8 +205,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -118,8 +118,10 @@ smf:
|
|||
- address: 127.0.0.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -203,8 +205,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -116,8 +116,10 @@ smf:
|
|||
- address: 127.0.0.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -198,8 +200,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -118,8 +118,10 @@ smf:
|
|||
- address: 127.0.0.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -203,8 +205,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -116,8 +116,10 @@ smf:
|
|||
- address: 127.0.0.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -198,8 +200,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -118,8 +118,10 @@ smf:
|
|||
- address: 127.0.0.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -203,8 +205,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -118,8 +118,10 @@ smf:
|
|||
- address: 127.0.0.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -203,8 +205,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -118,8 +118,10 @@ smf:
|
|||
- address: 127.0.0.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -203,8 +205,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -116,8 +116,10 @@ smf:
|
|||
- address: 127.0.0.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -198,8 +200,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
|
||||
postrotate
|
||||
for i in nrfd scpd seppd pcrfd hssd ausfd udmd udrd upfd sgwcd sgwud smfd mmed amfd; do
|
||||
if systemctl --quiet is-active open5gs-$i; then
|
||||
systemctl reload open5gs-$i
|
||||
fi
|
||||
done
|
||||
endscript
|
||||
}
|
||||
|
|
|
@ -110,8 +110,10 @@ smf:
|
|||
server:
|
||||
- address: 127.0.0.4
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -192,8 +194,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/amf.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/amf.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/ausf.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/ausf.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/bsf.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/bsf.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
db_uri: mongodb://localhost/open5gs
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/hss.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/hss.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/mme.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/mme.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/nrf.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/nrf.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/nssf.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/nssf.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
db_uri: mongodb://localhost/open5gs
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/pcf.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/pcf.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,59 +1,7 @@
|
|||
db_uri: mongodb://localhost/open5gs
|
||||
db_json:
|
||||
default:
|
||||
af:
|
||||
ambr:
|
||||
up: 10000
|
||||
down: 10000
|
||||
gmbr:
|
||||
up: 1000
|
||||
down: 1000
|
||||
qci: 4
|
||||
normal:
|
||||
ambr:
|
||||
up: 10000
|
||||
down: 10000
|
||||
gmbr:
|
||||
up: 10000
|
||||
down: 10000
|
||||
qci: 5
|
||||
charging_profiles:
|
||||
af:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
normal:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
dir:
|
||||
normal: "/tmp/profiles"
|
||||
af: "/tmp/profiles_af"
|
||||
#
|
||||
# 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'
|
||||
# (Default values are used, so no configuration is required)
|
||||
#
|
||||
# o Set OGS_LOG_ERROR to all domain level
|
||||
# - `level` can be set with none, fatal, error, warn, info, debug, trace
|
||||
# logger:
|
||||
# level: error
|
||||
#
|
||||
# o Set OGS_LOG_DEBUG to mme/emm domain level
|
||||
# logger:
|
||||
# level: debug
|
||||
# domain: mme,emm
|
||||
#
|
||||
# o Set OGS_LOG_TRACE to all domain level
|
||||
# logger:
|
||||
# level: trace
|
||||
# domain: core,sbi,ausf,event,tlv,mem,sock
|
||||
#
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/pcrf.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/pcrf.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/scp.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/scp.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/sepp1.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/sepp1.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/sepp2.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/sepp2.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/sgwc.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/sgwc.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/sgwu.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/sgwu.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/smf.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/smf.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
@ -34,8 +35,10 @@ smf:
|
|||
- address: 127.0.0.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -327,23 +330,26 @@ smf:
|
|||
# o Specific DNN/APN(e.g 'ims') uses 10.46.0.1/16, 2001:db8:babe::1/48
|
||||
# (If the UE has unknown DNN/APN(not internet/ims), SMF/UPF will crash.)
|
||||
# session:
|
||||
# - subnet: 10.45.0.1/16
|
||||
# - subnet: 10.45.0.0/16
|
||||
# gateway: 10.45.0.1
|
||||
# dnn: internet
|
||||
# - subnet: 2001:db8:cafe::1/48
|
||||
# - subnet: 2001:db8:cafe::/48
|
||||
# dnn: internet
|
||||
# - subnet: 10.46.0.1/16
|
||||
# - subnet: 10.46.0.0/16
|
||||
# gateway: 10.46.0.1
|
||||
# dnn: ims
|
||||
# - subnet: 2001:db8:babe::1/48
|
||||
# - subnet: 2001:db8:babe::/48
|
||||
# dnn: ims
|
||||
#
|
||||
# o Pool Range
|
||||
# session:
|
||||
# - subnet: 10.45.0.1/16
|
||||
# - subnet: 10.45.0.0/16
|
||||
# gateway: 10.45.0.1
|
||||
# range:
|
||||
# - 10.45.0.100-10.45.0.200
|
||||
# - 10.45.1.100-
|
||||
# - -10.45.0.200
|
||||
# - subnet: 2001:db8:cafe::1/48
|
||||
# - subnet: 2001:db8:cafe::/48
|
||||
# range:
|
||||
# - 2001:db8:cafe:a0::0-2001:db8:cafe:b0::0
|
||||
# - 2001:db8:cafe:c0::0-2001:db8:cafe:d0::0
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/udm.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/udm.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
db_uri: mongodb://localhost/open5gs
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/udr.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/udr.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
logger:
|
||||
file: @localstatedir@/log/open5gs/upf.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/upf.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
@ -18,8 +19,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
@ -70,14 +73,16 @@ upf:
|
|||
# $ sudo ip addr add 2001:db8:babe::1/48 dev ogstun3
|
||||
#
|
||||
# session:
|
||||
# - subnet: 10.45.0.1/16
|
||||
# - subnet: 10.45.0.0/16
|
||||
# gateway: 10.45.0.1
|
||||
# dnn: internet
|
||||
# - subnet: 2001:db8:cafe::1/48
|
||||
# - subnet: 2001:db8:cafe::/48
|
||||
# dnn: internet
|
||||
# dev: ogstun2
|
||||
# - subnet: 10.46.0.1/16
|
||||
# - subnet: 10.46.0.0/16
|
||||
# gateway: 10.46.0.1
|
||||
# dnn: ims
|
||||
# dev: ogstun3
|
||||
# - subnet: 2001:db8:babe::1/48
|
||||
# - subnet: 2001:db8:babe::/48
|
||||
# dnn: ims
|
||||
# dev: ogstun3
|
||||
|
|
|
@ -118,8 +118,10 @@ smf:
|
|||
- address: 127.0.0.4
|
||||
port: 9090
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -203,8 +205,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -110,8 +110,10 @@ smf:
|
|||
server:
|
||||
- address: 127.0.0.4
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -194,8 +196,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -107,8 +107,10 @@ smf:
|
|||
server:
|
||||
- address: 127.0.0.4
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -184,8 +186,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -5,6 +5,14 @@ Name=ogstun
|
|||
Address=10.45.0.1/16
|
||||
Address=2001:db8:cafe::1/48
|
||||
|
||||
[Route]
|
||||
Gateway=0.0.0.0
|
||||
Destination=10.45.0.0/16
|
||||
|
||||
[Route]
|
||||
Gateway=::
|
||||
Destination=2001:db8:cafe::0/48
|
||||
|
||||
[Link]
|
||||
MTUBytes=1400
|
||||
RequiredForOnline=false
|
||||
|
|
|
@ -107,8 +107,10 @@ smf:
|
|||
server:
|
||||
- address: 127.0.0.4
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -187,8 +189,10 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
gateway: 2001:db8:cafe::1
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -110,8 +110,9 @@ smf:
|
|||
server:
|
||||
- address: 127.0.0.4
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
@ -193,8 +194,9 @@ upf:
|
|||
server:
|
||||
- address: 127.0.0.7
|
||||
session:
|
||||
- subnet: 10.45.0.1/16
|
||||
- subnet: 2001:db8:cafe::1/48
|
||||
- subnet: 10.45.0.0/16
|
||||
gateway: 10.45.0.1
|
||||
- subnet: 2001:db8:cafe::/48
|
||||
metrics:
|
||||
server:
|
||||
- address: 127.0.0.7
|
||||
|
|
|
@ -1,9 +1,32 @@
|
|||
open5gs (2.7.0sysmocom1) unstable; urgency=medium
|
||||
open5gs (2.7.1) unstable; urgency=medium
|
||||
|
||||
* Remove mongodb dependency
|
||||
* Use default APN if none could be found
|
||||
* Bug Fixed
|
||||
|
||||
-- Daniel Willmann <dwillmann@sysmocom.de> Mon, 29 Jan 2024 20:17:10 +0100
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 19 Apr 2024 21:21:46 +0900
|
||||
|
||||
open5gs (2.7.1~mantic) mantic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 19 Apr 2024 21:18:53 +0900
|
||||
|
||||
open5gs (2.7.1~bionic) bionic; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 19 Apr 2024 21:16:21 +0900
|
||||
|
||||
open5gs (2.7.1~jammy) jammy; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 19 Apr 2024 21:11:30 +0900
|
||||
|
||||
open5gs (2.7.1~focal) focal; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- Sukchan Lee <acetcom@gmail.com> Fri, 19 Apr 2024 21:08:46 +0900
|
||||
|
||||
open5gs (2.7.0) unstable; urgency=medium
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ Build-Depends: debhelper (>= 11),
|
|||
libgcrypt-dev,
|
||||
libssl-dev,
|
||||
libidn11-dev,
|
||||
libmongoc-dev,
|
||||
libbson-dev,
|
||||
libsctp-dev,
|
||||
libyaml-dev,
|
||||
|
@ -120,11 +121,29 @@ Description: UPF (User Plane Function)
|
|||
.
|
||||
This package provides the UPF (User Plane Function)
|
||||
|
||||
Package: open5gs-hss
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
mongodb-org | mongodb,
|
||||
open5gs-common (= ${binary:Version})
|
||||
Description: HSS (Home Subscriber Server)
|
||||
Open5GS is a C-language implementation of 5G Core and EPC
|
||||
Packet Core, i.e. the core network of an NR/LTE network (Release-17)
|
||||
.
|
||||
This package provides the HSS (Home Subscriber Server) element of the
|
||||
EPC, i.e. the central database of mobile network subscribers, with
|
||||
their IMSI, MSISDN, cryptographic key materials, service subscription
|
||||
information, etc. It implements the S6a interface towards the MME
|
||||
using the DIAMETER protocol.
|
||||
|
||||
Package: open5gs-pcrf
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
mongodb-org | mongodb,
|
||||
open5gs-common (= ${binary:Version})
|
||||
Description: PCRF (Policy and Charging Rules Function)
|
||||
Open5GS is a C-language implementation of 5G Core and EPC
|
||||
|
@ -254,6 +273,7 @@ Depends: ${misc:Depends},
|
|||
open5gs-amf (= ${binary:Version}),
|
||||
open5gs-sgwu (= ${binary:Version}),
|
||||
open5gs-upf (= ${binary:Version}),
|
||||
open5gs-hss (= ${binary:Version}),
|
||||
open5gs-pcrf (= ${binary:Version}),
|
||||
open5gs-nrf (= ${binary:Version}),
|
||||
open5gs-scp (= ${binary:Version}),
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
usr/bin/open5gs-hssd
|
||||
configs/freeDiameter/hss.* etc/freeDiameter
|
||||
configs/open5gs/hss.yaml etc/open5gs
|
||||
configs/open5gs/tls/hss.key etc/open5gs/tls
|
||||
configs/open5gs/tls/hss.crt etc/open5gs/tls
|
||||
configs/systemd/open5gs-hssd.service lib/systemd/system
|
|
@ -13,7 +13,7 @@ RUN apk update && \
|
|||
sudo
|
||||
|
||||
ARG username=acetcom
|
||||
RUN adduser -u 1000 acetcom -D && \
|
||||
RUN adduser -u 2000 acetcom -D && \
|
||||
echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \
|
||||
chmod 0440 /etc/sudoers.d/${username}
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
latest
|
|
@ -27,7 +27,7 @@ RUN apt-get update && \
|
|||
COPY setup.sh /root
|
||||
|
||||
ARG username=acetcom
|
||||
RUN useradd -m --uid=1000 ${username} && \
|
||||
RUN useradd -m --uid=2000 ${username} && \
|
||||
echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \
|
||||
chmod 0440 /etc/sudoers.d/${username}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ RUN dnf -y install \
|
|||
COPY setup.sh /root
|
||||
|
||||
ARG username=acetcom
|
||||
RUN useradd -m --uid=1000 ${username} && \
|
||||
RUN useradd -m --uid=2000 ${username} && \
|
||||
echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \
|
||||
chmod 0440 /etc/sudoers.d/${username}
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../debian
|
|
@ -0,0 +1 @@
|
|||
../ubuntu
|
|
@ -33,7 +33,7 @@ RUN apt-get update && \
|
|||
COPY setup.sh /root
|
||||
|
||||
ARG username=acetcom
|
||||
RUN useradd -m --uid=1000 ${username} && \
|
||||
RUN useradd -m --uid=2000 ${username} && \
|
||||
echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \
|
||||
chmod 0440 /etc/sudoers.d/${username}
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
latest
|
|
@ -0,0 +1 @@
|
|||
latest
|
|
@ -233,7 +233,7 @@ MME-frDi = 127.0.0.2 :3868 for S6a
|
|||
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 S5c, N11
|
||||
SMF-gtpc = 127.0.0.4 :2123 for S5c
|
||||
SMF-gtpu = 127.0.0.4 :2152 for N4u (Sxu)
|
||||
SMF-pfcp = 127.0.0.4 :8805 for N4 (Sxb)
|
||||
SMF-frDi = 127.0.0.4 :3868 for Gx auth
|
||||
|
@ -428,11 +428,39 @@ $ sudo systemctl restart open5gs-amfd
|
|||
$ sudo systemctl restart open5gs-upfd
|
||||
```
|
||||
|
||||
#### Configure logging
|
||||
|
||||
The Open5GS components log to `/var/log/open5gs/*.log` and to `stderr` by
|
||||
default.
|
||||
|
||||
##### Avoid duplicate timestamps in journalctl
|
||||
|
||||
Open5GS adds timestamps to each log line in the log file, and on `stderr`. If
|
||||
you run Open5GS with systemd and prefer looking at the logs with `journalctl`,
|
||||
then each line will have two timestamps. To fix this, disable the timestamp for
|
||||
`stderr` with the following configuration change:
|
||||
|
||||
```diff
|
||||
diff --git a/configs/open5gs/mme.yaml.in b/configs/open5gs/mme.yaml.in
|
||||
index 87c251b9d..599032b8a 100644
|
||||
--- a/configs/open5gs/mme.yaml.in
|
||||
+++ b/configs/open5gs/mme.yaml.in
|
||||
@@ -1,6 +1,9 @@
|
||||
logger:
|
||||
+ default:
|
||||
+ timestamp: false
|
||||
file:
|
||||
path: /var/log/open5gs/mme.log
|
||||
+ timestamp: true
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
```
|
||||
|
||||
#### Register Subscriber Information
|
||||
---
|
||||
|
||||
Connect to `http://localhost:3000` and login with **admin** account.
|
||||
Connect to `http://localhost:9999` and login with **admin** account.
|
||||
|
||||
> Username : admin
|
||||
> Password : 1423
|
||||
|
|
|
@ -495,7 +495,7 @@ $ PORT=7777 npm run dev
|
|||
### Register Subscriber Information
|
||||
---
|
||||
|
||||
Connect to `http://127.0.0.1:3000` and login with **admin** account.
|
||||
Connect to `http://127.0.0.1:9999` and login with **admin** account.
|
||||
|
||||
> Username : admin
|
||||
> Password : 1423
|
||||
|
|
|
@ -169,7 +169,8 @@ index a70143f08..e0dba560c 100644
|
|||
+++ b/configs/open5gs/amf.yaml.in
|
||||
@@ -1,6 +1,6 @@
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/amf.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/amf.log
|
||||
-# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
+ level: debug
|
||||
|
||||
|
|
|
@ -10,6 +10,62 @@ head_inline: "<style> .blue { color: blue; } </style>"
|
|||
}
|
||||
</style>
|
||||
|
||||
#### How to run wireshark from within Docker?
|
||||
|
||||
In the following, I will explain how to run wireshark on Ubuntu 32bit.
|
||||
|
||||
First, make the following modifications to get wireshark working.
|
||||
|
||||
```diff
|
||||
$ diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
|
||||
index 01925303b..8d5e23a4f 100644
|
||||
--- a/docker/docker-compose.yml
|
||||
+++ b/docker/docker-compose.yml
|
||||
@@ -105,7 +105,7 @@ services:
|
||||
volumes:
|
||||
- home:/home/${USER}
|
||||
- ${HOME}:/mnt
|
||||
- # - /tmp/.X11-unix:/tmp/.X11-unix
|
||||
+ - /tmp/.X11-unix:/tmp/.X11-unix
|
||||
# - /etc/localtime:/etc/localtime:ro
|
||||
# - /usr/share/zoneinfo/Europe/Helsinki:/etc/localtime:ro
|
||||
hostname: open5gs-dev
|
||||
|
||||
$ diff --git a/docker/ubuntu/latest/dev/Dockerfile b/docker/ubuntu/latest/dev/Dockerfile
|
||||
index 970dddb72..6902fc59c 100644
|
||||
--- a/docker/ubuntu/latest/dev/Dockerfile
|
||||
+++ b/docker/ubuntu/latest/dev/Dockerfile
|
||||
@@ -23,12 +23,12 @@ RUN apt-get update && \
|
||||
net-tools && \
|
||||
apt-get clean
|
||||
|
||||
-#RUN apt-get update && \
|
||||
-# apt-get install -y software-properties-common && \
|
||||
-# sudo add-apt-repository ppa:wireshark-dev/stable -y && \
|
||||
-# apt-get update && \
|
||||
-# DEBIAN_FRONTEND=noninteractive \
|
||||
-# apt-get install -y wireshark
|
||||
+RUN apt-get update && \
|
||||
+ apt-get install -y software-properties-common && \
|
||||
+ sudo add-apt-repository ppa:wireshark-dev/stable -y && \
|
||||
+ apt-get update && \
|
||||
+ DEBIAN_FRONTEND=noninteractive \
|
||||
+ apt-get install -y wireshark
|
||||
|
||||
COPY setup.sh /root
|
||||
```
|
||||
|
||||
It allows any program run by the docker user to communicate with X windows.
|
||||
```
|
||||
$ xhost +local:docker
|
||||
```
|
||||
|
||||
And run 32bit ubuntu like below.
|
||||
```
|
||||
$ cd docker
|
||||
$ DIST=i386/ubuntu docker compose run dev
|
||||
```
|
||||
|
||||
#### What to do if a FATAL occurs?
|
||||
|
||||
You may occasionally encounter a FATAL like the one below.
|
||||
|
@ -429,7 +485,8 @@ index a70143f08..e0dba560c 100644
|
|||
+++ b/configs/open5gs/amf.yaml.in
|
||||
@@ -1,6 +1,6 @@
|
||||
logger:
|
||||
file: @localstatedir@/log/open5gs/amf.log
|
||||
file:
|
||||
path: @localstatedir@/log/open5gs/amf.log
|
||||
-# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
+ level: debug
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ K : 82E9053A1882085FF2C020359938DAE9
|
|||
OPc : BFD5771AAF4F6728E9BC6EF2C2533BDB
|
||||
```
|
||||
|
||||
Connect to `http://localhost:3000` and login with **admin** account.
|
||||
Connect to `http://localhost:9999` and login with **admin** account.
|
||||
|
||||
> Username : admin
|
||||
> Password : 1423
|
||||
|
@ -334,7 +334,7 @@ Change back to the srsRAN source directory and copy the main config example as w
|
|||
```bash
|
||||
$ cp srsenb/enb.conf.example srsenb/enb.conf
|
||||
$ cp srsenb/rr.conf.example srsenb/rr.conf
|
||||
$ cp srsenb/drb.conf.example srsenb/drb.conf
|
||||
$ cp srsenb/rb.conf.example srsenb/rb.conf
|
||||
$ cp srsenb/sib.conf.example srsenb/sib.conf
|
||||
```
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ If there is a need to change the Core Network component configuration, then corr
|
|||
|
||||
- Provision SIM details in open5gs HSS
|
||||
|
||||
Open (http://<DOCKER_HOST_IP>:3000) in a web browser, where <DOCKER_HOST_IP> is the IP of the machine/VM running the open5gs containers. Login with following credentials
|
||||
Open (http://<DOCKER_HOST_IP>:9999) in a web browser, where <DOCKER_HOST_IP> is the IP of the machine/VM running the open5gs containers. Login with following credentials
|
||||
|
||||
```
|
||||
Username : admin
|
||||
|
|
|
@ -92,7 +92,8 @@ NRF shall follow TS23.003(28.3.2.3.2 Format of NRF FQDN) for routing.
|
|||
```bash
|
||||
$ sh -c 'cat << EOF > ./install/etc/open5gs/h-nrf.yaml
|
||||
logger:
|
||||
file: /home/acetcom/Documents/git/open5gs/install/var/log/open5gs/h-nrf.log
|
||||
file:
|
||||
path: /home/acetcom/Documents/git/open5gs/install/var/log/open5gs/h-nrf.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
@ -116,7 +117,8 @@ EOF'
|
|||
```bash
|
||||
$ sh -c 'cat << EOF > ./install/etc/open5gs/h-scp.yaml
|
||||
logger:
|
||||
file: /home/acetcom/Documents/git/open5gs/install/var/log/open5gs/h-scp.log
|
||||
file:
|
||||
path: /home/acetcom/Documents/git/open5gs/install/var/log/open5gs/h-scp.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
global:
|
||||
|
@ -302,7 +304,8 @@ $ diff -u ./install/etc/open5gs/pcf.yaml.old ./install/etc/open5gs/pcf.yaml
|
|||
@@ -1,4 +1,3 @@
|
||||
-db_uri: mongodb://localhost/open5gs
|
||||
logger:
|
||||
file: /home/acetcom/Documents/git/open5gs/install/var/log/open5gs/pcf.log
|
||||
file:
|
||||
path: /home/acetcom/Documents/git/open5gs/install/var/log/open5gs/pcf.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
@@ -22,6 +21,29 @@
|
||||
server:
|
||||
|
@ -646,7 +649,8 @@ For now we will set up SEPP without using TLS.
|
|||
```bash
|
||||
$ sh -c 'cat << EOF > ./install/etc/open5gs/sepp.yaml
|
||||
logger:
|
||||
file: /home/acetcom/Documents/git/open5gs/install/var/log/open5gs/sepp.log
|
||||
file:
|
||||
path: /home/acetcom/Documents/git/open5gs/install/var/log/open5gs/sepp.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
max:
|
||||
|
@ -966,7 +970,8 @@ For now we will set up SEPP without using TLS.
|
|||
```bash
|
||||
$ sh -c 'cat << EOF > ./install/etc/open5gs/sepp.yaml
|
||||
logger:
|
||||
file: /home/acetcom/Documents/git/open5gs/install/var/log/open5gs/sepp.log
|
||||
file:
|
||||
path: /home/acetcom/Documents/git/open5gs/install/var/log/open5gs/sepp.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
max:
|
||||
|
@ -1286,7 +1291,8 @@ For now we will set up SEPP without using TLS.
|
|||
```bash
|
||||
$ sh -c 'cat << EOF > ./install/etc/open5gs/sepp.yaml
|
||||
logger:
|
||||
file: /home/acetcom/Documents/git/open5gs/install/var/log/open5gs/sepp.log
|
||||
file:
|
||||
path: /home/acetcom/Documents/git/open5gs/install/var/log/open5gs/sepp.log
|
||||
# level: info # fatal|error|warn|info(default)|debug|trace
|
||||
|
||||
max:
|
||||
|
|
|
@ -18,9 +18,9 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
|||
- [Dockerized VoLTE Setup](tutorial/03-VoLTE-dockerized)
|
||||
- [Roaming](tutorial/05-roaming)
|
||||
|
||||
- Inside Source Code
|
||||
- [UPF Code Explanation](https://medium.com/@aditya.koranga/open5gs-upf-code-explanation-with-flow-c-79c50f253dd1)
|
||||
- [SMF Code Explanation](https://medium.com/@aditya.koranga/open5gs-smf-code-explanation-with-flow-charts-a3b3cd38c991)
|
||||
- In the lab
|
||||
- [A Demonstration of 30 Gbps Load Testing for Accelerated UPF with Open5gs](https://nextepc.com/technology)
|
||||
- [Measurement of UPF Performance](https://github.com/s5uishida/simple_measurement_of_upf_performance)
|
||||
|
||||
- Troubleshooting
|
||||
- [Simple Issues](troubleshoot/01-simple-issues)
|
||||
|
@ -38,6 +38,10 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
|||
- Hardware Specific Notes
|
||||
- [eNodeBs/gNodeBs tested on Open5GS](hardware/01-genodebs)
|
||||
|
||||
- Inside Source Code
|
||||
- [UPF Code Explanation](https://medium.com/@aditya.koranga/open5gs-upf-code-explanation-with-flow-c-79c50f253dd1)
|
||||
- [SMF Code Explanation](https://medium.com/@aditya.koranga/open5gs-smf-code-explanation-with-flow-charts-a3b3cd38c991)
|
||||
|
||||
- @infinitydon
|
||||
- [Open5GS on Amazon Elastic Kubernetes Service](https://aws.amazon.com/blogs/opensource/open-source-mobile-core-network-implementation-on-amazon-elastic-kubernetes-service/)
|
||||
- [Kubernetes Open5GS Deployment](https://dev.to/infinitydon/virtual-4g-simulation-using-kubernetes-and-gns3-3b7k?fbclid=IwAR1p99h13a-mCfejanbBQe0H0-jp5grXkn5mWf1WrTHf47UtegB2-UHGGZQ)
|
||||
|
@ -69,11 +73,12 @@ head_inline: "<style> ul { padding-bottom: 1em; } </style>"
|
|||
- [VPP-UPF with DPDK](https://github.com/s5uishida/open5gs_5gc_ueransim_vpp_upf_dpdk_sample_config)
|
||||
- [UERANSIM with eUPF(eBPF/XDP UPF)](https://github.com/s5uishida/open5gs_5gc_ueransim_eupf_sample_config)
|
||||
- [srsRAN with eUPF(eBPF/XDP UPF)](https://github.com/s5uishida/open5gs_epc_srsran_eupf_sample_config)
|
||||
- [Measurement of UPF Performance](https://github.com/s5uishida/simple_measurement_of_upf_performance)
|
||||
|
||||
- @gradiant helm charts
|
||||
- [Open5GS EPC and SRS LTE in kubernetes](https://gradiant.github.io/openverso-charts/open5gs-srslte.html)
|
||||
- [Open5GS NGC and UERANSIM in kubernetes](https://gradiant.github.io/openverso-charts/open5gs-ueransim-gnb.html)
|
||||
- [Open5GS NGC and OpenAirInterface GNB with ettus USRP in kubernetes](https://gradiant.github.io/openverso-charts/open5gs-oaignb.html)
|
||||
- [Open5GS EPC and SRS ENB with ettus USRP in kubernetes](https://gradiant.github.io/openverso-charts/open5gs-srsenb.html)
|
||||
- [Open5GS with Service Communication Proxy in kubernetes](https://gradiant.github.io/openverso-charts/open5gs-scp.html)
|
||||
- [Open5GS and srsRAN-5G in kubernetes](https://gradiant.github.io/5g-charts/open5gs-srsran-5g-zmq.html)
|
||||
- [Open5GS and srsLTE in kubernetes](https://gradiant.github.io/5g-charts/open5gs-srslte.html)
|
||||
- [Open5GS and UERANSIM](https://gradiant.github.io/5g-charts/open5gs-ueransim-gnb.html)
|
||||
- [Open5GS and PacketRusher](https://gradiant.github.io/5g-charts/open5gs-packetrusher.html)
|
||||
- [Open5GS and OAI-GNB](https://gradiant.github.io/5g-charts/open5gs-oaignb.html)
|
||||
- [Open5GS and srsenb](https://gradiant.github.io/5g-charts/open5gs-srsenb.html)
|
||||
- [Open5GS with SCP(Service Communication Proxy](https://gradiant.github.io/5g-charts/open5gs-scp.html)
|
||||
|
|
|
@ -25,7 +25,8 @@ Example of sgw.yaml to use this feature:
|
|||
|
||||
```
|
||||
logger:
|
||||
file: /var/log/open5gs/sgw.log
|
||||
file:
|
||||
path: /var/log/open5gs/sgw.log
|
||||
level: debug
|
||||
|
||||
parameter:
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "v2.7.1 - Bug Fixed"
|
||||
date: 2024-04-19 21:23:00 +0900
|
||||
categories:
|
||||
- Release
|
||||
tags:
|
||||
- News
|
||||
- Release
|
||||
head_inline: "<style> ul { padding-bottom: 1em; } .blue { color: blue; }</style>"
|
||||
---
|
||||
|
||||
See [Release Note](https://github.com/open5gs/open5gs/releases/tag/v2.7.1)
|
||||
|
||||
Download -- [v2.7.1.tar.gz](https://github.com/open5gs/open5gs/archive/v2.7.1.tar.gz)
|
||||
{: .notice--info}
|
|
@ -408,8 +408,8 @@ static int local_conf_prepare(void)
|
|||
* Heartbeat Interval(e.g: 10 seconds) + No Heartbeat Margin(1 second) */
|
||||
local_conf.time.nf_instance.no_heartbeat_margin = 1;
|
||||
|
||||
/* 3600 seconds = 1 hour */
|
||||
local_conf.time.nf_instance.validity_duration = 3600;
|
||||
/* 30 seconds */
|
||||
local_conf.time.nf_instance.validity_duration = 30;
|
||||
|
||||
/* 86400 seconds = 1 day */
|
||||
local_conf.time.subscription.validity_duration = 86400;
|
||||
|
|
|
@ -36,10 +36,15 @@ typedef struct ogs_app_context_s {
|
|||
|
||||
const char *db_uri;
|
||||
|
||||
struct {
|
||||
ogs_log_ts_e timestamp;
|
||||
} logger_default;
|
||||
|
||||
struct {
|
||||
const char *file;
|
||||
const char *level;
|
||||
const char *domain;
|
||||
ogs_log_ts_e timestamp;
|
||||
} logger;
|
||||
|
||||
ogs_queue_t *queue;
|
||||
|
|
|
@ -114,6 +114,9 @@ int ogs_app_initialize(
|
|||
ogs_app()->logger.domain, ogs_app()->logger.level);
|
||||
if (rv != OGS_OK) return rv;
|
||||
|
||||
ogs_log_set_timestamp(ogs_app()->logger_default.timestamp,
|
||||
ogs_app()->logger.timestamp);
|
||||
|
||||
/**************************************************************************
|
||||
* Stage 5 : Setup Database Module
|
||||
*/
|
||||
|
@ -254,6 +257,57 @@ static int context_validation(void)
|
|||
return OGS_OK;
|
||||
}
|
||||
|
||||
static void parse_config_logger_file(ogs_yaml_iter_t *logger_iter,
|
||||
const char *logger_key)
|
||||
{
|
||||
ogs_yaml_iter_t iter;
|
||||
|
||||
/* Legacy format:
|
||||
* logger:
|
||||
* file: /var/log/open5gs/mme.log */
|
||||
if (!strcmp(logger_key, "file") && ogs_yaml_iter_has_value(logger_iter)) {
|
||||
ogs_app()->logger.file = ogs_yaml_iter_value(logger_iter);
|
||||
|
||||
ogs_warn("Please change the configuration file as below.");
|
||||
ogs_log_print(OGS_LOG_WARN, "\n<OLD Format>\n");
|
||||
ogs_log_print(OGS_LOG_WARN, "logger:\n");
|
||||
ogs_log_print(OGS_LOG_WARN, " file: %s\n", ogs_app()->logger.file);
|
||||
ogs_log_print(OGS_LOG_WARN, "\n<NEW Format>\n");
|
||||
ogs_log_print(OGS_LOG_WARN, "logger:\n");
|
||||
ogs_log_print(OGS_LOG_WARN, " file:\n");
|
||||
ogs_log_print(OGS_LOG_WARN, " path: %s\n", ogs_app()->logger.file);
|
||||
ogs_log_print(OGS_LOG_WARN, "\n\n\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Current format:
|
||||
* logger:
|
||||
* default:
|
||||
* timestamp: false
|
||||
* file:
|
||||
* path: /var/log/open5gs/mme.log
|
||||
* timestamp: true */
|
||||
ogs_yaml_iter_recurse(logger_iter, &iter);
|
||||
while (ogs_yaml_iter_next(&iter)) {
|
||||
const char *key = ogs_yaml_iter_key(&iter);
|
||||
ogs_assert(key);
|
||||
if (!strcmp(key, "timestamp")) {
|
||||
ogs_log_ts_e ts = ogs_yaml_iter_bool(&iter)
|
||||
? OGS_LOG_TS_ENABLED
|
||||
: OGS_LOG_TS_DISABLED;
|
||||
if (!strcmp(logger_key, "default")) {
|
||||
ogs_app()->logger_default.timestamp = ts;
|
||||
} else if (!strcmp(logger_key, "file")) {
|
||||
ogs_app()->logger.timestamp = ts;
|
||||
}
|
||||
} else if (!strcmp(key, "path")) {
|
||||
if (!strcmp(logger_key, "file")) {
|
||||
ogs_app()->logger.file = ogs_yaml_iter_value(&iter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int parse_config(void)
|
||||
{
|
||||
int rv;
|
||||
|
@ -278,9 +332,8 @@ static int parse_config(void)
|
|||
while (ogs_yaml_iter_next(&logger_iter)) {
|
||||
const char *logger_key = ogs_yaml_iter_key(&logger_iter);
|
||||
ogs_assert(logger_key);
|
||||
if (!strcmp(logger_key, "file")) {
|
||||
ogs_app()->logger.file = ogs_yaml_iter_value(&logger_iter);
|
||||
} else if (!strcmp(logger_key, "level")) {
|
||||
parse_config_logger_file(&logger_iter, logger_key);
|
||||
if (!strcmp(logger_key, "level")) {
|
||||
ogs_app()->logger.level =
|
||||
ogs_yaml_iter_value(&logger_iter);
|
||||
} else if (!strcmp(logger_key, "domain")) {
|
||||
|
|
|
@ -178,6 +178,34 @@ const char *ogs_yaml_iter_value(ogs_yaml_iter_t *iter)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int ogs_yaml_iter_has_value(ogs_yaml_iter_t *iter)
|
||||
{
|
||||
ogs_assert(iter);
|
||||
ogs_assert(iter->document);
|
||||
ogs_assert(iter->node);
|
||||
|
||||
if (iter->node->type == YAML_SCALAR_NODE) {
|
||||
return 1;
|
||||
} else if (iter->node->type == YAML_MAPPING_NODE) {
|
||||
yaml_node_t *node = NULL;
|
||||
|
||||
ogs_assert(iter->pair);
|
||||
node = yaml_document_get_node(iter->document, iter->pair->value);
|
||||
ogs_assert(node);
|
||||
return node->type == YAML_SCALAR_NODE;
|
||||
} else if (iter->node->type == YAML_SEQUENCE_NODE) {
|
||||
yaml_node_t *node = NULL;
|
||||
|
||||
ogs_assert(iter->item);
|
||||
node = yaml_document_get_node(iter->document, *iter->item);
|
||||
ogs_assert(node);
|
||||
return node->type == YAML_SCALAR_NODE;
|
||||
}
|
||||
|
||||
ogs_assert_if_reached();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ogs_yaml_iter_bool(ogs_yaml_iter_t *iter)
|
||||
{
|
||||
const char *v = ogs_yaml_iter_value(iter);
|
||||
|
|
|
@ -59,6 +59,7 @@ void ogs_yaml_iter_recurse(ogs_yaml_iter_t *parent, ogs_yaml_iter_t *iter);
|
|||
int ogs_yaml_iter_type(ogs_yaml_iter_t *iter);
|
||||
const char *ogs_yaml_iter_key(ogs_yaml_iter_t *iter);
|
||||
const char *ogs_yaml_iter_value(ogs_yaml_iter_t *iter);
|
||||
int ogs_yaml_iter_has_value(ogs_yaml_iter_t *iter);
|
||||
int ogs_yaml_iter_bool(ogs_yaml_iter_t *iter);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -18,6 +18,7 @@ asn_TYPE_operation_t asn_OP_ANY = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
OCTET_STRING_compare,
|
||||
OCTET_STRING_copy,
|
||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||
OCTET_STRING_decode_ber,
|
||||
OCTET_STRING_encode_der,
|
||||
|
@ -33,9 +34,11 @@ asn_TYPE_operation_t asn_OP_ANY = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
OCTET_STRING_decode_jer_hex,
|
||||
ANY_encode_jer,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
0,
|
||||
|
|
|
@ -29,6 +29,7 @@ extern asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs;
|
|||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
|
||||
#define ANY_compare OCTET_STRING_compare
|
||||
#define ANY_copy OCTET_STRING_copy
|
||||
|
||||
#define ANY_constraint asn_generic_no_constraint
|
||||
|
||||
|
@ -43,6 +44,7 @@ xer_type_encoder_f ANY_encode_xer;
|
|||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
jer_type_decoder_f ANY_decode_jer;
|
||||
jer_type_encoder_f ANY_encode_jer;
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ asn_TYPE_operation_t asn_OP_BIT_STRING = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
BIT_STRING_compare,
|
||||
BIT_STRING_copy,
|
||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
||||
OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */
|
||||
|
@ -39,9 +40,11 @@ asn_TYPE_operation_t asn_OP_BIT_STRING = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
OCTET_STRING_decode_jer_hex,
|
||||
BIT_STRING_encode_jer,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
BIT_STRING_decode_oer,
|
||||
|
@ -211,3 +214,37 @@ BIT_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
BIT_STRING_copy(const asn_TYPE_descriptor_t *td, void **aptr,
|
||||
const void *bptr) {
|
||||
const asn_OCTET_STRING_specifics_t *specs = td->specifics;
|
||||
BIT_STRING_t *a = (BIT_STRING_t *)*aptr;
|
||||
const BIT_STRING_t *b = (const BIT_STRING_t *)bptr;
|
||||
|
||||
if(!b) {
|
||||
if(a) {
|
||||
FREEMEM(a->buf);
|
||||
FREEMEM(a);
|
||||
*aptr = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(!a) {
|
||||
a = *aptr = CALLOC(1, specs->struct_size);
|
||||
if(!a) return -1;
|
||||
}
|
||||
|
||||
uint8_t* buf = MALLOC(b->size + 1);
|
||||
if(!buf) return -1;
|
||||
memcpy(buf, b->buf, b->size);
|
||||
buf[b->size] = 0;
|
||||
|
||||
FREEMEM(a->buf);
|
||||
a->buf = buf;
|
||||
a->size = b->size;
|
||||
a->bits_unused = b->bits_unused;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ asn_struct_print_f BIT_STRING_print; /* Human-readable output */
|
|||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
|
||||
asn_struct_compare_f BIT_STRING_compare;
|
||||
asn_struct_copy_f BIT_STRING_copy;
|
||||
|
||||
asn_constr_check_f BIT_STRING_constraint;
|
||||
|
||||
|
@ -45,6 +46,7 @@ xer_type_encoder_f BIT_STRING_encode_xer;
|
|||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
#define BIT_STRING_decode_jer OCTET_STRING_decode_jer_binary
|
||||
jer_type_encoder_f BIT_STRING_encode_jer;
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
/*-
|
||||
* Copyright (c) 2003, 2005, 2006 Lev Walkin <vlm@lionet.info>.
|
||||
* All rights reserved.
|
||||
* Redistribution and modifications are permitted subject to BSD license.
|
||||
*/
|
||||
#include <asn_internal.h>
|
||||
#include <ENUMERATED.h>
|
||||
|
||||
/*
|
||||
* ENUMERATED basic type description.
|
||||
*/
|
||||
static const ber_tlv_tag_t asn_DEF_ENUMERATED_tags[] = {
|
||||
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
|
||||
};
|
||||
asn_TYPE_operation_t asn_OP_ENUMERATED = {
|
||||
ASN__PRIMITIVE_TYPE_free,
|
||||
#if !defined(ASN_DISABLE_PRINT_SUPPORT)
|
||||
INTEGER_print, /* Implemented in terms of INTEGER */
|
||||
#else
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
INTEGER_compare, /* Implemented in terms of INTEGER */
|
||||
INTEGER_copy, /* Implemented in terms of INTEGER */
|
||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||
ber_decode_primitive,
|
||||
INTEGER_encode_der, /* Implemented in terms of INTEGER */
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_XER_SUPPORT)
|
||||
INTEGER_decode_xer, /* This is temporary! */
|
||||
INTEGER_encode_xer,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
ENUMERATED_decode_jer,
|
||||
INTEGER_encode_jer,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
ENUMERATED_decode_oer,
|
||||
ENUMERATED_encode_oer,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_UPER_SUPPORT)
|
||||
ENUMERATED_decode_uper, /* Unaligned PER decoder */
|
||||
ENUMERATED_encode_uper, /* Unaligned PER encoder */
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_APER_SUPPORT)
|
||||
ENUMERATED_decode_aper, /* Aligned PER decoder */
|
||||
ENUMERATED_encode_aper, /* Aligned PER encoder */
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_RFILL_SUPPORT)
|
||||
ENUMERATED_random_fill,
|
||||
#else
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */
|
||||
0 /* Use generic outmost tag fetcher */
|
||||
};
|
||||
asn_TYPE_descriptor_t asn_DEF_ENUMERATED = {
|
||||
"ENUMERATED",
|
||||
"ENUMERATED",
|
||||
&asn_OP_ENUMERATED,
|
||||
asn_DEF_ENUMERATED_tags,
|
||||
sizeof(asn_DEF_ENUMERATED_tags) / sizeof(asn_DEF_ENUMERATED_tags[0]),
|
||||
asn_DEF_ENUMERATED_tags, /* Same as above */
|
||||
sizeof(asn_DEF_ENUMERATED_tags) / sizeof(asn_DEF_ENUMERATED_tags[0]),
|
||||
{
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
|
||||
asn_generic_no_constraint
|
||||
},
|
||||
0, 0, /* No members */
|
||||
0 /* No specifics */
|
||||
};
|
|
@ -0,0 +1,67 @@
|
|||
/*-
|
||||
* Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved.
|
||||
* Redistribution and modifications are permitted subject to BSD license.
|
||||
*/
|
||||
#ifndef _ENUMERATED_H_
|
||||
#define _ENUMERATED_H_
|
||||
|
||||
#include <INTEGER.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef INTEGER_t ENUMERATED_t; /* Implemented via INTEGER */
|
||||
|
||||
extern asn_TYPE_descriptor_t asn_DEF_ENUMERATED;
|
||||
extern asn_TYPE_operation_t asn_OP_ENUMERATED;
|
||||
|
||||
#define ENUMERATED_free ASN__PRIMITIVE_TYPE_free
|
||||
|
||||
#if !defined(ASN_DISABLE_PRINT_SUPPORT)
|
||||
#define ENUMERATED_print INTEGER_print
|
||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
|
||||
#define ENUMERATED_compare INTEGER_compare
|
||||
#define ENUMERATED_copy INTEGER_copy
|
||||
|
||||
#define ENUMERATED_constraint asn_generic_no_constraint
|
||||
|
||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||
#define ENUMERATED_decode_ber ber_decode_primitive
|
||||
#define ENUMERATED_encode_der INTEGER_encode_der
|
||||
#endif /* !defined(ASN_DISABLE_BER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_XER_SUPPORT)
|
||||
#define ENUMERATED_decode_xer INTEGER_decode_xer
|
||||
#define ENUMERATED_encode_xer INTEGER_encode_xer
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
jer_type_decoder_f ENUMERATED_decode_jer;
|
||||
#define ENUMERATED_encode_jer INTEGER_encode_jer
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
oer_type_decoder_f ENUMERATED_decode_oer;
|
||||
oer_type_encoder_f ENUMERATED_encode_oer;
|
||||
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_UPER_SUPPORT)
|
||||
per_type_decoder_f ENUMERATED_decode_uper;
|
||||
per_type_encoder_f ENUMERATED_encode_uper;
|
||||
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_APER_SUPPORT)
|
||||
per_type_decoder_f ENUMERATED_decode_aper;
|
||||
per_type_encoder_f ENUMERATED_encode_aper;
|
||||
#endif /* !defined(ASN_DISABLE_APER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_RFILL_SUPPORT)
|
||||
#define ENUMERATED_random_fill INTEGER_random_fill
|
||||
#endif /* !defined(ASN_DISABLE_RFILL_SUPPORT) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ENUMERATED_H_ */
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Copyright (c) 2017 Lev Walkin <vlm@lionet.info>.
|
||||
* All rights reserved.
|
||||
* Redistribution and modifications are permitted subject to BSD license.
|
||||
*/
|
||||
#include <asn_internal.h>
|
||||
#include <ENUMERATED.h>
|
||||
#include <NativeEnumerated.h>
|
||||
|
||||
asn_dec_rval_t
|
||||
ENUMERATED_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
||||
const asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
|
||||
asn_dec_rval_t rval;
|
||||
ENUMERATED_t *st = (ENUMERATED_t *)*sptr;
|
||||
long value;
|
||||
void *vptr = &value;
|
||||
|
||||
if(!st) {
|
||||
st = (ENUMERATED_t *)(*sptr = CALLOC(1, sizeof(*st)));
|
||||
if(!st) ASN__DECODE_FAILED;
|
||||
}
|
||||
|
||||
rval = NativeEnumerated_decode_aper(opt_codec_ctx, td, constraints,
|
||||
(void **)&vptr, pd);
|
||||
if(rval.code == RC_OK)
|
||||
if(asn_long2INTEGER(st, value))
|
||||
rval.code = RC_FAIL;
|
||||
return rval;
|
||||
}
|
||||
|
||||
asn_enc_rval_t
|
||||
ENUMERATED_encode_aper(const asn_TYPE_descriptor_t *td,
|
||||
const asn_per_constraints_t *constraints,
|
||||
const void *sptr, asn_per_outp_t *po) {
|
||||
const ENUMERATED_t *st = (const ENUMERATED_t *)sptr;
|
||||
long value;
|
||||
|
||||
if(asn_INTEGER2long(st, &value))
|
||||
ASN__ENCODE_FAILED;
|
||||
|
||||
return NativeEnumerated_encode_aper(td, constraints, &value, po);
|
||||
}
|
|
@ -20,6 +20,7 @@ asn_TYPE_operation_t asn_OP_GraphicString = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
OCTET_STRING_compare,
|
||||
OCTET_STRING_copy,
|
||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||
OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */
|
||||
OCTET_STRING_encode_der,
|
||||
|
@ -35,9 +36,11 @@ asn_TYPE_operation_t asn_OP_GraphicString = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
OCTET_STRING_decode_jer_hex,
|
||||
OCTET_STRING_encode_jer, /* Can't expect it to be ASCII/UTF8 */
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
OCTET_STRING_decode_oer,
|
||||
|
|
|
@ -23,6 +23,7 @@ extern asn_TYPE_operation_t asn_OP_GraphicString;
|
|||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
|
||||
#define GraphicString_compare OCTET_STRING_compare
|
||||
#define GraphicString_copy OCTET_STRING_copy
|
||||
|
||||
#define GraphicString_constraint asn_generic_unknown_constraint
|
||||
|
||||
|
@ -37,6 +38,7 @@ extern asn_TYPE_operation_t asn_OP_GraphicString;
|
|||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
#define GraphicString_decode_jer OCTET_STRING_decode_jer
|
||||
#define GraphicString_encode_jer OCTET_STRING_encode_jer
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ asn_TYPE_operation_t asn_OP_INTEGER = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
INTEGER_compare,
|
||||
INTEGER_copy,
|
||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||
ber_decode_primitive,
|
||||
INTEGER_encode_der,
|
||||
|
@ -37,9 +38,11 @@ asn_TYPE_operation_t asn_OP_INTEGER = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
INTEGER_decode_jer,
|
||||
INTEGER_encode_jer,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
INTEGER_decode_oer, /* OER decoder */
|
||||
|
@ -411,6 +414,33 @@ asn_ulong2INTEGER(INTEGER_t *st, unsigned long value) {
|
|||
return asn_imax2INTEGER(st, value);
|
||||
}
|
||||
|
||||
int asn_INTEGER2int64(const INTEGER_t *st, int64_t *value) {
|
||||
intmax_t v;
|
||||
if(asn_INTEGER2imax(st, &v) == 0) {
|
||||
if(v < INT64_MIN || v > INT64_MAX) {
|
||||
errno = ERANGE;
|
||||
return -1;
|
||||
}
|
||||
*value = v;
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int asn_INTEGER2uint64(const INTEGER_t *st, uint64_t *value) {
|
||||
uintmax_t v;
|
||||
if(asn_INTEGER2umax(st, &v) == 0) {
|
||||
if(v > UINT64_MAX) {
|
||||
errno = ERANGE;
|
||||
return -1;
|
||||
}
|
||||
*value = v;
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
asn_uint642INTEGER(INTEGER_t *st, uint64_t value) {
|
||||
|
@ -736,3 +766,40 @@ INTEGER_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
INTEGER_copy(const asn_TYPE_descriptor_t *td, void **aptr,
|
||||
const void *bptr) {
|
||||
(void)td;
|
||||
INTEGER_t *a = *aptr;
|
||||
const INTEGER_t *b = bptr;
|
||||
|
||||
if(!b) {
|
||||
if(a) {
|
||||
FREEMEM(a->buf);
|
||||
FREEMEM(a);
|
||||
*aptr = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(!a) {
|
||||
a = *aptr = CALLOC(1, sizeof(*a));
|
||||
if(!a) return -1;
|
||||
}
|
||||
|
||||
if(b->size) {
|
||||
uint8_t* buf = MALLOC(b->size);
|
||||
if(!buf) return -1;
|
||||
memcpy(buf, b->buf, b->size);
|
||||
FREEMEM(a->buf);
|
||||
a->buf = buf;
|
||||
a->size = b->size;
|
||||
} else {
|
||||
FREEMEM(a->buf);
|
||||
a->buf = 0;
|
||||
a->size = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ asn_struct_print_f INTEGER_print;
|
|||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
|
||||
asn_struct_compare_f INTEGER_compare;
|
||||
asn_struct_copy_f INTEGER_copy;
|
||||
|
||||
#define INTEGER_constraint asn_generic_no_constraint
|
||||
|
||||
|
@ -61,6 +62,7 @@ xer_type_encoder_f INTEGER_encode_xer;
|
|||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
jer_type_decoder_f INTEGER_decode_jer;
|
||||
jer_type_encoder_f INTEGER_encode_jer;
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
|
||||
|
@ -106,6 +108,8 @@ int asn_INTEGER2long(const INTEGER_t *i, long *l);
|
|||
int asn_INTEGER2ulong(const INTEGER_t *i, unsigned long *l);
|
||||
int asn_long2INTEGER(INTEGER_t *i, long l);
|
||||
int asn_ulong2INTEGER(INTEGER_t *i, unsigned long l);
|
||||
int asn_INTEGER2int64(const INTEGER_t *i, int64_t *l);
|
||||
int asn_INTEGER2uint64(const INTEGER_t *i, uint64_t *l);
|
||||
int asn_int642INTEGER(INTEGER_t *i, int64_t l);
|
||||
int asn_uint642INTEGER(INTEGER_t *i, uint64_t l);
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ INTEGER_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
|||
int max_range_bytes = (ct->range_bits >> 3) +
|
||||
(((ct->range_bits % 8) > 0) ? 1 : 0);
|
||||
int length = 0, i;
|
||||
long value = 0;
|
||||
intmax_t value = 0;
|
||||
|
||||
for (i = 1; ; i++) {
|
||||
int upper = 1 << i;
|
||||
|
@ -79,18 +79,18 @@ INTEGER_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
|||
int buf = per_get_few_bits(pd, 8);
|
||||
if (buf < 0)
|
||||
ASN__DECODE_FAILED;
|
||||
value += (((long)buf) << (8 * length));
|
||||
value += (((intmax_t)buf) << (8 * length));
|
||||
}
|
||||
|
||||
value += ct->lower_bound;
|
||||
if((specs && specs->field_unsigned)
|
||||
? asn_uint642INTEGER(st, (unsigned long)value)
|
||||
: asn_int642INTEGER(st, value))
|
||||
? asn_umax2INTEGER(st, (uintmax_t)value)
|
||||
: asn_imax2INTEGER(st, value))
|
||||
ASN__DECODE_FAILED;
|
||||
ASN_DEBUG("Got value %ld + low %lld",
|
||||
value, (long long int)ct->lower_bound);
|
||||
value, (intmax_t)ct->lower_bound);
|
||||
} else {
|
||||
long value = 0;
|
||||
intmax_t value = 0;
|
||||
if (ct->range_bits < 8) {
|
||||
value = per_get_few_bits(pd, ct->range_bits);
|
||||
if(value < 0) ASN__DECODE_STARVED;
|
||||
|
@ -108,11 +108,11 @@ INTEGER_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
|||
}
|
||||
value += ct->lower_bound;
|
||||
if((specs && specs->field_unsigned)
|
||||
? asn_ulong2INTEGER(st, value)
|
||||
: asn_long2INTEGER(st, value))
|
||||
? asn_umax2INTEGER(st, (uintmax_t)value)
|
||||
: asn_imax2INTEGER(st, value))
|
||||
ASN__DECODE_FAILED;
|
||||
ASN_DEBUG("Got value %ld + low %lld",
|
||||
value, (long long int)ct->lower_bound);
|
||||
value, (intmax_t)ct->lower_bound);
|
||||
}
|
||||
return rval;
|
||||
} else {
|
||||
|
@ -167,7 +167,7 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
|||
const uint8_t *buf;
|
||||
const uint8_t *end;
|
||||
const asn_per_constraint_t *ct;
|
||||
long value = 0;
|
||||
intmax_t value = 0;
|
||||
|
||||
if(!st || st->size == 0) ASN__ENCODE_FAILED;
|
||||
|
||||
|
@ -179,26 +179,26 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
|||
if(ct) {
|
||||
int inext = 0;
|
||||
if(specs && specs->field_unsigned) {
|
||||
unsigned long uval;
|
||||
if(asn_INTEGER2ulong(st, &uval))
|
||||
uintmax_t uval;
|
||||
if(asn_INTEGER2umax(st, &uval))
|
||||
ASN__ENCODE_FAILED;
|
||||
/* Check proper range */
|
||||
if(ct->flags & APC_SEMI_CONSTRAINED) {
|
||||
if(uval < (unsigned long)ct->lower_bound)
|
||||
if(uval < (uintmax_t)ct->lower_bound)
|
||||
inext = 1;
|
||||
} else if(ct->range_bits >= 0) {
|
||||
if(uval < (unsigned long)ct->lower_bound
|
||||
|| uval > (unsigned long)ct->upper_bound)
|
||||
if(uval < (uintmax_t)ct->lower_bound
|
||||
|| uval > (uintmax_t)ct->upper_bound)
|
||||
inext = 1;
|
||||
}
|
||||
ASN_DEBUG("Value %lu (%02x/%zu) lb %lld ub %lld %s",
|
||||
uval, st->buf[0], st->size,
|
||||
(long long int)ct->lower_bound,
|
||||
(long long int)ct->upper_bound,
|
||||
(intmax_t)ct->lower_bound,
|
||||
(intmax_t)ct->upper_bound,
|
||||
inext ? "ext" : "fix");
|
||||
value = uval;
|
||||
} else {
|
||||
if(asn_INTEGER2long(st, &value)) ASN__ENCODE_FAILED;
|
||||
if(asn_INTEGER2imax(st, &value)) ASN__ENCODE_FAILED;
|
||||
/* Check proper range */
|
||||
if(ct->flags & APC_SEMI_CONSTRAINED) {
|
||||
if(value < ct->lower_bound)
|
||||
|
@ -210,8 +210,8 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
|||
}
|
||||
ASN_DEBUG("Value %lu (%02x/%zu) lb %lld ub %lld %s",
|
||||
value, st->buf[0], st->size,
|
||||
(long long int)ct->lower_bound,
|
||||
(long long int)ct->upper_bound,
|
||||
(intmax_t)ct->lower_bound,
|
||||
(intmax_t)ct->upper_bound,
|
||||
inext ? "ext" : "fix");
|
||||
}
|
||||
if(ct->flags & APC_EXTENSIBLE) {
|
||||
|
@ -225,11 +225,11 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
|||
|
||||
/* X.691, #12.2.2 */
|
||||
if(ct && ct->range_bits >= 0) {
|
||||
unsigned long v;
|
||||
uintmax_t v;
|
||||
|
||||
/* #10.5.6 */
|
||||
ASN_DEBUG("Encoding integer %ld (%lld) with range %d bits",
|
||||
value, (long long int)(value - ct->lower_bound),
|
||||
value, (intmax_t)(value - ct->lower_bound),
|
||||
ct->range_bits);
|
||||
|
||||
v = value - ct->lower_bound;
|
||||
|
@ -287,7 +287,7 @@ INTEGER_encode_aper(const asn_TYPE_descriptor_t *td,
|
|||
}
|
||||
|
||||
if(ct && ct->lower_bound) {
|
||||
ASN_DEBUG("Adjust lower bound to %lld", (long long int)ct->lower_bound);
|
||||
ASN_DEBUG("Adjust lower bound to %lld", (intmax_t)ct->lower_bound);
|
||||
/* TODO: adjust lower bound */
|
||||
ASN__ENCODE_FAILED;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ asn_TYPE_operation_t asn_OP_NULL = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
NULL_compare,
|
||||
NULL_copy,
|
||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||
NULL_decode_ber,
|
||||
NULL_encode_der, /* Special handling of DER encoding */
|
||||
|
@ -34,9 +35,11 @@ asn_TYPE_operation_t asn_OP_NULL = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
NULL_decode_jer,
|
||||
NULL_encode_jer,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
NULL_decode_oer,
|
||||
|
@ -111,3 +114,15 @@ NULL_compare(const asn_TYPE_descriptor_t *td, const void *a, const void *b) {
|
|||
(void)b;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
NULL_copy(const asn_TYPE_descriptor_t *td, void **a, const void *b) {
|
||||
(void)td;
|
||||
|
||||
if(b && !*a) {
|
||||
*a = CALLOC(1, sizeof(NULL_t));
|
||||
if (!*a) return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ asn_struct_print_f NULL_print;
|
|||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
|
||||
asn_struct_compare_f NULL_compare;
|
||||
asn_struct_copy_f NULL_copy;
|
||||
|
||||
#define NULL_constraint asn_generic_no_constraint
|
||||
|
||||
|
@ -41,6 +42,7 @@ xer_type_encoder_f NULL_encode_xer;
|
|||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
jer_type_decoder_f NULL_decode_jer;
|
||||
jer_type_encoder_f NULL_encode_jer;
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ asn_TYPE_operation_t asn_OP_NativeEnumerated = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
NativeInteger_compare,
|
||||
NativeInteger_copy,
|
||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||
NativeInteger_decode_ber,
|
||||
NativeInteger_encode_der,
|
||||
|
@ -41,9 +42,11 @@ asn_TYPE_operation_t asn_OP_NativeEnumerated = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
NativeEnumerated_decode_jer,
|
||||
NativeEnumerated_encode_jer,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
NativeEnumerated_decode_oer,
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#define _NativeEnumerated_H_
|
||||
|
||||
#include <NativeInteger.h>
|
||||
#include <ENUMERATED.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -28,6 +29,7 @@ extern asn_TYPE_operation_t asn_OP_NativeEnumerated;
|
|||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
|
||||
#define NativeEnumerated_compare NativeInteger_compare
|
||||
#define NativeEnumerated_copy NativeInteger_copy
|
||||
|
||||
#define NativeEnumerated_constraint asn_generic_no_constraint
|
||||
|
||||
|
@ -42,6 +44,7 @@ xer_type_encoder_f NativeEnumerated_encode_xer;
|
|||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
jer_type_decoder_f NativeEnumerated_decode_jer;
|
||||
jer_type_encoder_f NativeEnumerated_encode_jer;
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ NativeEnumerated_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
|||
*/
|
||||
|
||||
/* XXX handle indefinite index length > 64k */
|
||||
value = aper_get_nsnnwn(pd, 65537);
|
||||
value = aper_get_nsnnwn(pd);
|
||||
if(value < 0) ASN__DECODE_STARVED;
|
||||
value += specs->extension - 1;
|
||||
//if(value >= specs->map_count)
|
||||
|
@ -148,9 +148,7 @@ NativeEnumerated_encode_aper(const asn_TYPE_descriptor_t *td,
|
|||
ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld",
|
||||
value, specs->extension, inext,
|
||||
value - (inext ? (specs->extension - 1) : 0));
|
||||
if(aper_put_nsnnwn(po,
|
||||
ct->upper_bound - ct->lower_bound + 1,
|
||||
value - (inext ? (specs->extension - 1) : 0)))
|
||||
if(aper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0)))
|
||||
ASN__ENCODE_FAILED;
|
||||
|
||||
ASN__ENCODED_OK(er);
|
||||
|
|
|
@ -27,6 +27,7 @@ asn_TYPE_operation_t asn_OP_NativeInteger = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
NativeInteger_compare,
|
||||
NativeInteger_copy,
|
||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||
NativeInteger_decode_ber,
|
||||
NativeInteger_encode_der,
|
||||
|
@ -42,9 +43,11 @@ asn_TYPE_operation_t asn_OP_NativeInteger = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
NativeInteger_decode_jer,
|
||||
NativeInteger_encode_jer,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
NativeInteger_decode_oer, /* OER decoder */
|
||||
|
@ -150,3 +153,30 @@ NativeInteger_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const v
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
NativeInteger_copy(const asn_TYPE_descriptor_t *td, void **aptr, const void *bptr) {
|
||||
unsigned long *a = *aptr;
|
||||
const unsigned long *b = bptr;
|
||||
|
||||
(void)td;
|
||||
|
||||
/* Check if source has data */
|
||||
if(!b) {
|
||||
/* Clear destination */
|
||||
if(a) {
|
||||
FREEMEM(a);
|
||||
*aptr = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(!a) {
|
||||
a = *aptr = MALLOC(sizeof(*a));
|
||||
if(!a) return -1;
|
||||
}
|
||||
|
||||
*a = *b;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ asn_struct_print_f NativeInteger_print;
|
|||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
|
||||
asn_struct_compare_f NativeInteger_compare;
|
||||
asn_struct_copy_f NativeInteger_copy;
|
||||
|
||||
#define NativeInteger_constraint asn_generic_no_constraint
|
||||
|
||||
|
@ -43,6 +44,7 @@ xer_type_encoder_f NativeInteger_encode_xer;
|
|||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
jer_type_decoder_f NativeInteger_decode_jer;
|
||||
jer_type_encoder_f NativeInteger_encode_jer;
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
|
||||
|
|
|
@ -63,8 +63,10 @@ NativeInteger_random_fill(const asn_TYPE_descriptor_t *td, void **sptr,
|
|||
0, sizeof(variants) / sizeof(variants[0]) - 1)];
|
||||
}
|
||||
|
||||
if(!constraints) constraints = &td->encoding_constraints;
|
||||
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
|
||||
if(!constraints || !constraints->per_constraints)
|
||||
constraints = &td->encoding_constraints;
|
||||
|
||||
const asn_per_constraints_t *ct;
|
||||
|
||||
ct = constraints ? constraints->per_constraints : 0;
|
||||
|
@ -74,6 +76,8 @@ NativeInteger_random_fill(const asn_TYPE_descriptor_t *td, void **sptr,
|
|||
ct->value.upper_bound);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if(!constraints) constraints = &td->encoding_constraints;
|
||||
#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
OCTET_STRING_compare, /* Implemented in terms of a string comparison */
|
||||
OCTET_STRING_copy, /* Implemented in terms of a string copy */
|
||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||
ber_decode_primitive,
|
||||
der_encode_primitive,
|
||||
|
@ -39,9 +40,11 @@ asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
OBJECT_IDENTIFIER_decode_jer,
|
||||
OBJECT_IDENTIFIER_encode_jer,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
OBJECT_IDENTIFIER_decode_oer,
|
||||
|
|
|
@ -32,6 +32,7 @@ asn_struct_print_f OBJECT_IDENTIFIER_print;
|
|||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
|
||||
#define OBJECT_IDENTIFIER_compare OCTET_STRING_compare
|
||||
#define OBJECT_IDENTIFIER_copy OCTET_STRING_copy
|
||||
|
||||
asn_constr_check_f OBJECT_IDENTIFIER_constraint;
|
||||
|
||||
|
@ -46,6 +47,7 @@ xer_type_encoder_f OBJECT_IDENTIFIER_encode_xer;
|
|||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
jer_type_decoder_f OBJECT_IDENTIFIER_decode_jer;
|
||||
jer_type_encoder_f OBJECT_IDENTIFIER_encode_jer;
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ asn_TYPE_operation_t asn_OP_OCTET_STRING = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
OCTET_STRING_compare,
|
||||
OCTET_STRING_copy,
|
||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||
OCTET_STRING_decode_ber,
|
||||
OCTET_STRING_encode_der,
|
||||
|
@ -41,9 +42,11 @@ asn_TYPE_operation_t asn_OP_OCTET_STRING = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
OCTET_STRING_decode_jer_hex,
|
||||
OCTET_STRING_encode_jer,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
OCTET_STRING_decode_oer,
|
||||
|
@ -247,6 +250,43 @@ OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
|
|||
|
||||
}
|
||||
|
||||
int
|
||||
OCTET_STRING_copy(const asn_TYPE_descriptor_t *td, void **aptr,
|
||||
const void *bptr) {
|
||||
const asn_OCTET_STRING_specifics_t *specs =
|
||||
td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics
|
||||
: &asn_SPC_OCTET_STRING_specs;
|
||||
OCTET_STRING_t *a = *aptr;
|
||||
const OCTET_STRING_t *b = bptr;
|
||||
|
||||
if(!b) {
|
||||
if(a) {
|
||||
FREEMEM(a->buf);
|
||||
a->buf = 0;
|
||||
a->size = 0;
|
||||
FREEMEM(a);
|
||||
}
|
||||
*aptr = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(!a) {
|
||||
a = *aptr = (OCTET_STRING_t *)CALLOC(1, specs->struct_size);
|
||||
if(!a) return -1;
|
||||
}
|
||||
|
||||
void *buf = MALLOC(b->size + 1);
|
||||
if(!buf) return -1;
|
||||
memcpy(buf, b->buf, b->size);
|
||||
((uint8_t *)buf)[b->size] = '\0';
|
||||
|
||||
FREEMEM(a->buf);
|
||||
a->buf = (uint8_t *)buf;
|
||||
a->size = b->size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
|
||||
int
|
||||
OCTET_STRING_per_get_characters(asn_per_data_t *po, uint8_t *buf,
|
||||
|
|
|
@ -29,6 +29,7 @@ asn_struct_print_f OCTET_STRING_print_utf8;
|
|||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
|
||||
asn_struct_compare_f OCTET_STRING_compare;
|
||||
asn_struct_copy_f OCTET_STRING_copy;
|
||||
|
||||
#define OCTET_STRING_constraint asn_generic_no_constraint
|
||||
|
||||
|
@ -46,6 +47,8 @@ xer_type_encoder_f OCTET_STRING_encode_xer_utf8;
|
|||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
jer_type_decoder_f OCTET_STRING_decode_jer_hex; /* Hexadecimal */
|
||||
jer_type_decoder_f OCTET_STRING_decode_jer_utf8; /* ASCII/UTF-8 */
|
||||
jer_type_encoder_f OCTET_STRING_encode_jer;
|
||||
jer_type_encoder_f OCTET_STRING_encode_jer_utf8;
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
|
|
|
@ -179,7 +179,6 @@ OCTET_STRING_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
|
|||
raw_len = aper_get_length(pd, csiz->lower_bound, csiz->upper_bound,
|
||||
csiz->effective_bits, &repeat);
|
||||
if(raw_len < 0) RETURN(RC_WMORE);
|
||||
raw_len += csiz->lower_bound;
|
||||
|
||||
ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)",
|
||||
(long)csiz->effective_bits, (long)raw_len,
|
||||
|
|
|
@ -14,6 +14,7 @@ asn_TYPE_operation_t asn_OP_OPEN_TYPE = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
OPEN_TYPE_compare,
|
||||
OPEN_TYPE_copy,
|
||||
#if !defined(ASN_DISABLE_BER_SUPPORT)
|
||||
OPEN_TYPE_decode_ber,
|
||||
OPEN_TYPE_encode_der,
|
||||
|
@ -29,9 +30,11 @@ asn_TYPE_operation_t asn_OP_OPEN_TYPE = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
OPEN_TYPE_decode_jer,
|
||||
OPEN_TYPE_encode_jer,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
OPEN_TYPE_decode_oer,
|
||||
|
|
|
@ -33,6 +33,7 @@ extern "C" {
|
|||
#endif /* !defined(ASN_DISABLE_PRINT_SUPPORT) */
|
||||
|
||||
#define OPEN_TYPE_compare CHOICE_compare
|
||||
#define OPEN_TYPE_copy CHOICE_copy
|
||||
|
||||
#define OPEN_TYPE_constraint CHOICE_constraint
|
||||
|
||||
|
@ -59,6 +60,13 @@ asn_dec_rval_t OPEN_TYPE_xer_get(
|
|||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
asn_dec_rval_t OPEN_TYPE_jer_get(
|
||||
const asn_codec_ctx_t *opt_codec_ctx,
|
||||
const asn_TYPE_descriptor_t *parent_type,
|
||||
void *parent_structure,
|
||||
const asn_TYPE_member_t *element,
|
||||
const void *ptr, size_t size);
|
||||
#define OPEN_TYPE_decode_jer NULL
|
||||
#define OPEN_TYPE_encode_jer CHOICE_encode_jer
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
|
||||
|
@ -70,7 +78,10 @@ asn_dec_rval_t OPEN_TYPE_oer_get(
|
|||
asn_TYPE_member_t *element, const void *ptr,
|
||||
size_t size);
|
||||
#define OPEN_TYPE_decode_oer NULL
|
||||
#define OPEN_TYPE_encode_oer CHOICE_encode_oer
|
||||
asn_enc_rval_t OPEN_TYPE_encode_oer(
|
||||
const asn_TYPE_descriptor_t *type_descriptor,
|
||||
const asn_oer_constraints_t *constraints, const void *struct_ptr,
|
||||
asn_app_consume_bytes_f *consume_bytes_cb, void *app_key);
|
||||
#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_UPER_SUPPORT)
|
||||
|
|
|
@ -53,7 +53,8 @@ OPEN_TYPE_aper_get(const asn_codec_ctx_t *opt_codec_ctx,
|
|||
(char *)*memb_ptr2
|
||||
+ elm->type->elements[selected.presence_index - 1].memb_offset;
|
||||
|
||||
rv = aper_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL,
|
||||
rv = aper_open_type_get(opt_codec_ctx, selected.type_descriptor,
|
||||
elm->type->elements[selected.presence_index - 1].encoding_constraints.per_constraints,
|
||||
&inner_value, pd);
|
||||
switch(rv.code) {
|
||||
case RC_OK:
|
||||
|
@ -110,7 +111,7 @@ OPEN_TYPE_encode_aper(const asn_TYPE_descriptor_t *td,
|
|||
memb_ptr = (const char *)sptr + elm->memb_offset;
|
||||
}
|
||||
|
||||
if(aper_open_type_put(elm->type, NULL, memb_ptr, po) < 0) {
|
||||
if(aper_open_type_put(elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po) < 0) {
|
||||
ASN__ENCODE_FAILED;
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue