forked from acouzens/open5gs
Compare commits
152 Commits
Author | SHA1 | Date |
---|---|---|
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 | |
Sukchan Lee | 3886891833 | |
Pau Espin | 609c234f0b | |
Pau Espin | 64598fab2e | |
Pau Espin | 29ea85ca4c | |
Bostjan Meglic | dcdfc970ce | |
Bostjan Meglic | a3afc4764c | |
Bostjan Meglic | e650b66305 | |
jmasterfunk84 | 2583fd3c08 | |
Sukchan Lee | b94173ab41 | |
Gaber Stare | d7b896affb | |
Sukchan Lee | 97e1b1bd30 | |
Pau Espin | 60691b02d2 | |
Sukchan Lee | 4088cdf17d | |
Pau Espin | 52be56b839 | |
Pau Espin | 078bfc90da | |
Pau Espin | feaa86fc9c | |
Pau Espin | afa2c2c9e0 | |
Sukchan Lee | b0cf9fcbe7 | |
Emanuele Di Pascale | 21f99ad08d | |
Emanuele Di Pascale | 77d94c0301 | |
Bostjan Meglic | 84569ccbdc | |
Bostjan Meglic | a4babef9eb | |
herlesupreeth | 48323bd299 | |
Sukchan Lee | be1305b903 | |
Pau Espin | ba59c8309a | |
Bostjan Meglic | 21b7cd487a | |
Bostjan Meglic | ad216c0b77 | |
Pau Espin | 7d60b13d3a | |
Pau Espin | 4ab275ad70 | |
Pau Espin | b3845d5b0b | |
Pau Espin | 2a840297f8 | |
Pau Espin | 3457435071 | |
Sukchan Lee | b1515a16ff | |
Pau Espin | 8f58b55e14 | |
Pau Espin | 27d2f86103 | |
Pau Espin | 389ccaed16 | |
jmasterfunk84 | ad2154ac2a | |
Pau Espin | 1f8f20da34 | |
Pau Espin | 55844d1eed | |
Pau Espin | 9b729b2c6f | |
Pau Espin | 7d9f6181f3 | |
jmasterfunk84 | f0de33833b | |
Sergey Yarin | 0b93bd2ca9 | |
Sukchan Lee | 5d26416cd5 | |
Pau Espin | 6cb20185fa | |
Pau Espin | 3d693da73e | |
Sukchan Lee | 080f5bfd70 | |
Pau Espin | ea7708bcfc | |
Pau Espin | 14932a7254 | |
Pau Espin | 6a9c7f16c1 | |
jmasterfunk84 | 2390a22504 | |
Pau Espin | 75f32e07de | |
Pau Espin | ab51ba9dd5 | |
Pau Espin | 5a31af36e0 | |
Pau Espin | 7728172a83 | |
Pau Espin | 9349743295 | |
Pau Espin | 5061a3aec0 | |
Pau Espin | 414f81fcd5 | |
Stare Gaber | 4655507a00 | |
Sukchan Lee | 4eb4a93cbd | |
Sukchan Lee | dcaccb4105 | |
mitmitmitm | cecb87b346 | |
Pau Espin | 8c01f3387d | |
Pau Espin | 3b6b8ebf4f | |
Sukchan Lee | 1ba3fd3cf8 | |
Pau Espin | b0f381416b | |
Pau Espin | 204ac35a66 | |
Sukchan Lee | 1041f37a34 | |
Oliver Smith | 66c39f2085 | |
Sukchan Lee | 177e561ba8 |
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
|
||||
systemctl reload open5gs-$i
|
||||
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,6 +1,7 @@
|
|||
db_uri: mongodb://localhost/open5gs
|
||||
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:
|
||||
|
@ -83,3 +84,44 @@ scp:
|
|||
# client:
|
||||
# nrf:
|
||||
# - uri: http://127.0.0.10:7777
|
||||
#
|
||||
################################################################################
|
||||
# HTTPS scheme with TLS
|
||||
################################################################################
|
||||
# o Set as default if not individually set
|
||||
# default:
|
||||
# tls:
|
||||
# server:
|
||||
# scheme: https
|
||||
# private_key: @sysconfdir@/open5gs/tls/scp.key
|
||||
# cert: @sysconfdir@/open5gs/tls/scp.crt
|
||||
# client:
|
||||
# scheme: https
|
||||
# cacert: @sysconfdir@/open5gs/tls/ca.crt
|
||||
# sbi:
|
||||
# server:
|
||||
# - address: scp.localdomain
|
||||
# client:
|
||||
# nrf:
|
||||
# - uri: https://nrf.localdomain
|
||||
#
|
||||
# o Add client TLS verification
|
||||
# default:
|
||||
# tls:
|
||||
# server:
|
||||
# scheme: https
|
||||
# private_key: @sysconfdir@/open5gs/tls/scp.key
|
||||
# cert: @sysconfdir@/open5gs/tls/scp.crt
|
||||
# verify_client: true
|
||||
# verify_client_cacert: @sysconfdir@/open5gs/tls/ca.crt
|
||||
# client:
|
||||
# scheme: https
|
||||
# cacert: @sysconfdir@/open5gs/tls/ca.crt
|
||||
# client_private_key: @sysconfdir@/open5gs/tls/scp.key
|
||||
# client_cert: @sysconfdir@/open5gs/tls/scp.crt
|
||||
# sbi:
|
||||
# server:
|
||||
# - address: scp.localdomain
|
||||
# client:
|
||||
# nrf:
|
||||
# - uri: https://nrf.localdomain
|
||||
|
|
|
@ -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,3 +1,33 @@
|
|||
open5gs (2.7.1) unstable; urgency=medium
|
||||
|
||||
* Bug Fixed
|
||||
|
||||
-- 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
|
||||
|
||||
* 5G Roaming with SEPP
|
||||
|
|
|
@ -277,6 +277,7 @@ Depends: ${misc:Depends},
|
|||
open5gs-pcrf (= ${binary:Version}),
|
||||
open5gs-nrf (= ${binary:Version}),
|
||||
open5gs-scp (= ${binary:Version}),
|
||||
open5gs-sepp (= ${binary:Version}),
|
||||
open5gs-ausf (= ${binary:Version}),
|
||||
open5gs-udm (= ${binary:Version}),
|
||||
open5gs-pcf (= ${binary:Version}),
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
usr/bin/open5gs-seppd
|
||||
configs/open5gs/sepp*.yaml etc/open5gs
|
||||
configs/open5gs/tls/sepp*.key etc/open5gs/tls
|
||||
configs/open5gs/tls/sepp*.crt etc/open5gs/tls
|
||||
configs/systemd/open5gs-seppd.service lib/systemd/system
|
|
@ -0,0 +1 @@
|
|||
latest
|
|
@ -20,7 +20,7 @@ services:
|
|||
depends_on:
|
||||
- mongodb
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "9999:9999"
|
||||
environment:
|
||||
- DB_URI=mongodb://mongodb/open5gs
|
||||
- WAIT_HOSTS=mongodb:27017
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../debian
|
|
@ -0,0 +1 @@
|
|||
../ubuntu
|
|
@ -0,0 +1 @@
|
|||
latest
|
|
@ -0,0 +1 @@
|
|||
latest
|
|
@ -13,4 +13,4 @@ RUN chmod +x /wait
|
|||
|
||||
CMD /wait && npm run start
|
||||
|
||||
EXPOSE 3000
|
||||
EXPOSE 9999
|
||||
|
|
|
@ -224,7 +224,7 @@ Okay - you have installed the software, now what to do with it? Well, there are
|
|||
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
|
||||
MongoDB = 127.0.0.1 (subscriber data) - http://localhost:9999
|
||||
|
||||
MME-s1ap = 127.0.0.2 :36412 for S1-MME
|
||||
MME-gtpc = 127.0.0.2 :2123 for S11
|
||||
|
@ -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
|
||||
|
@ -335,10 +335,29 @@ $ 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).
|
||||
You will need to modify the PLMN in your NRF and AMF config, and in case of AMF, further modify the TAC information. 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/nrf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/nrf.yaml.in) to set the Serving PLMN ID.
|
||||
|
||||
```diff
|
||||
$ diff --git a/configs/open5gs/nrf.yaml.in b/configs/open5gs/nrf.yaml.in
|
||||
index cd9e45feb..58e8cbbce 100644
|
||||
--- a/configs/open5gs/nrf.yaml.in
|
||||
+++ b/configs/open5gs/nrf.yaml.in
|
||||
@@ -10,8 +10,8 @@ global:
|
||||
nrf:
|
||||
serving: # 5G roaming requires PLMN in NRF
|
||||
- plmn_id:
|
||||
- mcc: 999
|
||||
- mnc: 70
|
||||
+ mcc: 001
|
||||
+ mnc: 01
|
||||
sbi:
|
||||
server:
|
||||
- address: 127.0.0.10
|
||||
```
|
||||
|
||||
Modify [/etc/open5gs/amf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/amf.yaml.in) to set the NGAP IP address, PLMN ID, TAC and NSSAI.
|
||||
|
||||
|
@ -404,15 +423,44 @@ index e78b018f1..35a54419e 100644
|
|||
After changing config files, please restart Open5GS daemons.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl restart open5gs-nrfd
|
||||
$ 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
|
||||
|
|
|
@ -110,6 +110,26 @@ $ cd ../
|
|||
|
||||
##### 5G Core
|
||||
|
||||
Modify [install/etc/open5gs/nrf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/nrf.yaml.in) to set the NGAP IP address, PLMN ID, TAC and NSSAI.
|
||||
|
||||
```diff
|
||||
$ diff --git a/configs/open5gs/nrf.yaml.in b/configs/open5gs/nrf.yaml.in
|
||||
index cd9e45feb..58e8cbbce 100644
|
||||
--- a/configs/open5gs/nrf.yaml.in
|
||||
+++ b/configs/open5gs/nrf.yaml.in
|
||||
@@ -10,8 +10,8 @@ global:
|
||||
nrf:
|
||||
serving: # 5G roaming requires PLMN in NRF
|
||||
- plmn_id:
|
||||
- mcc: 999
|
||||
- mnc: 70
|
||||
+ mcc: 001
|
||||
+ mnc: 01
|
||||
sbi:
|
||||
server:
|
||||
- address: 127.0.0.10
|
||||
```
|
||||
|
||||
Modify [install/etc/open5gs/amf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/amf.yaml.in) to set the NGAP IP address, PLMN ID, TAC and NSSAI.
|
||||
|
||||
```diff
|
||||
|
@ -475,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
|
||||
|
|
|
@ -48,11 +48,13 @@ If you have tested radio hardware from a vendor not listed with Open5GS, please
|
|||
* Gemtek WLTGFC-101 (S/W version 2.1.1746.1116)
|
||||
* Huawei BTS3900 (S/W version V100R011C10SPC230)
|
||||
* Huawei BBU5900 with RRU5304W Band 7 FDD 2600Mhz 40W Version V100R016C10
|
||||
* Klas VoyagerCell Duo 4GAP1000/4GAP1000X
|
||||
* 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
|
||||
* Nokia FRGY Flexi BTS BBU with Nokia FRCG RRU Band 5 850Mhz FDD 40W. Version 16.1A to 19.0
|
||||
* Nokia FW2FA Flexi Zone Mini-Macro Outdoor BTS, 2x20w Band 39
|
||||
* Nokia FWGR Flexi Zone Mini-Macro Outdoor BTS, 2x20w Band 1
|
||||
* Nokia FWHG Flexi Zone Indoor Pico BTS, 2x250 mW Band 7
|
||||
* Ruckus Q710 and Q910
|
||||
|
||||
### 4G/5G Software Stacks + SDRs
|
||||
|
|
|
@ -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,175 @@ 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.
|
||||
|
||||
```
|
||||
FATAL: s1ap_build_initial_context_setup_request: Assertion `E_RABToBeSetupListCtxtSUReq->list.count' failed. (../src/mme/s1ap-build.c:577)
|
||||
01/19 22:01:49.169: [core] FATAL: backtrace() returned 10 addresses (../lib/core/ogs-abort.c:37)
|
||||
./src/mme/open5gs-mmed(+0x8ef5e) [0x55f6f8a78f5e]
|
||||
./src/mme/open5gs-mmed(+0x5910b) [0x55f6f8a4310b]
|
||||
./src/mme/open5gs-mmed(+0xa4ea5) [0x55f6f8a8eea5]
|
||||
./src/mme/open5gs-mmed(+0x88b65) [0x55f6f8a72b65]
|
||||
/home/acetcom/Documents/git/open5gs/build/src/mme/../../lib/core/libogscore.so.2(ogs_fsm_dispatch+0x119) [0x7fc2362f4c2f]
|
||||
./src/mme/open5gs-mmed(+0x9e99) [0x55f6f89f3e99]
|
||||
/home/acetcom/Documents/git/open5gs/build/src/mme/../../lib/core/libogscore.so.2(+0x1199d) [0x7fc2362e599d]
|
||||
/lib/x86_64-linux-gnu/libc.so.6(+0x94ac3) [0x7fc235a94ac3]
|
||||
/lib/x86_64-linux-gnu/libc.so.6(+0x126850) [0x7fc235b26850]
|
||||
[1] 41823 IOT instruction (core dumped) ./src/mme/open5gs-mmed
|
||||
```
|
||||
|
||||
When a FATAL occurs, Open5GS automatically calls backtrace(), and from the address information it outputs, we can see in which source code this happened. Note the addresses 0x8ef5e, 0x5910b, 0xa4ea5, 0x88b65 in the output below. You can find those addresses in the following places.
|
||||
|
||||
```
|
||||
./src/mme/open5gs-mmed(+0x8ef5e)
|
||||
./src/mme/open5gs-mmed(+0x5910b)
|
||||
./src/mme/open5gs-mmed(+0xa4ea5)
|
||||
./src/mme/open5gs-mmed(+0x88b65)
|
||||
```
|
||||
|
||||
And you can use the GDB tool to provide additional information. If you are in a Ubuntu environment, you can install GDB as shown below.
|
||||
```
|
||||
$ sudo apt install gdb
|
||||
```
|
||||
|
||||
Then run gdb like below.
|
||||
|
||||
```
|
||||
$ gdb ./src/mme/open5gs-mmed
|
||||
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
|
||||
Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
Type "show copying" and "show warranty" for details.
|
||||
This GDB was configured as "x86_64-linux-gnu".
|
||||
Type "show configuration" for configuration details.
|
||||
For bug reporting instructions, please see:
|
||||
<https://www.gnu.org/software/gdb/bugs/>.
|
||||
Find the GDB manual and other documentation resources online at:
|
||||
<http://www.gnu.org/software/gdb/documentation/>.
|
||||
|
||||
For help, type "help".
|
||||
Type "apropos word" to search for commands related to "word"...
|
||||
Reading symbols from ./src/mme/open5gs-mmed...
|
||||
(gdb)
|
||||
```
|
||||
|
||||
With the address 0x8ef5e, 0x5910b, 0xa4ea5, 0x88b65 that you remembered from above and the `list` command within the GDB prompt, you can find out in which source code the problem is occurring.
|
||||
|
||||
```
|
||||
(gdb) list *0x8ef5e
|
||||
0x8ef5e is in s1ap_build_initial_context_setup_request (../src/mme/s1ap-build.c:579).
|
||||
574 emmbuf = NULL;
|
||||
575 }
|
||||
576
|
||||
577 ogs_assert(E_RABToBeSetupListCtxtSUReq->list.count);
|
||||
578
|
||||
579 ie = CALLOC(1, sizeof(S1AP_InitialContextSetupRequestIEs_t));
|
||||
580 ASN_SEQUENCE_ADD(&InitialContextSetupRequest->protocolIEs, ie);
|
||||
581
|
||||
582 ie->id = S1AP_ProtocolIE_ID_id_UESecurityCapabilities;
|
||||
583 ie->criticality = S1AP_Criticality_reject;
|
||||
(gdb) list *0x5910b
|
||||
0x5910b is in nas_eps_send_attach_accept (../src/mme/nas-path.c:171).
|
||||
166 * the MME shall delete the stored UE radio capability information
|
||||
167 * or the UE radio capability ID, if any.
|
||||
168 */
|
||||
169 OGS_ASN_CLEAR_DATA(&mme_ue->ueRadioCapability);
|
||||
170
|
||||
171 s1apbuf = s1ap_build_initial_context_setup_request(mme_ue, emmbuf);
|
||||
172 if (!s1apbuf) {
|
||||
173 ogs_error("s1ap_build_initial_context_setup_request() failed");
|
||||
174 return OGS_ERROR;
|
||||
175 }
|
||||
(gdb) list *0xa4ea5
|
||||
0xa4ea5 is in mme_s11_handle_create_session_response (../src/mme/mme-s11-handler.c:436).
|
||||
431 ogs_assert(OGS_OK ==
|
||||
432 sgsap_send_location_update_request(mme_ue));
|
||||
433 } else {
|
||||
434 ogs_assert(OGS_PDU_SESSION_TYPE_IS_VALID(
|
||||
435 session->paa.session_type));
|
||||
436 r = nas_eps_send_attach_accept(mme_ue);
|
||||
437 ogs_expect(r == OGS_OK);
|
||||
438 ogs_assert(r != OGS_ERROR);
|
||||
439 }
|
||||
440
|
||||
(gdb) list *0x88b65
|
||||
0x88b65 is in mme_state_operational (../src/mme/mme-sm.c:552).
|
||||
547 break;
|
||||
548 case OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE:
|
||||
549 if (!gtp_message.h.teid_presence) ogs_error("No TEID");
|
||||
550 mme_s11_handle_create_session_response(
|
||||
551 xact, mme_ue, >p_message.create_session_response);
|
||||
552 break;
|
||||
553 case OGS_GTP2_MODIFY_BEARER_RESPONSE_TYPE:
|
||||
554 if (!gtp_message.h.teid_presence) ogs_error("No TEID");
|
||||
555 mme_s11_handle_modify_bearer_response(
|
||||
556 xact, mme_ue, >p_message.modify_bearer_response);
|
||||
(gdb)
|
||||
```
|
||||
|
||||
Reporting this information to a github issue or discussion will help others troubleshoot the issue.
|
||||
|
||||
|
||||
#### MME sends Attach reject(EMM-Cause:15) with Diameter error(Result-Code:3002)
|
||||
|
||||
If you see the Attach reject(EMM-Cause:15] with Diameter error(Result-Code:3002), it means that HSS is not running.
|
||||
|
@ -316,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
|
||||
```
|
||||
|
||||
|
|
|
@ -457,7 +457,7 @@ $ mysql
|
|||
|
||||
```
|
||||
$ cd ~ && git clone https://github.com/herlesupreeth/Kamailio_IMS_Config
|
||||
$ cd Kamailio_IMS_Config
|
||||
$ cd Kamailio_IMS_Config && git checkout 5.3
|
||||
$ cp -r kamailio_icscf /etc
|
||||
$ cp -r kamailio_pcscf /etc
|
||||
$ cp -r kamailio_scscf /etc
|
||||
|
|
|
@ -5,63 +5,56 @@ head_inline: "<style> .blue { color: blue; } </style>"
|
|||
|
||||
Setup description:
|
||||
- MCC: 001, MNC: 01
|
||||
- Docker-compose
|
||||
- Docker + Docker Compose
|
||||
- VM/Physical machine running Ubuntu 20.04 or 22.04
|
||||
- srsENB + USRP B210 or a commercial eNB
|
||||
- Sysmocom USIM - sysmoUSIM-SJS1
|
||||
- UE: Mi 9 Pro 5G. Other UE are being tested.
|
||||
- UE: Mi 9 Pro 5G, Oneplus 5, iPhone X and above, Nokia 5.3. Other UE are being tested.
|
||||
{: .blue}
|
||||
|
||||
#### 0. Introduction
|
||||
|
||||
This tutorial introduces an install-and-run lab for Open5GS + Kamailio IMS
|
||||
VoLTE study, a follow-up project of [Open5GS Tutorial: VoLTE Setup with Kamailio IMS and Open5GS](https://open5gs.org/open5gs/docs/tutorial/02-VoLTE-setup/).
|
||||
This tutorial introduces an install-and-run setup for Open5GS + Kamailio IMS VoLTE study.
|
||||
|
||||
The main purpose is to save researchers' and students' time to debug for a
|
||||
minimum-viable environment before actual study can be proceeded.
|
||||
|
||||
**Important notice before you start**
|
||||
|
||||
1. Java 7 is downloaded from an alternative location. You have to agree with
|
||||
Oracle's term of service and have an Oracle account, to legally use Java SDK
|
||||
7u80. By using this repo, I assume you have the legal right to use it and
|
||||
hold no liability.
|
||||
|
||||
You have to prepare IMSI, Ki, OP/OPc, SQN of your SIM cards.
|
||||
The main purpose is to save researchers' and students' time to debug for a minimum-viable environment before actual study can be proceeded.
|
||||
|
||||
#### 1. Prepare SIM cards for VoLTE
|
||||
|
||||
1. Wrong KIC / KID / KIK bricks your SIM card.
|
||||
Program IMSI, Ki, OP/OPc, SQN for the SIM cards you plan to use.
|
||||
|
||||
If VoLTE is not enabled on your Android phone then please refer to the instructions mentioned here: [VoLTE settings overriding](https://github.com/herlesupreeth/CoIMS_Wiki/blob/master/README.md).
|
||||
{: .notice--info}
|
||||
|
||||
1. Using wrong KIC / KID / KIK bricks your SIM card and is irrecoverable
|
||||
2. Use MCC = 001, MNC = 01 for a test network, unless you know your MCC/MNC is supported by Android Carrier Privileges.
|
||||
{: .notice--warning}
|
||||
|
||||
Refer to: https://github.com/herlesupreeth/CoIMS_Wiki/blob/master/README.md
|
||||
* gp --key-enc <KIC1> --key-mac <KID1> --key-dek <KIK1> -lvi
|
||||
* gp --key-enc <KIC1> --key-mac <KID1> --key-dek <KIK1> --unlock
|
||||
* gp --install applet.cap
|
||||
* gp -a 00A4040009A00000015141434C0000 -a 80E2900033F031E22FE11E4F06FFFFFFFFFFFFC114E46872F28B350B7E1F140DE535C2A8D5804F0BE3E30DD00101DB080000000000000001
|
||||
* gp --acr-list-aram
|
||||
#### 2. Build Open5GS, Kamailio docker images
|
||||
|
||||
#### 2. Build Open5GS, Kamailio with docker-compose
|
||||
* Mandatory requirements:
|
||||
* [docker-ce](https://docs.docker.com/install/linux/docker-ce/ubuntu) - Version 22.0.5 or above
|
||||
* [docker compose](https://docs.docker.com/compose) - Version 2.14 or above
|
||||
|
||||
Mandatory requirements:
|
||||
* [docker-ce](https://docs.docker.com/install/linux/docker-ce/ubuntu)
|
||||
* [docker-compose](https://docs.docker.com/compose)
|
||||
|
||||
Install docker-compose and make sure it works before going forward.
|
||||
|
||||
Clone the repository and build base docker images of open5gs and Kamailio:
|
||||
Clone repository and build base docker image of open5gs and kamailio:
|
||||
|
||||
```
|
||||
# Build docker images for open5gs EPC/5GC components
|
||||
git clone https://github.com/herlesupreeth/docker_open5gs
|
||||
cd docker_open5gs/base
|
||||
docker build --no-cache --force-rm -t docker_open5gs .
|
||||
|
||||
# Build docker images for kamailio IMS components
|
||||
cd ../ims_base
|
||||
docker build --no-cache --force-rm -t docker_kamailio .
|
||||
|
||||
# Build docker images for additional components
|
||||
cd ..
|
||||
docker compose -f 4g-volte-deploy.yaml build
|
||||
```
|
||||
|
||||
#### 3. Configuring your setup
|
||||
|
||||
`.env` is the only file most of them need to edit as per their deployment needs
|
||||
`.env` is the only file most of them need to edit as per your deployment needs
|
||||
{: .notice--warning}
|
||||
|
||||
Edit only the following parameters in `.env` as per your setup
|
||||
|
@ -69,15 +62,15 @@ Edit only the following parameters in `.env` as per your setup
|
|||
```
|
||||
MCC
|
||||
MNC
|
||||
TEST_NETWORK --> Change this only if it clashes with the internal network at your home/office
|
||||
DOCKER_HOST_IP --> This is the IP address of the host running your docker setup
|
||||
SGWU_ADVERTISE_IP --> Change this to value of DOCKER_HOST_IP set above only if eNB is not running the same docker network/host
|
||||
DOCKER_HOST_IP --> This is the IP address of the host running (EPC+IMS)
|
||||
SGWU_ADVERTISE_IP --> Change this to value of DOCKER_HOST_IP
|
||||
UE_IPV4_INTERNET --> Change this to your desired (Not conflicted) UE network ip range for internet APN
|
||||
UE_IPV4_IMS --> Change this to your desired (Not conflicted) UE network ip range for ims APN
|
||||
```
|
||||
|
||||
If eNB is NOT running in the same docker network/host as the host running the dockerized Core + IMS then follow the below additional steps
|
||||
|
||||
Under `mme` section in docker-compose file (`docker-compose.yaml`, `nsa-deploy.yaml`), uncomment the following part
|
||||
|
||||
Under **mme** section in docker compose file (**4g-volte-deploy.yaml**), uncomment the following part
|
||||
```
|
||||
...
|
||||
# ports:
|
||||
|
@ -85,8 +78,7 @@ Under `mme` section in docker-compose file (`docker-compose.yaml`, `nsa-deploy.y
|
|||
...
|
||||
```
|
||||
|
||||
Under `sgwu` section in docker-compose file (`docker-compose.yaml`, `nsa-deploy.yaml`), uncomment the following part
|
||||
|
||||
Then, uncomment the following part under **sgwu** section
|
||||
```
|
||||
...
|
||||
# ports:
|
||||
|
@ -94,57 +86,96 @@ Under `sgwu` section in docker-compose file (`docker-compose.yaml`, `nsa-deploy.
|
|||
...
|
||||
```
|
||||
|
||||
#### 4. Building 4G/5G Core + IMS related components images
|
||||
#### 4. Deploying 4G/5G Core + IMS related components images
|
||||
|
||||
```
|
||||
cd docker_open5gs
|
||||
source .env
|
||||
docker-compose -f deploy-all.yaml build --no-cache
|
||||
docker-compose -f deploy-all.yaml up
|
||||
sudo ufw disable
|
||||
sudo sysctl -w net.ipv4.ip_forward=1
|
||||
docker compose -f 4g-volte-deploy.yaml up
|
||||
```
|
||||
|
||||
#### 5. (Optional) Run srsENB in a separate container
|
||||
|
||||
I use srsENB and USRP B210 in the lab. Sometimes you may want to restart
|
||||
srsENB while keeping the core network running. It is thus recommended to run
|
||||
srsENB separately.
|
||||
Sometimes you may want to restart srsENB while keeping the core network running. It is thus recommended to run srsENB separately.
|
||||
|
||||
In order to run srsENB in a separate host, clone the docker_open5gs repository as mentioned above and build srsENB docker images.
|
||||
|
||||
```
|
||||
# Build docker images for srsRAN_4G eNB
|
||||
cd ../srslte
|
||||
docker build --no-cache --force-rm -t docker_srslte .
|
||||
```
|
||||
|
||||
And, edit only the following parameters in **.env** as per your setup
|
||||
|
||||
```
|
||||
MCC
|
||||
MNC
|
||||
DOCKER_HOST_IP --> This is the IP address of the host running eNB
|
||||
MME_IP --> Change this to IP address of host running (EPC+IMS)
|
||||
SRS_ENB_IP --> Change this to the IP address of the host running eNB
|
||||
```
|
||||
|
||||
Replace the following part in the docker compose file (**srsenb.yaml**)
|
||||
```
|
||||
networks:
|
||||
default:
|
||||
ipv4_address: ${SRS_ENB_IP}
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: docker_open5gs_default
|
||||
```
|
||||
with
|
||||
```
|
||||
network_mode: host
|
||||
```
|
||||
|
||||
```
|
||||
cd docker_open5gs
|
||||
source .env
|
||||
docker-compose -f srsenb.yaml build --no-cache
|
||||
docker-compose -f srsenb.yaml up
|
||||
sudo cpupower frequency-set -g performance
|
||||
docker compose -f srsenb.yaml up -d && docker container attach srsenb
|
||||
```
|
||||
|
||||
#### 6. Configuration and register two UE
|
||||
#### 6. Configuration and provisioning of SIM information in HSS and HLR
|
||||
|
||||
If there is a need to change the Core Network component configuration files
|
||||
found under their respective folder, make sure to re-compile images using
|
||||
`docker-compose build` again.
|
||||
If there is a need to change the Core Network component configuration, then corresponding configuration files can be found under their respective folders.
|
||||
{: .notice--warning}
|
||||
|
||||
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
|
||||
- Provision SIM details in open5gs HSS
|
||||
|
||||
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
|
||||
Password : 1423
|
||||
```
|
||||
|
||||
Follow the instructions in [VoLTE Setup](https://open5gs.org/open5gs/docs/tutorial/02-VoLTE-setup/):
|
||||
- Step 18, set IMSI, Ki, OP, SQN and APN of your SIM cards.
|
||||
**Important!** Set the type of both APN to IPv4. Kamailio does not support VoLTE over
|
||||
IPv6 at the moment. (See the screenshot below.)
|
||||
- Step 20, add IMS subscriptions to FHoSS.
|
||||
Add users with their corresponding IMSI, Ki, OP/OPc value and APN settings. The APN settings should look like below:
|
||||
|
||||
<pre>
|
||||
APN Configuration:
|
||||
---------------------------------------------------------------------------------------------------------------------
|
||||
| APN | Type | QCI | ARP | Capability | Vulnerablility | MBR DL/UL(Kbps) | GBR DL/UL(Kbps) | PGW IP |
|
||||
---------------------------------------------------------------------------------------------------------------------
|
||||
| internet | IPv4 | 9 | 8 | Disabled | Disabled | unlimited/unlimited | | |
|
||||
---------------------------------------------------------------------------------------------------------------------
|
||||
| ims | IPv4 | 5 | 1 | Disabled | Disabled | 3850/1530 | | |
|
||||
| | | 1 | 2 | Enabled | Enabled | 128/128 | 128/128 | |
|
||||
| | | 2 | 4 | Enabled | Enabled | 128/128 | 128/128 | |
|
||||
---------------------------------------------------------------------------------------------------------------------
|
||||
</pre>
|
||||
|
||||
**Important!** Set the type of both APN to IPv4. Kamailio does not support VoLTE over IPv6 at the moment. (See the screenshot below)
|
||||
|
||||
![Set both type to IPv4 only](https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/subscriber-type-ipv4.png)
|
||||
|
||||
For already running systems, copy SQN from Open5GS and type it in FHoSS. You
|
||||
can type SQN in decimal. FHoSS will automagically convert it to hex.
|
||||
- Provision IMSI and MSISDN in osmohlr to allow [SMS over SGs](https://github.com/herlesupreeth/docker_open5gs#provisioning-of-imsi-and-msisdn-with-osmohlr-as-follows)
|
||||
|
||||
Pay special attention to copy/paste. You might have leading or trailing spaces
|
||||
in FHoSS, resulting in failed connections!
|
||||
- Provision SIM information in pyHSS [IMS](https://github.com/herlesupreeth/docker_open5gs#provisioning-of-sim-information-in-pyhss-is-as-follows)
|
||||
|
||||
#### 7. Debugging with Wireshark
|
||||
|
||||
|
@ -152,15 +183,13 @@ Thanks to Open5GS, the topology is super similar to [SAE on Wikipedia](https://e
|
|||
|
||||
![Network topology of Open5GS + IMS](https://raw.githubusercontent.com/miaoski/docker_open5gs/master/network-topology.png)
|
||||
|
||||
|
||||
**APN**
|
||||
|
||||
On your cellphone, there should be *internet* and *ims*.
|
||||
|
||||
<img src="https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/apn-on-cellphone.jpg" width="320" />
|
||||
|
||||
CoIMS should look like the one below. If you don't know what CoIMS is, please
|
||||
refer to step 23 of VoLTE Setup.
|
||||
If CoIMS is used to force enable VoLTE on the Android device, it should look like in the screenshot below:
|
||||
|
||||
<img src="https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/coims.jpg" width="320" />
|
||||
|
||||
|
@ -173,13 +202,11 @@ When DNS is not properly set, you may end up with 478 Unresolvable destination (
|
|||
|
||||
![478 unresolvable destination](https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/478-unresolvable-destination.png)
|
||||
|
||||
If the port if not open, or DNS is not properly configured, the phone cannot
|
||||
reach P-CSCF and fails.
|
||||
If the port if not open, or DNS is not properly configured, the phone cannot reach P-CSCF and fails.
|
||||
|
||||
![RST at port 5060](https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/RST-5060.png)
|
||||
|
||||
If there is an NAT between PGW and P-CSCF, IPsec-NAT would not work, and the
|
||||
PCAP looks like the one below. N.B. that you need to run P-CSCF as root, in
|
||||
If there is an NAT between PGW and P-CSCF, IPsec-NAT would not work, and the PCAP looks like the one below. Note that you need to run P-CSCF as root, in
|
||||
order to add xfrm state and policy.
|
||||
|
||||
![401 Unauthorized](https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/401-unauthorized.png)
|
||||
|
@ -193,17 +220,12 @@ Herle Supreeth has shared PCAP files of successful calls, including
|
|||
- [Non-IPSec UE to IPSec UE calling]({{ site.url }}{{ site.baseurl }}/assets/pcapng/nonipsec_to_ipsec_call.pcapng)
|
||||
- [IPSec UE to Non-IPSec UE calling]({{ site.url }}{{ site.baseurl }}/assets/pcapng/ipsec_to_nonipsec_call.pcapng)
|
||||
|
||||
The successful calls were made with a commercial eNB (in his case a Casa
|
||||
smallcell), while srsENB the ACK takes a very long time to reach the UE,
|
||||
resulting in disconnected calls.
|
||||
|
||||
**UE registration**
|
||||
|
||||
![UE registration with IPSec](https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/ue-ipsec.png)
|
||||
|
||||
From the screenshot, we see a UE that supports IPSec got a response from
|
||||
S-CSCF, indicating that ipsec-3gpp is supported, protocol is ESP (ethernet
|
||||
proto 50, IPSec). Client port (port-c) is 5100 and server port (port-s) 6100.
|
||||
From the screenshot, we see a UE that supports IPSec got a response from S-CSCF, indicating that ipsec-3gpp is supported, protocol is ESP (ethernet proto 50, IPSec). Client port (port-c) is 5100 and server port (port-s) 6100.
|
||||
Refer to [IMS/SIP - Basic Procedures](https://www.sharetechnote.com/html/IMS_SIP_Procedure_Reg_Auth_IPSec.html) if you want to know more.
|
||||
Also, notice that packets after 401 Unauthorized are transmitted over ESP.
|
||||
|
||||
|
@ -216,8 +238,7 @@ If a UE does not support IPSec, you don't see the "security-server", as shown be
|
|||
|
||||
![ipsec to ipsec call](https://raw.githubusercontent.com/miaoski/docker_open5gs/gh-pages/screenshots/ipsec-to-ipsec%20calls.png)
|
||||
|
||||
The Wireshark above shows that after several IPSec (ESP) packets, S-CSCF is
|
||||
sending a SIP INVITE for UE 03 to UE 04. To be more precise,
|
||||
The Wireshark above shows that after several IPSec (ESP) packets, S-CSCF is sending a SIP INVITE for UE 03 to UE 04. To be more precise,
|
||||
|
||||
```
|
||||
Request-Line: INVITE sip:0398765432100;phone-context=0498765432100@0498765432100;user=phone SIP/2.0
|
||||
|
|
|
@ -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,12 +38,17 @@ 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)
|
||||
- [5G Core SBI mTLS Using External Certificate PKI](https://futuredon.medium.com/5g-core-sbi-mtls-using-external-certificate-pki-4ffc02ac7728)
|
||||
- [5G Frame Routing](https://futuredon.medium.com/5g-frame-routing-6e34d8587123)
|
||||
- [5G SCTP LoadBalancer Using LoxiLB](https://futuredon.medium.com/5g-sctp-loadbalancer-using-loxilb-b525198a9103)([Video Link](https://youtu.be/k3ICc7MXcC8))
|
||||
- [5G Roaming With Mutual TLS](https://futuredon.medium.com/5g-roaming-with-mutual-tls-1468d109129c)
|
||||
|
||||
- @nickvsnetworking
|
||||
- [My first 5G Core : Open5GS and UERANSIM](http://nickvsnetworking.com/my-first-5g-core-open5gs-and-ueransim/)
|
||||
|
|
|
@ -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}
|
|
@ -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
|
||||
*/
|
||||
|
@ -197,7 +200,7 @@ static int read_config(void)
|
|||
break;
|
||||
case YAML_SCANNER_ERROR:
|
||||
if (parser.context)
|
||||
ogs_error("Scanner error - %s at line %zu, column %zu"
|
||||
ogs_error("Scanner error - %s at line %zu, column %zu "
|
||||
"%s at line %zu, column %zu", parser.context,
|
||||
parser.context_mark.line+1,
|
||||
parser.context_mark.column+1,
|
||||
|
@ -210,7 +213,7 @@ static int read_config(void)
|
|||
break;
|
||||
case YAML_PARSER_ERROR:
|
||||
if (parser.context)
|
||||
ogs_error("Parser error - %s at line %zu, column %zu"
|
||||
ogs_error("Parser error - %s at line %zu, column %zu "
|
||||
"%s at line %zu, column %zu", parser.context,
|
||||
parser.context_mark.line+1,
|
||||
parser.context_mark.column+1,
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ asn_TYPE_operation_t asn_OP_ObjectDescriptor = {
|
|||
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_ObjectDescriptor = {
|
|||
0,
|
||||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
OCTET_STRING_decode_jer_utf8,
|
||||
OCTET_STRING_encode_jer_utf8,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
#if !defined(ASN_DISABLE_OER_SUPPORT)
|
||||
0,
|
||||
|
|
|
@ -35,6 +35,7 @@ extern asn_TYPE_operation_t asn_OP_ObjectDescriptor;
|
|||
#endif /* !defined(ASN_DISABLE_XER_SUPPORT) */
|
||||
|
||||
#if !defined(ASN_DISABLE_JER_SUPPORT)
|
||||
#define ObjectDescriptor_decode_jer OCTET_STRING_decode_jer_utf8
|
||||
#define ObjectDescriptor_encode_jer OCTET_STRING_encode_jer_utf8
|
||||
#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue