mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
Compare commits
1965 Commits
fairwaves/
...
1.13.0
Author | SHA1 | Date | |
---|---|---|---|
|
f1b557988d | ||
|
95e504aa97 | ||
|
a5ae091fdd | ||
|
249f799a88 | ||
|
dc395843ff | ||
|
c5d003e09e | ||
|
e6398d886b | ||
|
23140d6f94 | ||
|
36c823eef1 | ||
|
fa393fa1e9 | ||
|
e0fc37a437 | ||
|
4aa2b0e35b | ||
|
e01f6e7f33 | ||
|
388b48d14e | ||
|
352b967d1b | ||
|
ed4da25f2f | ||
|
5abda312ed | ||
|
75862d3131 | ||
|
8733542b13 | ||
|
d7aac20cc1 | ||
|
8b5361412c | ||
|
3a971ba0d1 | ||
|
c4b90354ca | ||
|
28fd236044 | ||
|
17b5701f19 | ||
|
9bea6eb78c | ||
|
fd57bd5f6f | ||
|
d0dbda4106 | ||
|
35a738214c | ||
|
afbe872045 | ||
|
909be19285 | ||
|
8ee08c6b78 | ||
|
c053e07336 | ||
|
2b30cbdfa8 | ||
|
c9df010416 | ||
|
3a3e1b57c6 | ||
|
186d4f1a0b | ||
|
cc2f7937ed | ||
|
960c031a67 | ||
|
4993452561 | ||
|
43eed63b09 | ||
|
7a6d9c2f72 | ||
|
f3715dc0d3 | ||
|
a68a863b9d | ||
|
18717f5247 | ||
|
677b5396cb | ||
|
5d0e07112f | ||
|
a5acaa68db | ||
|
7787a3aeae | ||
|
dd1ddf74fc | ||
|
5e101c9fed | ||
|
f6db465082 | ||
|
a7e6fbc220 | ||
|
cd132126ef | ||
|
249d21eb1e | ||
|
0127a0608d | ||
|
8b663e4d7c | ||
|
5e5c7bc176 | ||
|
c695e9f972 | ||
|
2bdad960ff | ||
|
58d5b97831 | ||
|
6225b5cecb | ||
|
c415ed5113 | ||
|
730a1f28d2 | ||
|
af67178581 | ||
|
dc7dfd0bbd | ||
|
c364f4ab5a | ||
|
e9989b9e76 | ||
|
9423817311 | ||
|
292ba1bdb1 | ||
|
10d9f8dcf4 | ||
|
4c0658955e | ||
|
e9164c295d | ||
|
563386e8bb | ||
|
af0f58fac7 | ||
|
2e411f33a0 | ||
|
8e8d59ff0e | ||
|
14da3a33cb | ||
|
ea2035326d | ||
|
2bfa708527 | ||
|
72f911513e | ||
|
3d0676a791 | ||
|
4c4d227624 | ||
|
0e8310fa6c | ||
|
e3624562dc | ||
|
d5057ec7b8 | ||
|
72761b312b | ||
|
a312523be4 | ||
|
45fe47cea7 | ||
|
ce356eec1f | ||
|
cca1d180f5 | ||
|
833ab4b083 | ||
|
d358ca14a9 | ||
|
3699ef06a4 | ||
|
9dd80ca1f8 | ||
|
621e8666ff | ||
|
ec967d74f7 | ||
|
3ccf02a300 | ||
|
b6795ddfd2 | ||
|
747fbce4ce | ||
|
e1da8c9d2c | ||
|
e78221d273 | ||
|
6c303664f5 | ||
|
544016d8e6 | ||
|
263a1a3e8f | ||
|
30bdf94102 | ||
|
0dbaaadc06 | ||
|
671c37b72b | ||
|
2a9ba66922 | ||
|
f8abd0ec0c | ||
|
1a7048d69a | ||
|
c70c08cd49 | ||
|
a8f13286ff | ||
|
b9e7569217 | ||
|
057decfe3a | ||
|
342a9a9418 | ||
|
22f9cf2687 | ||
|
26d6b2b5ce | ||
|
169d50ed4a | ||
|
82dfb505db | ||
|
9c0d105d09 | ||
|
ded02cfc29 | ||
|
0cbed362cd | ||
|
310e41cdf3 | ||
|
a55bfdc436 | ||
|
6ea8d7dac6 | ||
|
9befdeb673 | ||
|
5fb814b6b9 | ||
|
9ac9cb963d | ||
|
377d39122d | ||
|
d1e94c7ac3 | ||
|
6db3f7f1cb | ||
|
58c0b0a6f7 | ||
|
cca55247ed | ||
|
d266c374ee | ||
|
d358d71206 | ||
|
5e6661eece | ||
|
c1468ef7a5 | ||
|
24763eaa73 | ||
|
d8c2f31a87 | ||
|
01b812ea76 | ||
|
0807771b9e | ||
|
103e50a561 | ||
|
3a914e33e9 | ||
|
2172f402a5 | ||
|
8c138fe89c | ||
|
7881f7da0b | ||
|
d17a9de79e | ||
|
8e74c63e15 | ||
|
80dd576ad2 | ||
|
cb922b646f | ||
|
5d8b5b0935 | ||
|
35bd2523e2 | ||
|
f45a9b9760 | ||
|
f48cd95bbc | ||
|
7558c20973 | ||
|
6ddc79b6ed | ||
|
ff5921573a | ||
|
d4ad77d326 | ||
|
a6917fecb1 | ||
|
58877f04e3 | ||
|
d4707e2185 | ||
|
f633302c73 | ||
|
36413c011f | ||
|
833281dcb9 | ||
|
07bbd766c5 | ||
|
c7c8e649f1 | ||
|
c0e1b1aec5 | ||
|
9735d21b9d | ||
|
705565d745 | ||
|
63088e0e61 | ||
|
887c93e198 | ||
|
2ca48823b1 | ||
|
e7de137b29 | ||
|
c1ad7fd92b | ||
|
3779919551 | ||
|
8e0d101997 | ||
|
654b68d602 | ||
|
70c03f5e44 | ||
|
e56ec4a146 | ||
|
5ffd127384 | ||
|
051eb4d563 | ||
|
e740665cab | ||
|
abb9d47c90 | ||
|
2dd2b33030 | ||
|
69f15e4e95 | ||
|
b0ea7976bf | ||
|
9d939b6d5d | ||
|
de805b6772 | ||
|
cb25a0aa48 | ||
|
72eff2cf6a | ||
|
1c5fcb0791 | ||
|
48fb176fbc | ||
|
4d090d85f4 | ||
|
81c5847434 | ||
|
d48a811f6c | ||
|
b7f52b414e | ||
|
ea7aaf2eca | ||
|
432ee9d150 | ||
|
b4a59475d2 | ||
|
2177919edb | ||
|
87f114a1d0 | ||
|
928a20b540 | ||
|
b9022497d8 | ||
|
582c2bf7b0 | ||
|
663ba5c41f | ||
|
daf5bcea99 | ||
|
a29f155301 | ||
|
941e317c97 | ||
|
3fbf035923 | ||
|
21bcf6abd8 | ||
|
26e810d8a9 | ||
|
4d1a52d463 | ||
|
83df47cd7a | ||
|
c5bbb78ffe | ||
|
e0e5a772f4 | ||
|
e39ae87ea3 | ||
|
8b0a614e43 | ||
|
c61664c2b2 | ||
|
15e7e4f37d | ||
|
ab8371c6d7 | ||
|
8c777990a5 | ||
|
ec5e85b84e | ||
|
ab4e8663e1 | ||
|
a4f783b51b | ||
|
479cf76e55 | ||
|
33639166a2 | ||
|
709aad28ed | ||
|
5892b2e4db | ||
|
f1f73b8e1d | ||
|
0fdc08c551 | ||
|
5be57da075 | ||
|
147184eb06 | ||
|
cfef36837e | ||
|
c946605208 | ||
|
a02faff1ac | ||
|
ce055d5ac4 | ||
|
452f2ba5bd | ||
|
0b6faa4521 | ||
|
1c69fb0f14 | ||
|
069dd16b67 | ||
|
e144275757 | ||
|
e0058b7207 | ||
|
bb3ccdea1a | ||
|
2799ff9bb9 | ||
|
fed5feafd3 | ||
|
1de5ed6f97 | ||
|
80751d850b | ||
|
2c40164ff0 | ||
|
e308202285 | ||
|
b4a067c9fb | ||
|
8029b12146 | ||
|
ebb05c1f90 | ||
|
bc3f3b40fe | ||
|
fae09f4562 | ||
|
7c0fe31697 | ||
|
98aef217c6 | ||
|
e03e34f8bb | ||
|
ee6958c9a8 | ||
|
fbcf4a6f6c | ||
|
58dc88bc31 | ||
|
aac84edc9d | ||
|
172f5acfce | ||
|
fdbefde869 | ||
|
25ecc91c3b | ||
|
995529548b | ||
|
0c04500ac5 | ||
|
a0b69f1896 | ||
|
fbf78d13f1 | ||
|
df9192efee | ||
|
70a658a2ba | ||
|
2764bdb1aa | ||
|
55fdfc223e | ||
|
8f33303660 | ||
|
a94c56e4c6 | ||
|
2ebcf5c34a | ||
|
f936e10f07 | ||
|
e303fa9ff3 | ||
|
958f5e74cc | ||
|
1e8d5fa44b | ||
|
374ad788d8 | ||
|
da07b90f0f | ||
|
fa495d669f | ||
|
439c86fc58 | ||
|
74e83d3d82 | ||
|
d55be05af1 | ||
|
8f91a7f450 | ||
|
da3a5759e1 | ||
|
29e671f257 | ||
|
d6a7e17911 | ||
|
3f4a4cb49c | ||
|
3d2b76fd95 | ||
|
276a414aa3 | ||
|
c534ad17dc | ||
|
3f2c15f275 | ||
|
38533ba9b3 | ||
|
39889e4389 | ||
|
c824fe4eb0 | ||
|
124a3e0b34 | ||
|
96c6e06681 | ||
|
ce18705875 | ||
|
41ab87f67c | ||
|
a8739fc7be | ||
|
21dfeff8aa | ||
|
f486e741a4 | ||
|
268568593e | ||
|
41d59205c0 | ||
|
036612b035 | ||
|
6bad138c96 | ||
|
8dc3597085 | ||
|
d70eef6421 | ||
|
33d97f721d | ||
|
d57310731f | ||
|
a8c684b51f | ||
|
03fcc91aad | ||
|
9de30e7cc4 | ||
|
d64c041cdb | ||
|
d02716d6c2 | ||
|
a065e632c0 | ||
|
bd060c3c99 | ||
|
97cae477fb | ||
|
02c880a7dd | ||
|
ba09687768 | ||
|
a4b677c45a | ||
|
6b7afe8f57 | ||
|
4131a65c4d | ||
|
6a5e5ac2d4 | ||
|
b066bd0c86 | ||
|
d6769ea207 | ||
|
ca280a1a84 | ||
|
a24dcc61d7 | ||
|
62d9df684f | ||
|
8358c4ba07 | ||
|
4c77e9b748 | ||
|
33347a4f5d | ||
|
7d86d4c523 | ||
|
eb984bd630 | ||
|
b3d14eb552 | ||
|
907744e2fc | ||
|
776846a0b9 | ||
|
59e7cf4437 | ||
|
b2064423fe | ||
|
97a9312be8 | ||
|
427cede4ba | ||
|
7371663aeb | ||
|
fe53edd776 | ||
|
4f6a7ad5f8 | ||
|
55a9229922 | ||
|
7802ccc8d6 | ||
|
3ff5151661 | ||
|
5936a9c23e | ||
|
9ffaba7c1b | ||
|
535ede2598 | ||
|
6ccdaa243f | ||
|
ace0b946ff | ||
|
a34036c296 | ||
|
9fec391d6e | ||
|
a835fa85d7 | ||
|
2c66c15227 | ||
|
92a73cd637 | ||
|
6e2795bfbf | ||
|
276b595361 | ||
|
3c293b418b | ||
|
41425e9b85 | ||
|
31682a3274 | ||
|
870f94b493 | ||
|
242e9ada91 | ||
|
9b444fd417 | ||
|
e9473f610e | ||
|
53002b3a00 | ||
|
a098b65252 | ||
|
78b0055e5e | ||
|
648bec3982 | ||
|
c2a8f59560 | ||
|
38404969df | ||
|
19c430feba | ||
|
3ba409558e | ||
|
60be627557 | ||
|
8cfe7df3f1 | ||
|
ba94b6d7be | ||
|
30e01355f6 | ||
|
06624e13d4 | ||
|
19539866e5 | ||
|
1dc2dcebbf | ||
|
6049a63d1d | ||
|
3ef8e76534 | ||
|
fbf07f3f69 | ||
|
de133113a0 | ||
|
6d0a59a1bf | ||
|
2491401932 | ||
|
fbbe8f2f98 | ||
|
71d42e778a | ||
|
8a2a1b22fe | ||
|
a790f0c082 | ||
|
0ab152b2c6 | ||
|
2741d6bb0e | ||
|
74d0e5c318 | ||
|
c4ef4a21c6 | ||
|
ee2f33bf9a | ||
|
531470a0ca | ||
|
9dc73593a3 | ||
|
ae6858bddf | ||
|
99d4d368e8 | ||
|
8667d5169d | ||
|
1add5a53cb | ||
|
729bf3e45a | ||
|
2f34b53b5b | ||
|
ad79f9eb99 | ||
|
9e494e67c7 | ||
|
5322473d04 | ||
|
c57ad7ff9a | ||
|
c59b5c533d | ||
|
0653cc8a7c | ||
|
246233d0d4 | ||
|
a910a81b7c | ||
|
c8acee2234 | ||
|
55863e42c1 | ||
|
6177cae2a2 | ||
|
6af3ccf65d | ||
|
03cb5f3397 | ||
|
113141d4f9 | ||
|
993ea6be7a | ||
|
889fe7f203 | ||
|
efd09d0b77 | ||
|
ffbc618a13 | ||
|
563ffc51b5 | ||
|
51b42ff2e1 | ||
|
7a755be4c2 | ||
|
06ea49159e | ||
|
869b21c869 | ||
|
37a808c5a5 | ||
|
24b8c0ce92 | ||
|
fe67e094ad | ||
|
fbcf39976e | ||
|
4863591c23 | ||
|
827da2c867 | ||
|
efe1571b7b | ||
|
6521fc0695 | ||
|
f5531845bc | ||
|
13fae78b32 | ||
|
b7d395d83a | ||
|
6fbbeec064 | ||
|
0ffa3bdc45 | ||
|
ca8639dc05 | ||
|
8d6a193c1a | ||
|
58a1ba85c7 | ||
|
b0c05aa3a9 | ||
|
0996a1e4ae | ||
|
7e9ddc9904 | ||
|
04bbb9de3e | ||
|
bea56788cb | ||
|
48bcc2ee12 | ||
|
080935a8c7 | ||
|
a466f57007 | ||
|
41f77d8018 | ||
|
e674345e29 | ||
|
3f8139c55f | ||
|
98c09b3f30 | ||
|
7462b95829 | ||
|
7a64182f9a | ||
|
d19de2ee80 | ||
|
08eb9352ab | ||
|
0b79d21c7f | ||
|
bce5f29265 | ||
|
3d5a2dd19f | ||
|
7f90ddb519 | ||
|
c66ab2c4c3 | ||
|
f53796c1fe | ||
|
14b27a8893 | ||
|
21be42abed | ||
|
2d681fd84c | ||
|
c39b1bffec | ||
|
62612e8575 | ||
|
af932ce3bc | ||
|
265b0a8045 | ||
|
74390c521e | ||
|
abfb858f0c | ||
|
6500d72aaf | ||
|
d6877eb8f9 | ||
|
ebb9bf3f12 | ||
|
61cf9bb5f1 | ||
|
a7152e055a | ||
|
63866009e2 | ||
|
dab89af070 | ||
|
eebbf2b1fc | ||
|
e885bc5c24 | ||
|
173dc129fc | ||
|
3abced8d64 | ||
|
a48ff4a738 | ||
|
6c92f9d83e | ||
|
9852e22101 | ||
|
b141cccbfb | ||
|
ec45068972 | ||
|
832bcdf631 | ||
|
73f9c02f49 | ||
|
6a25a61142 | ||
|
1dbbed169a | ||
|
a8f27abe12 | ||
|
ca2aec0235 | ||
|
e827831514 | ||
|
923d60bb12 | ||
|
f2bf8dc8c8 | ||
|
055ded74de | ||
|
3ff71284fa | ||
|
cc0b97e197 | ||
|
8c69e29820 | ||
|
843d9038ce | ||
|
d071a30238 | ||
|
3ab8ca4d84 | ||
|
23f4048b57 | ||
|
401b740ccd | ||
|
a468b0f57f | ||
|
b0cfa7272e | ||
|
683e05f60b | ||
|
16b637bf1b | ||
|
2698540c1e | ||
|
d2f5e69d3e | ||
|
ce64f18587 | ||
|
667fa59b0c | ||
|
5a6220f43b | ||
|
7c6dd3c2c3 | ||
|
740af6ed44 | ||
|
782d607962 | ||
|
50e52e45f9 | ||
|
a2d10216ea | ||
|
f54eb96338 | ||
|
a2b1c5e6f6 | ||
|
c5c1430a1c | ||
|
f7de9aea7b | ||
|
199c5e965e | ||
|
06a49fc04b | ||
|
6349bd422a | ||
|
796a4a1325 | ||
|
2cf6652ba2 | ||
|
9b508f6b53 | ||
|
6e26c70f46 | ||
|
9a34592c09 | ||
|
7eb6f2cb56 | ||
|
83fd8a5692 | ||
|
17058484d1 | ||
|
166077ea48 | ||
|
0c6c3c1da6 | ||
|
fe9a1fe03b | ||
|
1e4a34d45e | ||
|
189f29e939 | ||
|
d2ce444008 | ||
|
ef9420adf5 | ||
|
cb96e05a91 | ||
|
f6387dc766 | ||
|
1b1d7ed98f | ||
|
df7d97e4b4 | ||
|
85978dadab | ||
|
9aaaab6b3b | ||
|
c1ad553d86 | ||
|
c1bf4694e7 | ||
|
1442c5a99e | ||
|
dac2ca7e21 | ||
|
375252279c | ||
|
295570c631 | ||
|
a93c6e9263 | ||
|
30907dc9d8 | ||
|
14f8a08f44 | ||
|
c63f15a9a7 | ||
|
ca538fc5eb | ||
|
6be2c49538 | ||
|
91088c305f | ||
|
900cd6518a | ||
|
fa810e8ccd | ||
|
497611ae84 | ||
|
2b89617aad | ||
|
b542b0457b | ||
|
120568651a | ||
|
f1d301a9a6 | ||
|
c9a6280c94 | ||
|
b5583cde41 | ||
|
6c1cd63a57 | ||
|
0d7ba56f5c | ||
|
3ac604e3ad | ||
|
9fb8ddf00e | ||
|
182ca3bad4 | ||
|
f027f17dcb | ||
|
ac772d8b0c | ||
|
9d9f44ac71 | ||
|
84274e4e9b | ||
|
c5479fe086 | ||
|
538d2c53d9 | ||
|
8de58e79b8 | ||
|
5e8d7995d1 | ||
|
3239f6212e | ||
|
209eb9f103 | ||
|
ef6304e4a1 | ||
|
21cdbfc196 | ||
|
fc8067348b | ||
|
9f11dc5616 | ||
|
ca0818c760 | ||
|
c12bfb7ffc | ||
|
228e591589 | ||
|
58128258b0 | ||
|
e7ae69a7be | ||
|
7e37ce6008 | ||
|
dbe09dd515 | ||
|
217d31d62f | ||
|
47642f245d | ||
|
cb760bdebe | ||
|
e3f8bca424 | ||
|
9fc8a02196 | ||
|
e36b775eae | ||
|
622dd61764 | ||
|
e81c1176aa | ||
|
ed0c1aa9d5 | ||
|
ac69ea9cdf | ||
|
0a40379214 | ||
|
72bc8da537 | ||
|
c3132fd508 | ||
|
96c3107daf | ||
|
ad21a0e166 | ||
|
32d15cc8ba | ||
|
1fd50e5306 | ||
|
6802374574 | ||
|
82c1d1eb20 | ||
|
5a5169e15c | ||
|
7c0b70a94e | ||
|
ca6a8495e1 | ||
|
c0a2196f91 | ||
|
da026abc27 | ||
|
27780313ac | ||
|
e5ed946bdb | ||
|
c319b79baa | ||
|
2818db8b33 | ||
|
0415de74b8 | ||
|
4075b8805d | ||
|
8ab3fbbaf2 | ||
|
cc39218dce | ||
|
8dbc9ed408 | ||
|
ba25eab0fa | ||
|
aa823bf24b | ||
|
a714abfc91 | ||
|
9270e91c09 | ||
|
b7974e2fa4 | ||
|
1e174875bf | ||
|
c26b665c0c | ||
|
0479b2a15f | ||
|
ff6606cacb | ||
|
407b1f186d | ||
|
de2a4d7c22 | ||
|
48aff62341 | ||
|
852ba86949 | ||
|
662fa421c6 | ||
|
d14163e74f | ||
|
11b4810142 | ||
|
9ecceb651b | ||
|
426a9d9103 | ||
|
17bf603222 | ||
|
bcd52e5724 | ||
|
956242dcec | ||
|
e686675f7d | ||
|
4ca0b0d1fa | ||
|
efd645e5a8 | ||
|
f0504e86b3 | ||
|
e28b673fba | ||
|
a77eade744 | ||
|
6531726a02 | ||
|
31b4729f27 | ||
|
a729db62a9 | ||
|
5336f57f05 | ||
|
eb72ff058f | ||
|
8a91d2c04e | ||
|
55e0dcf254 | ||
|
23e7bf1c00 | ||
|
10d487e13f | ||
|
40f5033cf9 | ||
|
b1bb1fa187 | ||
|
1d121483f6 | ||
|
124441af1f | ||
|
b861db97ea | ||
|
08e07046f9 | ||
|
a5e0cf09a6 | ||
|
f2388eab71 | ||
|
120865833c | ||
|
e6d8e91b3a | ||
|
475f868b7f | ||
|
0063ca2fb0 | ||
|
610fda6108 | ||
|
352eed09ae | ||
|
0a89e92a5e | ||
|
dde80f3f61 | ||
|
9a7ccc3746 | ||
|
910189d0a1 | ||
|
8482e8374c | ||
|
fee4fa9492 | ||
|
4dba769577 | ||
|
da895b1151 | ||
|
a74c0ea2db | ||
|
6a26c16eb0 | ||
|
af8e00ffe8 | ||
|
6931f9a7a4 | ||
|
544448abea | ||
|
e547bdd1ce | ||
|
d1562a7766 | ||
|
304b3eb328 | ||
|
9cd5233609 | ||
|
35a382968c | ||
|
7066af825a | ||
|
acc10353fe | ||
|
bca0ef6cd9 | ||
|
cede2a4b7c | ||
|
337209a6ea | ||
|
56e0443e1c | ||
|
b1a1b4000e | ||
|
8838c62fe9 | ||
|
704c4f0adf | ||
|
bc0346e080 | ||
|
5928dc9345 | ||
|
04da5e5e98 | ||
|
54b4f82f91 | ||
|
3d7b58d77a | ||
|
604410cd13 | ||
|
b340f90c9e | ||
|
3c8ccb6724 | ||
|
d4e6aa42ca | ||
|
e6df0e47e7 | ||
|
54eb0e1204 | ||
|
b38fb8911f | ||
|
1b3a385b9d | ||
|
dbd70c7b68 | ||
|
a19547b7a1 | ||
|
06823731d8 | ||
|
ed1cff5ab9 | ||
|
f2321b7a72 | ||
|
4219904cb2 | ||
|
b2753f2044 | ||
|
ba61f68137 | ||
|
9e1d164469 | ||
|
0ec1d4e17c | ||
|
d761d355f9 | ||
|
8d064dfd24 | ||
|
7181cc1f02 | ||
|
60f8e31a2f | ||
|
086c3f3c67 | ||
|
d0b470d1a9 | ||
|
77f76d0be5 | ||
|
892dec0be9 | ||
|
c430d19112 | ||
|
7b8e419d92 | ||
|
4f7613eeb1 | ||
|
01f039538e | ||
|
d2e3a52230 | ||
|
2924825bc6 | ||
|
bd86f94a09 | ||
|
1083533db4 | ||
|
0793d2f5d5 | ||
|
a8c6a9c37a | ||
|
2da99a2946 | ||
|
c3eed40f00 | ||
|
515e341ff6 | ||
|
8bda7a7766 | ||
|
df5d219f39 | ||
|
5656fbf49d | ||
|
19d640e806 | ||
|
207ab51270 | ||
|
c3cc654add | ||
|
b911b879d8 | ||
|
af07f66ca3 | ||
|
dd0c522cd4 | ||
|
37d11c80da | ||
|
1355d7e4f7 | ||
|
fdd603c4c8 | ||
|
1fc6999a77 | ||
|
220f487238 | ||
|
edc00f4ea7 | ||
|
a49e32a1ab | ||
|
dd4ede34ad | ||
|
3aa815755d | ||
|
3261dc7540 | ||
|
771b26a043 | ||
|
36a81129ec | ||
|
a390d0ba52 | ||
|
b759473d10 | ||
|
c3cfae2cf8 | ||
|
3cbfb8a53c | ||
|
275ac97036 | ||
|
abe8c897fd | ||
|
e9d645b3b3 | ||
|
7f0966c13d | ||
|
55295f7b07 | ||
|
9d25d7a2e6 | ||
|
490cbaa89e | ||
|
eb0bde09bb | ||
|
3b12e1b011 | ||
|
2138779559 | ||
|
12943ea0c1 | ||
|
6efb43a210 | ||
|
03cc48474c | ||
|
5672563f7e | ||
|
106743c66b | ||
|
8890dfa634 | ||
|
10f32dbfbf | ||
|
e35eeae8e0 | ||
|
abbb6b9088 | ||
|
3f35a3708a | ||
|
33eafe050b | ||
|
1d1b98f4a4 | ||
|
a0ac30faa5 | ||
|
49e3d5a9c9 | ||
|
3338135ead | ||
|
5dbfc78aff | ||
|
7bc5552512 | ||
|
a330b864e5 | ||
|
7df419b434 | ||
|
7cedfd753b | ||
|
23b8e29835 | ||
|
1c3287f1db | ||
|
922ae9a5bf | ||
|
189d6bf4d4 | ||
|
c8f37cb4d6 | ||
|
c0dcc3c60c | ||
|
230e4fc270 | ||
|
ead2f60f73 | ||
|
f8bfbe8b14 | ||
|
ffd75e420c | ||
|
01d24a3281 | ||
|
0be3ce66c0 | ||
|
fcd0655176 | ||
|
48454983c4 | ||
|
9a3543a8d4 | ||
|
465446b4b4 | ||
|
b597b4fc9d | ||
|
d20910c655 | ||
|
677f4ad968 | ||
|
7c20c9de5a | ||
|
839fc954d0 | ||
|
d164b05655 | ||
|
a896f9cdeb | ||
|
1b0cf6fa1c | ||
|
9bf7c53779 | ||
|
6be0fdb5e4 | ||
|
641c4d47b9 | ||
|
c1b9fa158e | ||
|
6a421f1b6f | ||
|
f1889d8640 | ||
|
2982e42d93 | ||
|
ddf1f9d7d5 | ||
|
653c4ff354 | ||
|
4efce88a62 | ||
|
e7d27aeae1 | ||
|
e6f172dd57 | ||
|
b969455941 | ||
|
54dd4b3f72 | ||
|
dbd88e5167 | ||
|
87203f2a37 | ||
|
1cb1e38dbc | ||
|
e726d4fad2 | ||
|
c341388b30 | ||
|
7bf4ce3aed | ||
|
f4c0e37352 | ||
|
06da85ed3a | ||
|
1dc6be6a82 | ||
|
8348abb372 | ||
|
d8d7b4b188 | ||
|
31c4305225 | ||
|
c7a228aceb | ||
|
e472b4e39a | ||
|
8970c497bc | ||
|
1e0b9f872c | ||
|
8863f7ae64 | ||
|
1ae2d5ebf4 | ||
|
5852a78d2e | ||
|
59e2d518fd | ||
|
062b0f0eee | ||
|
71c619ee05 | ||
|
e3b5de2285 | ||
|
f96e46fcce | ||
|
88d4dae645 | ||
|
8042539444 | ||
|
6ba4406c47 | ||
|
1e940d615a | ||
|
fde78ad412 | ||
|
3d9b656a1c | ||
|
2152f8523e | ||
|
c5ecebb711 | ||
|
020e89bce9 | ||
|
6779354245 | ||
|
87bd9be0b0 | ||
|
f83ec56212 | ||
|
1c8d67d7f5 | ||
|
9d4f1d57f3 | ||
|
d95ab1e9ad | ||
|
a1fa2f4bc3 | ||
|
c221b7ad01 | ||
|
f19acc9a35 | ||
|
53f2bd0443 | ||
|
0c5a16c253 | ||
|
32330aa9be | ||
|
beabe15526 | ||
|
8ec0365ae9 | ||
|
725f924316 | ||
|
3a8e723a0d | ||
|
97df691307 | ||
|
d049a66b79 | ||
|
48dd6c3e73 | ||
|
7eaeb5a416 | ||
|
2fb853fb35 | ||
|
bf0ab74b23 | ||
|
e9920f24b1 | ||
|
b6f6c23fa1 | ||
|
73a93bd4ef | ||
|
28295b939c | ||
|
6542f52dc1 | ||
|
dd9f6cd377 | ||
|
4b60d0782c | ||
|
58cfd25c2f | ||
|
3d24d2947e | ||
|
4d254dd490 | ||
|
c7a58cb239 | ||
|
8f282f23c2 | ||
|
52c43258e5 | ||
|
0c99bb469f | ||
|
ad0161db6c | ||
|
3671968824 | ||
|
4a1e442daa | ||
|
9c10f4a9dc | ||
|
3d80064c59 | ||
|
52bdd62eb3 | ||
|
d0d62499c3 | ||
|
4a6c56bbfb | ||
|
dea26c68e4 | ||
|
4a6d8d95a4 | ||
|
c5f60fb64e | ||
|
02da674ed4 | ||
|
569dc7b6d8 | ||
|
ff4cb11e17 | ||
|
03a3cc7ba5 | ||
|
e802f1a54f | ||
|
1f9a576cdc | ||
|
bc822624e4 | ||
|
b31d2c62a6 | ||
|
3c8d627a08 | ||
|
868e442bd0 | ||
|
b343807cf8 | ||
|
be89bc7278 | ||
|
14af83239a | ||
|
ff6900943a | ||
|
f49519ef46 | ||
|
4d62a999f9 | ||
|
92d6dcbbaf | ||
|
d11e8f358f | ||
|
f694033bc6 | ||
|
06e14c6b72 | ||
|
d7d926620c | ||
|
ac64f87708 | ||
|
a5d7e61308 | ||
|
4bb662b473 | ||
|
d0e4764ecd | ||
|
20515896b3 | ||
|
f226bd5236 | ||
|
b65195fa16 | ||
|
0854d6b156 | ||
|
fad3309556 | ||
|
d5429bb79b | ||
|
3fb8a7ba87 | ||
|
bbb17f0148 | ||
|
ca52991d6e | ||
|
8008ac0175 | ||
|
4755091a8a | ||
|
9282db8be8 | ||
|
d36641a832 | ||
|
4331f25e42 | ||
|
b68ad96406 | ||
|
6571561192 | ||
|
1016fb5c16 | ||
|
48c23b6416 | ||
|
9a9d0560b2 | ||
|
c3bd466259 | ||
|
e44dbcf30a | ||
|
d4ee5923c9 | ||
|
dc6a7cd406 | ||
|
8fd871143f | ||
|
1a232bd900 | ||
|
2e7e4b93a0 | ||
|
30f532b9bd | ||
|
6424b5633c | ||
|
075fc11fce | ||
|
717c7b9692 | ||
|
10d64d5d66 | ||
|
815124952b | ||
|
a1756f320a | ||
|
069e53fbb5 | ||
|
0e5a7c409c | ||
|
2d503d03f4 | ||
|
29dfc91b93 | ||
|
21b48e96c3 | ||
|
3728471963 | ||
|
e7542288bb | ||
|
48a0c6a940 | ||
|
b6cd7934de | ||
|
9f52b06975 | ||
|
f817814c68 | ||
|
7b423edb56 | ||
|
a183a6ed20 | ||
|
0bc77b1283 | ||
|
ffebe6e938 | ||
|
39a7c75814 | ||
|
4c30529a84 | ||
|
3eb991ead2 | ||
|
079d4e0fe9 | ||
|
9e95604394 | ||
|
0c0d70582c | ||
|
85929a7be7 | ||
|
68bd8e434a | ||
|
220dc0c7f6 | ||
|
eab5f594b0 | ||
|
5a44d25ad3 | ||
|
2f8b9d25f8 | ||
|
8b1a2f8cd7 | ||
|
70fdd24d04 | ||
|
9b97b007df | ||
|
a60bb3dd28 | ||
|
c51c1e7950 | ||
|
33e1357a90 | ||
|
4a824ca8fc | ||
|
aef68387ae | ||
|
71d082bec7 | ||
|
8254cf75bf | ||
|
3f86c523ee | ||
|
2abd5e1663 | ||
|
645eb62283 | ||
|
7fe00fb9be | ||
|
0483f33820 | ||
|
0de69a2501 | ||
|
5f72f6fccc | ||
|
271ceca862 | ||
|
2faeb1ac6c | ||
|
722bbb402f | ||
|
f8aeb2cccb | ||
|
f14cb3535c | ||
|
872671e01b | ||
|
a229756885 | ||
|
54050a28ed | ||
|
854bcc2b7b | ||
|
e586f41692 | ||
|
67798617b5 | ||
|
b4999b60d4 | ||
|
94bbc73bce | ||
|
6f483d3a05 | ||
|
1fe2647c5d | ||
|
5265bea76c | ||
|
320960cf9d | ||
|
9f77d7bd0e | ||
|
71124de33c | ||
|
defb6c95c1 | ||
|
845a3a4c59 | ||
|
f39d03ad21 | ||
|
1ebf23b7fe | ||
|
7590ff3fd6 | ||
|
34ce3d93c5 | ||
|
5121576b0c | ||
|
7b62d54b52 | ||
|
2b6c5407b6 | ||
|
7507aef92b | ||
|
93ffbd0029 | ||
|
638ad068e8 | ||
|
fd2c1f90ba | ||
|
310b730798 | ||
|
7b5dbc2805 | ||
|
c6e8a01e70 | ||
|
50eb66996d | ||
|
086067f0a1 | ||
|
7bb383a45c | ||
|
6d8e5198ad | ||
|
6f0e50c833 | ||
|
a18001d506 | ||
|
8b8fca757e | ||
|
2b229ffaef | ||
|
cb1e366094 | ||
|
11e4e41ffc | ||
|
7636c0833b | ||
|
dc9de23523 | ||
|
d75f11e6f2 | ||
|
f9685c1461 | ||
|
689e7e5562 | ||
|
2d92162a6b | ||
|
7f3724e04d | ||
|
4aa75e74f4 | ||
|
36891a7d9d | ||
|
b1e6b37493 | ||
|
9311881bb1 | ||
|
16dcf2ae22 | ||
|
baaf3e242e | ||
|
f7e9a349ef | ||
|
3521af7f3a | ||
|
ce49258a12 | ||
|
dd22a30d75 | ||
|
ca2778cd22 | ||
|
476c4bb7d1 | ||
|
ca06e040cc | ||
|
ac27a99021 | ||
|
88d4fc70d5 | ||
|
6dd0fc685b | ||
|
c103c64e7d | ||
|
3d6cb338c6 | ||
|
e7379fe657 | ||
|
99c9707d1c | ||
|
11368118c9 | ||
|
2459f9fb5a | ||
|
8a215c3d25 | ||
|
b3c7c79c04 | ||
|
dfb138ff09 | ||
|
0722ffc743 | ||
|
6d804b1a7e | ||
|
abf53d87b6 | ||
|
0b61932e7f | ||
|
6ee49d8416 | ||
|
3f8a8f7736 | ||
|
0436e42472 | ||
|
d3270a9c05 | ||
|
5616cdde3a | ||
|
f01bd13ca1 | ||
|
f480b35893 | ||
|
e0d5caa916 | ||
|
acc6e8323a | ||
|
534034580c | ||
|
d015cbd65d | ||
|
27355c9c65 | ||
|
058cd573d8 | ||
|
44468ad531 | ||
|
577a125652 | ||
|
8b24e9f203 | ||
|
c634063ea3 | ||
|
0e5d807297 | ||
|
a369e24cb9 | ||
|
a42855f09f | ||
|
9762b4c579 | ||
|
fe291de36b | ||
|
d2b3399c04 | ||
|
40a91b38ec | ||
|
7a250cc9d9 | ||
|
89a8e722ed | ||
|
94f49a4f08 | ||
|
f13b3c968f | ||
|
a66d8cfcb5 | ||
|
a1613695d1 | ||
|
2c16beeb64 | ||
|
87bfed259d | ||
|
b726c2c72b | ||
|
8dc8f23c07 | ||
|
db0e380558 | ||
|
50422016f0 | ||
|
5ba6fb3ef4 | ||
|
1013550218 | ||
|
17a29ef311 | ||
|
2b5fb8ed66 | ||
|
4f8da6dfd5 | ||
|
48324fed11 | ||
|
bcfee2a0a6 | ||
|
d09b26d487 | ||
|
89837d422e | ||
|
22a735bfd4 | ||
|
e1f8b9244a | ||
|
e02e1e782f | ||
|
d675515bd4 | ||
|
ba1468e4c6 | ||
|
b39053ad6d | ||
|
7d17c3ef61 | ||
|
35706ddd80 | ||
|
26adfd099b | ||
|
a5c71bf39a | ||
|
150abfffbf | ||
|
2d02775b91 | ||
|
725f3f1de0 | ||
|
dac5867af5 | ||
|
3f940fc9ee | ||
|
6934a0fa9e | ||
|
f188623091 | ||
|
42def7205b | ||
|
6c4382b998 | ||
|
471ac7d99c | ||
|
cc7db18e1a | ||
|
d0ef1ed78c | ||
|
f6e51709fc | ||
|
76f048a1fd | ||
|
d32b6d13ed | ||
|
e610e700da | ||
|
881064e9b8 | ||
|
47e1781907 | ||
|
a5e369300f | ||
|
93bafb611a | ||
|
59504dc80f | ||
|
f5e74b5988 | ||
|
b7f41d554b | ||
|
34f012639d | ||
|
c8fc41c2f6 | ||
|
04db87a89f | ||
|
3d07aef800 | ||
|
98bc7fa50d | ||
|
fd161ccce8 | ||
|
34be86b93c | ||
|
fa9abaca26 | ||
|
80abe522e2 | ||
|
532480a705 | ||
|
db142dc59d | ||
|
a191dcd8f0 | ||
|
b42dc43e28 | ||
|
9fdb4e5f2f | ||
|
5fa8b083cc | ||
|
549ebc7d6c | ||
|
6903848029 | ||
|
b735390284 | ||
|
59d57da1e5 | ||
|
0c32685898 | ||
|
ea619f1704 | ||
|
ecdfd6d097 | ||
|
37f9252361 | ||
|
2fa74faf92 | ||
|
3cbc052101 | ||
|
73ed45599b | ||
|
2e109f08c0 | ||
|
28786bb209 | ||
|
2c1f8c8ceb | ||
|
3d6b9f4fe9 | ||
|
11ecc9320c | ||
|
49012f14dd | ||
|
736474ce45 | ||
|
ef022783c3 | ||
|
eaaee92db5 | ||
|
814fef04b0 | ||
|
3df5d53a04 | ||
|
4f8e34b226 | ||
|
08586c68db | ||
|
bd33f54444 | ||
|
82caa3e9b7 | ||
|
688231331b | ||
|
3e6768937e | ||
|
d53e9b51b6 | ||
|
c3b94f92c5 | ||
|
1611df5226 | ||
|
b8e8d0a402 | ||
|
c59e28fa5e | ||
|
1cd50585e9 | ||
|
4a7d0e79cc | ||
|
2327cede9c | ||
|
8d35965f24 | ||
|
c346f87371 | ||
|
8825c69409 | ||
|
e14f4b93f2 | ||
|
2440f49a72 | ||
|
ec16c16193 | ||
|
f788d93382 | ||
|
2b9c53408f | ||
|
ce090f890b | ||
|
50669bebdb | ||
|
42eb0141d7 | ||
|
640b794de0 | ||
|
7398395cc0 | ||
|
1a60644eb2 | ||
|
ea11bf8095 | ||
|
06d39fdb72 | ||
|
b90eabfb46 | ||
|
2c05f75bbf | ||
|
e235441f73 | ||
|
6a366055dd | ||
|
05667a0aff | ||
|
ac1f1436e9 | ||
|
43273c63de | ||
|
eb52aad198 | ||
|
143a274051 | ||
|
487436138e | ||
|
be67050a36 | ||
|
3c165d02bb | ||
|
54f44ec585 | ||
|
18712f0bd1 | ||
|
96df077083 | ||
|
b0993e61d0 | ||
|
7b6bae6584 | ||
|
28f637ec2c | ||
|
e78ae21ff4 | ||
|
2d521a0296 | ||
|
27681a3407 | ||
|
402006dfdf | ||
|
c69ee8527c | ||
|
16606c9007 | ||
|
5085e0bf4c | ||
|
26f6ced05c | ||
|
80ccb95267 | ||
|
96638d141e | ||
|
309425e105 | ||
|
38cba5aa79 | ||
|
fb89b9b00b | ||
|
c04c6ed4af | ||
|
7d3093506a | ||
|
bb42eee113 | ||
|
beade314d0 | ||
|
58273f4b88 | ||
|
eae68292bd | ||
|
fe7be8ddd0 | ||
|
c1efa67c13 | ||
|
dfe48fdecf | ||
|
af9a9b0b44 | ||
|
87ef68eb33 | ||
|
f926f45c4b | ||
|
194b4cb4fd | ||
|
b4ecc1d43b | ||
|
6bbcfbb78c | ||
|
8136e4b9af | ||
|
7975ddf0ec | ||
|
4579978983 | ||
|
46edbc4162 | ||
|
686f4d6a85 | ||
|
424656e527 | ||
|
591e1d7daa | ||
|
b748012d31 | ||
|
350f93e1e4 | ||
|
0c566a444b | ||
|
5e5d94cd1b | ||
|
d37981e8f7 | ||
|
b4cb838092 | ||
|
05adbdcb2e | ||
|
87c0056480 | ||
|
ae9beda150 | ||
|
1b76a03cdd | ||
|
8c53c59bfb | ||
|
582e4f6276 | ||
|
fbd96f55fd | ||
|
39ae17fb69 | ||
|
4c2d4ab5db | ||
|
e072da9d2e | ||
|
20436c8506 | ||
|
30f7310a62 | ||
|
3edd0b03d5 | ||
|
b6591072d8 | ||
|
f1a56dea7b | ||
|
1e646f02f4 | ||
|
756fb30c8a | ||
|
a6ba6a370b | ||
|
5275c152e5 | ||
|
2d66bb2099 | ||
|
63c18ca791 | ||
|
3316397921 | ||
|
92f552f344 | ||
|
38e9ea3f7f | ||
|
a8f91df851 | ||
|
b81031292b | ||
|
ea291e3004 | ||
|
0867b72055 | ||
|
0a45c1e77d | ||
|
aba82097b6 | ||
|
c6a44bbab9 | ||
|
caeb62d7ff | ||
|
7e5bb6283d | ||
|
3ea9fece6d | ||
|
255dbfe655 | ||
|
23c3aa37ac | ||
|
c3f72f63af | ||
|
2afffd5cf6 | ||
|
e289a2a86a | ||
|
8d878e8a28 | ||
|
57e8a1fee0 | ||
|
3163f336f2 | ||
|
dab3e34d0b | ||
|
89d20b60ef | ||
|
23d37c91af | ||
|
a9f2bb5ab8 | ||
|
5e0b0a658f | ||
|
663debcb90 | ||
|
43d86bfc94 | ||
|
c13e687742 | ||
|
77c8d5ffb5 | ||
|
d90fa42dc9 | ||
|
0ce98c749a | ||
|
73f83d533b | ||
|
d8b45778de | ||
|
0b11db7e9f | ||
|
f1f34360fb | ||
|
2c7f83762a | ||
|
b3e116c74d | ||
|
22611be3d9 | ||
|
308cb0719d | ||
|
7c359eb4b4 | ||
|
8ce66fd19e | ||
|
1e918c3d31 | ||
|
ffaed9eed2 | ||
|
378a492fd9 | ||
|
0b607297e6 | ||
|
d1fdefedf1 | ||
|
6d82c351b9 | ||
|
ab04fb2d50 | ||
|
292ec58e67 | ||
|
2867f883a1 | ||
|
b3d8706bea | ||
|
aa386d29fd | ||
|
c2f2ad8a5f | ||
|
7b6673fa06 | ||
|
58f446ca08 | ||
|
a173566b35 | ||
|
21b269f814 | ||
|
c17cdb40b5 | ||
|
fac9758820 | ||
|
5b2363ebb2 | ||
|
af241727a9 | ||
|
1dee2b6e96 | ||
|
3ecfbbba6f | ||
|
770f3e32e0 | ||
|
7bc6986f6b | ||
|
6b7b319d54 | ||
|
61329d45b8 | ||
|
6292c8d44d | ||
|
9bc42ec47b | ||
|
7e82ad20fa | ||
|
4b95b5401c | ||
|
b847a21fa4 | ||
|
d75864f6f5 | ||
|
746c7896cb | ||
|
f4daf16c8d | ||
|
bfa8878a07 | ||
|
4ac3aee711 | ||
|
3ec03d5048 | ||
|
a536fc644b | ||
|
d5d39ae2b6 | ||
|
423269f803 | ||
|
baa6c5546e | ||
|
a0a08d80b8 | ||
|
d35fc4408c | ||
|
a2ef7d6477 | ||
|
b74a2c8e29 | ||
|
cd150a8f74 | ||
|
2ae305de46 | ||
|
7130683ffe | ||
|
20423ea6cf | ||
|
4e699a9cbf | ||
|
76a0ad7fe9 | ||
|
5486025b18 | ||
|
3673380cdb | ||
|
723f7c7db3 | ||
|
91dfa86c18 | ||
|
1f6a9ba7e5 | ||
|
dbb6392368 | ||
|
2a63d01c1e | ||
|
b6f565c97d | ||
|
2f44693fad | ||
|
158b5d2bdb | ||
|
beca090586 | ||
|
3ed214c7b0 | ||
|
5f0c71b7d5 | ||
|
c5e75f3e6a | ||
|
d3b7fa837d | ||
|
b91e6002a6 | ||
|
7af652c0b2 | ||
|
fdd9ad7c40 | ||
|
f58852d117 | ||
|
9518ffc299 | ||
|
4673b86f3d | ||
|
d384110d3d | ||
|
6e999b75fa | ||
|
cf7933892a | ||
|
e2eb5cb6a1 | ||
|
2e84b60652 | ||
|
ec1b5a0e9e | ||
|
350533cc32 | ||
|
e3dc498e01 | ||
|
e443145d3e | ||
|
d1c0e3755f | ||
|
bbbcfe5b73 | ||
|
745857277c | ||
|
34b8b5b29b | ||
|
c165876223 | ||
|
f29dd5f15b | ||
|
8151648ceb | ||
|
4007468014 | ||
|
c6926d064d | ||
|
67933a19d6 | ||
|
7c989e7ced | ||
|
14314bd808 | ||
|
b1c227e5ab | ||
|
17a6bab150 | ||
|
d091b8de21 | ||
|
15fcd10fde | ||
|
b572d7c45e | ||
|
9ddd8e6267 | ||
|
9331df16cf | ||
|
1de159168c | ||
|
82040101eb | ||
|
b997f84443 | ||
|
5aa5196fbf | ||
|
4011e728d2 | ||
|
9759374adb | ||
|
a3d93ed2f9 | ||
|
5754206379 | ||
|
176b62a80c | ||
|
e6052c4cc7 | ||
|
9f8f9b8021 | ||
|
3955025c2a | ||
|
93408ae727 | ||
|
896c6f8e9e | ||
|
488902db2a | ||
|
dd49beebb1 | ||
|
3f2212235c | ||
|
b0cc64274a | ||
|
efedf80526 | ||
|
82c8f75f71 | ||
|
241bda03b4 | ||
|
29048b2a80 | ||
|
f8e02aa4e3 | ||
|
349108801f | ||
|
832afa3f4b | ||
|
285df2ec62 | ||
|
3201988f7b | ||
|
c1fbdedcd3 | ||
|
2ebacce4fa | ||
|
0fcd2e2fec | ||
|
e152ffe14d | ||
|
b8afb5fda2 | ||
|
9df268e217 | ||
|
3adb23cfc5 | ||
|
a66852525a | ||
|
0434efa077 | ||
|
ec744655b4 | ||
|
f5fe31d513 | ||
|
ae3f0718f1 | ||
|
35a65edd10 | ||
|
f5713a5c63 | ||
|
6079528b48 | ||
|
9329e6fb49 | ||
|
3af9660e51 | ||
|
9f5d231f00 | ||
|
3e62d415ac | ||
|
ddee01fa8f | ||
|
d7df7ae392 | ||
|
f9f4387686 | ||
|
7ec8ca422c | ||
|
2b2429eb59 | ||
|
dbc72b37ee | ||
|
e98ba82d2b | ||
|
49393e128e | ||
|
62ff38447c | ||
|
f97ee04563 | ||
|
97165f386f | ||
|
e1197481e5 | ||
|
a9ca72d907 | ||
|
85f8fdabc3 | ||
|
51fbc5f6e0 | ||
|
0f46f9ca5a | ||
|
69e9c0dfc6 | ||
|
82dd983dd8 | ||
|
307e40648e | ||
|
5b692d0a5c | ||
|
ddf4e1e114 | ||
|
ed04fcc179 | ||
|
aea28ceb27 | ||
|
ea8e983514 | ||
|
7184bd088e | ||
|
8495e03588 | ||
|
5493d87f95 | ||
|
2fa7d8464f | ||
|
63081fe34d | ||
|
e21cf38da4 | ||
|
8a4d2e756d | ||
|
c08ee71bff | ||
|
9a7e25b9c3 | ||
|
a8d8e93086 | ||
|
34e2b09278 | ||
|
cd5e52605c | ||
|
7c55ede8b1 | ||
|
5f2524fe3d | ||
|
5d547a4358 | ||
|
d8aa412c46 | ||
|
564c06525b | ||
|
31760a1f60 | ||
|
23d77d56ea | ||
|
50f1c0af56 | ||
|
eff215a8bb | ||
|
7ca035deca | ||
|
85234a32db | ||
|
842674b8b3 | ||
|
28903a99ea | ||
|
d3fa84dbba | ||
|
53373bca8f | ||
|
121e9a4164 | ||
|
3ffce19cb4 | ||
|
35697b9a10 | ||
|
299a999465 | ||
|
e01f5050ef | ||
|
8db12e4263 | ||
|
aafff96c40 | ||
|
26679e0475 | ||
|
27c3e76aa7 | ||
|
0c1bc26b64 | ||
|
36212f2850 | ||
|
3a434f8e8c | ||
|
e43f8e0400 | ||
|
59a1bf3dae | ||
|
5fa7e36bbc | ||
|
f3f3505f49 | ||
|
c9ac20ea43 | ||
|
a6e81a0986 | ||
|
312bf6ce8b | ||
|
8bb6204d50 | ||
|
2abf2b072d | ||
|
e98c9c7136 | ||
|
84ae27e731 | ||
|
44ed4979c9 | ||
|
f1a61bb99f | ||
|
4936448761 | ||
|
82f5ecde6a | ||
|
70cf7290da | ||
|
a47b401990 | ||
|
714b170f89 | ||
|
7a301d3576 | ||
|
f220b52df3 | ||
|
e5686f21d6 | ||
|
687f048ab0 | ||
|
9bcb1a56cb | ||
|
adb86759da | ||
|
2826df56b2 | ||
|
de392254ff | ||
|
7dd2eed6d3 | ||
|
c6a65511f3 | ||
|
740e65fb7b | ||
|
3a38ee6c3d | ||
|
cf1302e4cb | ||
|
0d929be826 | ||
|
4e875aec0f | ||
|
f9b212fabd | ||
|
d617c5d3ac | ||
|
4554a62c4d | ||
|
37984bdb1b | ||
|
56ea30ff3f | ||
|
3ad0346f00 | ||
|
044fbe6568 | ||
|
d2fa7a509a | ||
|
f4afcf0b23 | ||
|
10cd11345c | ||
|
8c515272c3 | ||
|
961bd0b121 | ||
|
531734a547 | ||
|
51273157fa | ||
|
6a1d172c95 | ||
|
45ee133d1d | ||
|
5b38312b92 | ||
|
49b83d8f67 | ||
|
a7313dd886 | ||
|
fea1df8587 | ||
|
1b0e5540db | ||
|
73828152d9 | ||
|
fc7add20e1 | ||
|
f4a3123145 | ||
|
0ade63233b | ||
|
fa0f71526c | ||
|
58d5430dd5 | ||
|
127fc93a13 | ||
|
547f048c89 | ||
|
fd1187e2e9 | ||
|
1901b92f0c | ||
|
69da1d453c | ||
|
03933a49de | ||
|
389a62d752 | ||
|
5ac4aadd1a | ||
|
1330478aa5 | ||
|
d35957a7d9 | ||
|
d58c033305 | ||
|
e7bcdc3bda | ||
|
9158089fa8 | ||
|
3fbf0a3735 | ||
|
2259c7528e | ||
|
28e9f60404 | ||
|
bafc1e4cfe | ||
|
e9f420d487 | ||
|
8239e063b9 | ||
|
1da0a7e229 | ||
|
6d575cbe57 | ||
|
34cf923704 | ||
|
9c4f1d6fd0 | ||
|
1bf8617610 | ||
|
de76661cf3 | ||
|
f9f44901a2 | ||
|
fec29ab4e9 | ||
|
7ba088bdf0 | ||
|
91e0e1b038 | ||
|
22a7142129 | ||
|
6cacc56d8e | ||
|
5cb480a4c0 | ||
|
cdc548cb0a | ||
|
69a720f3be | ||
|
da5359f1b6 | ||
|
720372e4e8 | ||
|
4adca4e8af | ||
|
0a8cf32a48 | ||
|
53d51f501c | ||
|
da8a19fec0 | ||
|
36948bf7c7 | ||
|
4d2b3ff6a2 | ||
|
d010c49407 | ||
|
bee75969cc | ||
|
ee07e4f75d | ||
|
f6e4d08219 | ||
|
328d2f78c1 | ||
|
23d09cc904 | ||
|
ee1e5d758e | ||
|
e38fb66f4b | ||
|
956d856b61 | ||
|
ba0525e3d8 | ||
|
28a70f20cd | ||
|
9d8f506f7f | ||
|
5d5c31a367 | ||
|
5c7dcf9665 | ||
|
3f015f04b1 | ||
|
c14574b567 | ||
|
d8352d75b6 | ||
|
c696cc28d8 | ||
|
e1ba781f7b | ||
|
f8c701008b | ||
|
1ae3ebd68b | ||
|
ca2361c237 | ||
|
d53c6046bc | ||
|
e5a0798c9c | ||
|
8c5b073072 | ||
|
8defadbdd2 | ||
|
59c1b645e2 | ||
|
87c83d0b89 | ||
|
d8660ef090 | ||
|
c6d51f5fb4 | ||
|
996ec1d731 | ||
|
18d3049612 | ||
|
237fee649e | ||
|
936b890f71 | ||
|
be4bebaad0 | ||
|
4573ca8834 | ||
|
52c0bd3025 | ||
|
bc44330671 | ||
|
3fdba2ed5a | ||
|
7559910e8c | ||
|
99a50b3529 | ||
|
10fc024472 | ||
|
2f67125c32 | ||
|
800126b1f3 | ||
|
cd865d62f0 | ||
|
085500807c | ||
|
ff4b630de9 | ||
|
817bc32696 | ||
|
a9905a51f9 | ||
|
7174b169e0 | ||
|
d121ea6124 | ||
|
f977320736 | ||
|
ba9e9f63bc | ||
|
8d1ffbd3ba | ||
|
005f175c3b | ||
|
fc1be3a0c1 | ||
|
e54cd1555a | ||
|
2c8b58139f | ||
|
1aa0e47104 | ||
|
508514c7c5 | ||
|
29d926be12 | ||
|
231653a8d0 | ||
|
4b2cbdab3e | ||
|
1ba50c6598 | ||
|
dba6d1af69 | ||
|
20bd6bfef5 | ||
|
1ed9a8673d | ||
|
b6c2db569f | ||
|
d9b1d49485 | ||
|
4960fab767 | ||
|
e2ed8e6cc3 | ||
|
334af5dd9d | ||
|
5e95a41194 | ||
|
e5e78c21bb | ||
|
ff252bb801 | ||
|
8fbfaa51bb | ||
|
4ae165da61 | ||
|
a4370dd969 | ||
|
273f875c42 | ||
|
6a8cbe9718 | ||
|
97b6bfa996 | ||
|
1b9c815024 | ||
|
557c84e9f7 | ||
|
a2bbc5ec0e | ||
|
ae2c18c57b | ||
|
0d21ac8f5a | ||
|
24e3c3e136 | ||
|
6187e010a8 | ||
|
3c820ee532 | ||
|
3d3aa8fb88 | ||
|
4034897038 | ||
|
ad945b6aa7 | ||
|
9cfe037559 | ||
|
063a802d46 | ||
|
390e910125 | ||
|
a208c734a2 | ||
|
16c3f57ed6 | ||
|
3317c84c16 | ||
|
c83cd898ef | ||
|
e921e32c82 | ||
|
c227594394 | ||
|
5b664f4b9b | ||
|
bb3d6785e1 | ||
|
30f7bcbd79 | ||
|
c8a614d2e9 | ||
|
65482c919f | ||
|
98fa3dc1c6 | ||
|
9270dc8ca3 | ||
|
4316cb2f25 | ||
|
292769e19e | ||
|
46caed8fc4 | ||
|
64630cccc7 | ||
|
11cb27ece6 | ||
|
568a727550 | ||
|
9c534fdbe8 | ||
|
89ef324eab | ||
|
f06046b6af | ||
|
d739f092be | ||
|
d48f057328 | ||
|
fe60cfb1d6 | ||
|
69ca8f01ec | ||
|
537d480f39 | ||
|
d1554ecb78 | ||
|
044ce5fb84 | ||
|
133e8624ef | ||
|
cf15187458 | ||
|
a777c9ee3d | ||
|
9861c122dd | ||
|
fa07b489dc | ||
|
f3316e30d6 | ||
|
d74cce266b | ||
|
6962127982 | ||
|
1afe7c7fe5 | ||
|
20626dde8f | ||
|
6598ded5cd | ||
|
15a40db606 | ||
|
b45e4d80b6 | ||
|
641d387409 | ||
|
2aedfbdfe1 | ||
|
62a63f54a6 | ||
|
6cf0249dac | ||
|
cdeb815c78 | ||
|
b3cbd9aa3b | ||
|
0e62e595a6 | ||
|
06cfe00c71 | ||
|
8b4e584621 | ||
|
7a77d0155f | ||
|
a174a47811 | ||
|
615ed46a6a | ||
|
11cb7a9fd9 | ||
|
130be40c3e | ||
|
d3496aed69 | ||
|
3e4e8cfb74 | ||
|
925504bfe0 | ||
|
e57e0fa701 | ||
|
732665269e | ||
|
354d1f3084 | ||
|
c6a8d09b78 | ||
|
51cf69cdb4 | ||
|
4b4a187b4f | ||
|
53122b09d0 | ||
|
c21dcb20e5 | ||
|
c8a6c13e4e | ||
|
ffbf45e09e | ||
|
08c508f84a | ||
|
d721579a6a | ||
|
92360b15e3 | ||
|
614aba391d | ||
|
79135acbb8 | ||
|
e5ba92e7be | ||
|
e18f78e81d | ||
|
8fc568466c | ||
|
0190d790b6 | ||
|
c390ae8eaf | ||
|
e6ed009a36 | ||
|
ceef936ea8 | ||
|
57e95a22f0 | ||
|
ecff2424e5 | ||
|
b9845f937e | ||
|
6b39feedc7 | ||
|
601cf12f81 | ||
|
eb98c74fb1 | ||
|
22df4ac848 | ||
|
78fa99103d | ||
|
6a19dd0d31 | ||
|
9450882901 | ||
|
39ba248608 | ||
|
4d4944a07d | ||
|
93e795c1fd | ||
|
4c97435b35 | ||
|
d17bc7b3a8 | ||
|
a334e90ddf | ||
|
aeadf261e5 | ||
|
ca7d05bdb9 | ||
|
a611da8407 | ||
|
0eaad4f216 | ||
|
e9f7c9925c | ||
|
29d58b734d | ||
|
c9dbe3c7b1 | ||
|
2f25764e51 | ||
|
5425e5ea27 | ||
|
8159455506 | ||
|
e019b564ec | ||
|
eb48cafac9 | ||
|
778c7d1544 | ||
|
ba43365e96 | ||
|
469f992b2b | ||
|
b618c7ec9b | ||
|
daaea0c84f | ||
|
5c06e4045a | ||
|
145e2532f4 | ||
|
666e36aea9 | ||
|
5f8a0c5c70 | ||
|
d15409876c | ||
|
4672059d94 | ||
|
a2c41c42b1 | ||
|
1e365477ee | ||
|
14a434b9d6 | ||
|
7c19c6b406 | ||
|
42cf2e03c9 | ||
|
dcbc83355e | ||
|
e3c391e8d0 | ||
|
af1b968b22 | ||
|
b69518f383 | ||
|
58ec15c4ed | ||
|
9f95ae8885 | ||
|
8ee53ed9ec | ||
|
694d98042f | ||
|
e2ac6b77fe | ||
|
9705671025 | ||
|
fce6971fe3 | ||
|
8a8df80772 | ||
|
0363d1bb97 | ||
|
aa0cecd9b7 | ||
|
2dd18bdd87 | ||
|
57ee780789 | ||
|
797eb7b592 | ||
|
4bb3fccb75 | ||
|
b25c8342cc | ||
|
c58a1e573b | ||
|
ce97a06fa3 | ||
|
0958938d4e | ||
|
f2e114ac85 | ||
|
65b0efe56e | ||
|
c36a13b073 | ||
|
9cb249bf84 | ||
|
5fd0c64e0a | ||
|
b7ae0b34f9 | ||
|
a5a6da46a0 | ||
|
39c430ee29 | ||
|
66e7106d39 | ||
|
ccd2312d10 | ||
|
7605bdc02c | ||
|
08bb84b04e | ||
|
9270d99f3d | ||
|
5e4b88cbb2 | ||
|
8ee13e2937 | ||
|
10c0f56a0e | ||
|
0bb5674cde | ||
|
e54a24d4e6 | ||
|
0f7a279a06 | ||
|
c1c6a28c8d | ||
|
4c6e667968 | ||
|
072bee5c85 | ||
|
267fd0c7f7 | ||
|
d6900dfba4 | ||
|
6ddb6ac028 | ||
|
22093ef964 | ||
|
77ff1c40e2 | ||
|
446f8403d1 | ||
|
7882d2751f | ||
|
c15c61c401 | ||
|
4f5b8237ec | ||
|
b100895557 | ||
|
20de3ae17c | ||
|
b448dd849a |
118
.clang-format
Normal file
118
.clang-format
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
#
|
||||||
|
# clang-format configuration file. Intended for clang-format >= 4.
|
||||||
|
#
|
||||||
|
# For more information, see:
|
||||||
|
#
|
||||||
|
# Documentation/process/clang-format.rst
|
||||||
|
# https://clang.llvm.org/docs/ClangFormat.html
|
||||||
|
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||||
|
#
|
||||||
|
---
|
||||||
|
AccessModifierOffset: -4
|
||||||
|
AlignAfterOpenBracket: Align
|
||||||
|
AlignConsecutiveAssignments: false
|
||||||
|
AlignConsecutiveDeclarations: false
|
||||||
|
#AlignEscapedNewlines: Left # Unknown to clang-format-4.0
|
||||||
|
AlignOperands: true
|
||||||
|
AlignTrailingComments: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
AllowShortBlocksOnASingleLine: false
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: None
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
AlwaysBreakTemplateDeclarations: false
|
||||||
|
BinPackArguments: true
|
||||||
|
BinPackParameters: true
|
||||||
|
BraceWrapping:
|
||||||
|
AfterClass: false
|
||||||
|
AfterControlStatement: false
|
||||||
|
AfterEnum: false
|
||||||
|
AfterFunction: true
|
||||||
|
AfterNamespace: true
|
||||||
|
AfterObjCDeclaration: false
|
||||||
|
AfterStruct: false
|
||||||
|
AfterUnion: false
|
||||||
|
#AfterExternBlock: false # Unknown to clang-format-5.0
|
||||||
|
BeforeCatch: false
|
||||||
|
BeforeElse: false
|
||||||
|
IndentBraces: false
|
||||||
|
#SplitEmptyFunction: true # Unknown to clang-format-4.0
|
||||||
|
#SplitEmptyRecord: true # Unknown to clang-format-4.0
|
||||||
|
#SplitEmptyNamespace: true # Unknown to clang-format-4.0
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
BreakBeforeBraces: Custom
|
||||||
|
#BreakBeforeInheritanceComma: false # Unknown to clang-format-4.0
|
||||||
|
BreakBeforeTernaryOperators: false
|
||||||
|
BreakConstructorInitializersBeforeComma: false
|
||||||
|
#BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0
|
||||||
|
BreakAfterJavaFieldAnnotations: false
|
||||||
|
BreakStringLiterals: false
|
||||||
|
ColumnLimit: 120
|
||||||
|
CommentPragmas: '^ IWYU pragma:'
|
||||||
|
#CompactNamespaces: false # Unknown to clang-format-4.0
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||||
|
ConstructorInitializerIndentWidth: 8
|
||||||
|
ContinuationIndentWidth: 8
|
||||||
|
Cpp11BracedListStyle: false
|
||||||
|
DerivePointerAlignment: false
|
||||||
|
DisableFormat: false
|
||||||
|
ExperimentalAutoDetectBinPacking: false
|
||||||
|
#FixNamespaceComments: false # Unknown to clang-format-4.0
|
||||||
|
|
||||||
|
#IncludeBlocks: Preserve # Unknown to clang-format-5.0
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '.*'
|
||||||
|
Priority: 1
|
||||||
|
IncludeIsMainRegex: '(Test)?$'
|
||||||
|
IndentCaseLabels: false
|
||||||
|
#IndentPPDirectives: None # Unknown to clang-format-5.0
|
||||||
|
IndentWidth: 8
|
||||||
|
IndentWrappedFunctionNames: false
|
||||||
|
JavaScriptQuotes: Leave
|
||||||
|
JavaScriptWrapImports: true
|
||||||
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
|
MacroBlockBegin: ''
|
||||||
|
MacroBlockEnd: ''
|
||||||
|
MaxEmptyLinesToKeep: 1
|
||||||
|
NamespaceIndentation: None
|
||||||
|
#ObjCBinPackProtocolList: Auto # Unknown to clang-format-5.0
|
||||||
|
ObjCBlockIndentWidth: 8
|
||||||
|
ObjCSpaceAfterProperty: true
|
||||||
|
ObjCSpaceBeforeProtocolList: true
|
||||||
|
|
||||||
|
# Taken from git's rules
|
||||||
|
#PenaltyBreakAssignment: 10 # Unknown to clang-format-4.0
|
||||||
|
PenaltyBreakBeforeFirstCallParameter: 30
|
||||||
|
PenaltyBreakComment: 10
|
||||||
|
PenaltyBreakFirstLessLess: 0
|
||||||
|
PenaltyBreakString: 10
|
||||||
|
PenaltyExcessCharacter: 100
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 60
|
||||||
|
|
||||||
|
PointerAlignment: Right
|
||||||
|
ReflowComments: false
|
||||||
|
SortIncludes: false
|
||||||
|
#SortUsingDeclarations: false # Unknown to clang-format-4.0
|
||||||
|
SpaceAfterCStyleCast: false
|
||||||
|
SpaceAfterTemplateKeyword: true
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
#SpaceBeforeCtorInitializerColon: true # Unknown to clang-format-5.0
|
||||||
|
#SpaceBeforeInheritanceColon: true # Unknown to clang-format-5.0
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
#SpaceBeforeRangeBasedForLoopColon: true # Unknown to clang-format-5.0
|
||||||
|
SpaceInEmptyParentheses: false
|
||||||
|
SpacesBeforeTrailingComments: 1
|
||||||
|
SpacesInAngles: false
|
||||||
|
SpacesInContainerLiterals: false
|
||||||
|
SpacesInCStyleCastParentheses: false
|
||||||
|
SpacesInParentheses: false
|
||||||
|
SpacesInSquareBrackets: false
|
||||||
|
Standard: Cpp03
|
||||||
|
TabWidth: 8
|
||||||
|
UseTab: Always
|
||||||
|
...
|
70
.gitignore
vendored
70
.gitignore
vendored
@@ -1 +1,71 @@
|
|||||||
debian/*.log
|
debian/*.log
|
||||||
|
*.o
|
||||||
|
*.lo
|
||||||
|
*.a
|
||||||
|
*.la
|
||||||
|
.deps
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
bscconfig.h
|
||||||
|
bscconfig.h.in
|
||||||
|
src/osmo-mgw/osmo-mgw
|
||||||
|
*.*~
|
||||||
|
*.sw?
|
||||||
|
.libs
|
||||||
|
*.pyc
|
||||||
|
*.gcda
|
||||||
|
*.gcno
|
||||||
|
*.pc
|
||||||
|
*~
|
||||||
|
|
||||||
|
#configure
|
||||||
|
aclocal.m4
|
||||||
|
autom4te.cache/
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
config.guess
|
||||||
|
config.sub
|
||||||
|
configure
|
||||||
|
compile
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
missing
|
||||||
|
stamp-h1
|
||||||
|
libtool
|
||||||
|
ltmain.sh
|
||||||
|
m4/*.m4
|
||||||
|
|
||||||
|
# git-version-gen magic
|
||||||
|
.tarball-version
|
||||||
|
.version
|
||||||
|
|
||||||
|
|
||||||
|
#tests
|
||||||
|
tests/testsuite.dir
|
||||||
|
tests/*/*_test
|
||||||
|
|
||||||
|
tests/atconfig
|
||||||
|
tests/atlocal
|
||||||
|
tests/package.m4
|
||||||
|
tests/testsuite
|
||||||
|
tests/testsuite.log
|
||||||
|
|
||||||
|
writtenconfig/
|
||||||
|
|
||||||
|
# manuals
|
||||||
|
doc/manuals/*.html
|
||||||
|
doc/manuals/*.svg
|
||||||
|
doc/manuals/*.pdf
|
||||||
|
doc/manuals/*__*.png
|
||||||
|
doc/manuals/*.check
|
||||||
|
doc/manuals/generated/
|
||||||
|
doc/manuals/osmomsc-usermanual.xml
|
||||||
|
doc/manuals/common
|
||||||
|
doc/manuals/build
|
||||||
|
|
||||||
|
contrib/osmo-mgw.spec
|
||||||
|
|
||||||
|
#vs code
|
||||||
|
.cache
|
||||||
|
.vscode
|
||||||
|
|
||||||
|
3
.gitreview
Normal file
3
.gitreview
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[gerrit]
|
||||||
|
host=gerrit.osmocom.org
|
||||||
|
project=osmo-mgw
|
12
.mailmap
Normal file
12
.mailmap
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Harald Welte <laforge@gnumonks.org>
|
||||||
|
Harald Welte <laforge@gnumonks.org> <laflocal@hanuman.gnumonks.org>
|
||||||
|
Harald Welte <laforge@gnumonks.org> <laflocal@goeller.de.gnumonks.org>
|
||||||
|
Holger Hans Peter Freyther <holger@moiji-mobile.com> <zecke@selfish.org>
|
||||||
|
Holger Hans Peter Freyther <holger@moiji-mobile.com> <ich@tamarin.(none)>
|
||||||
|
Holger Hans Peter Freyther <holgre@moiji-mobile.com> <holger@freyther.de>
|
||||||
|
Andreas Eversberg <jolly@eversberg.eu>
|
||||||
|
Andreas Eversberg <jolly@eversberg.eu> <Andreas.Eversberg@versatel.de>
|
||||||
|
Andreas Eversberg <jolly@eversberg.eu> <root@nuedel.(none)>
|
||||||
|
Pablo Neira Ayuso <pablo@soleta.eu> <pablo@gnumonks.org>
|
||||||
|
Max Suraev <msuraev@sysmocom.de>
|
||||||
|
Tom Tsou <tom.tsou@ettus.com> <tom@tsou.cc>
|
@@ -5,3 +5,5 @@ Stefan Schmidt <stefan@datenfreihafen.org>
|
|||||||
Daniel Willmann <daniel@totalueberwachung.de>
|
Daniel Willmann <daniel@totalueberwachung.de>
|
||||||
Andreas Eversberg <Andreas.Eversberg@versatel.de>
|
Andreas Eversberg <Andreas.Eversberg@versatel.de>
|
||||||
Sylvain Munaut <246tnt@gmail.com>
|
Sylvain Munaut <246tnt@gmail.com>
|
||||||
|
Jacob Erlbeck <jerlbeck@sysmocom.de>
|
||||||
|
Neels Hofmeyr <nhofmeyr@sysmocom.de>
|
41
Makefile.am
Normal file
41
Makefile.am
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
|
||||||
|
|
||||||
|
## FIXME: automake >= 1.13 or autoconf >= 2.70 provide better suited AC_CONFIG_MACRO_DIRS for configure.ac
|
||||||
|
## remove line below when OE toolchain is updated to version which include those
|
||||||
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
AM_CPPFLAGS = \
|
||||||
|
$(all_includes) \
|
||||||
|
-I$(top_srcdir)/include \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
SUBDIRS = \
|
||||||
|
include \
|
||||||
|
src \
|
||||||
|
tests \
|
||||||
|
doc \
|
||||||
|
contrib \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = \
|
||||||
|
libosmo-mgcp-client.pc \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
BUILT_SOURCES = $(top_srcdir)/.version
|
||||||
|
EXTRA_DIST = \
|
||||||
|
.version \
|
||||||
|
README.md \
|
||||||
|
debian \
|
||||||
|
git-version-gen \
|
||||||
|
osmoappdesc.py \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
AM_DISTCHECK_CONFIGURE_FLAGS = \
|
||||||
|
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
|
||||||
|
|
||||||
|
@RELMAKE@
|
||||||
|
|
||||||
|
$(top_srcdir)/.version:
|
||||||
|
echo $(VERSION) > $@-t && mv $@-t $@
|
||||||
|
dist-hook:
|
||||||
|
echo $(VERSION) > $(distdir)/.tarball-version
|
102
README.md
Normal file
102
README.md
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
osmo-mgw - Osmocom MGW (Media GateWay) Implementation
|
||||||
|
=====================================================
|
||||||
|
|
||||||
|
This repository contains a C-language implementation of an MGW (Media
|
||||||
|
GateWay) for use [not only] within the 2G (GSM) and/or 3G (UMTS)
|
||||||
|
Cellular Network built using Osmocom CNI (Cellular Network
|
||||||
|
Infrastructure) software.
|
||||||
|
|
||||||
|
The OsmoMGW program provides an MGCP interface towards an MGCP call agent
|
||||||
|
(client) like OsmoMSC and OsmoBSC, and receives and sends RTP streams as
|
||||||
|
configured via the MGCP control plane.
|
||||||
|
|
||||||
|
This Media Gateway implementation is capable of
|
||||||
|
|
||||||
|
* streaming RTP for 2G (3GPP AoIP and Abis-over-IP)
|
||||||
|
* streaming RTP for 3G (IuCS including the IuFP protocol)
|
||||||
|
* TDM (E1/T1) based Abis interface with TRAU frames on 16k sub-slots
|
||||||
|
* basic support for LCLS (Local Call, Local Switch) related features
|
||||||
|
* various built-in translation capabilities
|
||||||
|
* between Abis TRAU frames and RTP formats
|
||||||
|
* between 2G AMR/RTP and 3G AMR/IuFP/RTP
|
||||||
|
* between bandwidth-efficient and octet-aligned AMR
|
||||||
|
* between different standards for encapsulating GSM HR codec frames in RTP
|
||||||
|
|
||||||
|
osmo-mgw is typically co-located with
|
||||||
|
|
||||||
|
* osmo-bsc (GSM BSC)
|
||||||
|
* osmo-msc (GSM/UMTS MSC)
|
||||||
|
* osmo-hnbgw (UMTS HNBGW); osmo-mgw implements RTP relay between Iuh
|
||||||
|
and IuCS interfaces
|
||||||
|
|
||||||
|
The libosmo-mgcp-client library exposes utilities used by e.g. OsmoMSC
|
||||||
|
(found in osmo-msc.git) to instruct OsmoMGW via its MGCP service.
|
||||||
|
|
||||||
|
Homepage
|
||||||
|
--------
|
||||||
|
|
||||||
|
You can find the OsmoMGW issue tracker and wiki online at
|
||||||
|
<https://osmocom.org/projects/osmo-mgw> and <https://osmocom.org/projects/osmo-mgw/wiki>.
|
||||||
|
|
||||||
|
|
||||||
|
GIT Repository
|
||||||
|
--------------
|
||||||
|
|
||||||
|
You can clone from the official osmo-mgw.git repository using
|
||||||
|
|
||||||
|
git clone https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw
|
||||||
|
|
||||||
|
There is a web interface at <https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw>
|
||||||
|
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
-------------
|
||||||
|
|
||||||
|
User Manuals and VTY reference manuals are [optionally] built in PDF form
|
||||||
|
as part of the build process.
|
||||||
|
|
||||||
|
Pre-rendered PDF version of the current "master" can be found at
|
||||||
|
[User Manual](https://ftp.osmocom.org/docs/latest/osmomgw-usermanual.pdf)
|
||||||
|
as well as the [VTY Reference Manual](https://ftp.osmocom.org/docs/latest/osmomgw-vty-reference.pdf)
|
||||||
|
|
||||||
|
|
||||||
|
Mailing List
|
||||||
|
------------
|
||||||
|
|
||||||
|
Discussions related to osmo-mgw are happening on the
|
||||||
|
openbsc@lists.osmocom.org mailing list, please see
|
||||||
|
<https://lists.osmocom.org/mailman/listinfo/openbsc> for subscription
|
||||||
|
options and the list archive.
|
||||||
|
|
||||||
|
Please observe the [Osmocom Mailing List
|
||||||
|
Rules](https://osmocom.org/projects/cellular-infrastructure/wiki/Mailing_List_Rules)
|
||||||
|
when posting.
|
||||||
|
|
||||||
|
|
||||||
|
Contributing
|
||||||
|
------------
|
||||||
|
|
||||||
|
Our coding standards are described at
|
||||||
|
<https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards>
|
||||||
|
|
||||||
|
We use a gerrit based patch submission/review process for managing
|
||||||
|
contributions. Please see
|
||||||
|
<https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit> for
|
||||||
|
more details
|
||||||
|
|
||||||
|
The current patch queue for osmo-mgw can be seen at
|
||||||
|
<https://gerrit.osmocom.org/#/q/project:osmo-mgw+status:open>
|
||||||
|
|
||||||
|
|
||||||
|
History
|
||||||
|
-------
|
||||||
|
|
||||||
|
OsmoMGW originated from the OpenBSC project, which started as a minimalistic
|
||||||
|
all-in-one implementation of the GSM Network. In 2017, OpenBSC had reached
|
||||||
|
maturity and diversity (including M3UA SIGTRAN and 3G support in the form of
|
||||||
|
IuCS and IuPS interfaces) that naturally lead to a separation of the all-in-one
|
||||||
|
approach to fully independent separate programs as in typical GSM networks.
|
||||||
|
|
||||||
|
OsmoMGW was one of the parts split off from the old openbsc.git. It originated
|
||||||
|
as a solution to merely navigate RTP streams through a NAT, but has since
|
||||||
|
matured.
|
11
README.vty-tests
Normal file
11
README.vty-tests
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
To run the configuration parsing and output (VTY) test suite, first install
|
||||||
|
|
||||||
|
https://gitea.osmocom.org/cellular-infrastructure/osmo-python-tests
|
||||||
|
|
||||||
|
and pass the following configure options here:
|
||||||
|
|
||||||
|
./configure --enable-vty-tests --enable-external-tests
|
||||||
|
|
||||||
|
The VTY tests are then included in the standard check target:
|
||||||
|
|
||||||
|
make check
|
11
TODO-RELEASE
Normal file
11
TODO-RELEASE
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# When cleaning up this file: bump API version in corresponding Makefile.am and rename corresponding debian/lib*.install
|
||||||
|
# according to https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release
|
||||||
|
# In short: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
|
||||||
|
# LIBVERSION=c:r:a
|
||||||
|
# If the library source code has changed at all since the last update, then increment revision: c:r + 1:a.
|
||||||
|
# If any interfaces have been added, removed, or changed since the last update: c + 1:0:a.
|
||||||
|
# If any interfaces have been added since the last public release: c:r:a + 1.
|
||||||
|
# If any interfaces have been removed or changed since the last public release: c:r:0.
|
||||||
|
#library what description / commit summary line
|
||||||
|
libosmocore bump_dep; workaround Bump libosmocore version dependency after I68328adb952ca8833ba047cb3b49ccc6f8a1f1b5
|
||||||
|
has been merged to libosmocore.git; then remove my_msgb_copy_c wrapper function.
|
207
configure.ac
Normal file
207
configure.ac
Normal file
@@ -0,0 +1,207 @@
|
|||||||
|
dnl Process this file with autoconf to produce a configure script
|
||||||
|
AC_INIT([osmo-mgw],
|
||||||
|
m4_esyscmd([./git-version-gen .tarball-version]),
|
||||||
|
[openbsc@lists.osmocom.org])
|
||||||
|
|
||||||
|
dnl *This* is the root dir, even if an install-sh exists in ../ or ../../
|
||||||
|
AC_CONFIG_AUX_DIR([.])
|
||||||
|
|
||||||
|
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||||
|
AC_CONFIG_TESTDIR(tests)
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS -std=gnu11"
|
||||||
|
|
||||||
|
dnl kernel style compile messages
|
||||||
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||||
|
|
||||||
|
dnl include release helper
|
||||||
|
RELMAKE='-include osmo-release.mk'
|
||||||
|
AC_SUBST([RELMAKE])
|
||||||
|
|
||||||
|
dnl checks for programs
|
||||||
|
AC_PROG_MAKE_SET
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
LT_INIT
|
||||||
|
|
||||||
|
dnl patching ${archive_cmds} to affect generation of file "libtool" to fix linking with clang
|
||||||
|
AS_CASE(["$LD"],[*clang*],
|
||||||
|
[AS_CASE(["${host_os}"],
|
||||||
|
[*linux*],[archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'])])
|
||||||
|
|
||||||
|
dnl check for pkg-config (explained in detail in libosmocore/configure.ac)
|
||||||
|
AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no)
|
||||||
|
if test "x$PKG_CONFIG_INSTALLED" = "xno"; then
|
||||||
|
AC_MSG_WARN([You need to install pkg-config])
|
||||||
|
fi
|
||||||
|
PKG_PROG_PKG_CONFIG([0.20])
|
||||||
|
|
||||||
|
dnl checks for libraries
|
||||||
|
AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""])
|
||||||
|
AC_SUBST(LIBRARY_DL)
|
||||||
|
|
||||||
|
AC_SEARCH_LIBS([dlsym], [dl dld], [LIBRARY_DLSYM="$LIBS";LIBS=""])
|
||||||
|
AC_SUBST(LIBRARY_DLSYM)
|
||||||
|
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.10.0)
|
||||||
|
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.10.0)
|
||||||
|
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.10.0)
|
||||||
|
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.10.0)
|
||||||
|
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 1.5.0)
|
||||||
|
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.6.0)
|
||||||
|
PKG_CHECK_MODULES(LIBOSMOTRAU, libosmotrau >= 1.6.0)
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS -DBUILDING_LIBOSMOMGCPCLIENT -pthread"
|
||||||
|
CPPFLAGS="$CPPFLAGS -DBUILDING_LIBOSMOMGCPCLIENT -pthread"
|
||||||
|
LDFLAGS="$LDFLAGS -pthread"
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(sanitize,
|
||||||
|
[AS_HELP_STRING(
|
||||||
|
[--enable-sanitize],
|
||||||
|
[Compile with address sanitizer enabled],
|
||||||
|
)],
|
||||||
|
[sanitize=$enableval], [sanitize="no"])
|
||||||
|
if test x"$sanitize" = x"yes"
|
||||||
|
then
|
||||||
|
CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
|
||||||
|
CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(werror,
|
||||||
|
[AS_HELP_STRING(
|
||||||
|
[--enable-werror],
|
||||||
|
[Turn all compiler warnings into errors, with exceptions:
|
||||||
|
a) deprecation (allow upstream to mark deprecation without breaking builds);
|
||||||
|
b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds)
|
||||||
|
]
|
||||||
|
)],
|
||||||
|
[werror=$enableval], [werror="no"])
|
||||||
|
if test x"$werror" = x"yes"
|
||||||
|
then
|
||||||
|
WERROR_FLAGS="-Werror"
|
||||||
|
WERROR_FLAGS+=" -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition"
|
||||||
|
WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations"
|
||||||
|
WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
|
||||||
|
CFLAGS="$CFLAGS $WERROR_FLAGS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Coverage build taken from WebKit's configure.in
|
||||||
|
AC_MSG_CHECKING([whether to enable code coverage support])
|
||||||
|
AC_ARG_ENABLE(coverage,
|
||||||
|
AC_HELP_STRING([--enable-coverage],
|
||||||
|
[enable code coverage support [default=no]]),
|
||||||
|
[],[enable_coverage="no"])
|
||||||
|
AC_MSG_RESULT([$enable_coverage])
|
||||||
|
if test "$enable_coverage" = "yes"; then
|
||||||
|
COVERAGE_CFLAGS="-ftest-coverage -fprofile-arcs"
|
||||||
|
COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
|
||||||
|
AC_SUBST([COVERAGE_CFLAGS])
|
||||||
|
AC_SUBST([COVERAGE_LDFLAGS])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([vty_tests],
|
||||||
|
AC_HELP_STRING([--enable-vty-tests],
|
||||||
|
[Include the VTY/CTRL tests in make check (deprecated)
|
||||||
|
[default=no]]),
|
||||||
|
[enable_ext_tests="$enableval"],[enable_ext_tests="no"])
|
||||||
|
AC_ARG_ENABLE([external_tests],
|
||||||
|
AC_HELP_STRING([--enable-external-tests],
|
||||||
|
[Include the VTY/CTRL tests in make check [default=no]]),
|
||||||
|
[enable_ext_tests="$enableval"],[enable_ext_tests="no"])
|
||||||
|
if test "x$enable_ext_tests" = "xyes" ; then
|
||||||
|
AM_PATH_PYTHON
|
||||||
|
AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes)
|
||||||
|
if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then
|
||||||
|
AC_MSG_ERROR([Please install https://gitea.osmocom.org/cellular-infrastructure/osmo-python-tests to run the VTY/CTRL tests.])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_MSG_CHECKING([whether to enable VTY/CTRL tests])
|
||||||
|
AC_MSG_RESULT([$enable_ext_tests])
|
||||||
|
AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes")
|
||||||
|
|
||||||
|
# Generate manuals
|
||||||
|
AC_ARG_ENABLE(manuals,
|
||||||
|
[AS_HELP_STRING(
|
||||||
|
[--enable-manuals],
|
||||||
|
[Generate manual PDFs [default=no]],
|
||||||
|
)],
|
||||||
|
[osmo_ac_build_manuals=$enableval], [osmo_ac_build_manuals="no"])
|
||||||
|
AM_CONDITIONAL([BUILD_MANUALS], [test x"$osmo_ac_build_manuals" = x"yes"])
|
||||||
|
AC_ARG_VAR(OSMO_GSM_MANUALS_DIR, [path to common osmo-gsm-manuals files, overriding pkg-config and "../osmo-gsm-manuals"
|
||||||
|
fallback])
|
||||||
|
if test x"$osmo_ac_build_manuals" = x"yes"
|
||||||
|
then
|
||||||
|
# Find OSMO_GSM_MANUALS_DIR (env, pkg-conf, fallback)
|
||||||
|
if test -n "$OSMO_GSM_MANUALS_DIR"; then
|
||||||
|
echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (from env)"
|
||||||
|
else
|
||||||
|
OSMO_GSM_MANUALS_DIR="$($PKG_CONFIG osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null)"
|
||||||
|
if test -n "$OSMO_GSM_MANUALS_DIR"; then
|
||||||
|
echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (from pkg-conf)"
|
||||||
|
else
|
||||||
|
OSMO_GSM_MANUALS_DIR="../osmo-gsm-manuals"
|
||||||
|
echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (fallback)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if ! test -d "$OSMO_GSM_MANUALS_DIR"; then
|
||||||
|
AC_MSG_ERROR("OSMO_GSM_MANUALS_DIR does not exist! Install osmo-gsm-manuals or set OSMO_GSM_MANUALS_DIR.")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Find and run check-depends
|
||||||
|
CHECK_DEPENDS="$OSMO_GSM_MANUALS_DIR/check-depends.sh"
|
||||||
|
if ! test -x "$CHECK_DEPENDS"; then
|
||||||
|
CHECK_DEPENDS="osmo-gsm-manuals-check-depends"
|
||||||
|
fi
|
||||||
|
if ! $CHECK_DEPENDS; then
|
||||||
|
AC_MSG_ERROR("missing dependencies for --enable-manuals")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Put in Makefile with absolute path
|
||||||
|
OSMO_GSM_MANUALS_DIR="$(realpath "$OSMO_GSM_MANUALS_DIR")"
|
||||||
|
AC_SUBST([OSMO_GSM_MANUALS_DIR])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# https://www.freedesktop.org/software/systemd/man/daemon.html
|
||||||
|
AC_ARG_WITH([systemdsystemunitdir],
|
||||||
|
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,
|
||||||
|
[with_systemdsystemunitdir=auto])
|
||||||
|
AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [
|
||||||
|
def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
|
||||||
|
|
||||||
|
AS_IF([test "x$def_systemdsystemunitdir" = "x"],
|
||||||
|
[AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
|
||||||
|
[AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
|
||||||
|
with_systemdsystemunitdir=no],
|
||||||
|
[with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
|
||||||
|
AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
|
||||||
|
[AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
|
||||||
|
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])
|
||||||
|
|
||||||
|
AC_MSG_RESULT([CFLAGS="$CFLAGS"])
|
||||||
|
AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
|
||||||
|
|
||||||
|
dnl Generate the output
|
||||||
|
AM_CONFIG_HEADER(bscconfig.h)
|
||||||
|
|
||||||
|
AC_OUTPUT(
|
||||||
|
libosmo-mgcp-client.pc
|
||||||
|
include/Makefile
|
||||||
|
include/osmocom/Makefile
|
||||||
|
include/osmocom/mgcp_client/Makefile
|
||||||
|
include/osmocom/mgcp/Makefile
|
||||||
|
src/Makefile
|
||||||
|
src/libosmo-mgcp-client/Makefile
|
||||||
|
src/libosmo-mgcp/Makefile
|
||||||
|
src/osmo-mgw/Makefile
|
||||||
|
tests/Makefile
|
||||||
|
tests/atlocal
|
||||||
|
tests/mgcp_client/Makefile
|
||||||
|
tests/mgcp/Makefile
|
||||||
|
doc/Makefile
|
||||||
|
doc/examples/Makefile
|
||||||
|
doc/manuals/Makefile
|
||||||
|
contrib/Makefile
|
||||||
|
contrib/systemd/Makefile
|
||||||
|
Makefile)
|
3
contrib/Makefile.am
Normal file
3
contrib/Makefile.am
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
SUBDIRS = systemd
|
||||||
|
|
||||||
|
EXTRA_DIST = ipa.py
|
274
contrib/ipa.py
Executable file
274
contrib/ipa.py
Executable file
@@ -0,0 +1,274 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
# -*- mode: python-mode; py-indent-tabs-mode: nil -*-
|
||||||
|
"""
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2016 sysmocom s.f.m.c. GmbH
|
||||||
|
*
|
||||||
|
* All Rights Reserved
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
"""
|
||||||
|
|
||||||
|
import struct, random, sys
|
||||||
|
|
||||||
|
class IPA(object):
|
||||||
|
"""
|
||||||
|
Stateless IPA protocol multiplexer: add/remove/parse (extended) header
|
||||||
|
"""
|
||||||
|
version = "0.0.5"
|
||||||
|
TCP_PORT_OML = 3002
|
||||||
|
TCP_PORT_RSL = 3003
|
||||||
|
# OpenBSC extensions: OSMO, MGCP_OLD
|
||||||
|
PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, MGCP_OLD=0xFC)
|
||||||
|
# ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol
|
||||||
|
EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6)
|
||||||
|
# OpenBSC extension: SCCP_OLD
|
||||||
|
MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, SCCP_OLD=0xFF)
|
||||||
|
_IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8)
|
||||||
|
CTRL_GET = 'GET'
|
||||||
|
CTRL_SET = 'SET'
|
||||||
|
CTRL_REP = 'REPLY'
|
||||||
|
CTRL_ERR = 'ERR'
|
||||||
|
CTRL_TRAP = 'TRAP'
|
||||||
|
|
||||||
|
def _l(self, d, p):
|
||||||
|
"""
|
||||||
|
Reverse dictionary lookup: return key for a given value
|
||||||
|
"""
|
||||||
|
if p is None:
|
||||||
|
return 'UNKNOWN'
|
||||||
|
return list(d.keys())[list(d.values()).index(p)]
|
||||||
|
|
||||||
|
def _tag(self, t, v):
|
||||||
|
"""
|
||||||
|
Create TAG as TLV data
|
||||||
|
"""
|
||||||
|
return struct.pack(">HB", len(v) + 1, t) + v
|
||||||
|
|
||||||
|
def proto(self, p):
|
||||||
|
"""
|
||||||
|
Lookup protocol name
|
||||||
|
"""
|
||||||
|
return self._l(self.PROTO, p)
|
||||||
|
|
||||||
|
def ext(self, p):
|
||||||
|
"""
|
||||||
|
Lookup protocol extension name
|
||||||
|
"""
|
||||||
|
return self._l(self.EXT, p)
|
||||||
|
|
||||||
|
def msgt(self, p):
|
||||||
|
"""
|
||||||
|
Lookup message type name
|
||||||
|
"""
|
||||||
|
return self._l(self.MSGT, p)
|
||||||
|
|
||||||
|
def idtag(self, p):
|
||||||
|
"""
|
||||||
|
Lookup ID tag name
|
||||||
|
"""
|
||||||
|
return self._l(self._IDTAG, p)
|
||||||
|
|
||||||
|
def ext_name(self, proto, exten):
|
||||||
|
"""
|
||||||
|
Return proper extension byte name depending on the protocol used
|
||||||
|
"""
|
||||||
|
if self.PROTO['CCM'] == proto:
|
||||||
|
return self.msgt(exten)
|
||||||
|
if self.PROTO['OSMO'] == proto:
|
||||||
|
return self.ext(exten)
|
||||||
|
return None
|
||||||
|
|
||||||
|
def add_header(self, data, proto, ext=None):
|
||||||
|
"""
|
||||||
|
Add IPA header (with extension if necessary), data must be represented as bytes
|
||||||
|
"""
|
||||||
|
if ext is None:
|
||||||
|
return struct.pack(">HB", len(data) + 1, proto) + data
|
||||||
|
return struct.pack(">HBB", len(data) + 1, proto, ext) + data
|
||||||
|
|
||||||
|
def del_header(self, data):
|
||||||
|
"""
|
||||||
|
Strip IPA protocol header correctly removing extension if present
|
||||||
|
Returns data length, IPA protocol, extension (or None if not defined for a give protocol) and the data without header
|
||||||
|
"""
|
||||||
|
if not len(data):
|
||||||
|
return None, None, None, None
|
||||||
|
(dlen, proto) = struct.unpack('>HB', data[:3])
|
||||||
|
if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # there's extension which we have to unpack
|
||||||
|
return struct.unpack('>HBB', data[:4]) + (data[4:], ) # length, protocol, extension, data
|
||||||
|
return dlen, proto, None, data[3:] # length, protocol, _, data
|
||||||
|
|
||||||
|
def split_combined(self, data):
|
||||||
|
"""
|
||||||
|
Split the data which contains multiple concatenated IPA messages into tuple (first, rest) where rest contains remaining messages, first is the single IPA message
|
||||||
|
"""
|
||||||
|
(length, _, _, _) = self.del_header(data)
|
||||||
|
return data[:(length + 3)], data[(length + 3):]
|
||||||
|
|
||||||
|
def tag_serial(self, data):
|
||||||
|
"""
|
||||||
|
Make TAG for serial number
|
||||||
|
"""
|
||||||
|
return self._tag(self._IDTAG['SERNR'], data)
|
||||||
|
|
||||||
|
def tag_name(self, data):
|
||||||
|
"""
|
||||||
|
Make TAG for unit name
|
||||||
|
"""
|
||||||
|
return self._tag(self._IDTAG['UNITNAME'], data)
|
||||||
|
|
||||||
|
def tag_loc(self, data):
|
||||||
|
"""
|
||||||
|
Make TAG for location
|
||||||
|
"""
|
||||||
|
return self._tag(self._IDTAG['LOCATION'], data)
|
||||||
|
|
||||||
|
def tag_type(self, data):
|
||||||
|
"""
|
||||||
|
Make TAG for unit type
|
||||||
|
"""
|
||||||
|
return self._tag(self._IDTAG['TYPE'], data)
|
||||||
|
|
||||||
|
def tag_equip(self, data):
|
||||||
|
"""
|
||||||
|
Make TAG for equipment version
|
||||||
|
"""
|
||||||
|
return self._tag(self._IDTAG['EQUIPVERS'], data)
|
||||||
|
|
||||||
|
def tag_sw(self, data):
|
||||||
|
"""
|
||||||
|
Make TAG for software version
|
||||||
|
"""
|
||||||
|
return self._tag(self._IDTAG['SWVERSION'], data)
|
||||||
|
|
||||||
|
def tag_ip(self, data):
|
||||||
|
"""
|
||||||
|
Make TAG for IP address
|
||||||
|
"""
|
||||||
|
return self._tag(self._IDTAG['IPADDR'], data)
|
||||||
|
|
||||||
|
def tag_mac(self, data):
|
||||||
|
"""
|
||||||
|
Make TAG for MAC address
|
||||||
|
"""
|
||||||
|
return self._tag(self._IDTAG['MACADDR'], data)
|
||||||
|
|
||||||
|
def tag_unit(self, data):
|
||||||
|
"""
|
||||||
|
Make TAG for unit ID
|
||||||
|
"""
|
||||||
|
return self._tag(self._IDTAG['UNIT'], data)
|
||||||
|
|
||||||
|
def identity(self, unit=b'', mac=b'', location=b'', utype=b'', equip=b'', sw=b'', name=b'', serial=b''):
|
||||||
|
"""
|
||||||
|
Make IPA IDENTITY tag list, by default returns empty concatenated bytes of tag list
|
||||||
|
"""
|
||||||
|
return self.tag_unit(unit) + self.tag_mac(mac) + self.tag_loc(location) + self.tag_type(utype) + self.tag_equip(equip) + self.tag_sw(sw) + self.tag_name(name) + self.tag_serial(serial)
|
||||||
|
|
||||||
|
def ping(self):
|
||||||
|
"""
|
||||||
|
Make PING message
|
||||||
|
"""
|
||||||
|
return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PING'])
|
||||||
|
|
||||||
|
def pong(self):
|
||||||
|
"""
|
||||||
|
Make PONG message
|
||||||
|
"""
|
||||||
|
return self.add_header(b'', self.PROTO['CCM'], self.MSGT['PONG'])
|
||||||
|
|
||||||
|
def id_ack(self):
|
||||||
|
"""
|
||||||
|
Make ID_ACK CCM message
|
||||||
|
"""
|
||||||
|
return self.add_header(b'', self.PROTO['CCM'], self.MSGT['ID_ACK'])
|
||||||
|
|
||||||
|
def id_get(self):
|
||||||
|
"""
|
||||||
|
Make ID_GET CCM message
|
||||||
|
"""
|
||||||
|
return self.add_header(self.identity(), self.PROTO['CCM'], self.MSGT['ID_GET'])
|
||||||
|
|
||||||
|
def id_resp(self, data):
|
||||||
|
"""
|
||||||
|
Make ID_RESP CCM message
|
||||||
|
"""
|
||||||
|
return self.add_header(data, self.PROTO['CCM'], self.MSGT['ID_RESP'])
|
||||||
|
|
||||||
|
class Ctrl(IPA):
|
||||||
|
"""
|
||||||
|
Osmocom CTRL protocol implemented on top of IPA multiplexer
|
||||||
|
"""
|
||||||
|
def __init__(self):
|
||||||
|
random.seed()
|
||||||
|
|
||||||
|
def add_header(self, data):
|
||||||
|
"""
|
||||||
|
Add CTRL header
|
||||||
|
"""
|
||||||
|
return super(Ctrl, self).add_header(data.encode('utf-8'), IPA.PROTO['OSMO'], IPA.EXT['CTRL'])
|
||||||
|
|
||||||
|
def rem_header(self, data):
|
||||||
|
"""
|
||||||
|
Remove CTRL header, check for appropriate protocol and extension
|
||||||
|
"""
|
||||||
|
(_, proto, ext, d) = super(Ctrl, self).del_header(data)
|
||||||
|
if self.PROTO['OSMO'] != proto or self.EXT['CTRL'] != ext:
|
||||||
|
return None
|
||||||
|
return d
|
||||||
|
|
||||||
|
def parse(self, data, op=None):
|
||||||
|
"""
|
||||||
|
Parse Ctrl string returning (var, value) pair
|
||||||
|
var could be None in case of ERROR message
|
||||||
|
value could be None in case of GET message
|
||||||
|
"""
|
||||||
|
(s, i, v) = data.split(' ', 2)
|
||||||
|
if s == self.CTRL_ERR:
|
||||||
|
return None, v
|
||||||
|
if s == self.CTRL_GET:
|
||||||
|
return v, None
|
||||||
|
(s, i, var, val) = data.split(' ', 3)
|
||||||
|
if s == self.CTRL_TRAP and i != '0':
|
||||||
|
return None, '%s with non-zero id %s' % (s, i)
|
||||||
|
if op is not None and i != op:
|
||||||
|
if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET + '_' + self.CTRL_REP:
|
||||||
|
return None, '%s with unexpected id %s' % (s, i)
|
||||||
|
return var, val
|
||||||
|
|
||||||
|
def trap(self, var, val):
|
||||||
|
"""
|
||||||
|
Make TRAP message with given (vak, val) pair
|
||||||
|
"""
|
||||||
|
return self.add_header("%s 0 %s %s" % (self.CTRL_TRAP, var, val))
|
||||||
|
|
||||||
|
def cmd(self, var, val=None):
|
||||||
|
"""
|
||||||
|
Make SET/GET command message: returns (r, m) tuple where r is random operation id and m is assembled message
|
||||||
|
"""
|
||||||
|
r = random.randint(1, sys.maxsize)
|
||||||
|
if val is not None:
|
||||||
|
return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, val))
|
||||||
|
return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var))
|
||||||
|
|
||||||
|
def verify(self, reply, r, var, val=None):
|
||||||
|
"""
|
||||||
|
Verify reply to SET/GET command: returns (b, v) tuple where v is True/False verification result and v is the variable value
|
||||||
|
"""
|
||||||
|
(k, v) = self.parse(reply)
|
||||||
|
if k != var or (val is not None and v != val):
|
||||||
|
return False, v
|
||||||
|
return True, v
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
print("IPA multiplexer v%s loaded." % IPA.version)
|
66
contrib/jenkins.sh
Executable file
66
contrib/jenkins.sh
Executable file
@@ -0,0 +1,66 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# jenkins build helper script for openbsc. This is how we build on jenkins.osmocom.org
|
||||||
|
#
|
||||||
|
# environment variables:
|
||||||
|
# * WITH_MANUALS: build manual PDFs if set to "1"
|
||||||
|
# * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1")
|
||||||
|
#
|
||||||
|
|
||||||
|
if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then
|
||||||
|
echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
base="$PWD"
|
||||||
|
deps="$base/deps"
|
||||||
|
inst="$deps/install"
|
||||||
|
export deps inst
|
||||||
|
|
||||||
|
osmo-clean-workspace.sh
|
||||||
|
|
||||||
|
mkdir "$deps" || true
|
||||||
|
osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false
|
||||||
|
|
||||||
|
verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
|
||||||
|
|
||||||
|
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
|
export LD_LIBRARY_PATH="$inst/lib"
|
||||||
|
export PATH="$inst/bin:$PATH"
|
||||||
|
|
||||||
|
osmo-build-dep.sh libosmo-abis
|
||||||
|
osmo-build-dep.sh libosmo-netif
|
||||||
|
|
||||||
|
# Additional configure options and depends
|
||||||
|
CONFIG=""
|
||||||
|
if [ "$WITH_MANUALS" = "1" ]; then
|
||||||
|
CONFIG="--enable-manuals"
|
||||||
|
fi
|
||||||
|
|
||||||
|
set +x
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo " =============================== osmo-mgw ==============================="
|
||||||
|
echo
|
||||||
|
set -x
|
||||||
|
|
||||||
|
cd "$base"
|
||||||
|
autoreconf --install --force
|
||||||
|
./configure --enable-sanitize --enable-vty-tests --enable-external-tests --enable-werror $CONFIG
|
||||||
|
$MAKE $PARALLEL_MAKE
|
||||||
|
LD_LIBRARY_PATH="$inst/lib" $MAKE check \
|
||||||
|
|| cat-testlogs.sh
|
||||||
|
LD_LIBRARY_PATH="$inst/lib" \
|
||||||
|
DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests $CONFIG" \
|
||||||
|
$MAKE $PARALLEL_MAKE distcheck \
|
||||||
|
|| cat-testlogs.sh
|
||||||
|
|
||||||
|
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
|
||||||
|
make -C "$base/doc/manuals" publish
|
||||||
|
fi
|
||||||
|
|
||||||
|
$MAKE $PARALLEL_MAKE maintainer-clean
|
||||||
|
osmo-clean-workspace.sh
|
6
contrib/systemd/Makefile.am
Normal file
6
contrib/systemd/Makefile.am
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
EXTRA_DIST = osmo-mgw.service
|
||||||
|
|
||||||
|
if HAVE_SYSTEMD
|
||||||
|
systemdsystemunit_DATA = \
|
||||||
|
osmo-mgw.service
|
||||||
|
endif
|
24
contrib/systemd/osmo-mgw.service
Normal file
24
contrib/systemd/osmo-mgw.service
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Osmocom Media Gateway (MGW)
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
LimitNOFILE=65536
|
||||||
|
StateDirectory=osmocom
|
||||||
|
WorkingDirectory=%S/osmocom
|
||||||
|
Restart=always
|
||||||
|
User=osmocom
|
||||||
|
Group=osmocom
|
||||||
|
ExecStart=/usr/bin/osmo-mgw -s -c /etc/osmocom/osmo-mgw.cfg
|
||||||
|
RestartSec=2
|
||||||
|
AmbientCapabilities=CAP_SYS_NICE
|
||||||
|
# CPU scheduling policy:
|
||||||
|
CPUSchedulingPolicy=rr
|
||||||
|
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
||||||
|
CPUSchedulingPriority=1
|
||||||
|
# See sched(7) for further details on real-time policies and priorities
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
1
debian/autoreconf
vendored
1
debian/autoreconf
vendored
@@ -1 +0,0 @@
|
|||||||
openbsc
|
|
1096
debian/changelog
vendored
1096
debian/changelog
vendored
File diff suppressed because it is too large
Load Diff
2
debian/compat
vendored
2
debian/compat
vendored
@@ -1 +1 @@
|
|||||||
7
|
10
|
||||||
|
149
debian/control
vendored
149
debian/control
vendored
@@ -1,107 +1,46 @@
|
|||||||
Source: openbsc
|
Source: osmo-mgw
|
||||||
Section: net
|
Section: net
|
||||||
|
Priority: extra
|
||||||
|
Maintainer: Osmocom team <openbsc@lists.osmocom.org>
|
||||||
|
Build-Depends: debhelper (>= 10),
|
||||||
|
dh-autoreconf,
|
||||||
|
pkg-config,
|
||||||
|
autotools-dev,
|
||||||
|
libosmocore-dev (>= 1.10.0),
|
||||||
|
libosmo-netif-dev (>= 1.5.0),
|
||||||
|
libosmo-abis-dev (>= 1.6.0),
|
||||||
|
osmo-gsm-manuals-dev (>= 1.6.0)
|
||||||
|
Standards-Version: 3.9.8
|
||||||
|
Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw
|
||||||
|
Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw
|
||||||
|
Homepage: https://osmocom.org/projects/osmo-mgw
|
||||||
|
|
||||||
|
Package: osmo-mgw
|
||||||
|
Architecture: any
|
||||||
|
Multi-Arch: foreign
|
||||||
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
|
Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks
|
||||||
|
|
||||||
|
Package: libosmo-mgcp-client14
|
||||||
|
Section: libs
|
||||||
|
Architecture: any
|
||||||
|
Multi-Arch: same
|
||||||
|
Pre-Depends: ${misc:Pre-Depends}
|
||||||
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
|
Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities
|
||||||
|
|
||||||
|
Package: libosmo-mgcp-client-dev
|
||||||
|
Section: libdevel
|
||||||
|
Architecture: any
|
||||||
|
Multi-Arch: same
|
||||||
|
Depends: libosmo-mgcp-client14 (= ${binary:Version}), ${misc:Depends}
|
||||||
|
Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities
|
||||||
|
|
||||||
|
Package: osmo-mgw-doc
|
||||||
|
Architecture: all
|
||||||
|
Section: doc
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Harald Welte <laforge@gnumonks.org>
|
Depends: ${misc:Depends}
|
||||||
Build-Depends: debhelper (>= 7.0.0~), autotools-dev, pkg-config, libgtp0-dev, libosmocore-dev, libosmo-sccp-dev, libdbi0-dev, dh-autoreconf, libosmo-abis-dev, libosmo-netif-dev, libdbd-sqlite3, libpcap-dev
|
Description: ${misc:Package} PDF documentation
|
||||||
Standards-Version: 3.8.4
|
Various manuals: user manual, VTY reference manual and/or
|
||||||
Homepage: http://openbsc.osmocom.org/
|
protocol/interface manuals.
|
||||||
Vcs-Git: git://bs11-abis.gnumonks.org/openbsc.git
|
|
||||||
Vcs-Browser: http://openbsc.osmocom.org/trac/browser
|
|
||||||
|
|
||||||
Package: osmocom-bsc
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
|
||||||
Description: GSM Base Station Controller; BSC-only version of OpenBSC. Needs a real MSC!
|
|
||||||
Classical BSC which requires MSC to operate.
|
|
||||||
|
|
||||||
Package: osmocom-nitb
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends} libdbd-sqlite3
|
|
||||||
Description: GSM Network-in-a-Box, implements BSC, MSC, SMSC, HLR, VLR
|
|
||||||
All the GSM network components bundled together.
|
|
||||||
|
|
||||||
Package: osmocom-ipaccess-utils
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
|
||||||
Description: Command line utilities for ip.access nanoBTS
|
|
||||||
Utilities specific for ip.access unit.
|
|
||||||
|
|
||||||
Package: osmocom-bs11-utils
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
|
||||||
Description: Command line utilities for Siemens BS-11 BTS
|
|
||||||
Utilities specific for BS-11 unit.
|
|
||||||
|
|
||||||
Package: osmocom-sgsn
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
|
||||||
Description: Osmocom Serving GPRS Support Node
|
|
||||||
SGSN implementation.
|
|
||||||
|
|
||||||
Package: osmocom-gbproxy
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
|
||||||
Description: Osmocom GPRS Gb Interface Proxy
|
|
||||||
Proxy for Gb interface.
|
|
||||||
|
|
||||||
Package: osmocom-bsc-nat
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
|
||||||
Description: Osmocom Base Station Controller Network Address Translation
|
|
||||||
Network address translation for BSC.
|
|
||||||
|
|
||||||
Package: osmocom-bsc-dbg
|
|
||||||
Architecture: any
|
|
||||||
Section: debug
|
|
||||||
Priority: extra
|
|
||||||
Depends: osmocom-bsc (= ${binary:Version}), ${misc:Depends}
|
|
||||||
Description: Debug symbols for the OpenBSC BSC
|
|
||||||
Make debugging possible
|
|
||||||
|
|
||||||
Package: osmocom-nitb-dbg
|
|
||||||
Architecture: any
|
|
||||||
Section: debug
|
|
||||||
Priority: extra
|
|
||||||
Depends: osmocom-nitb (= ${binary:Version}), ${misc:Depends}
|
|
||||||
Description: Debug symbols for the OpenBSC NITB
|
|
||||||
Make debugging possible
|
|
||||||
|
|
||||||
Package: osmocom-ipaccess-utils-dbg
|
|
||||||
Architecture: any
|
|
||||||
Section: debug
|
|
||||||
Priority: extra
|
|
||||||
Depends: osmocom-ipaccess-utils (= ${binary:Version}), ${misc:Depends}
|
|
||||||
Description: Debug symbols for the OpenBSC ip.access utils
|
|
||||||
Make debugging possible
|
|
||||||
|
|
||||||
Package: osmocom-bs11-utils-dbg
|
|
||||||
Architecture: any
|
|
||||||
Section: debug
|
|
||||||
Priority: extra
|
|
||||||
Depends: osmocom-bs11-utils (= ${binary:Version}), ${misc:Depends}
|
|
||||||
Description: Debug symbols for the OpenBSC BS11 utils
|
|
||||||
Make debugging possible
|
|
||||||
|
|
||||||
Package: osmocom-sgsn-dbg
|
|
||||||
Architecture: any
|
|
||||||
Section: debug
|
|
||||||
Priority: extra
|
|
||||||
Depends: osmocom-sgsn (= ${binary:Version}), ${misc:Depends}
|
|
||||||
Description: Debug symbols for the OpenBSC Serving GPRS Support Node
|
|
||||||
Make debugging possible
|
|
||||||
|
|
||||||
Package: osmocom-gbproxy-dbg
|
|
||||||
Architecture: any
|
|
||||||
Section: debug
|
|
||||||
Priority: extra
|
|
||||||
Depends: osmocom-gbproxy (= ${binary:Version}), ${misc:Depends}
|
|
||||||
Description: Debug symbols for the OpenBSC GPRS GBProxy
|
|
||||||
Make debugging possible
|
|
||||||
|
|
||||||
Package: osmocom-bsc-nat-dbg
|
|
||||||
Architecture: any
|
|
||||||
Section: debug
|
|
||||||
Priority: extra
|
|
||||||
Depends: osmocom-bsc-nat (= ${binary:Version}), ${misc:Depends}
|
|
||||||
Description: Debug symbols for the OpenBSC Network Address Translation
|
|
||||||
Make debugging possible
|
|
||||||
|
104
debian/copyright
vendored
104
debian/copyright
vendored
@@ -1,47 +1,65 @@
|
|||||||
This work was packaged for Debian by:
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: osmo-mgw
|
||||||
|
Source: https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw
|
||||||
|
|
||||||
Harald Welte <laforge@gnumonks.org> on Tue, 24 Aug 2010 10:55:04 +0200
|
Files: *
|
||||||
|
Copyright: 2009-2014 On-Waves
|
||||||
|
2009-2015 Holger Hans Peter Freyther <zecke@selfish.org>
|
||||||
|
2013 Jacob Erlbeck <jerlbeck@sysmocom.de>
|
||||||
|
2016-2017 sysmocom s.f.m.c. GmbH <info@sysmocom.de>
|
||||||
|
License: AGPL-3.0+
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published by
|
||||||
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
.
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
.
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
It was downloaded from:
|
Files: src/libosmo-mgcp-client/* include/osmocom/mgcp_client/*
|
||||||
|
Copyright: 2016 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
|
||||||
|
Based on OpenBSC interface to quagga VTY (libmsc/vty_interface_layer3.c)
|
||||||
|
2009 by Harald Welte <laforge@gnumonks.org>
|
||||||
|
2009-2011 by Holger Hans Peter Freyther
|
||||||
|
License: GPL-2.0+
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
.
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
.
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
git://bs11-abis.gnumonks.org/openbsc.git
|
Files: tests/vty_test_runner.py
|
||||||
|
Copyright: 2013 Holger Hans Peter Freyther
|
||||||
|
2013 Katerina Barone-Adesi <kat.obsc@gmail.com>
|
||||||
|
License: GPL-3.0+
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
.
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
.
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
.
|
||||||
|
On Debian systems, the complete text of the GNU General Public License
|
||||||
|
Version 3 can be found in `/usr/share/common-licenses/GPL-3'.
|
||||||
|
|
||||||
Upstream Authors:
|
Files: osmoappdesc.py
|
||||||
|
Copyright: 2013 Katerina Barone-Adesi <kat.obsc@gmail.com>
|
||||||
Harald Welte <laforge@gnumonks.org>
|
License: GPL-3.0+
|
||||||
Dieter Spaar <spaar@mirider.augusta.de>
|
|
||||||
Holger Hans Peter Freyther <zecke@selfish.org>
|
|
||||||
Sylvain Munaut <tnt@246tNt.com>
|
|
||||||
Daniel Willmann <daniel@totalueberwachung.de>
|
|
||||||
Jan Luebbe <jluebbe@debian.org>
|
|
||||||
Mike Haben <michael.haben@btinternet.com>
|
|
||||||
Andreas Eversberg <Andreas.Eversberg@versatel.de>
|
|
||||||
|
|
||||||
Copyright:
|
|
||||||
|
|
||||||
Copyright (C) 2008-2010 Harald Welte <laforge@gnumonks.org>
|
|
||||||
Copyright (C) 2008-2009 Dieter Spaar <spaar@mirider.augusta.de>
|
|
||||||
Copyright (C) 2008-2010 Holger Hans Peter Freyther <zecke@selfish.org>
|
|
||||||
Copyright (C) 2009-2010 Sylvain Munaut <tnt@246tNt.com>
|
|
||||||
Copyright (C) 2009-2010 On-Waves
|
|
||||||
Copyright (C) 2008 Daniel Willmann <daniel@totalueberwachung.de>
|
|
||||||
Copyright (C) 2008 Jan Luebbe <jluebbe@debian.org>
|
|
||||||
Copyright (C) 2009 by Mike Haben <michael.haben@btinternet.com>
|
|
||||||
Copyright (C) 2009 Andreas Eversberg <Andreas.Eversberg@versatel.de>
|
|
||||||
|
|
||||||
License:
|
|
||||||
|
|
||||||
GNU General Public License, Version 2 or later
|
|
||||||
|
|
||||||
The Debian packaging is:
|
|
||||||
|
|
||||||
Copyright (C) 2010 Harald Welte <laforge@gnumonks.org>
|
|
||||||
|
|
||||||
# Please chose a license for your packaging work. If the program you package
|
|
||||||
# uses a mainstream license, using the same license is the safest choice.
|
|
||||||
# Please avoid to pick license terms that are more restrictive than the
|
|
||||||
# packaged work, as it may make Debian's contributions unacceptable upstream.
|
|
||||||
# If you just want it to be GPL version 3, leave the following lines in.
|
|
||||||
|
|
||||||
and is licensed under the GPL version 3,
|
|
||||||
see "/usr/share/common-licenses/GPL-3".
|
|
||||||
|
1
debian/docs
vendored
1
debian/docs
vendored
@@ -1 +0,0 @@
|
|||||||
README
|
|
4
debian/libosmo-mgcp-client-dev.install
vendored
Normal file
4
debian/libosmo-mgcp-client-dev.install
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
usr/include/osmocom/mgcp_client
|
||||||
|
usr/lib/*/libosmo-mgcp-client.so
|
||||||
|
usr/lib/*/libosmo-mgcp-client.a
|
||||||
|
usr/lib/*/pkgconfig/libosmo-mgcp-client.pc
|
1
debian/libosmo-mgcp-client14.install
vendored
Normal file
1
debian/libosmo-mgcp-client14.install
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
usr/lib/*/libosmo-mgcp-client.so.*
|
1
debian/osmo-mgw-doc.install
vendored
Normal file
1
debian/osmo-mgw-doc.install
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
usr/share/doc/osmo-mgw-doc/*.pdf
|
5
debian/osmo-mgw.install
vendored
Normal file
5
debian/osmo-mgw.install
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
etc/osmocom/osmo-mgw.cfg
|
||||||
|
lib/systemd/system/osmo-mgw.service
|
||||||
|
usr/bin/osmo-mgw
|
||||||
|
usr/share/doc/osmo-mgw/examples/osmo-mgw/osmo-mgw.cfg
|
||||||
|
usr/share/doc/osmo-mgw/examples/osmo-mgw/osmo-mgw-abis_e1.cfg
|
2
debian/osmocom-bs11-utils.install
vendored
2
debian/osmocom-bs11-utils.install
vendored
@@ -1,2 +0,0 @@
|
|||||||
/usr/bin/bs11_config
|
|
||||||
/usr/bin/isdnsync
|
|
153
debian/osmocom-bsc-nat.init
vendored
153
debian/osmocom-bsc-nat.init
vendored
@@ -1,153 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: osmocom-bsc-nat
|
|
||||||
# Required-Start: $network $local_fs
|
|
||||||
# Required-Stop:
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
# Short-Description: Osmocom GSM network-in-a-box
|
|
||||||
# Description: A minimal implementation of the GSM Base Station Controller,
|
|
||||||
# Mobile Switching Center, Home Location regster and all other
|
|
||||||
# components to run a self-contained GSM network.
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
# Author: Harald Welte <laforge@gnumonks.org>
|
|
||||||
|
|
||||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|
||||||
NAME=osmo-bsc_nat # Introduce the short server's name here
|
|
||||||
DESC="Osmocom GSM BSC Multiplexer (NAT)" # Introduce a short description here
|
|
||||||
DAEMON=/usr/bin/osmo-bsc_nat # Introduce the server's location here
|
|
||||||
SCRIPTNAME=/etc/init.d/osmocom-bsc-nat
|
|
||||||
CONFIG_FILE=/etc/osmocom/osmocom-bsc-nat.cfg
|
|
||||||
|
|
||||||
# Exit if the package is not installed
|
|
||||||
[ -x $DAEMON ] || exit 0
|
|
||||||
|
|
||||||
# Read configuration variable file if it is present
|
|
||||||
[ -r /etc/default/osmocom-bsc-nat ] && . /etc/default/osmocom-bsc-nat
|
|
||||||
|
|
||||||
# Load the VERBOSE setting and other rcS variables
|
|
||||||
. /lib/init/vars.sh
|
|
||||||
|
|
||||||
# Define LSB log_* functions.
|
|
||||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
|
||||||
. /lib/lsb/init-functions
|
|
||||||
|
|
||||||
DAEMON_ARGS="-D -c $CONFIG_FILE"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that starts the daemon/service
|
|
||||||
#
|
|
||||||
do_start()
|
|
||||||
{
|
|
||||||
# Return
|
|
||||||
# 0 if daemon has been started
|
|
||||||
# 1 if daemon was already running
|
|
||||||
# 2 if daemon could not be started
|
|
||||||
start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
|
|
||||||
|| return 1
|
|
||||||
start-stop-daemon --start --quiet --exec $DAEMON -- \
|
|
||||||
$DAEMON_ARGS \
|
|
||||||
|| return 2
|
|
||||||
# Add code here, if necessary, that waits for the process to be ready
|
|
||||||
# to handle requests from services started subsequently which depend
|
|
||||||
# on this one. As a last resort, sleep for some time.
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that stops the daemon/service
|
|
||||||
#
|
|
||||||
do_stop()
|
|
||||||
{
|
|
||||||
# Return
|
|
||||||
# 0 if daemon has been stopped
|
|
||||||
# 1 if daemon was already stopped
|
|
||||||
# 2 if daemon could not be stopped
|
|
||||||
# other if a failure occurred
|
|
||||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
|
|
||||||
RETVAL="$?"
|
|
||||||
[ "$RETVAL" = 2 ] && return 2
|
|
||||||
# Wait for children to finish too if this is a daemon that forks
|
|
||||||
# and if the daemon is only ever run from this initscript.
|
|
||||||
# If the above conditions are not satisfied then add some other code
|
|
||||||
# that waits for the process to drop all resources that could be
|
|
||||||
# needed by services started subsequently. A last resort is to
|
|
||||||
# sleep for some time.
|
|
||||||
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
|
|
||||||
[ "$?" = 2 ] && return 2
|
|
||||||
return "$RETVAL"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that sends a SIGHUP to the daemon/service
|
|
||||||
#
|
|
||||||
do_reload() {
|
|
||||||
#
|
|
||||||
# If the daemon can reload its configuration without
|
|
||||||
# restarting (for example, when it is sent a SIGHUP),
|
|
||||||
# then implement that here.
|
|
||||||
#
|
|
||||||
start-stop-daemon --stop --signal 1 --quiet $PIDFILE --name $NAME
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
|
|
||||||
do_start
|
|
||||||
case "$?" in
|
|
||||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
||||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
|
||||||
do_stop
|
|
||||||
case "$?" in
|
|
||||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
||||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
|
||||||
;;
|
|
||||||
#reload|force-reload)
|
|
||||||
#
|
|
||||||
# If do_reload() is not implemented then leave this commented out
|
|
||||||
# and leave 'force-reload' as an alias for 'restart'.
|
|
||||||
#
|
|
||||||
#log_daemon_msg "Reloading $DESC" "$NAME"
|
|
||||||
#do_reload
|
|
||||||
#log_end_msg $?
|
|
||||||
#;;
|
|
||||||
restart|force-reload)
|
|
||||||
#
|
|
||||||
# If the "reload" option is implemented then remove the
|
|
||||||
# 'force-reload' alias
|
|
||||||
#
|
|
||||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
|
||||||
do_stop
|
|
||||||
case "$?" in
|
|
||||||
0|1)
|
|
||||||
do_start
|
|
||||||
case "$?" in
|
|
||||||
0) log_end_msg 0 ;;
|
|
||||||
1) log_end_msg 1 ;; # Old process is still running
|
|
||||||
*) log_end_msg 1 ;; # Failed to start
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Failed to stop
|
|
||||||
log_end_msg 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
|
||||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
|
||||||
exit 3
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
:
|
|
1
debian/osmocom-bsc-nat.install
vendored
1
debian/osmocom-bsc-nat.install
vendored
@@ -1 +0,0 @@
|
|||||||
/usr/bin/osmo-bsc_nat
|
|
1
debian/osmocom-bsc.examples
vendored
1
debian/osmocom-bsc.examples
vendored
@@ -1 +0,0 @@
|
|||||||
openbsc/doc/examples/osmo-bsc_mgcp
|
|
2
debian/osmocom-bsc.install
vendored
2
debian/osmocom-bsc.install
vendored
@@ -1,2 +0,0 @@
|
|||||||
/usr/bin/osmo-bsc_mgcp
|
|
||||||
/usr/bin/osmo-bsc
|
|
151
debian/osmocom-gbproxy.init
vendored
151
debian/osmocom-gbproxy.init
vendored
@@ -1,151 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: osmo-gbproxy
|
|
||||||
# Required-Start: $network $local_fs
|
|
||||||
# Required-Stop:
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
# Short-Description: Osmocom GBproxy
|
|
||||||
# Description: A tool to proxy the GPRS Gb interface.
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
# Author: Harald Welte <laforge@gnumonks.org>
|
|
||||||
|
|
||||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|
||||||
NAME=osmo-gbproxy # Introduce the short server's name here
|
|
||||||
DESC="Osmocom GBProxy" # Introduce a short description here
|
|
||||||
DAEMON=/usr/bin/osmo-gbproxy # Introduce the server's location here
|
|
||||||
SCRIPTNAME=/etc/init.d/osmocom-gbproxy
|
|
||||||
CONFIG_FILE=/etc/osmocom/osmocom-gbproxy.cfg
|
|
||||||
|
|
||||||
# Exit if the package is not installed
|
|
||||||
[ -x $DAEMON ] || exit 0
|
|
||||||
|
|
||||||
# Read configuration variable file if it is present
|
|
||||||
[ -r /etc/default/osmocom-gbproxy ] && . /etc/default/osmocom-gbproxy
|
|
||||||
|
|
||||||
# Load the VERBOSE setting and other rcS variables
|
|
||||||
. /lib/init/vars.sh
|
|
||||||
|
|
||||||
# Define LSB log_* functions.
|
|
||||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
|
||||||
. /lib/lsb/init-functions
|
|
||||||
|
|
||||||
DAEMON_ARGS="-D -c $CONFIG_FILE"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that starts the daemon/service
|
|
||||||
#
|
|
||||||
do_start()
|
|
||||||
{
|
|
||||||
# Return
|
|
||||||
# 0 if daemon has been started
|
|
||||||
# 1 if daemon was already running
|
|
||||||
# 2 if daemon could not be started
|
|
||||||
start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
|
|
||||||
|| return 1
|
|
||||||
start-stop-daemon --start --quiet --exec $DAEMON -- \
|
|
||||||
$DAEMON_ARGS \
|
|
||||||
|| return 2
|
|
||||||
# Add code here, if necessary, that waits for the process to be ready
|
|
||||||
# to handle requests from services started subsequently which depend
|
|
||||||
# on this one. As a last resort, sleep for some time.
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that stops the daemon/service
|
|
||||||
#
|
|
||||||
do_stop()
|
|
||||||
{
|
|
||||||
# Return
|
|
||||||
# 0 if daemon has been stopped
|
|
||||||
# 1 if daemon was already stopped
|
|
||||||
# 2 if daemon could not be stopped
|
|
||||||
# other if a failure occurred
|
|
||||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
|
|
||||||
RETVAL="$?"
|
|
||||||
[ "$RETVAL" = 2 ] && return 2
|
|
||||||
# Wait for children to finish too if this is a daemon that forks
|
|
||||||
# and if the daemon is only ever run from this initscript.
|
|
||||||
# If the above conditions are not satisfied then add some other code
|
|
||||||
# that waits for the process to drop all resources that could be
|
|
||||||
# needed by services started subsequently. A last resort is to
|
|
||||||
# sleep for some time.
|
|
||||||
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
|
|
||||||
[ "$?" = 2 ] && return 2
|
|
||||||
return "$RETVAL"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that sends a SIGHUP to the daemon/service
|
|
||||||
#
|
|
||||||
do_reload() {
|
|
||||||
#
|
|
||||||
# If the daemon can reload its configuration without
|
|
||||||
# restarting (for example, when it is sent a SIGHUP),
|
|
||||||
# then implement that here.
|
|
||||||
#
|
|
||||||
start-stop-daemon --stop --signal 1 --quiet $PIDFILE --name $NAME
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
|
|
||||||
do_start
|
|
||||||
case "$?" in
|
|
||||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
||||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
|
||||||
do_stop
|
|
||||||
case "$?" in
|
|
||||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
||||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
|
||||||
;;
|
|
||||||
#reload|force-reload)
|
|
||||||
#
|
|
||||||
# If do_reload() is not implemented then leave this commented out
|
|
||||||
# and leave 'force-reload' as an alias for 'restart'.
|
|
||||||
#
|
|
||||||
#log_daemon_msg "Reloading $DESC" "$NAME"
|
|
||||||
#do_reload
|
|
||||||
#log_end_msg $?
|
|
||||||
#;;
|
|
||||||
restart|force-reload)
|
|
||||||
#
|
|
||||||
# If the "reload" option is implemented then remove the
|
|
||||||
# 'force-reload' alias
|
|
||||||
#
|
|
||||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
|
||||||
do_stop
|
|
||||||
case "$?" in
|
|
||||||
0|1)
|
|
||||||
do_start
|
|
||||||
case "$?" in
|
|
||||||
0) log_end_msg 0 ;;
|
|
||||||
1) log_end_msg 1 ;; # Old process is still running
|
|
||||||
*) log_end_msg 1 ;; # Failed to start
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Failed to stop
|
|
||||||
log_end_msg 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
|
||||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
|
||||||
exit 3
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
:
|
|
1
debian/osmocom-gbproxy.install
vendored
1
debian/osmocom-gbproxy.install
vendored
@@ -1 +0,0 @@
|
|||||||
/usr/bin/osmo-gbproxy
|
|
3
debian/osmocom-ipaccess-utils.install
vendored
3
debian/osmocom-ipaccess-utils.install
vendored
@@ -1,3 +0,0 @@
|
|||||||
/usr/bin/ipaccess-config
|
|
||||||
/usr/bin/ipaccess-find
|
|
||||||
/usr/bin/ipaccess-proxy
|
|
8
debian/osmocom-nitb.default
vendored
8
debian/osmocom-nitb.default
vendored
@@ -1,8 +0,0 @@
|
|||||||
CONFIG_FILE="/etc/osmocom/osmo-nitb.cfg"
|
|
||||||
HLR_FILE="/var/lib/osmocom/hlr.sqlite3"
|
|
||||||
|
|
||||||
DAEMON_ARGS="-P"
|
|
||||||
|
|
||||||
# Uncomment if using LCR+Asterisk
|
|
||||||
# DAEMON_ARGS="-m -P"
|
|
||||||
|
|
3
debian/osmocom-nitb.dirs
vendored
3
debian/osmocom-nitb.dirs
vendored
@@ -1,3 +0,0 @@
|
|||||||
/etc/osmocom
|
|
||||||
/var/log/osmocom
|
|
||||||
/var/lib/osmocom
|
|
1
debian/osmocom-nitb.examples
vendored
1
debian/osmocom-nitb.examples
vendored
@@ -1 +0,0 @@
|
|||||||
openbsc/doc/examples/osmo-nitb
|
|
152
debian/osmocom-nitb.init
vendored
152
debian/osmocom-nitb.init
vendored
@@ -1,152 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: osmo-nitb
|
|
||||||
# Required-Start: $network $local_fs
|
|
||||||
# Required-Stop:
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
# Short-Description: Osmocom GSM network-in-a-box
|
|
||||||
# Description: A minimal implementation of the GSM Base Station Controller,
|
|
||||||
# Mobile Switching Center, Home Location regster and all other
|
|
||||||
# components to run a self-contained GSM network.
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
# Author: Harald Welte <laforge@gnumonks.org>
|
|
||||||
|
|
||||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|
||||||
NAME=osmo-nitb # Introduce the short server's name here
|
|
||||||
DESC="Osmocom GSM Network-in-a-Box" # Introduce a short description here
|
|
||||||
DAEMON=/usr/bin/osmo-nitb # Introduce the server's location here
|
|
||||||
SCRIPTNAME=/etc/init.d/osmocom-nitb
|
|
||||||
|
|
||||||
# Exit if the package is not installed
|
|
||||||
[ -x $DAEMON ] || exit 0
|
|
||||||
|
|
||||||
# Read configuration variable file if it is present
|
|
||||||
[ -r /etc/default/osmocom-nitb ] && . /etc/default/osmocom-nitb
|
|
||||||
|
|
||||||
# Load the VERBOSE setting and other rcS variables
|
|
||||||
. /lib/init/vars.sh
|
|
||||||
|
|
||||||
# Define LSB log_* functions.
|
|
||||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
|
||||||
. /lib/lsb/init-functions
|
|
||||||
|
|
||||||
DAEMON_ARGS="$DAEMON_ARGS -D -c $CONFIG_FILE -l $HLR_FILE"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that starts the daemon/service
|
|
||||||
#
|
|
||||||
do_start()
|
|
||||||
{
|
|
||||||
# Return
|
|
||||||
# 0 if daemon has been started
|
|
||||||
# 1 if daemon was already running
|
|
||||||
# 2 if daemon could not be started
|
|
||||||
start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
|
|
||||||
|| return 1
|
|
||||||
start-stop-daemon --start --quiet --exec $DAEMON -- \
|
|
||||||
$DAEMON_ARGS \
|
|
||||||
|| return 2
|
|
||||||
# Add code here, if necessary, that waits for the process to be ready
|
|
||||||
# to handle requests from services started subsequently which depend
|
|
||||||
# on this one. As a last resort, sleep for some time.
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that stops the daemon/service
|
|
||||||
#
|
|
||||||
do_stop()
|
|
||||||
{
|
|
||||||
# Return
|
|
||||||
# 0 if daemon has been stopped
|
|
||||||
# 1 if daemon was already stopped
|
|
||||||
# 2 if daemon could not be stopped
|
|
||||||
# other if a failure occurred
|
|
||||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
|
|
||||||
RETVAL="$?"
|
|
||||||
[ "$RETVAL" = 2 ] && return 2
|
|
||||||
# Wait for children to finish too if this is a daemon that forks
|
|
||||||
# and if the daemon is only ever run from this initscript.
|
|
||||||
# If the above conditions are not satisfied then add some other code
|
|
||||||
# that waits for the process to drop all resources that could be
|
|
||||||
# needed by services started subsequently. A last resort is to
|
|
||||||
# sleep for some time.
|
|
||||||
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
|
|
||||||
[ "$?" = 2 ] && return 2
|
|
||||||
return "$RETVAL"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that sends a SIGHUP to the daemon/service
|
|
||||||
#
|
|
||||||
do_reload() {
|
|
||||||
#
|
|
||||||
# If the daemon can reload its configuration without
|
|
||||||
# restarting (for example, when it is sent a SIGHUP),
|
|
||||||
# then implement that here.
|
|
||||||
#
|
|
||||||
start-stop-daemon --stop --signal 1 --quiet $PIDFILE --name $NAME
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
|
|
||||||
do_start
|
|
||||||
case "$?" in
|
|
||||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
||||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
|
||||||
do_stop
|
|
||||||
case "$?" in
|
|
||||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
||||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
|
||||||
;;
|
|
||||||
#reload|force-reload)
|
|
||||||
#
|
|
||||||
# If do_reload() is not implemented then leave this commented out
|
|
||||||
# and leave 'force-reload' as an alias for 'restart'.
|
|
||||||
#
|
|
||||||
#log_daemon_msg "Reloading $DESC" "$NAME"
|
|
||||||
#do_reload
|
|
||||||
#log_end_msg $?
|
|
||||||
#;;
|
|
||||||
restart|force-reload)
|
|
||||||
#
|
|
||||||
# If the "reload" option is implemented then remove the
|
|
||||||
# 'force-reload' alias
|
|
||||||
#
|
|
||||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
|
||||||
do_stop
|
|
||||||
case "$?" in
|
|
||||||
0|1)
|
|
||||||
do_start
|
|
||||||
case "$?" in
|
|
||||||
0) log_end_msg 0 ;;
|
|
||||||
1) log_end_msg 1 ;; # Old process is still running
|
|
||||||
*) log_end_msg 1 ;; # Failed to start
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Failed to stop
|
|
||||||
log_end_msg 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
|
||||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
|
||||||
exit 3
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
:
|
|
1
debian/osmocom-nitb.install
vendored
1
debian/osmocom-nitb.install
vendored
@@ -1 +0,0 @@
|
|||||||
/usr/bin/osmo-nitb
|
|
2
debian/osmocom-sgsn.default
vendored
2
debian/osmocom-sgsn.default
vendored
@@ -1,2 +0,0 @@
|
|||||||
CONFIG_FILE="/etc/osmocom/osmo-sgsn.cfg"
|
|
||||||
|
|
1
debian/osmocom-sgsn.examples
vendored
1
debian/osmocom-sgsn.examples
vendored
@@ -1 +0,0 @@
|
|||||||
openbsc/doc/examples/osmo-sgsn
|
|
150
debian/osmocom-sgsn.init
vendored
150
debian/osmocom-sgsn.init
vendored
@@ -1,150 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: osmo-sgsn
|
|
||||||
# Required-Start: $network $local_fs
|
|
||||||
# Required-Stop:
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
# Short-Description: Osmocom Serving GPRS Support Node
|
|
||||||
# Description: Osmocom Serving GPRS Support Node
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
# Author: Harald Welte <laforge@gnumonks.org>
|
|
||||||
|
|
||||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|
||||||
NAME=osmo-sgsn # Introduce the short server's name here
|
|
||||||
DESC="Osmocom Serving GPRS Support Node" # Introduce a short description here
|
|
||||||
DAEMON=/usr/bin/osmo-sgsn # Introduce the server's location here
|
|
||||||
SCRIPTNAME=/etc/init.d/osmocom-sgsn
|
|
||||||
|
|
||||||
# Exit if the package is not installed
|
|
||||||
[ -x $DAEMON ] || exit 0
|
|
||||||
|
|
||||||
# Read configuration variable file if it is present
|
|
||||||
[ -r /etc/default/osmocom-sgsn ] && . /etc/default/osmocom-sgsn
|
|
||||||
|
|
||||||
# Load the VERBOSE setting and other rcS variables
|
|
||||||
. /lib/init/vars.sh
|
|
||||||
|
|
||||||
# Define LSB log_* functions.
|
|
||||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
|
||||||
. /lib/lsb/init-functions
|
|
||||||
|
|
||||||
DAEMON_ARGS="$DAEMON_ARGS -D -c $CONFIG_FILE"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that starts the daemon/service
|
|
||||||
#
|
|
||||||
do_start()
|
|
||||||
{
|
|
||||||
# Return
|
|
||||||
# 0 if daemon has been started
|
|
||||||
# 1 if daemon was already running
|
|
||||||
# 2 if daemon could not be started
|
|
||||||
start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
|
|
||||||
|| return 1
|
|
||||||
start-stop-daemon --start --quiet --exec $DAEMON -- \
|
|
||||||
$DAEMON_ARGS \
|
|
||||||
|| return 2
|
|
||||||
# Add code here, if necessary, that waits for the process to be ready
|
|
||||||
# to handle requests from services started subsequently which depend
|
|
||||||
# on this one. As a last resort, sleep for some time.
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that stops the daemon/service
|
|
||||||
#
|
|
||||||
do_stop()
|
|
||||||
{
|
|
||||||
# Return
|
|
||||||
# 0 if daemon has been stopped
|
|
||||||
# 1 if daemon was already stopped
|
|
||||||
# 2 if daemon could not be stopped
|
|
||||||
# other if a failure occurred
|
|
||||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
|
|
||||||
RETVAL="$?"
|
|
||||||
[ "$RETVAL" = 2 ] && return 2
|
|
||||||
# Wait for children to finish too if this is a daemon that forks
|
|
||||||
# and if the daemon is only ever run from this initscript.
|
|
||||||
# If the above conditions are not satisfied then add some other code
|
|
||||||
# that waits for the process to drop all resources that could be
|
|
||||||
# needed by services started subsequently. A last resort is to
|
|
||||||
# sleep for some time.
|
|
||||||
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
|
|
||||||
[ "$?" = 2 ] && return 2
|
|
||||||
return "$RETVAL"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Function that sends a SIGHUP to the daemon/service
|
|
||||||
#
|
|
||||||
do_reload() {
|
|
||||||
#
|
|
||||||
# If the daemon can reload its configuration without
|
|
||||||
# restarting (for example, when it is sent a SIGHUP),
|
|
||||||
# then implement that here.
|
|
||||||
#
|
|
||||||
start-stop-daemon --stop --signal 1 --quiet $PIDFILE --name $NAME
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
|
|
||||||
do_start
|
|
||||||
case "$?" in
|
|
||||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
||||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
|
||||||
do_stop
|
|
||||||
case "$?" in
|
|
||||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
||||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
|
||||||
;;
|
|
||||||
#reload|force-reload)
|
|
||||||
#
|
|
||||||
# If do_reload() is not implemented then leave this commented out
|
|
||||||
# and leave 'force-reload' as an alias for 'restart'.
|
|
||||||
#
|
|
||||||
#log_daemon_msg "Reloading $DESC" "$NAME"
|
|
||||||
#do_reload
|
|
||||||
#log_end_msg $?
|
|
||||||
#;;
|
|
||||||
restart|force-reload)
|
|
||||||
#
|
|
||||||
# If the "reload" option is implemented then remove the
|
|
||||||
# 'force-reload' alias
|
|
||||||
#
|
|
||||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
|
||||||
do_stop
|
|
||||||
case "$?" in
|
|
||||||
0|1)
|
|
||||||
do_start
|
|
||||||
case "$?" in
|
|
||||||
0) log_end_msg 0 ;;
|
|
||||||
1) log_end_msg 1 ;; # Old process is still running
|
|
||||||
*) log_end_msg 1 ;; # Failed to start
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Failed to stop
|
|
||||||
log_end_msg 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
|
||||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
|
||||||
exit 3
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
:
|
|
1
debian/osmocom-sgsn.install
vendored
1
debian/osmocom-sgsn.install
vendored
@@ -1 +0,0 @@
|
|||||||
/usr/bin/osmo-sgsn
|
|
38
debian/postinst
vendored
Executable file
38
debian/postinst
vendored
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
case "$1" in
|
||||||
|
configure)
|
||||||
|
# Create the osmocom group and user (if it doesn't exist yet)
|
||||||
|
if ! getent group osmocom >/dev/null; then
|
||||||
|
groupadd --system osmocom
|
||||||
|
fi
|
||||||
|
if ! getent passwd osmocom >/dev/null; then
|
||||||
|
useradd \
|
||||||
|
--system \
|
||||||
|
--gid osmocom \
|
||||||
|
--home-dir /var/lib/osmocom \
|
||||||
|
--shell /sbin/nologin \
|
||||||
|
--comment "Open Source Mobile Communications" \
|
||||||
|
osmocom
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fix permissions of previous (root-owned) install (OS#4107)
|
||||||
|
if dpkg --compare-versions "$2" le "1.13.0"; then
|
||||||
|
if [ -e /etc/osmocom/osmo-mgw.cfg ]; then
|
||||||
|
chown -v osmocom:osmocom /etc/osmocom/osmo-mgw.cfg
|
||||||
|
chmod -v 0660 /etc/osmocom/osmo-mgw.cfg
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d /etc/osmocom ]; then
|
||||||
|
chown -v root:osmocom /etc/osmocom
|
||||||
|
chmod -v 2775 /etc/osmocom
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p /var/lib/osmocom
|
||||||
|
chown -R -v osmocom:osmocom /var/lib/osmocom
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# dh_installdeb(1) will replace this with shell code automatically
|
||||||
|
# generated by other debhelper scripts.
|
||||||
|
#DEBHELPER#
|
54
debian/rules
vendored
54
debian/rules
vendored
@@ -1,41 +1,39 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
# -*- makefile -*-
|
# You must remove unused comment lines for the released package.
|
||||||
# Sample debian/rules that uses debhelper.
|
# See debhelper(7) (uncomment to enable)
|
||||||
|
# This is an autogenerated template for debian/rules.
|
||||||
#
|
#
|
||||||
# This file was originally written by Joey Hess and Craig Small.
|
# Output every command that modifies files on the build system.
|
||||||
# As a special exception, when this file is copied by dh-make into a
|
#export DH_VERBOSE = 1
|
||||||
# dh-make output file, you may use that output file without restriction.
|
|
||||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
|
||||||
#
|
|
||||||
# Modified to make a template file for a multi-binary package with separated
|
|
||||||
# build-arch and build-indep targets by Bill Allombert 2001
|
|
||||||
|
|
||||||
# Uncomment this to turn on verbose mode.
|
DEBIAN := $(shell dpkg-parsechangelog | grep '^Version:' | cut -d' ' -f2)
|
||||||
#export DH_VERBOSE=1
|
|
||||||
|
|
||||||
DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
|
|
||||||
DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
|
DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
|
||||||
VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
|
VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
|
||||||
|
|
||||||
export DEB_BUILD_HARDENING=1
|
CFLAGS += -g
|
||||||
|
|
||||||
|
# main packaging script based on dh7 syntax
|
||||||
%:
|
%:
|
||||||
dh --sourcedirectory=openbsc --with autoreconf $@
|
dh $@ --with autoreconf
|
||||||
|
|
||||||
# This is needed for debian stable (squeeze)
|
# debmake generated override targets
|
||||||
override_dh_autoreconf:
|
# Set options for ./configure
|
||||||
cd openbsc && autoreconf --install --force
|
#CONFIGURE_FLAGS = <options for ./configure>
|
||||||
|
#overrride_dh_configure:
|
||||||
|
# dh_configure -- $(CONFIGURE_FLAGS)
|
||||||
|
#
|
||||||
|
# Do not install libtool archive, python .pyc .pyo
|
||||||
|
#override_dh_install:
|
||||||
|
# dh_install --list-missing -X.la -X.pyc -X.pyo
|
||||||
|
|
||||||
override_dh_strip:
|
override_dh_auto_test:
|
||||||
dh_strip -posmocom-bsc --dbg-package=osmocom-bsc-dbg
|
dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
|
||||||
dh_strip -posmocom-nitb --dbg-package=osmocom-nitb-dbg
|
|
||||||
dh_strip -posmocom-ipaccess-utils --dbg-package=osmocom-ipaccess-utils-dbg
|
|
||||||
dh_strip -posmocom-bs11-utils --dbg-package=osmocom-bs11-utils-dbg
|
|
||||||
dh_strip -posmocom-sgsn --dbg-package=osmocom-sgsn-dbg
|
|
||||||
dh_strip -posmocom-gbproxy --dbg-package=osmocom-gbproxy-dbg
|
|
||||||
dh_strip -posmocom-bsc-nat --dbg-package=osmocom-bsc-nat-dbg
|
|
||||||
|
|
||||||
override_dh_auto_configure:
|
override_dh_auto_configure:
|
||||||
echo $(VERSION) > openbsc/.tarball-version
|
dh_auto_configure -- --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals
|
||||||
dh_auto_configure --sourcedirectory=openbsc -- --enable-nat --enable-osmo-bsc
|
|
||||||
|
|
||||||
|
# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers)
|
||||||
|
override_dh_compress:
|
||||||
|
dh_compress -X.pdf
|
||||||
|
|
||||||
|
# See https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-dbg
|
||||||
|
4
doc/Makefile.am
Normal file
4
doc/Makefile.am
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
SUBDIRS = \
|
||||||
|
examples \
|
||||||
|
manuals \
|
||||||
|
$(NULL)
|
@@ -1,3 +1,10 @@
|
|||||||
|
OSMOCONF_FILES = \
|
||||||
|
osmo-mgw/osmo-mgw.cfg
|
||||||
|
|
||||||
|
osmoconfdir = $(sysconfdir)/osmocom
|
||||||
|
osmoconf_DATA = $(OSMOCONF_FILES)
|
||||||
|
|
||||||
|
EXTRA_DIST = $(OSMOCONF_FILES)
|
||||||
|
|
||||||
CFG_FILES = find $(srcdir) -name '*.cfg*' | sed -e 's,^$(srcdir),,'
|
CFG_FILES = find $(srcdir) -name '*.cfg*' | sed -e 's,^$(srcdir),,'
|
||||||
|
|
30
doc/examples/osmo-mgw/osmo-mgw-abis_e1.cfg
Normal file
30
doc/examples/osmo-mgw/osmo-mgw-abis_e1.cfg
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
!
|
||||||
|
! MGCP configuration example
|
||||||
|
!
|
||||||
|
log stderr
|
||||||
|
logging color 1
|
||||||
|
logging print category-hex 0
|
||||||
|
logging print category 1
|
||||||
|
logging timestamp 0
|
||||||
|
logging print file basename last
|
||||||
|
logging print level 1
|
||||||
|
|
||||||
|
e1_input
|
||||||
|
e1_line 0 driver dahdi
|
||||||
|
e1_line 0 port 0
|
||||||
|
mgcp
|
||||||
|
bind ip 127.0.0.1
|
||||||
|
rtp port-range 4002 16001
|
||||||
|
rtp bind-ip 127.0.0.1
|
||||||
|
rtp ip-probing
|
||||||
|
rtp ip-dscp 46
|
||||||
|
bind port 2427
|
||||||
|
number endpoints 512
|
||||||
|
force-realloc 1
|
||||||
|
rtcp-omit
|
||||||
|
rtp-patch ssrc
|
||||||
|
rtp-patch timestamp
|
||||||
|
trunk 1
|
||||||
|
rtp keep-alive once
|
||||||
|
no rtp keep-alive
|
||||||
|
line 0
|
23
doc/examples/osmo-mgw/osmo-mgw.cfg
Normal file
23
doc/examples/osmo-mgw/osmo-mgw.cfg
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
!
|
||||||
|
! MGCP configuration example
|
||||||
|
!
|
||||||
|
log stderr
|
||||||
|
logging color 1
|
||||||
|
logging print category-hex 0
|
||||||
|
logging print category 1
|
||||||
|
logging timestamp 0
|
||||||
|
logging print file basename last
|
||||||
|
logging print level 1
|
||||||
|
|
||||||
|
mgcp
|
||||||
|
bind ip 127.0.0.1
|
||||||
|
rtp port-range 4002 16001
|
||||||
|
rtp bind-ip 127.0.0.1
|
||||||
|
rtp ip-probing
|
||||||
|
rtp ip-dscp 46
|
||||||
|
bind port 2427
|
||||||
|
number endpoints 512
|
||||||
|
force-realloc 1
|
||||||
|
rtcp-omit
|
||||||
|
rtp-patch ssrc
|
||||||
|
rtp-patch timestamp
|
23
doc/manuals/Makefile.am
Normal file
23
doc/manuals/Makefile.am
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
EXTRA_DIST = osmomgw-usermanual.adoc \
|
||||||
|
osmomgw-usermanual-docinfo.xml \
|
||||||
|
osmomgw-vty-reference.xml \
|
||||||
|
regen_doc.sh \
|
||||||
|
chapters \
|
||||||
|
vty
|
||||||
|
|
||||||
|
if BUILD_MANUALS
|
||||||
|
ASCIIDOC = osmomgw-usermanual.adoc
|
||||||
|
ASCIIDOC_DEPS = $(srcdir)/chapters/*.adoc
|
||||||
|
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.asciidoc.inc
|
||||||
|
|
||||||
|
VTY_REFERENCE = osmomgw-vty-reference.xml
|
||||||
|
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc
|
||||||
|
|
||||||
|
BUILT_REFERENCE_XML = $(builddir)/vty/mgw_vty_reference.xml
|
||||||
|
$(builddir)/vty/mgw_vty_reference.xml: $(top_builddir)/src/osmo-mgw/osmo-mgw
|
||||||
|
mkdir -p $(builddir)/vty
|
||||||
|
$(top_builddir)/src/osmo-mgw/osmo-mgw --vty-ref-xml > $@
|
||||||
|
|
||||||
|
OSMO_REPOSITORY = osmo-mgw
|
||||||
|
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
|
||||||
|
endif
|
129
doc/manuals/chapters/configuration.adoc
Normal file
129
doc/manuals/chapters/configuration.adoc
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
== Configuring OsmoMGW
|
||||||
|
|
||||||
|
A basic configation of OsmoMGW mainly consists of specifying the IP address
|
||||||
|
and port on which to listen to MGCP commands, but changing the port range at
|
||||||
|
which the RTP streams terminate as well as limiting operation to a single call
|
||||||
|
agent can be done as well as changing the number of endpoints.
|
||||||
|
|
||||||
|
=== Configuring MGCP
|
||||||
|
|
||||||
|
By default OsmoMGW listens for MGCP on port 2427 on any IP address. If a call
|
||||||
|
agent address is configured then OsmoMGW will only answer MGCP commands from
|
||||||
|
that IP port 2727, otherwise all sources are handled. A domain can be
|
||||||
|
specified
|
||||||
|
|
||||||
|
.Example: MGCP configuration
|
||||||
|
----
|
||||||
|
OsmoMGW(config-mgcp)# bind ip 127.0.0.1
|
||||||
|
OsmoMGW(config-mgcp)# bind port 2427
|
||||||
|
OsmoMGW(config-mgcp)# call-agent ip 127.0.0.1
|
||||||
|
OsmoMGW(config-mgcp)# domain mgw-bsc
|
||||||
|
OsmoMGW(config-mgcp)# local ip 127.0.0.1
|
||||||
|
----
|
||||||
|
|
||||||
|
=== Configuring the trunk
|
||||||
|
|
||||||
|
The first trunk is considered a virtual trunk in OsmoMGW. All
|
||||||
|
endpoints of type "rtpbridge" are routed here. The virtual trunk is configured
|
||||||
|
in the config-mgcp context.
|
||||||
|
|
||||||
|
All other trunks are configured in the config-mgcp-trunk context, but the
|
||||||
|
commands used are identical. Right now trunks are considered only for "ds/e1"
|
||||||
|
type endpoints.
|
||||||
|
|
||||||
|
.Example: MGCP trunk configuration
|
||||||
|
----
|
||||||
|
OsmoMGW(config-mgcp)# number endpoints 63 <1>
|
||||||
|
OsmoMGW(config-mgcp)# rtp bind-ip 10.0.0.1 <2>
|
||||||
|
OsmoMGW(config-mgcp)# rtp port-range 12000-14000 <3>
|
||||||
|
----
|
||||||
|
<1> Maximum number of endpoints that can be allocated at once
|
||||||
|
<2> Use this IP when binding RTP endpoints
|
||||||
|
<3> Use ports in this range when binding RTP endpoints
|
||||||
|
|
||||||
|
There are some options to tweak how RTP forwarding behaves in OsmoMGW:
|
||||||
|
|
||||||
|
.Example: MGCP trunk rtp options
|
||||||
|
----
|
||||||
|
OsmoMGW(config-mgcp)# rtp keep-alive 30 <1>
|
||||||
|
OsmoMGW(config-mgcp)# rtp-patch ssrc <2>
|
||||||
|
OsmoMGW(config-mgcp)# rtp-patch timestamp <3>
|
||||||
|
----
|
||||||
|
<1> Send dummy UDP packets periodically to RTP destination
|
||||||
|
<2> Hide SSRC changes
|
||||||
|
<3> Ensure RTP timestamp is aligned with frame duration
|
||||||
|
|
||||||
|
NOTE: Changes to trunks that affect resource allocation, such as newly created
|
||||||
|
trunks or a change of the number of available endpoints, require a full restart
|
||||||
|
of osmo-mgw!
|
||||||
|
|
||||||
|
=== E1 trunk considerations
|
||||||
|
|
||||||
|
While the RTP bridge trunks are natively based on IP no special considerations
|
||||||
|
are required during setup. E1 trunks are mapped on a physical E1 line, which has
|
||||||
|
to be configured as shown below.
|
||||||
|
|
||||||
|
.Example: E1 line setup
|
||||||
|
----
|
||||||
|
OsmoMGW(config-e1_input)# e1_line 0 driver dahdi <1>
|
||||||
|
OsmoMGW(config-e1_input)# e1_line 0 port 2 <2>
|
||||||
|
----
|
||||||
|
<1> Name of the libosmo-abis driver implementation ("dahdi")
|
||||||
|
<2> Port number of the physical E1 port to use (2)
|
||||||
|
|
||||||
|
In osmo-mgw the e1_input node is used to configure the physical E1 line. The
|
||||||
|
line number will be used internally to identify the configured E1 line. The
|
||||||
|
port number is the physical E1 connector (sometimes called 'span') at the E1
|
||||||
|
hardware. Per trunk an individual E1 line will be needed. Beware that the E1
|
||||||
|
driver may also need configuration settings that are not discussed here.
|
||||||
|
|
||||||
|
.Example: E1 trunk setup
|
||||||
|
----
|
||||||
|
OsmoMGW(config-mgcp)# trunk 0 <1>
|
||||||
|
OsmoMGW(config-mgcp-trunk)# line 0 <2>
|
||||||
|
----
|
||||||
|
<1> Creation of a trunk (0)
|
||||||
|
<2> Reference to the E1 line to use (0)
|
||||||
|
|
||||||
|
The E1 trunk is created along with a number, typically starting at 0, but if
|
||||||
|
required any number from 0-64 is allowed. The E1 trunk configuration concerning
|
||||||
|
the IP related aspects is nearly identical to the configuration of the virtual
|
||||||
|
trunk. However, it is important that the user assigns one of the E1 line numbers
|
||||||
|
that were configured under the e1_input node.
|
||||||
|
|
||||||
|
NOTE: The endpoint name that is used on MGCP level will include the trunk number,
|
||||||
|
not the E1 line number. For simplicity (and compatibility with OsmoBSC) it is
|
||||||
|
recommended to use equal numbers for trunk and E1 line. However, if required any
|
||||||
|
E1 line can be mapped flexible on any trunk as long as the mapping is bijective.
|
||||||
|
|
||||||
|
.Example: A typical configuration with one E1 trunk
|
||||||
|
----
|
||||||
|
e1_input
|
||||||
|
e1_line 0 driver dahdi
|
||||||
|
e1_line 0 port 2
|
||||||
|
mgcp
|
||||||
|
bind ip 127.0.0.1
|
||||||
|
rtp net-range 6000 6011
|
||||||
|
rtp net-bind-ip 192.168.100.130
|
||||||
|
rtp ip-probing
|
||||||
|
rtp ip-dscp 46
|
||||||
|
no rtp keep-alive
|
||||||
|
bind port 2428
|
||||||
|
number endpoints 30
|
||||||
|
loop 0
|
||||||
|
force-realloc 1
|
||||||
|
osmux off
|
||||||
|
rtp-patch rfc5993hr
|
||||||
|
trunk 0
|
||||||
|
rtp keep-alive once
|
||||||
|
no rtp keep-alive
|
||||||
|
line 0
|
||||||
|
----
|
||||||
|
|
||||||
|
NOTE: One E1 trunk always covers a whole E1 line. All subslots (I.640) will be mapped
|
||||||
|
to individual MGCP endpoints. As long as the endpoints remain unused the
|
||||||
|
underlying E1 timeslot is not used.
|
||||||
|
|
||||||
|
NOTE: The E1 trunk implementation also works with T1 lines, however since T1 has
|
||||||
|
24 instead of 31 usable timeslots only the endpoints that fall into that 1-24 timeslot
|
||||||
|
range will be useable.
|
4
doc/manuals/chapters/counters.adoc
Normal file
4
doc/manuals/chapters/counters.adoc
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[[counters]]
|
||||||
|
== Counters
|
||||||
|
|
||||||
|
include::./counters_generated.adoc[]
|
83
doc/manuals/chapters/counters_generated.adoc
Normal file
83
doc/manuals/chapters/counters_generated.adoc
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
|
||||||
|
// autogenerated by show asciidoc counters
|
||||||
|
These counters and their description based on OsmoMGW 1.5.0.64-189f (OsmoMGW).
|
||||||
|
|
||||||
|
=== Rate Counters
|
||||||
|
|
||||||
|
// generating tables for rate_ctr_group
|
||||||
|
// rate_ctr_group table aggregated statistics for all rtp connections
|
||||||
|
.all_rtp_conn - aggregated statistics for all rtp connections
|
||||||
|
[options="header"]
|
||||||
|
|===
|
||||||
|
| Name | Reference | Description
|
||||||
|
| all_rtp:err_tstmp_in | <<all_rtp_conn_all_rtp:err_tstmp_in>> | Total inbound rtp-stream timestamp errors.
|
||||||
|
| all_rtp:err_tstmp_out | <<all_rtp_conn_all_rtp:err_tstmp_out>> | Total outbound rtp-stream timestamp errors.
|
||||||
|
| all_rtp:packets_rx | <<all_rtp_conn_all_rtp:packets_rx>> | Total inbound rtp packets.
|
||||||
|
| all_rtp:octets_rx | <<all_rtp_conn_all_rtp:octets_rx>> | Total inbound rtp octets.
|
||||||
|
| all_rtp:packets_tx | <<all_rtp_conn_all_rtp:packets_tx>> | Total outbound rtp packets.
|
||||||
|
| all_rtp:octets_tx | <<all_rtp_conn_all_rtp:octets_tx>> | Total outbound rtp octets.
|
||||||
|
| all_rtp:dropped | <<all_rtp_conn_all_rtp:dropped>> | Total dropped rtp packets.
|
||||||
|
| all_rtp:num_closed_conns | <<all_rtp_conn_all_rtp:num_closed_conns>> | Total number of rtp connections closed.
|
||||||
|
|===
|
||||||
|
// rate_ctr_group table dlcx statistics
|
||||||
|
.dlcx - dlcx statistics
|
||||||
|
[options="header"]
|
||||||
|
|===
|
||||||
|
| Name | Reference | Description
|
||||||
|
| dlcx:success | <<dlcx_dlcx:success>> | DLCX command processed successfully.
|
||||||
|
| dlcx:wildcard | <<dlcx_dlcx:wildcard>> | wildcard names in DLCX commands are unsupported.
|
||||||
|
| dlcx:no_conn | <<dlcx_dlcx:no_conn>> | endpoint specified in DLCX command has no active connections.
|
||||||
|
| dlcx:callid | <<dlcx_dlcx:callid>> | CallId specified in DLCX command mismatches endpoint's CallId .
|
||||||
|
| dlcx:connid | <<dlcx_dlcx:connid>> | connection ID specified in DLCX command does not exist on endpoint.
|
||||||
|
| dlcx:unhandled_param | <<dlcx_dlcx:unhandled_param>> | unhandled parameter in DLCX command.
|
||||||
|
| dlcx:rejected | <<dlcx_dlcx:rejected>> | connection deletion rejected by policy.
|
||||||
|
| dlcx:deferred | <<dlcx_dlcx:deferred>> | connection deletion deferred by policy.
|
||||||
|
|===
|
||||||
|
// rate_ctr_group table mdcx statistics
|
||||||
|
.mdcx - mdcx statistics
|
||||||
|
[options="header"]
|
||||||
|
|===
|
||||||
|
| Name | Reference | Description
|
||||||
|
| mdcx:success | <<mdcx_mdcx:success>> | MDCX command processed successfully.
|
||||||
|
| mdcx:wildcard | <<mdcx_mdcx:wildcard>> | wildcard endpoint names in MDCX commands are unsupported.
|
||||||
|
| mdcx:no_conn | <<mdcx_mdcx:no_conn>> | endpoint specified in MDCX command has no active connections.
|
||||||
|
| mdcx:callid | <<mdcx_mdcx:callid>> | invalid CallId specified in MDCX command.
|
||||||
|
| mdcx:connid | <<mdcx_mdcx:connid>> | invalid connection ID specified in MDCX command.
|
||||||
|
| crcx:unhandled_param | <<mdcx_crcx:unhandled_param>> | unhandled parameter in MDCX command.
|
||||||
|
| mdcx:no_connid | <<mdcx_mdcx:no_connid>> | no connection ID specified in MDCX command.
|
||||||
|
| mdcx:conn_not_found | <<mdcx_mdcx:conn_not_found>> | connection specified in MDCX command does not exist.
|
||||||
|
| mdcx:invalid_mode | <<mdcx_mdcx:invalid_mode>> | invalid connection mode in MDCX command.
|
||||||
|
| mdcx:conn_opt | <<mdcx_mdcx:conn_opt>> | connection options invalid.
|
||||||
|
| mdcx:no_remote_conn_desc | <<mdcx_mdcx:no_remote_conn_desc>> | no opposite end specified for connection.
|
||||||
|
| mdcx:start_rtp_failure | <<mdcx_mdcx:start_rtp_failure>> | failure to start RTP processing.
|
||||||
|
| mdcx:conn_rejected | <<mdcx_mdcx:conn_rejected>> | connection rejected by policy.
|
||||||
|
| mdcx:conn_deferred | <<mdcx_mdcx:conn_deferred>> | connection deferred by policy.
|
||||||
|
|===
|
||||||
|
// rate_ctr_group table crxc statistics
|
||||||
|
.crcx - crxc statistics
|
||||||
|
[options="header"]
|
||||||
|
|===
|
||||||
|
| Name | Reference | Description
|
||||||
|
| crcx:success | <<crcx_crcx:success>> | CRCX command processed successfully.
|
||||||
|
| crcx:bad_action | <<crcx_crcx:bad_action>> | bad action in CRCX command.
|
||||||
|
| crcx:unhandled_param | <<crcx_crcx:unhandled_param>> | unhandled parameter in CRCX command.
|
||||||
|
| crcx:missing_callid | <<crcx_crcx:missing_callid>> | missing CallId in CRCX command.
|
||||||
|
| crcx:invalid_mode | <<crcx_crcx:invalid_mode>> | invalid connection mode in CRCX command.
|
||||||
|
| crcx:limit_exceeded | <<crcx_crcx:limit_exceeded>> | limit of concurrent connections was reached.
|
||||||
|
| crcx:unkown_callid | <<crcx_crcx:unkown_callid>> | unknown CallId in CRCX command.
|
||||||
|
| crcx:alloc_conn_fail | <<crcx_crcx:alloc_conn_fail>> | connection allocation failure.
|
||||||
|
| crcx:no_remote_conn_desc | <<crcx_crcx:no_remote_conn_desc>> | no opposite end specified for connection.
|
||||||
|
| crcx:start_rtp_failure | <<crcx_crcx:start_rtp_failure>> | failure to start RTP processing.
|
||||||
|
| crcx:conn_rejected | <<crcx_crcx:conn_rejected>> | connection rejected by policy.
|
||||||
|
| crcx:no_osmux | <<crcx_crcx:no_osmux>> | no osmux offered by peer.
|
||||||
|
| crcx:conn_opt | <<crcx_crcx:conn_opt>> | connection options invalid.
|
||||||
|
| crcx:codec_nego | <<crcx_crcx:codec_nego>> | codec negotiation failure.
|
||||||
|
| crcx:bind_port | <<crcx_crcx:bind_port>> | port bind failure.
|
||||||
|
|===
|
||||||
|
== Osmo Stat Items
|
||||||
|
|
||||||
|
// generating tables for osmo_stat_items
|
||||||
|
== Osmo Counters
|
||||||
|
|
||||||
|
// generating tables for osmo_counters
|
||||||
|
// there are no ungrouped osmo_counters
|
100
doc/manuals/chapters/mgcp_endpoints.adoc
Normal file
100
doc/manuals/chapters/mgcp_endpoints.adoc
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
== MGCP Endpoints
|
||||||
|
|
||||||
|
MGCP organizes the switching resources in so called endpoints. Each endpoint is
|
||||||
|
referenced by its unique identifier. While RFC 3435 specifies a naming scheme, the
|
||||||
|
actual identifier naming is subject to the implementation and configuration.
|
||||||
|
|
||||||
|
=== RTP proxy / RTP bridge endpoints
|
||||||
|
|
||||||
|
OsmoMGW implements a freely configurable number of `rtpbridge` endpoints. Those
|
||||||
|
endpoints are able to host two connections at a time to model the functionality
|
||||||
|
of a tandem switch.
|
||||||
|
|
||||||
|
RTP bridge endpoint identifiers are referenced by the string `rtpbridge/`, a
|
||||||
|
hexadecimal number without leading zeros and a domain name (configurable).
|
||||||
|
|
||||||
|
----
|
||||||
|
rtpbridge/<number>@<domain>
|
||||||
|
----
|
||||||
|
|
||||||
|
.Example: List of virtual endpoints
|
||||||
|
----
|
||||||
|
rtpbridge/1@mgw
|
||||||
|
rtpbridge/2@mgw
|
||||||
|
rtpbridge/3@mgw
|
||||||
|
rtpbridge/4@mgw
|
||||||
|
rtpbridge/5@mgw
|
||||||
|
rtpbridge/6@mgw
|
||||||
|
rtpbridge/7@mgw
|
||||||
|
rtpbridge/8@mgw
|
||||||
|
rtpbridge/9@mgw
|
||||||
|
rtpbridge/a@mgw
|
||||||
|
rtpbridge/b@mgw
|
||||||
|
rtpbridge/c@mgw
|
||||||
|
rtpbridge/d@mgw
|
||||||
|
rtpbridge/e@mgw
|
||||||
|
rtpbridge/f@mgw
|
||||||
|
rtpbridge/10@mgw
|
||||||
|
----
|
||||||
|
|
||||||
|
=== E1/T1 endpoints
|
||||||
|
|
||||||
|
OsmoMGW supports E1 subslot multiplexing as specified by I.460. All possible
|
||||||
|
subslot combinations are mapped on individual endpoints. The endpoint names
|
||||||
|
are prefixed with `ds/e1-` followed by the trunk number and the E1 timeslot.
|
||||||
|
The subslot is defined by a bit rate and a bit offset.
|
||||||
|
|
||||||
|
----
|
||||||
|
ds/e1-<trunk>/s-<timeslot>/su<bitrate>-<bitoffset>@<domain>
|
||||||
|
----
|
||||||
|
|
||||||
|
.Example: List of endpoints on E1 trunk 0 at E1 timeslot 2
|
||||||
|
----
|
||||||
|
ds/e1-0/s-2/su64-0@mgw
|
||||||
|
ds/e1-0/s-2/su32-0@mgw
|
||||||
|
ds/e1-0/s-2/su32-4@mgw
|
||||||
|
ds/e1-0/s-2/su16-0@mgw
|
||||||
|
ds/e1-0/s-2/su16-2@mgw
|
||||||
|
ds/e1-0/s-2/su16-4@mgw
|
||||||
|
ds/e1-0/s-2/su16-6@mgw
|
||||||
|
ds/e1-0/s-2/su8-0@mgw
|
||||||
|
ds/e1-0/s-2/su8-1@mgw
|
||||||
|
ds/e1-0/s-2/su8-2@mgw
|
||||||
|
ds/e1-0/s-2/su8-3@mgw
|
||||||
|
ds/e1-0/s-2/su8-4@mgw
|
||||||
|
ds/e1-0/s-2/su8-5@mgw
|
||||||
|
ds/e1-0/s-2/su8-6@mgw
|
||||||
|
ds/e1-0/s-2/su8-7@mgw
|
||||||
|
----
|
||||||
|
|
||||||
|
When creating connections on endpoints that reside in one E1 timeslot the call
|
||||||
|
agent must make sure that no overlapping endpoints are used. It is for example
|
||||||
|
not possible to use `ds/e1-0/s-2/su16-2@mgw` and `ds/e1-0/s-2/su8-3@mgw` at the
|
||||||
|
same time because they overlap.
|
||||||
|
|
||||||
|
.Subslot overlapping
|
||||||
|
[options="header"]
|
||||||
|
|===
|
||||||
|
| Bit offset 4+| Subslots
|
||||||
|
| 0 | 8k .2+| 16k .4+| 32k .8+| 64k
|
||||||
|
| 1 | 8k
|
||||||
|
| 2 | 8k .2+| 16k
|
||||||
|
| 3 | 8k
|
||||||
|
| 4 | 8k .2+| 16k .4+| 32k
|
||||||
|
| 5 | 8k
|
||||||
|
| 6 | 8k .2+| 16k
|
||||||
|
| 7 | 8k
|
||||||
|
|===
|
||||||
|
|
||||||
|
NOTE: The current implementation (December 2020) only implements TRAU frame
|
||||||
|
encoding/decoding for 16K and 8K subslots. Endpoints with other bitrates are
|
||||||
|
not yet useable.
|
||||||
|
|
||||||
|
NOTE: the VTY command "show mgcp" can be used to get a list of all available
|
||||||
|
endpoints (including identifiers)
|
||||||
|
|
||||||
|
=== The `null` endpoint
|
||||||
|
|
||||||
|
OsmoMGW offers a special `null@<domain>` endpoint which can be audited at all times.
|
||||||
|
This is useful for MGCP clients who wish to submit requests to OsmoMGW
|
||||||
|
periodically to find out whether it is still reachable and in a working state.
|
72
doc/manuals/chapters/mgcp_extensions.adoc
Normal file
72
doc/manuals/chapters/mgcp_extensions.adoc
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
== MGCP Extensions
|
||||||
|
|
||||||
|
The MGCP protocol is extendable. The following non-standard extensions are
|
||||||
|
understood by OsmoMGW.
|
||||||
|
|
||||||
|
=== `X-Osmo-IGN`
|
||||||
|
|
||||||
|
`X-Osmo-IGN` indicates to OsmoMGW that specific items of an endpoint should be
|
||||||
|
ignored, so that it is lenient on mismatching values that would normally
|
||||||
|
indicate collisions or configuration errors.
|
||||||
|
|
||||||
|
==== `X-Osmo-IGN` Format
|
||||||
|
|
||||||
|
The value part of `X-Osmo-IGN` must be one or more items separated by one or more
|
||||||
|
spaces. Each item consists of one or more non-whitespace characters.
|
||||||
|
|
||||||
|
.Example: `X-Osmo-IGN` format with three ficticious items "X", "abc" and "123".
|
||||||
|
----
|
||||||
|
X-Osmo-IGN: X abc 123
|
||||||
|
----
|
||||||
|
|
||||||
|
`X-Osmo-IGN` must be issued in the MGCP header section (typically as its last item),
|
||||||
|
before the SDP section starts.
|
||||||
|
|
||||||
|
==== Supported `X-Osmo-IGN` Items
|
||||||
|
|
||||||
|
Currently, the following `X-Osmo-IGN` items are supported:
|
||||||
|
|
||||||
|
* `C`: ignore CallID mismatches, i.e. differing "C" values between connections
|
||||||
|
on the same endpoint.
|
||||||
|
|
||||||
|
.Note:
|
||||||
|
`X-Osmo-IGN` does not support ignoring mismatches on the domain part of
|
||||||
|
an endpoint name, e.g. ignoring a mismatch on "example.com" in
|
||||||
|
`rtpbridge/123abc@example.com`. Instead, you may globally configure OsmoMGW
|
||||||
|
with `mgcp` / `domain *` to permit all domain parts.
|
||||||
|
|
||||||
|
===== `X-Osmo-IGN: C`
|
||||||
|
|
||||||
|
By default, OsmoMGW verifies that all CallIDs ("C" values) match for all
|
||||||
|
connections on any one given endpoint. To ignore CallID mismatches, pass a `C`
|
||||||
|
in the `X-Osmo-IGN` header, for the first or the second `CRCX` on an endpoint.
|
||||||
|
When the `X-Osmo-IGN: C` is sent for any one `CRCX` on an endpoint, CallID
|
||||||
|
mismatches will be ignored for that and all subsequent messages for that
|
||||||
|
endpoint. Hence this header only needs to be included once per endpoint, in any
|
||||||
|
`CRCX` message that precedes or coincides with a CallID mismatch.
|
||||||
|
|
||||||
|
This is particularly useful for a BSC that is connected to an A/SCCPlite MSC,
|
||||||
|
where the BSC and MSC each are expected to configure their respective own
|
||||||
|
connection on a shared endpoint. For A/SCCPlite, it is impossible for the BSC
|
||||||
|
to know the CallID that the MSC will use, so CallID mismatches are inevitable.
|
||||||
|
See also OsmoBSC, which will by default pass the `X-Osmo-IGN: C` header for
|
||||||
|
endpoints associated with an A/SCCPlite MSC.
|
||||||
|
|
||||||
|
.Example: `CRCX` message that instructs OsmoMGW to ignore CallID mismatches
|
||||||
|
----
|
||||||
|
CRCX 2 rtpbridge/123abc@mgw MGCP 1.0
|
||||||
|
M: recvonly
|
||||||
|
C: 2
|
||||||
|
L: p:20
|
||||||
|
X-Osmo-IGN: C
|
||||||
|
|
||||||
|
v=0
|
||||||
|
c=IN IP4 123.12.12.123
|
||||||
|
m=audio 5904 RTP/AVP 97
|
||||||
|
a=rtpmap:97 GSM-EFR/8000
|
||||||
|
a=ptime:40
|
||||||
|
----
|
||||||
|
|
||||||
|
=== `X-Osmux`
|
||||||
|
|
||||||
|
See <<mgcp-extension-osmux>>
|
115
doc/manuals/chapters/overview.adoc
Normal file
115
doc/manuals/chapters/overview.adoc
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
[[overview]]
|
||||||
|
== Overview
|
||||||
|
|
||||||
|
This manual should help you getting started with OsmoMGW. It will cover
|
||||||
|
aspects of configuring and running the media gateway.
|
||||||
|
|
||||||
|
[[intro_overview]]
|
||||||
|
=== About OsmoMGW
|
||||||
|
|
||||||
|
OsmoMGW is the Osmocom implementation of a media gateway to handle user
|
||||||
|
plane (voice) traffic in cellular networks. It can connect and optionally
|
||||||
|
transcode RTP voice streams between different network elements such as BTSs
|
||||||
|
and external entities like SIP. It is typically co-located with both OsmoBSC
|
||||||
|
and OsmoMSC and controlled by them via MGCP, the Media Gateway Control
|
||||||
|
Protocol.
|
||||||
|
|
||||||
|
[[fig-bsc]]
|
||||||
|
.OsmoMGW used with OsmoBSC
|
||||||
|
[graphviz]
|
||||||
|
----
|
||||||
|
digraph G {
|
||||||
|
rankdir = LR;
|
||||||
|
OsmoBTS -> OsmoBSC [label="Abis/IP"];
|
||||||
|
OsmoBSC -> "core-network" [label="3GPP AoIP"];
|
||||||
|
OsmoBSC -> OsmoMGW [label="MGCP"];
|
||||||
|
OsmoBTS -> OsmoMGW [label="RTP",dir=both];
|
||||||
|
OsmoMGW -> "core-network" [label="RTP",dir=both];
|
||||||
|
{rank=same OsmoBSC OsmoMGW}
|
||||||
|
OsmoMGW [color=red];
|
||||||
|
}
|
||||||
|
----
|
||||||
|
|
||||||
|
[[fig-msc]]
|
||||||
|
.OsmoMGW used with OsmoMSC
|
||||||
|
[graphviz]
|
||||||
|
----
|
||||||
|
digraph G {
|
||||||
|
rankdir = LR;
|
||||||
|
"2G BSS" -> OsmoMSC [label="3GPP AoIP"];
|
||||||
|
OsmoMSC -> OsmoMGW [label="MGCP"];
|
||||||
|
"2G BSS" -> OsmoMGW [label="RTP",dir=both];
|
||||||
|
OsmoMSC -> OsmoSIP [label="MNCC"];
|
||||||
|
OsmoSIP -> PBX [label="SIP Trunk"];
|
||||||
|
OsmoMGW -> PBX [label="RTP",dir=both];
|
||||||
|
{rank=same OsmoMSC OsmoMGW}
|
||||||
|
OsmoSIP [label="osmo-sip-connector"];
|
||||||
|
OsmoMGW [color=red];
|
||||||
|
|
||||||
|
hNodeB -> OsmoHNBGW [label="Iuh"];
|
||||||
|
OsmoHNBGW -> OsmoMSC [label="IuCS"];
|
||||||
|
hNodeB -> OsmoMGW [label="RTP",dir=both];
|
||||||
|
}
|
||||||
|
----
|
||||||
|
|
||||||
|
[[fig-bsc-e1]]
|
||||||
|
.Integration of legacy E1 BTS in AoIP network
|
||||||
|
[graphviz]
|
||||||
|
----
|
||||||
|
digraph G {
|
||||||
|
rankdir = LR;
|
||||||
|
BTS -> OsmoBSC [label="Abis/E1"];
|
||||||
|
OsmoBSC -> "core-network" [label="3GPP AoIP"];
|
||||||
|
OsmoBSC -> OsmoMGW [label="MGCP"];
|
||||||
|
BTS -> OsmoMGW [label="TRAU/E1",dir=both];
|
||||||
|
OsmoMGW -> "core-network" [label="RTP",dir=both];
|
||||||
|
{rank=same OsmoBSC OsmoMGW}
|
||||||
|
OsmoMGW [color=red];
|
||||||
|
}
|
||||||
|
----
|
||||||
|
|
||||||
|
=== Software Components
|
||||||
|
|
||||||
|
OsmoMGW contains a variety of different software components, which we’ll
|
||||||
|
quickly describe in this section.
|
||||||
|
|
||||||
|
==== MGCP Implementation
|
||||||
|
|
||||||
|
OsmoMGW brings its own MGCP implementation through which OsmoMGW is
|
||||||
|
controlled.
|
||||||
|
|
||||||
|
The commands implemented are CRCX, MDCX, DLCX and RSIP. The command AUEP is
|
||||||
|
implemented as a stub and will simply respond with OK.
|
||||||
|
|
||||||
|
==== RTP implementation
|
||||||
|
|
||||||
|
Support for IuUP which is used in 3G cells is quite lacking at the moment.
|
||||||
|
3G<->3G and 2G<->2G calls should work, but 3G<->2G does not.
|
||||||
|
|
||||||
|
==== Audio transcoder
|
||||||
|
|
||||||
|
Transcoding is currently not supported in OsmoMGW.
|
||||||
|
|
||||||
|
=== Limitations
|
||||||
|
|
||||||
|
At the moment (November 2020), OsmoMGW implements RTP proxy / RTP bridge
|
||||||
|
type endpoints and E1/T1 16k/8k sub-slots with TRAU frames for classic BTS
|
||||||
|
support. To the RTP proxy / RTP bridge endpoints two RTP connections can
|
||||||
|
be established, which then work as a tandem. E1/T1 endpoints support one
|
||||||
|
RTP connection at a time that is associated with a sub-slot on an E1 line.
|
||||||
|
We are planning to add further endpoint types for:
|
||||||
|
|
||||||
|
- classic E1/T1 timeslots (64kBps alaw/ulaw)
|
||||||
|
- announcement/playout end-points
|
||||||
|
- conference endpoints
|
||||||
|
|
||||||
|
=== Additional resources
|
||||||
|
|
||||||
|
You can find the OsmoMGW issue tracker and wiki online at
|
||||||
|
|
||||||
|
- https://osmocom.org/projects/osmo-mgw
|
||||||
|
- https://osmocom.org/projects/osmo-mgw/wiki
|
||||||
|
|
||||||
|
RFC 3435 for MGCP is located at
|
||||||
|
|
||||||
|
- https://tools.ietf.org/html/rfc3435
|
42
doc/manuals/chapters/qos-example.adoc
Normal file
42
doc/manuals/chapters/qos-example.adoc
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
==== Full example of QoS for osmo-mgw
|
||||||
|
|
||||||
|
In the below example we will show the full set of configuration required
|
||||||
|
for both DSCP and PCP differentiation of RTP traffic by osmo-mgw.
|
||||||
|
|
||||||
|
What we want to achieve in this example is the following configuration:
|
||||||
|
|
||||||
|
.DSCP and PCP assignments for osmo-mgw Abis downlink traffic in this example
|
||||||
|
[options="header",width="30%",cols="2,1,1"]
|
||||||
|
|===
|
||||||
|
|Traffic |DSCP|PCP
|
||||||
|
|RTP | 46| 6
|
||||||
|
|===
|
||||||
|
|
||||||
|
. configure the osmo-mgw program to set the DSCP value
|
||||||
|
. configure an egrees QoS map to map from priority to PCP
|
||||||
|
|
||||||
|
.Example Step 1: add related VTY configuration to `osmo-mgw.cfg`
|
||||||
|
----
|
||||||
|
...
|
||||||
|
mgcp
|
||||||
|
rtp ip-dscp 46
|
||||||
|
rtp socket-priority 6
|
||||||
|
...
|
||||||
|
----
|
||||||
|
|
||||||
|
.Example Step 2: egress QoS map to map from socket priority to PCP values
|
||||||
|
----
|
||||||
|
$ sudo ip link set dev eth0.9<1> type vlan egress-qos-map 0:0 5:5 6:6 7:7 <2>
|
||||||
|
----
|
||||||
|
<1> make sure to specify your specific VLAN interface name here instead of `eth0.9`.
|
||||||
|
<2> create a egress QoS map that maps the priority value 1:1 to the PCP. We also include the
|
||||||
|
mapping 5:5 and 7:7 from the osmo-bsc example (see <<userman-osmobsc>>) here.
|
||||||
|
|
||||||
|
NOTE:: The settings of the `ip` command are volatile and only active until
|
||||||
|
the next reboot (or the network device or VLAN is removed). Please refer to
|
||||||
|
the documentation of your specific Linux distribution in order to find out how
|
||||||
|
to make such settings persistent by means of an `ifup` hook whenever the interface
|
||||||
|
comes up. For CentOS/RHEL 8 this can e.g. be achieved by means of an `/sbin/ifup-local
|
||||||
|
script` (when using `network-scripts` and not NetworkManager). For Debian or Ubuntu,
|
||||||
|
this typically involves adding `up` lines to `/etc/network/interfaces` or a `/etc/network/if-up.d`
|
||||||
|
script.
|
42
doc/manuals/chapters/running.adoc
Normal file
42
doc/manuals/chapters/running.adoc
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
== Running OsmoMGW
|
||||||
|
|
||||||
|
The OsmoMGW executable (`osmo-mgw`) offers the following command-line
|
||||||
|
arguments:
|
||||||
|
|
||||||
|
=== SYNOPSIS
|
||||||
|
|
||||||
|
*osmo-mgw* [-h|-V] [-D] [-c 'CONFIGFILE'] [-s]
|
||||||
|
|
||||||
|
=== OPTIONS
|
||||||
|
|
||||||
|
*-h, --help*::
|
||||||
|
Print a short help message about the supported options
|
||||||
|
*-V, --version*::
|
||||||
|
Print the compile-time version number of the program
|
||||||
|
*-D, --daemonize*::
|
||||||
|
Fork the process as a daemon into background.
|
||||||
|
*-c, --config-file 'CONFIGFILE'*::
|
||||||
|
Specify the file and path name of the configuration file to be
|
||||||
|
used. If none is specified, use `osmo-mgw.cfg` in the current
|
||||||
|
working directory.
|
||||||
|
*-s, --disable-color*::
|
||||||
|
Disable colors for logging to stderr. This has mostly been
|
||||||
|
deprecated by VTY based logging configuration, see <<logging>>
|
||||||
|
for more information.
|
||||||
|
|
||||||
|
|
||||||
|
=== Configure limits
|
||||||
|
|
||||||
|
When servicing hundreds of media endpoints, it may be necessary to adjust the
|
||||||
|
operating system's limit on open file descriptors for the osmo-mgw process. A
|
||||||
|
typical default limit imposed by operating systems is 1024; this would be
|
||||||
|
exceeded by, for example, about 256 active voice calls with 4 RTP/RTPC ports
|
||||||
|
each, sockets for other interfaces not considered yet.
|
||||||
|
|
||||||
|
It should be ok to set an OS limit on open file descriptors as high as 65536
|
||||||
|
for osmo-mgw, which practically rules out failure from running out of file
|
||||||
|
descriptors anywhere (<16,000 active calls).
|
||||||
|
|
||||||
|
When using systemd, the file descriptor limit may be adjusted in the service
|
||||||
|
file by the `LimitNOFILE` setting ("Number of Open FILE descriptors"). OsmoMGW
|
||||||
|
ships a systemd service file with a high LimitNOFILE setting.
|
47
doc/manuals/osmomgw-usermanual-docinfo.xml
Normal file
47
doc/manuals/osmomgw-usermanual-docinfo.xml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<revhistory>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1</revnumber>
|
||||||
|
<date>July 24th, 2018</date>
|
||||||
|
<authorinitials>DW</authorinitials>
|
||||||
|
<revremark>
|
||||||
|
Initial version
|
||||||
|
</revremark>
|
||||||
|
</revision>
|
||||||
|
</revhistory>
|
||||||
|
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<firstname>Daniel</firstname>
|
||||||
|
<surname>Willmann</surname>
|
||||||
|
<email>dwillmann@sysmocom.de</email>
|
||||||
|
<authorinitials>DW</authorinitials>
|
||||||
|
<affiliation>
|
||||||
|
<shortaffil>sysmocom</shortaffil>
|
||||||
|
<orgname>sysmocom - s.f.m.c. GmbH</orgname>
|
||||||
|
</affiliation>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
<year>2018</year>
|
||||||
|
<holder>sysmocom - s.f.m.c. GmbH</holder>
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<legalnotice>
|
||||||
|
<para>
|
||||||
|
Permission is granted to copy, distribute and/or modify this
|
||||||
|
document under the terms of the GNU Free Documentation License,
|
||||||
|
Version 1.3 or any later version published by the Free Software
|
||||||
|
Foundation; with the Invariant Sections being just 'Foreword',
|
||||||
|
'Acknowledgements' and 'Preface', with no Front-Cover Texts,
|
||||||
|
and no Back-Cover Texts. A copy of the license is included in
|
||||||
|
the section entitled "GNU Free Documentation License".
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The Asciidoc source code of this manual can be found at
|
||||||
|
<ulink url="http://git.osmocom.org/osmo-gsm-manuals/">
|
||||||
|
http://git.osmocom.org/osmo-gsm-manuals/
|
||||||
|
</ulink>
|
||||||
|
</para>
|
||||||
|
</legalnotice>
|
||||||
|
|
39
doc/manuals/osmomgw-usermanual.adoc
Normal file
39
doc/manuals/osmomgw-usermanual.adoc
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
:gfdl-enabled:
|
||||||
|
:program-name: OsmoMGW
|
||||||
|
|
||||||
|
OsmoMGW User Manual
|
||||||
|
====================
|
||||||
|
Daniel Willmann <dwillmann@sysmocom.de>
|
||||||
|
|
||||||
|
|
||||||
|
include::./common/chapters/preface.adoc[]
|
||||||
|
|
||||||
|
include::{srcdir}/chapters/overview.adoc[]
|
||||||
|
|
||||||
|
include::{srcdir}/chapters/running.adoc[]
|
||||||
|
|
||||||
|
include::./common/chapters/vty.adoc[]
|
||||||
|
|
||||||
|
include::./common/chapters/logging.adoc[]
|
||||||
|
|
||||||
|
include::{srcdir}/chapters/configuration.adoc[]
|
||||||
|
|
||||||
|
include::{srcdir}/chapters/mgcp_endpoints.adoc[]
|
||||||
|
|
||||||
|
include::{srcdir}/chapters/mgcp_extensions.adoc[]
|
||||||
|
|
||||||
|
include::./common/chapters/osmux/osmux.adoc[]
|
||||||
|
|
||||||
|
include::./common/chapters/qos-dscp-pcp.adoc[]
|
||||||
|
|
||||||
|
//include::{srcdir}/chapters/counters.adoc[]
|
||||||
|
|
||||||
|
include::./common/chapters/vty_cpu_sched.adoc[]
|
||||||
|
|
||||||
|
include::./common/chapters/port_numbers.adoc[]
|
||||||
|
|
||||||
|
include::./common/chapters/bibliography.adoc[]
|
||||||
|
|
||||||
|
include::./common/chapters/glossary.adoc[]
|
||||||
|
|
||||||
|
include::./common/chapters/gfdl.adoc[]
|
38
doc/manuals/osmomgw-vty-reference.xml
Normal file
38
doc/manuals/osmomgw-vty-reference.xml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
ex:ts=2:sw=42sts=2:et
|
||||||
|
-*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
||||||
|
-->
|
||||||
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML 5.0//EN"
|
||||||
|
"http://docbook.org/xml/5.0/dtd/docbook.dtd" [
|
||||||
|
<!ENTITY chapter-vty SYSTEM "./common/chapters/vty.xml" >
|
||||||
|
<!ENTITY sections-vty SYSTEM "generated/docbook_vty.xml" >
|
||||||
|
]>
|
||||||
|
|
||||||
|
<book>
|
||||||
|
<info>
|
||||||
|
<revhistory>
|
||||||
|
<revision>
|
||||||
|
<revnumber>v1</revnumber>
|
||||||
|
<date>12th December 2017</date>
|
||||||
|
<authorinitials>pm</authorinitials>
|
||||||
|
<revremark>Initial</revremark>
|
||||||
|
</revision>
|
||||||
|
</revhistory>
|
||||||
|
|
||||||
|
<title>OsmoMGW VTY Reference</title>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
<year>2017</year>
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<legalnotice>
|
||||||
|
<para>This work is copyright by <orgname>sysmocom - s.f.m.c. GmbH</orgname>. All rights reserved.
|
||||||
|
</para>
|
||||||
|
</legalnotice>
|
||||||
|
</info>
|
||||||
|
|
||||||
|
<!-- Main chapters-->
|
||||||
|
&chapter-vty;
|
||||||
|
</book>
|
||||||
|
|
17
doc/manuals/regen_doc.sh
Executable file
17
doc/manuals/regen_doc.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh -x
|
||||||
|
|
||||||
|
if [ -z "$DOCKER_PLAYGROUND" ]; then
|
||||||
|
echo "You need to set DOCKER_PLAYGROUND"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
SCRIPT=$(realpath "$0")
|
||||||
|
MANUAL_DIR=$(dirname "$SCRIPT")
|
||||||
|
|
||||||
|
COMMIT=${COMMIT:-$(git log -1 --format=format:%H)}
|
||||||
|
|
||||||
|
cd "$DOCKER_PLAYGROUND/scripts" || exit 1
|
||||||
|
|
||||||
|
OSMO_MGW_BRANCH=$COMMIT ./regen_doc.sh osmo-mgw 4243 \
|
||||||
|
"$MANUAL_DIR/chapters/counters_generated.adoc" \
|
||||||
|
"$MANUAL_DIR/vty/mgw_vty_reference.xml"
|
2
doc/manuals/vty/mgw_vty_additions.xml
Normal file
2
doc/manuals/vty/mgw_vty_additions.xml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<vtydoc xmlns='urn:osmocom:xml:libosmocore:vty:doc:1.0'>
|
||||||
|
</vtydoc>
|
@@ -92,8 +92,8 @@ fi
|
|||||||
if test -n "$v"
|
if test -n "$v"
|
||||||
then
|
then
|
||||||
: # use $v
|
: # use $v
|
||||||
elif test -d ./../.git \
|
elif
|
||||||
&& v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
|
v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
|
||||||
|| git describe --abbrev=4 HEAD 2>/dev/null` \
|
|| git describe --abbrev=4 HEAD 2>/dev/null` \
|
||||||
&& case $v in
|
&& case $v in
|
||||||
[0-9]*) ;;
|
[0-9]*) ;;
|
@@ -1,125 +0,0 @@
|
|||||||
#!/usr/bin/python2.5
|
|
||||||
|
|
||||||
from __future__ import with_statement
|
|
||||||
|
|
||||||
from pysqlite2 import dbapi2 as sqlite3
|
|
||||||
import sys
|
|
||||||
|
|
||||||
hlr = sqlite3.connect(sys.argv[1])
|
|
||||||
web = sqlite3.connect(sys.argv[2])
|
|
||||||
|
|
||||||
# switch to autocommit
|
|
||||||
hlr.isolation_level = None
|
|
||||||
web.isolation_level = None
|
|
||||||
|
|
||||||
hlr.row_factory = sqlite3.Row
|
|
||||||
web.row_factory = sqlite3.Row
|
|
||||||
|
|
||||||
with hlr:
|
|
||||||
hlr_subscrs = hlr.execute("""
|
|
||||||
SELECT * FROM Subscriber
|
|
||||||
""").fetchall()
|
|
||||||
hlr_tokens = hlr.execute("""
|
|
||||||
SELECT * FROM AuthToken
|
|
||||||
""").fetchall()
|
|
||||||
|
|
||||||
with web:
|
|
||||||
web_tokens = web.execute("""
|
|
||||||
SELECT * FROM reg_tokens
|
|
||||||
""").fetchall()
|
|
||||||
web_sms = web.execute("""
|
|
||||||
SELECT * FROM sms_queue
|
|
||||||
""").fetchall()
|
|
||||||
|
|
||||||
# index by subscr id
|
|
||||||
hlr_subscrs_by_id = {}
|
|
||||||
hlr_subscrs_by_ext = {}
|
|
||||||
hlr_tokens_by_subscr_id = {}
|
|
||||||
for x in hlr_subscrs:
|
|
||||||
hlr_subscrs_by_id[x['id']] = x
|
|
||||||
hlr_subscrs_by_ext[x['extension']] = x
|
|
||||||
del hlr_subscrs
|
|
||||||
for x in hlr_tokens:
|
|
||||||
hlr_tokens_by_subscr_id[x['subscriber_id']] = x
|
|
||||||
del hlr_tokens
|
|
||||||
|
|
||||||
web_tokens_by_subscr_id = {}
|
|
||||||
for x in web_tokens:
|
|
||||||
web_tokens_by_subscr_id[x['subscriber_id']] = x
|
|
||||||
del web_tokens
|
|
||||||
|
|
||||||
# remove leftover web_tokens and correct inconsistent fields
|
|
||||||
with web:
|
|
||||||
for x in web_tokens_by_subscr_id.values():
|
|
||||||
subscr = hlr_subscrs_by_id.get(x['subscriber_id'], None)
|
|
||||||
if subscr is None:
|
|
||||||
web.execute("""
|
|
||||||
DELETE FROM reg_tokens WHERE subscriber_id = ?
|
|
||||||
""", (x['subscriber_id'],))
|
|
||||||
del web_tokens_by_subscr_id[x['subscriber_id']]
|
|
||||||
continue
|
|
||||||
if str(x['imsi']) != str(subscr['imsi']) or \
|
|
||||||
x['extension'] != subscr['extension'] or \
|
|
||||||
x['tmsi'] != subscr['tmsi'] or \
|
|
||||||
x['lac'] != subscr['lac']:
|
|
||||||
web.execute("""
|
|
||||||
UPDATE reg_tokens
|
|
||||||
SET imsi = ?, extension = ?, tmsi = ?, lac = ?
|
|
||||||
WHERE subscriber_id = ?
|
|
||||||
""", (str(subscr['imsi']), subscr['extension'],
|
|
||||||
subscr['tmsi'], subscr['lac'], x['subscriber_id']))
|
|
||||||
|
|
||||||
# add missing web_tokens
|
|
||||||
with web:
|
|
||||||
for x in hlr_tokens_by_subscr_id.values():
|
|
||||||
subscr = hlr_subscrs_by_id.get(x['subscriber_id'], None)
|
|
||||||
if subscr is None:
|
|
||||||
hlr.execute("""
|
|
||||||
DELETE FROM AuthToken WHERE subscriber_id = ?
|
|
||||||
""", (x['subscriber_id'],))
|
|
||||||
del hlr_tokens_by_subscr_id[x['subscriber_id']]
|
|
||||||
continue
|
|
||||||
webtoken = web_tokens_by_subscr_id.get(x['subscriber_id'], None)
|
|
||||||
if webtoken is None:
|
|
||||||
web.execute("""
|
|
||||||
INSERT INTO reg_tokens
|
|
||||||
(subscriber_id, extension, reg_completed, name, email, lac, imsi, token, tmsi)
|
|
||||||
VALUES
|
|
||||||
(?, ?, 0, ?, '', ?, ?, ?, ?)
|
|
||||||
""", (x['subscriber_id'], subscr['extension'], subscr['name'],
|
|
||||||
subscr['lac'], str(subscr['imsi']), x['token'], subscr['tmsi']))
|
|
||||||
|
|
||||||
# authorize subscribers
|
|
||||||
with hlr:
|
|
||||||
for x in web_tokens_by_subscr_id.values():
|
|
||||||
subscr = hlr_subscrs_by_id.get(x['subscriber_id'], None)
|
|
||||||
if x['reg_completed'] and not subscr['authorized']:
|
|
||||||
hlr.execute("""
|
|
||||||
UPDATE Subscriber
|
|
||||||
SET authorized = 1
|
|
||||||
WHERE id = ?
|
|
||||||
""", (x['subscriber_id'],))
|
|
||||||
|
|
||||||
# Sync SMS from web to hlr
|
|
||||||
with hlr:
|
|
||||||
for sms in web_sms:
|
|
||||||
subscr = hlr_subscrs_by_ext.get(sms['receiver_ext'])
|
|
||||||
if subscr is None:
|
|
||||||
print '%s not found' % sms['receiver_ext']
|
|
||||||
continue
|
|
||||||
hlr.execute("""
|
|
||||||
INSERT INTO SMS
|
|
||||||
(created, sender_id, receiver_id, reply_path_req, status_rep_req, protocol_id, data_coding_scheme, ud_hdr_ind, text)
|
|
||||||
VALUES
|
|
||||||
(?, 1, ?, 0, 0, 0, 0, 0, ?)
|
|
||||||
""", (sms['created'], subscr['id'], sms['text']))
|
|
||||||
with web:
|
|
||||||
for sms in web_sms:
|
|
||||||
web.execute("""
|
|
||||||
DELETE FROM sms_queue WHERE id = ?
|
|
||||||
""", (sms['id'],))
|
|
||||||
|
|
||||||
|
|
||||||
hlr.close()
|
|
||||||
web.close()
|
|
||||||
|
|
23
include/Makefile.am
Normal file
23
include/Makefile.am
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
SUBDIRS = \
|
||||||
|
osmocom \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
nobase_include_HEADERS = \
|
||||||
|
osmocom/mgcp_client/defs.h \
|
||||||
|
osmocom/mgcp_client/mgcp_client.h \
|
||||||
|
osmocom/mgcp_client/mgcp_client_endpoint_fsm.h \
|
||||||
|
osmocom/mgcp_client/mgcp_client_fsm.h \
|
||||||
|
osmocom/mgcp_client/mgcp_client_pool.h \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
noinst_HEADERS = \
|
||||||
|
osmocom/mgcp/mgcp.h \
|
||||||
|
osmocom/mgcp/mgcp_common.h \
|
||||||
|
osmocom/mgcp/osmux.h \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
# This gets copied during make from osmocom/mgcp/mgcp_common.h. Therefore it is not included in the source tree and we
|
||||||
|
# don't need to distribute it (OS#4084).
|
||||||
|
nobase_nodist_include_HEADERS = \
|
||||||
|
osmocom/mgcp_client/mgcp_common.h \
|
||||||
|
$(NULL)
|
4
include/osmocom/Makefile.am
Normal file
4
include/osmocom/Makefile.am
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
SUBDIRS = \
|
||||||
|
mgcp_client \
|
||||||
|
mgcp \
|
||||||
|
$(NULL)
|
16
include/osmocom/mgcp/Makefile.am
Normal file
16
include/osmocom/mgcp/Makefile.am
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
noinst_HEADERS = \
|
||||||
|
vty.h \
|
||||||
|
mgcp_msg.h \
|
||||||
|
mgcp_conn.h \
|
||||||
|
mgcp_stat.h \
|
||||||
|
mgcp_endp.h \
|
||||||
|
mgcp_sdp.h \
|
||||||
|
mgcp_codec.h \
|
||||||
|
mgcp_trunk.h \
|
||||||
|
debug.h \
|
||||||
|
mgcp_ratectr.h \
|
||||||
|
mgcp_e1.h \
|
||||||
|
mgcp_network.h \
|
||||||
|
mgcp_protocol.h \
|
||||||
|
mgcp_iuup.h \
|
||||||
|
$(NULL)
|
@@ -1,7 +1,8 @@
|
|||||||
/* (C) 2011 by Harald Welte <laforge@gnumonks.org>
|
/* (C) 2017 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
|
||||||
*
|
|
||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*
|
*
|
||||||
|
* Author: Philipp Maier
|
||||||
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
@@ -16,15 +17,21 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <openbsc/bss.h>
|
|
||||||
|
|
||||||
int bts_init(void)
|
#pragma once
|
||||||
{
|
|
||||||
bts_model_bs11_init();
|
#include <stdio.h>
|
||||||
bts_model_rbs2k_init();
|
#include <osmocom/core/linuxlist.h>
|
||||||
bts_model_nanobts_init();
|
|
||||||
bts_model_nokia_site_init();
|
#define DEBUG
|
||||||
bts_model_sysmobts_init();
|
#include <osmocom/core/logging.h>
|
||||||
/* Your new BTS here. */
|
|
||||||
return 0;
|
/* Debug Areas of the code */
|
||||||
}
|
enum {
|
||||||
|
DRTP,
|
||||||
|
DE1,
|
||||||
|
DOSMUX,
|
||||||
|
Debug_LastEntry,
|
||||||
|
};
|
||||||
|
|
||||||
|
extern const struct log_info log_info;
|
209
include/osmocom/mgcp/mgcp.h
Normal file
209
include/osmocom/mgcp/mgcp.h
Normal file
@@ -0,0 +1,209 @@
|
|||||||
|
/* A Media Gateway Control Protocol Media Gateway: RFC 3435 */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (C) 2009-2012 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||||
|
* (C) 2009-2012 by On-Waves
|
||||||
|
* All Rights Reserved
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <osmocom/core/msgb.h>
|
||||||
|
#include <osmocom/core/socket.h>
|
||||||
|
#include <osmocom/core/osmo_io.h>
|
||||||
|
#include <osmocom/core/write_queue.h>
|
||||||
|
#include <osmocom/core/timer.h>
|
||||||
|
#include <osmocom/core/logging.h>
|
||||||
|
|
||||||
|
#include <osmocom/mgcp/mgcp_common.h>
|
||||||
|
#include <osmocom/mgcp/osmux.h>
|
||||||
|
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#include "mgcp_ratectr.h"
|
||||||
|
|
||||||
|
#define RTP_PORT_DEFAULT_RANGE_START 16002
|
||||||
|
#define RTP_PORT_DEFAULT_RANGE_END RTP_PORT_DEFAULT_RANGE_START + 64
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Handling of MGCP Endpoints and the MGCP Config
|
||||||
|
*/
|
||||||
|
struct mgcp_endpoint;
|
||||||
|
struct mgcp_config;
|
||||||
|
struct mgcp_trunk;
|
||||||
|
struct mgcp_rtp_end;
|
||||||
|
|
||||||
|
#define MGCP_ENDP_CRCX 1
|
||||||
|
#define MGCP_ENDP_DLCX 2
|
||||||
|
#define MGCP_ENDP_MDCX 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* what to do with the msg?
|
||||||
|
* - continue as usual?
|
||||||
|
* - reject and send a failure code?
|
||||||
|
* - defer? do not send anything
|
||||||
|
*/
|
||||||
|
#define MGCP_POLICY_CONT 4
|
||||||
|
#define MGCP_POLICY_REJECT 5
|
||||||
|
#define MGCP_POLICY_DEFER 6
|
||||||
|
|
||||||
|
typedef int (*mgcp_reset)(struct mgcp_trunk *cfg);
|
||||||
|
typedef int (*mgcp_rqnt)(struct mgcp_endpoint *endp, char tone);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return:
|
||||||
|
* < 0 in case no audio was processed
|
||||||
|
* >= 0 in case audio was processed.
|
||||||
|
*/
|
||||||
|
typedef int (*mgcp_processing)(struct mgcp_endpoint *endp,
|
||||||
|
struct mgcp_rtp_end *dst_end, struct msgb *msg);
|
||||||
|
|
||||||
|
struct mgcp_conn_rtp;
|
||||||
|
|
||||||
|
typedef int (*mgcp_processing_setup)(struct mgcp_endpoint *endp,
|
||||||
|
struct mgcp_conn_rtp *conn_dst,
|
||||||
|
struct mgcp_conn_rtp *conn_src);
|
||||||
|
|
||||||
|
struct mgcp_rtp_codec;
|
||||||
|
|
||||||
|
typedef void (*mgcp_get_format)(struct mgcp_endpoint *endp,
|
||||||
|
const struct mgcp_rtp_codec **codec,
|
||||||
|
const char **fmtp_extra,
|
||||||
|
struct mgcp_conn_rtp *conn);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This holds information on how to allocate ports
|
||||||
|
*/
|
||||||
|
struct mgcp_port_range {
|
||||||
|
pthread_mutex_t lock;
|
||||||
|
/* addr or NULL to fall-back to default */
|
||||||
|
char bind_addr_v4[INET6_ADDRSTRLEN];
|
||||||
|
char bind_addr_v6[INET6_ADDRSTRLEN];
|
||||||
|
|
||||||
|
/* dynamically allocated */
|
||||||
|
int range_start;
|
||||||
|
int range_end;
|
||||||
|
int last_port;
|
||||||
|
|
||||||
|
/* set to true to enable automatic probing
|
||||||
|
* of the local bind IP-Address, bind_addr
|
||||||
|
* (or its fall back) is used when automatic
|
||||||
|
* probing fails */
|
||||||
|
bool bind_addr_probe;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* There are up to three modes in which the keep-alive dummy packet can be
|
||||||
|
* sent. The behaviour is controlled via the keepalive_interval member of the
|
||||||
|
* trunk config. If that member is set to 0 (MGCP_KEEPALIVE_NEVER) no dummy-
|
||||||
|
* packet is sent at all and the timer that sends regular dummy packets
|
||||||
|
* is no longer scheduled. If the keepalive_interval is set to -1, only
|
||||||
|
* one dummy packet is sent when an CRCX or an MDCX is performed. No timer
|
||||||
|
* is scheduled. For all vales greater 0, the timer is scheduled and the
|
||||||
|
* value is used as interval. See also mgcp_keepalive_timer_cb(),
|
||||||
|
* handle_modify_con(), and handle_create_con() */
|
||||||
|
#define MGCP_KEEPALIVE_ONCE (-1)
|
||||||
|
#define MGCP_KEEPALIVE_NEVER 0
|
||||||
|
|
||||||
|
enum mgcp_role {
|
||||||
|
MGCP_BSC = 0,
|
||||||
|
MGCP_BSC_NAT,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_config {
|
||||||
|
int source_port;
|
||||||
|
char local_ip[INET6_ADDRSTRLEN];
|
||||||
|
char source_addr[INET6_ADDRSTRLEN];
|
||||||
|
char call_agent_addr[INET6_ADDRSTRLEN];
|
||||||
|
|
||||||
|
/* RTP processing */
|
||||||
|
mgcp_processing rtp_processing_cb;
|
||||||
|
mgcp_processing_setup setup_rtp_processing_cb;
|
||||||
|
|
||||||
|
struct osmo_wqueue gw_fd;
|
||||||
|
|
||||||
|
struct mgcp_port_range net_ports;
|
||||||
|
int endp_dscp;
|
||||||
|
int endp_priority;
|
||||||
|
|
||||||
|
int force_ptime;
|
||||||
|
|
||||||
|
mgcp_reset reset_cb;
|
||||||
|
mgcp_rqnt rqnt_cb;
|
||||||
|
void *data;
|
||||||
|
|
||||||
|
/* list holding the trunks */
|
||||||
|
struct llist_head trunks;
|
||||||
|
|
||||||
|
enum mgcp_role role;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
/* Osmux usage policy: */
|
||||||
|
enum osmux_usage usage;
|
||||||
|
/* addr to bind the server to */
|
||||||
|
char *local_addr_v4;
|
||||||
|
char *local_addr_v6;
|
||||||
|
/* osmux port */
|
||||||
|
uint16_t local_port;
|
||||||
|
/* The osmux socket is allocated on demand (1st time used).
|
||||||
|
* This tells us if the osmux socket is already initialized. */
|
||||||
|
bool initialized;
|
||||||
|
/* osmux batch factor: from 1 to 4 maximum */
|
||||||
|
int batch_factor;
|
||||||
|
/* osmux batch size (in bytes) */
|
||||||
|
int batch_size;
|
||||||
|
/* Pad circuit with dummy AMR frames if no payload to transmit is available */
|
||||||
|
bool dummy_padding;
|
||||||
|
/* Whether peer is behind NAT (Retrieve remote addr from 1st received Osmux packet) */
|
||||||
|
bool peer_behind_nat;
|
||||||
|
} osmux;
|
||||||
|
/* domain name of the media gateway */
|
||||||
|
char domain[255+1];
|
||||||
|
|
||||||
|
/* time after which inactive connections (CIs) get closed */
|
||||||
|
int conn_timeout;
|
||||||
|
|
||||||
|
/* osmocom CTRL interface */
|
||||||
|
struct ctrl_handle *ctrl;
|
||||||
|
|
||||||
|
/* global rate counters to measure the MGWs overall performance and
|
||||||
|
* health */
|
||||||
|
struct mgcp_ratectr_global ratectr;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* config management */
|
||||||
|
struct mgcp_config *mgcp_config_alloc(void);
|
||||||
|
int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg,
|
||||||
|
enum mgcp_role role);
|
||||||
|
int mgcp_vty_init(void);
|
||||||
|
void mgcp_trunk_set_keepalive(struct mgcp_trunk *trunk, int interval);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* format helper functions
|
||||||
|
*/
|
||||||
|
struct msgb *mgcp_handle_message(struct mgcp_config *cfg, struct msgb *msg);
|
||||||
|
|
||||||
|
|
||||||
|
int mgcp_send_reset_ep(struct mgcp_endpoint *endp);
|
||||||
|
int mgcp_send_reset_all(struct mgcp_config *cfg);
|
||||||
|
|
||||||
|
|
||||||
|
int mgcp_create_bind(const char *source_addr, int port, uint8_t dscp, uint8_t prio);
|
||||||
|
int mgcp_udp_send(struct osmo_io_fd *iofd, const struct osmo_sockaddr *addr, const char *buf, int len);
|
21
include/osmocom/mgcp/mgcp_codec.h
Normal file
21
include/osmocom/mgcp/mgcp_codec.h
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define DEFAULT_RTP_AUDIO_FRAME_DUR_NUM 20
|
||||||
|
#define DEFAULT_RTP_AUDIO_FRAME_DUR_DEN 1000
|
||||||
|
#define DEFAULT_RTP_AUDIO_PACKET_DURATION_MS 20
|
||||||
|
#define DEFAULT_RTP_AUDIO_DEFAULT_RATE 8000
|
||||||
|
#define DEFAULT_RTP_AUDIO_DEFAULT_CHANNELS 1
|
||||||
|
|
||||||
|
#define PTYPE_UNDEFINED (-1)
|
||||||
|
|
||||||
|
struct mgcp_conn_rtp;
|
||||||
|
|
||||||
|
void mgcp_codec_summary(struct mgcp_conn_rtp *conn);
|
||||||
|
void mgcp_codec_reset_all(struct mgcp_conn_rtp *conn);
|
||||||
|
int mgcp_codec_add(struct mgcp_conn_rtp *conn, int payload_type, const char *audio_name, const struct mgcp_codec_param *param);
|
||||||
|
int mgcp_codec_decide(struct mgcp_conn_rtp *conn_src, struct mgcp_conn_rtp *conn_dst);
|
||||||
|
const struct mgcp_rtp_codec *mgcp_codec_pt_find_by_subtype_name(struct mgcp_conn_rtp *conn,
|
||||||
|
const char *subtype_name, unsigned int match_nr);
|
||||||
|
bool mgcp_codec_amr_align_mode_is_indicated(const struct mgcp_rtp_codec *codec);
|
||||||
|
bool mgcp_codec_amr_is_octet_aligned(const struct mgcp_rtp_codec *codec);
|
||||||
|
struct mgcp_rtp_codec *mgcp_codec_from_pt(struct mgcp_conn_rtp *conn, int payload_type);
|
112
include/osmocom/mgcp/mgcp_common.h
Normal file
112
include/osmocom/mgcp/mgcp_common.h
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
/* MGCP common implementations.
|
||||||
|
* These are used in libosmo-mgcp as well as libosmo-mgcp-client.
|
||||||
|
* To avoid interdependency, these are implemented in .h file only. */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (C) 2017 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
|
||||||
|
* (C) 2009-2012 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||||
|
* (C) 2009-2012 by On-Waves
|
||||||
|
* All Rights Reserved
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Two copies of this file are kept in osmocom/mgcp/ and osmocom/mgcp_client/.
|
||||||
|
* Since both are by definition identical, use the old header exclusion ifdefs
|
||||||
|
* instead of '#pragma once' to avoid including both of these files.
|
||||||
|
* Though at the time of writing there are no such users, this allows including
|
||||||
|
* both libosmo-mgcp and libosmo-mgcp-client headers in the same file. */
|
||||||
|
#ifndef OSMO_MGCP_COMMON_H
|
||||||
|
#define OSMO_MGCP_COMMON_H
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include <osmocom/core/msgb.h>
|
||||||
|
#include <osmocom/core/logging.h>
|
||||||
|
|
||||||
|
#define for_each_non_empty_line(line, save) \
|
||||||
|
for (line = strtok_r(NULL, "\r\n", &save); line; \
|
||||||
|
line = strtok_r(NULL, "\r\n", &save))
|
||||||
|
|
||||||
|
enum mgcp_connection_mode {
|
||||||
|
MGCP_CONN_NONE = 0,
|
||||||
|
MGCP_CONN_RECV_ONLY = 1,
|
||||||
|
MGCP_CONN_SEND_ONLY = 2,
|
||||||
|
MGCP_CONN_RECV_SEND = MGCP_CONN_RECV_ONLY | MGCP_CONN_SEND_ONLY,
|
||||||
|
MGCP_CONN_LOOPBACK = 4 | MGCP_CONN_RECV_SEND,
|
||||||
|
MGCP_CONN_CONFECHO = 8 | MGCP_CONN_RECV_SEND,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MGCP_X_OSMO_IGN_HEADER "X-Osmo-IGN:"
|
||||||
|
#define MGCP_X_OSMO_OSMUX_HEADER "X-Osmux:"
|
||||||
|
|
||||||
|
/* Values should be bitwise-OR-able */
|
||||||
|
enum mgcp_x_osmo_ign {
|
||||||
|
MGCP_X_OSMO_IGN_NONE = 0,
|
||||||
|
MGCP_X_OSMO_IGN_CALLID = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Codec parameters (communicated via SDP/fmtp) */
|
||||||
|
struct mgcp_codec_param {
|
||||||
|
bool amr_octet_aligned_present;
|
||||||
|
bool amr_octet_aligned;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Ensure that the msg->l2h is NUL terminated. */
|
||||||
|
static inline int mgcp_msg_terminate_nul(struct msgb *msg)
|
||||||
|
{
|
||||||
|
unsigned char *tail = msg->tail; /* char after l2 data */
|
||||||
|
if (tail[-1] == '\0')
|
||||||
|
/* nothing to do */;
|
||||||
|
else if (msgb_tailroom(msg) > 0)
|
||||||
|
msgb_put_u8(msg, (uint8_t)'\0');
|
||||||
|
else if (tail[-1] == '\r' || tail[-1] == '\n')
|
||||||
|
tail[-1] = '\0';
|
||||||
|
else {
|
||||||
|
LOGP(DLMGCP, LOGL_ERROR, "Cannot NUL terminate MGCP message: "
|
||||||
|
"Length: %d, Buffer size: %d\n",
|
||||||
|
msgb_l2len(msg), msg->data_len);
|
||||||
|
return -ENOTSUP;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Maximum length of the comment field */
|
||||||
|
#define MGCP_COMMENT_MAXLEN 256
|
||||||
|
|
||||||
|
/* Maximum allowed String length of Connection Identifiers as per spec
|
||||||
|
* (see also RFC3435 2.1.3.2 Names of Connections), plus one for '\0'. */
|
||||||
|
#define MGCP_CONN_ID_MAXLEN 32+1
|
||||||
|
|
||||||
|
/* Deprecated: old name of MGCP_CONN_ID_MAXLEN. */
|
||||||
|
#define MGCP_CONN_ID_LENGTH MGCP_CONN_ID_MAXLEN
|
||||||
|
|
||||||
|
/* String length of Endpoint Identifiers.
|
||||||
|
/ (see also RFC3435 section 3.2.1.3) */
|
||||||
|
#define MGCP_ENDPOINT_MAXLEN (255*2+1+1)
|
||||||
|
|
||||||
|
/* A prefix to denote the virtual trunk (RTP on both ends) */
|
||||||
|
#define MGCP_ENDPOINT_PREFIX_VIRTUAL_TRUNK "rtpbridge/"
|
||||||
|
|
||||||
|
/* A prefix to denote the e1 trunk
|
||||||
|
* (see also RFC3435 section E.2) */
|
||||||
|
#define MGCP_ENDPOINT_PREFIX_E1_TRUNK "ds/e1-"
|
||||||
|
|
||||||
|
/* Maximal number of payload types / codecs that can be negotiated via SDP at
|
||||||
|
* at once. */
|
||||||
|
#define MGCP_MAX_CODECS 10
|
||||||
|
|
||||||
|
#endif
|
251
include/osmocom/mgcp/mgcp_conn.h
Normal file
251
include/osmocom/mgcp/mgcp_conn.h
Normal file
@@ -0,0 +1,251 @@
|
|||||||
|
/* Message connection list handling */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (C) 2017 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
|
||||||
|
* All Rights Reserved
|
||||||
|
*
|
||||||
|
* Author: Philipp Maier
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <osmocom/mgcp/mgcp.h>
|
||||||
|
#include <osmocom/mgcp/mgcp_network.h>
|
||||||
|
#include <osmocom/mgcp/osmux.h>
|
||||||
|
#include <osmocom/core/linuxlist.h>
|
||||||
|
#include <osmocom/core/rate_ctr.h>
|
||||||
|
#include <osmocom/gsm/iuup.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
#define LOGPCONN(conn, cat, level, fmt, args...) \
|
||||||
|
LOGPENDP((conn)->endp, cat, level, "CI:%s " fmt, \
|
||||||
|
(conn)->id, \
|
||||||
|
## args)
|
||||||
|
|
||||||
|
#define LOG_CONN(conn, level, fmt, args...) \
|
||||||
|
LOGP(DRTP, level, "(%s I:%s) " fmt, \
|
||||||
|
(conn)->endp ? (conn)->endp->name : "none", (conn)->id, ## args)
|
||||||
|
|
||||||
|
#define LOG_CONN_RTP(conn_rtp, level, fmt, args...) \
|
||||||
|
LOG_CONN((conn_rtp)->conn, level, fmt, ## args)
|
||||||
|
|
||||||
|
/* Specific rtp connection type (see struct mgcp_conn_rtp) */
|
||||||
|
enum mgcp_conn_rtp_type {
|
||||||
|
MGCP_RTP_DEFAULT = 0,
|
||||||
|
MGCP_RTP_OSMUX,
|
||||||
|
MGCP_RTP_IUUP,
|
||||||
|
};
|
||||||
|
extern const struct value_string mgcp_conn_rtp_type_names[];
|
||||||
|
static inline const char *mgcp_conn_rtp_type_name(enum mgcp_conn_rtp_type val)
|
||||||
|
{
|
||||||
|
return get_value_string(mgcp_conn_rtp_type_names, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*! Connection type, specifies which member of the union "u" in mgcp_conn
|
||||||
|
* contains a useful connection description (currently only RTP) */
|
||||||
|
enum mgcp_conn_type {
|
||||||
|
MGCP_CONN_TYPE_RTP,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* MGCP connection (RTP) */
|
||||||
|
struct mgcp_conn_rtp {
|
||||||
|
|
||||||
|
/* Backpointer to conn struct */
|
||||||
|
struct mgcp_conn *conn;
|
||||||
|
|
||||||
|
/* Specific connection type */
|
||||||
|
enum mgcp_conn_rtp_type type;
|
||||||
|
|
||||||
|
/* Port status */
|
||||||
|
struct mgcp_rtp_end end;
|
||||||
|
|
||||||
|
/* Sequence bits */
|
||||||
|
struct mgcp_rtp_state state;
|
||||||
|
|
||||||
|
/* taps for the rtp connection; one per direction */
|
||||||
|
struct mgcp_rtp_tap tap_in;
|
||||||
|
struct mgcp_rtp_tap tap_out;
|
||||||
|
|
||||||
|
/* Osmux states (optional) */
|
||||||
|
struct {
|
||||||
|
/* Osmux state: disabled, activating, active */
|
||||||
|
enum osmux_state state;
|
||||||
|
/* Is local_cid holding valid data? is it allocated from pool? */
|
||||||
|
bool local_cid_allocated;
|
||||||
|
/* Allocated local Osmux circuit ID for this conn */
|
||||||
|
uint8_t local_cid;
|
||||||
|
/* Is remote_cid holding valid data? was it already received from client? */
|
||||||
|
bool remote_cid_present;
|
||||||
|
/* Received remote Osmux circuit ID for this conn */
|
||||||
|
uint8_t remote_cid;
|
||||||
|
/* handle to batch messages, shared (refcounted) among several conns */
|
||||||
|
struct osmux_in_handle *in;
|
||||||
|
/* handle to unbatch messages, one allocated and owned per conn */
|
||||||
|
struct osmux_out_handle *out;
|
||||||
|
/* statistics: */
|
||||||
|
struct rate_ctr_group *ctrg;
|
||||||
|
} osmux;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
struct osmo_iuup_instance *iui;
|
||||||
|
bool active_init; /* true: Send IuUP Init */
|
||||||
|
int rfci_id_no_data; /* RFCI Id for RFCI NO_DATA (-1 if not available) */
|
||||||
|
bool configured;
|
||||||
|
struct osmo_iuup_rnl_prim *init_ind;
|
||||||
|
} iuup;
|
||||||
|
|
||||||
|
struct rate_ctr_group *ctrg;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*! MGCP connection (untyped) */
|
||||||
|
struct mgcp_conn {
|
||||||
|
/*! list head */
|
||||||
|
struct llist_head entry;
|
||||||
|
|
||||||
|
/*! Backpointer to the endpoint where the conn belongs to */
|
||||||
|
struct mgcp_endpoint *endp;
|
||||||
|
|
||||||
|
/*! type of the connection (union) */
|
||||||
|
enum mgcp_conn_type type;
|
||||||
|
|
||||||
|
/*! mode of the connection */
|
||||||
|
enum mgcp_connection_mode mode;
|
||||||
|
|
||||||
|
/*! copy of the mode to restore the original setting (VTY) */
|
||||||
|
enum mgcp_connection_mode mode_orig;
|
||||||
|
|
||||||
|
/*! connection id to identify the connection */
|
||||||
|
char id[MGCP_CONN_ID_MAXLEN];
|
||||||
|
|
||||||
|
/*! human readable name (vty, logging) */
|
||||||
|
char name[256];
|
||||||
|
|
||||||
|
/*! activity tracker (for cleaning up inactive connections) */
|
||||||
|
struct osmo_timer_list watchdog;
|
||||||
|
|
||||||
|
/*! union with connection description */
|
||||||
|
union {
|
||||||
|
struct mgcp_conn_rtp rtp;
|
||||||
|
} u;
|
||||||
|
|
||||||
|
/*! pointer to optional private data */
|
||||||
|
void *priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* RTP connection related counters */
|
||||||
|
enum {
|
||||||
|
IN_STREAM_ERR_TSTMP_CTR,
|
||||||
|
OUT_STREAM_ERR_TSTMP_CTR,
|
||||||
|
RTP_PACKETS_RX_CTR,
|
||||||
|
RTP_OCTETS_RX_CTR,
|
||||||
|
RTP_PACKETS_TX_CTR,
|
||||||
|
RTP_OCTETS_TX_CTR,
|
||||||
|
RTP_DROPPED_PACKETS_CTR,
|
||||||
|
RTP_NUM_CONNECTIONS,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* RTP per-connection statistics. Instances of the corresponding rate counter group
|
||||||
|
* exist for the lifetime of an RTP connection.
|
||||||
|
* Must be kept in sync with all_rtp_conn_rate_ctr_desc below */
|
||||||
|
static const struct rate_ctr_desc mgcp_conn_rate_ctr_desc[] = {
|
||||||
|
[IN_STREAM_ERR_TSTMP_CTR] = {"stream_err_tstmp:in", "Inbound rtp-stream timestamp errors."},
|
||||||
|
[OUT_STREAM_ERR_TSTMP_CTR] = {"stream_err_tstmp:out", "Outbound rtp-stream timestamp errors."},
|
||||||
|
[RTP_PACKETS_RX_CTR] = {"rtp:packets_rx", "Inbound rtp packets."},
|
||||||
|
[RTP_OCTETS_RX_CTR] = {"rtp:octets_rx", "Inbound rtp octets."},
|
||||||
|
[RTP_PACKETS_TX_CTR] = {"rtp:packets_tx", "Outbound rtp packets."},
|
||||||
|
[RTP_OCTETS_TX_CTR] = {"rtp:octets_tx", "Outbound rtp octets."},
|
||||||
|
[RTP_DROPPED_PACKETS_CTR] = {"rtp:dropped", "Dropped rtp packets."}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Aggregated RTP connection stats. These are updated when an RTP connection is freed.
|
||||||
|
* Must be kept in sync with mgcp_conn_rate_ctr_desc above */
|
||||||
|
static const struct rate_ctr_desc all_rtp_conn_rate_ctr_desc[] = {
|
||||||
|
[IN_STREAM_ERR_TSTMP_CTR] = {"all_rtp:err_tstmp_in", "Total inbound rtp-stream timestamp errors."},
|
||||||
|
[OUT_STREAM_ERR_TSTMP_CTR] = {"all_rtp:err_tstmp_out", "Total outbound rtp-stream timestamp errors."},
|
||||||
|
[RTP_PACKETS_RX_CTR] = {"all_rtp:packets_rx", "Total inbound rtp packets."},
|
||||||
|
[RTP_OCTETS_RX_CTR] = {"all_rtp:octets_rx", "Total inbound rtp octets."},
|
||||||
|
[RTP_PACKETS_TX_CTR] = {"all_rtp:packets_tx", "Total outbound rtp packets."},
|
||||||
|
[RTP_OCTETS_TX_CTR] = {"all_rtp:octets_tx", "Total outbound rtp octets."},
|
||||||
|
[RTP_DROPPED_PACKETS_CTR] = {"all_rtp:dropped", "Total dropped rtp packets."},
|
||||||
|
|
||||||
|
/* This last counter does not exist in per-connection stats, only here. */
|
||||||
|
[RTP_NUM_CONNECTIONS] = {"all_rtp:num_closed_conns", "Total number of rtp connections closed."}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Osmux connection related counters */
|
||||||
|
enum {
|
||||||
|
OSMUX_CHUNKS_RX_CTR,
|
||||||
|
OSMUX_OCTETS_RX_CTR,
|
||||||
|
OSMUX_RTP_PACKETS_TX_CTR,
|
||||||
|
OSMUX_RTP_PACKETS_TX_DROPPED_CTR,
|
||||||
|
OSMUX_AMR_OCTETS_TX_CTR,
|
||||||
|
/* Only available in global stats: */
|
||||||
|
OSMUX_NUM_CONNECTIONS,
|
||||||
|
OSMUX_PACKETS_RX_CTR,
|
||||||
|
OSMUX_PACKETS_TX_CTR,
|
||||||
|
OSMUX_DROPPED_PACKETS_CTR,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* RTP per-connection statistics. Instances of the corresponding rate counter group
|
||||||
|
* exist for the lifetime of an RTP connection.
|
||||||
|
* Must be kept in sync with all_rtp_conn_rate_ctr_desc below */
|
||||||
|
static const struct rate_ctr_desc mgcp_conn_osmux_rate_ctr_desc[] = {
|
||||||
|
[OSMUX_CHUNKS_RX_CTR] = {"osmux:chunks_rx", "Inbound Osmux chunks."},
|
||||||
|
[OSMUX_OCTETS_RX_CTR] = {"osmux:octets_rx", "Inbound Osmux octets."},
|
||||||
|
[OSMUX_RTP_PACKETS_TX_CTR] = {"osmux:rtp_packets_tx", "Tx outbound RTP packets to encode as Osmux."},
|
||||||
|
[OSMUX_RTP_PACKETS_TX_DROPPED_CTR] = {"osmux:rtp_packets_tx_dropped", "Dropped Tx outbound RTP packets to encode as Osmux."},
|
||||||
|
[OSMUX_AMR_OCTETS_TX_CTR] = {"osmux:amr_octets_tx", "Tx outbound AMD payload octets."},
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Aggregated Osmux connection stats. These are updated when an Osmux connection is freed.
|
||||||
|
* Must be kept in sync with mgcp_conn_osmux_rate_ctr_desc above */
|
||||||
|
static const struct rate_ctr_desc all_osmux_conn_rate_ctr_desc[] = {
|
||||||
|
[OSMUX_CHUNKS_RX_CTR] = {"all_osmux:chunks_rx", "Inbound Osmux chunks."},
|
||||||
|
[OSMUX_OCTETS_RX_CTR] = {"all_osmux:octets_rx", "Inbound Osmux octets."},
|
||||||
|
[OSMUX_RTP_PACKETS_TX_CTR] = {"all_osmux:rtp_packets_tx", "Tx outbound RTP packets to encode as Osmux."},
|
||||||
|
[OSMUX_RTP_PACKETS_TX_DROPPED_CTR] = {"all_osmux:rtp_packets_tx_dropped", "Dropped Tx outbound RTP packets to encode as Osmux."},
|
||||||
|
[OSMUX_AMR_OCTETS_TX_CTR] = {"all_osmux:amr_octets_tx", "Tx outbound AMD payload octets."},
|
||||||
|
/* These last counters below do not exist in per-connection stats, only here: */
|
||||||
|
[OSMUX_NUM_CONNECTIONS] = {"all_osmux:num_closed_conns", "Total number of osmux connections closed."},
|
||||||
|
[OSMUX_PACKETS_RX_CTR] = {"all_osmux:packets_rx", "Total inbound UDP/Osmux packets."},
|
||||||
|
[OSMUX_PACKETS_TX_CTR] = {"all_osmux:packets_tx", "Total outbound UDP/Osmux packets."},
|
||||||
|
[OSMUX_DROPPED_PACKETS_CTR] = {"all_osmux:dropped_packets", "Dropped outbound UDP/Osmux packets."}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Was conn configured to handle Osmux? */
|
||||||
|
static inline bool mgcp_conn_rtp_is_osmux(const struct mgcp_conn_rtp *conn) {
|
||||||
|
return conn->type == MGCP_RTP_OSMUX;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Was conn configured to handle Osmux? */
|
||||||
|
static inline bool mgcp_conn_rtp_is_iuup(const struct mgcp_conn_rtp *conn)
|
||||||
|
{
|
||||||
|
return conn->type == MGCP_RTP_IUUP;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct mgcp_conn *mgcp_conn_alloc(void *ctx, struct mgcp_endpoint *endp,
|
||||||
|
enum mgcp_conn_type type, char *name);
|
||||||
|
struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id);
|
||||||
|
struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp,
|
||||||
|
const char *id);
|
||||||
|
void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id);
|
||||||
|
void mgcp_conn_free_oldest(struct mgcp_endpoint *endp);
|
||||||
|
void mgcp_conn_free_all(struct mgcp_endpoint *endp);
|
||||||
|
char *mgcp_conn_dump(struct mgcp_conn *conn);
|
||||||
|
struct mgcp_conn *mgcp_find_dst_conn(struct mgcp_conn *conn);
|
||||||
|
struct mgcp_conn *mgcp_conn_get_oldest(struct mgcp_endpoint *endp);
|
||||||
|
void mgcp_conn_watchdog_kick(struct mgcp_conn *conn);
|
27
include/osmocom/mgcp/mgcp_e1.h
Normal file
27
include/osmocom/mgcp/mgcp_e1.h
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* A 64k timeslot on an E1 line can be subdevied into the following
|
||||||
|
* subslot combinations:
|
||||||
|
*
|
||||||
|
* subslot: offset:
|
||||||
|
* [ ][ ][ 16k ][8k_subslot] 0
|
||||||
|
* [ ][ 32k ][_subslot__][8k_subslot] 1
|
||||||
|
* [ ][ subslot ][ 16k ][8k_subslot] 2
|
||||||
|
* [ 64k ][__________][_subslot__][8k_subslot] 3
|
||||||
|
* [ timeslot ][ ][ 16k ][8k_subslot] 4
|
||||||
|
* [ ][ 32K ][_subslot__][8k_subslot] 5
|
||||||
|
* [ ][ subslot ][ 16k ][8k_subslot] 6
|
||||||
|
* [ ][ ][ subslot ][8k_subslot] 7
|
||||||
|
*
|
||||||
|
* Since overlapping assignment of subslots is not possible there is a limited
|
||||||
|
* set of subslot assignments possible. The e1_rates array lists the possible
|
||||||
|
* assignments as depicted above. Also each subslot assignment comes along with
|
||||||
|
* a bit offset in the E1 bitstream. The e1_offsets arrays lists the bit
|
||||||
|
* offsets. */
|
||||||
|
static const uint8_t e1_rates[] = { 64, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8, 8, 8, 8 };
|
||||||
|
static const uint8_t e1_offsets[] = { 0, 0, 4, 0, 2, 4, 6, 0, 1, 2, 3, 4, 5, 6, 7 };
|
||||||
|
|
||||||
|
int mgcp_e1_endp_equip(struct mgcp_endpoint *endp, uint8_t ts, uint8_t ss, uint8_t offs);
|
||||||
|
void mgcp_e1_endp_update(struct mgcp_endpoint *endp);
|
||||||
|
void mgcp_e1_endp_release(struct mgcp_endpoint *endp, uint8_t ts);
|
||||||
|
int mgcp_e1_send_rtp(struct mgcp_endpoint *endp, struct mgcp_rtp_codec *codec, struct msgb *msg);
|
148
include/osmocom/mgcp/mgcp_endp.h
Normal file
148
include/osmocom/mgcp/mgcp_endp.h
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
/* Endpoint types */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (C) 2017 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
|
||||||
|
* All Rights Reserved
|
||||||
|
*
|
||||||
|
* Author: Philipp Maier
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <osmocom/core/msgb.h>
|
||||||
|
#include <osmocom/gsm/i460_mux.h>
|
||||||
|
#include <osmocom/mgcp/mgcp_protocol.h>
|
||||||
|
|
||||||
|
struct sockaddr;
|
||||||
|
struct mgcp_conn;
|
||||||
|
struct mgcp_conn_rtp;
|
||||||
|
struct mgcp_endpoint;
|
||||||
|
|
||||||
|
/* Number of E1 subslots (different variants, not all useable at the same time) */
|
||||||
|
#define MGCP_ENDP_E1_SUBSLOTS 15
|
||||||
|
|
||||||
|
#define LOGPENDP(endp, cat, level, fmt, args...) \
|
||||||
|
LOGP(cat, level, "endpoint:%s " fmt, \
|
||||||
|
endp ? endp->name : "none", \
|
||||||
|
## args)
|
||||||
|
|
||||||
|
enum rtp_proto {
|
||||||
|
MGCP_PROTO_RTP,
|
||||||
|
MGCP_PROTO_RTCP,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct osmo_rtp_msg_ctx {
|
||||||
|
enum rtp_proto proto;
|
||||||
|
struct mgcp_conn_rtp *conn_src;
|
||||||
|
struct osmo_sockaddr *from_addr;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define OSMO_RTP_MSG_CTX(MSGB) ((struct osmo_rtp_msg_ctx*)(MSGB)->cb)
|
||||||
|
|
||||||
|
osmo_static_assert(sizeof(((struct msgb*)0)->cb) >= sizeof(struct osmo_rtp_msg_ctx), osmo_rtp_msg_ctx_fits_in_msgb_cb);
|
||||||
|
|
||||||
|
/* Callback type for RTP dispatcher functions (e.g mgcp_dispatch_rtp_bridge_cb, see below).
|
||||||
|
* The OSMO_RTP_MSG_CTX() should be set appropriately on the msg. */
|
||||||
|
typedef int (*mgcp_dispatch_rtp_cb) (struct msgb *msg);
|
||||||
|
|
||||||
|
/* Callback type for endpoint specific cleanup actions. This function
|
||||||
|
* is automatically executed when a connection is freed (see mgcp_conn_free()
|
||||||
|
* in mgcp_conn.c). Depending on the type of the endpoint there may be endpoint
|
||||||
|
* specific things to take care of once a connection has been removed. */
|
||||||
|
typedef void (*mgcp_cleanup_cp) (struct mgcp_endpoint *endp,
|
||||||
|
struct mgcp_conn *conn);
|
||||||
|
|
||||||
|
/*! MGCP endpoint properties */
|
||||||
|
struct mgcp_endpoint_type {
|
||||||
|
/*! maximum number of connections */
|
||||||
|
int max_conns;
|
||||||
|
|
||||||
|
/*! callback that defines how to dispatch incoming RTP data */
|
||||||
|
mgcp_dispatch_rtp_cb dispatch_rtp_cb;
|
||||||
|
|
||||||
|
/*! callback that implements endpoint specific cleanup actions */
|
||||||
|
mgcp_cleanup_cp cleanup_cb;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*! MGCP endpoint typeset */
|
||||||
|
struct mgcp_endpoint_typeset {
|
||||||
|
struct mgcp_endpoint_type rtp;
|
||||||
|
struct mgcp_endpoint_type e1;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*! static MGCP endpoint typeset (pre-initalized, read-only) */
|
||||||
|
extern const struct mgcp_endpoint_typeset ep_typeset;
|
||||||
|
|
||||||
|
/*! MGCP endpoint model */
|
||||||
|
struct mgcp_endpoint {
|
||||||
|
|
||||||
|
/*! Unique endpoint name, used for addressing via MGCP */
|
||||||
|
char *name;
|
||||||
|
|
||||||
|
/*! Call identifier string (as supplied by the call agant) */
|
||||||
|
char *callid;
|
||||||
|
|
||||||
|
/*! Local connection options (see mgcp_internal.h) */
|
||||||
|
struct mgcp_lco local_options;
|
||||||
|
|
||||||
|
/*! List of struct mgcp_conn, of the connections active on this endpoint */
|
||||||
|
struct llist_head conns;
|
||||||
|
|
||||||
|
/*! Backpointer to the trunk this endpoint belongs to */
|
||||||
|
struct mgcp_trunk *trunk;
|
||||||
|
|
||||||
|
/*! Endpoint properties (see above) */
|
||||||
|
const struct mgcp_endpoint_type *type;
|
||||||
|
|
||||||
|
/*! Last MGCP transmission (in case re-transmission is required) */
|
||||||
|
char *last_trans;
|
||||||
|
|
||||||
|
/*! Last MGCP response (in case re-transmission is required) */
|
||||||
|
char *last_response;
|
||||||
|
|
||||||
|
/*! MGCP_X_OSMO_IGN_* flags from 'X-Osmo-IGN:' header */
|
||||||
|
uint32_t x_osmo_ign;
|
||||||
|
|
||||||
|
/* E1 specific */
|
||||||
|
struct {
|
||||||
|
struct osmo_i460_schan_desc scd;
|
||||||
|
struct osmo_i460_subchan *schan;
|
||||||
|
struct osmo_fsm_inst *trau_sync_fi;
|
||||||
|
struct osmo_trau2rtp_state *trau_rtp_st;
|
||||||
|
uint8_t last_amr_ft;
|
||||||
|
struct mgcp_rtp_codec *last_codec;
|
||||||
|
} e1;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_endpoint *mgcp_endp_alloc(struct mgcp_trunk *trunk, unsigned int index);
|
||||||
|
int mgcp_endp_claim(struct mgcp_endpoint *endp, const char *callid);
|
||||||
|
void mgcp_endp_update(struct mgcp_endpoint *endp);
|
||||||
|
bool mgcp_endp_is_wildcarded(const char *epname);
|
||||||
|
bool mgcp_endp_is_null(const char *epname);
|
||||||
|
struct mgcp_endpoint *mgcp_endp_by_name_trunk(int *cause, const char *epname,
|
||||||
|
const struct mgcp_trunk *trunk);
|
||||||
|
struct mgcp_endpoint *mgcp_endp_by_name(int *cause, const char *epname,
|
||||||
|
struct mgcp_config *cfg);
|
||||||
|
bool mgcp_endp_avail(struct mgcp_endpoint *endp);
|
||||||
|
void mgcp_endp_add_conn(struct mgcp_endpoint *endp, struct mgcp_conn *conn);
|
||||||
|
void mgcp_endp_remove_conn(struct mgcp_endpoint *endp, struct mgcp_conn *conn);
|
||||||
|
void mgcp_endp_strip_name(char *epname_stripped, const char *epname,
|
||||||
|
const struct mgcp_trunk *trunk);
|
||||||
|
struct mgcp_endpoint *mgcp_endp_find_specific(const char *epname,
|
||||||
|
const struct mgcp_trunk *trunk);
|
||||||
|
void mgcp_endp_release(struct mgcp_endpoint *endp);
|
@@ -1,9 +1,11 @@
|
|||||||
/* Helpers for SMS/GSM 04.11 */
|
/* IuUP connection functionalitites */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (C) 2014 by Holger Hans Peter Freyther
|
* (C) 2021 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
|
||||||
*
|
|
||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*
|
*
|
||||||
|
* Author: Pau Espin Pedrol
|
||||||
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
@@ -18,20 +20,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include <openbsc/gsm_data.h>
|
#include <osmocom/core/msgb.h>
|
||||||
#include <openbsc/gsm_04_11.h>
|
|
||||||
|
|
||||||
uint8_t sms_next_rp_msg_ref(struct gsm_subscriber_connection *conn)
|
struct mgcp_conn_rtp;
|
||||||
{
|
|
||||||
const uint8_t rp_msg_ref = conn->next_rp_ref;
|
|
||||||
/*
|
|
||||||
* This should wrap as the valid range is 0 to 255. We only
|
|
||||||
* transfer one SMS at a time so we don't need to check if
|
|
||||||
* the id has been already assigned.
|
|
||||||
*/
|
|
||||||
conn->next_rp_ref += 1;
|
|
||||||
|
|
||||||
return rp_msg_ref;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
int mgcp_conn_iuup_init(struct mgcp_conn_rtp *conn_rtp);
|
||||||
|
void mgcp_conn_iuup_cleanup(struct mgcp_conn_rtp *conn_rtp);
|
||||||
|
int mgcp_conn_iuup_dispatch_rtp(struct msgb *msg);
|
||||||
|
int mgcp_conn_iuup_send_rtp(struct mgcp_conn_rtp *conn_src_rtp, struct mgcp_conn_rtp *conn_dest_rtp, struct msgb *msg);
|
||||||
|
int mgcp_conn_iuup_send_dummy(struct mgcp_conn_rtp *conn_rtp);
|
58
include/osmocom/mgcp/mgcp_msg.h
Normal file
58
include/osmocom/mgcp/mgcp_msg.h
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
/* A Media Gateway Control Protocol Media Gateway: RFC 3435 */
|
||||||
|
/* Message parser/generator utilities */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (C) 2009-2012 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||||
|
* (C) 2009-2012 by On-Waves
|
||||||
|
* (C) 2017 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
|
||||||
|
* All Rights Reserved
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
struct mgcp_conn;
|
||||||
|
struct mgcp_parse_data;
|
||||||
|
struct mgcp_endpoint;
|
||||||
|
struct mgcp_trunk;
|
||||||
|
|
||||||
|
void mgcp_disp_msg(unsigned char *message, unsigned int len, char *preamble);
|
||||||
|
|
||||||
|
int mgcp_parse_conn_mode(const char *msg, struct mgcp_endpoint *endp,
|
||||||
|
struct mgcp_conn *conn);
|
||||||
|
|
||||||
|
int mgcp_parse_header(struct mgcp_parse_data *pdata, char *data);
|
||||||
|
|
||||||
|
int mgcp_parse_osmux_cid(const char *line);
|
||||||
|
|
||||||
|
bool mgcp_check_param(const struct mgcp_endpoint *endp, struct mgcp_trunk *trunk, const char *line);
|
||||||
|
|
||||||
|
int mgcp_verify_call_id(struct mgcp_endpoint *endp, const char *callid);
|
||||||
|
|
||||||
|
int mgcp_verify_ci(struct mgcp_endpoint *endp, const char *conn_id);
|
||||||
|
|
||||||
|
char *mgcp_strline(char *str, char **saveptr);
|
||||||
|
|
||||||
|
#define for_each_line(line, save)\
|
||||||
|
for (line = mgcp_strline(NULL, &save); line;\
|
||||||
|
line = mgcp_strline(NULL, &save))
|
||||||
|
|
||||||
|
#define for_each_non_empty_line(line, save)\
|
||||||
|
for (line = strtok_r(NULL, "\r\n", &save); line;\
|
||||||
|
line = strtok_r(NULL, "\r\n", &save))
|
186
include/osmocom/mgcp/mgcp_network.h
Normal file
186
include/osmocom/mgcp/mgcp_network.h
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include <osmocom/core/socket.h>
|
||||||
|
#include <osmocom/core/osmo_io.h>
|
||||||
|
|
||||||
|
#include <osmocom/mgcp/mgcp.h>
|
||||||
|
|
||||||
|
/* The following constant defines an RTP dummy payload that is used for
|
||||||
|
* "UDP Hole Punching" (NAT) */
|
||||||
|
#define MGCP_DUMMY_LOAD 0x23
|
||||||
|
static const char rtp_dummy_payload[] = { MGCP_DUMMY_LOAD };
|
||||||
|
|
||||||
|
/* Check if the data in a given message buffer matches the rtp dummy payload
|
||||||
|
* defined above */
|
||||||
|
#define mgcp_is_rtp_dummy_payload(msg) \
|
||||||
|
(msgb_length(msg) == sizeof(rtp_dummy_payload) && \
|
||||||
|
memcmp(msgb_data(msg), rtp_dummy_payload, sizeof(rtp_dummy_payload)) == 0)
|
||||||
|
|
||||||
|
#define RTP_BUF_SIZE 4096
|
||||||
|
|
||||||
|
struct mgcp_rtp_stream_state {
|
||||||
|
uint32_t ssrc;
|
||||||
|
uint16_t last_seq;
|
||||||
|
uint32_t last_timestamp;
|
||||||
|
struct rate_ctr *err_ts_ctr;
|
||||||
|
int32_t last_tsdelta;
|
||||||
|
uint32_t last_arrival_time;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_rtp_state {
|
||||||
|
/* has this state structure been initialized? */
|
||||||
|
int initialized;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
/* are we patching the SSRC value? */
|
||||||
|
bool patch_ssrc;
|
||||||
|
/* original SSRC (to which we shall patch any different SSRC) */
|
||||||
|
uint32_t orig_ssrc;
|
||||||
|
/* offset to apply on the sequence number */
|
||||||
|
int seq_offset;
|
||||||
|
/* offset to apply on the timestamp number */
|
||||||
|
int32_t timestamp_offset;
|
||||||
|
} patch;
|
||||||
|
|
||||||
|
/* duration of a packet (FIXME: in which unit?) */
|
||||||
|
uint32_t packet_duration;
|
||||||
|
|
||||||
|
/* Note: These states are not continuously updated, they serve as an
|
||||||
|
* information source to patch certain values in the RTP header. Do
|
||||||
|
* not use this state if constantly updated data about the RTP stream
|
||||||
|
* is needed. (see also mgcp_patch_and_count() */
|
||||||
|
struct mgcp_rtp_stream_state in_stream;
|
||||||
|
struct mgcp_rtp_stream_state out_stream;
|
||||||
|
|
||||||
|
/* jitter and packet loss calculation */
|
||||||
|
struct {
|
||||||
|
int initialized;
|
||||||
|
uint16_t base_seq;
|
||||||
|
uint16_t max_seq;
|
||||||
|
uint32_t ssrc;
|
||||||
|
uint32_t jitter;
|
||||||
|
int32_t transit;
|
||||||
|
int cycles;
|
||||||
|
} stats;
|
||||||
|
|
||||||
|
/* Alternative values for RTP tx, in case no sufficient header
|
||||||
|
* information is available so the header needs to be generated
|
||||||
|
* locally (when just forwarding packets, the header of incoming
|
||||||
|
* data is just re-used) */
|
||||||
|
uint16_t alt_rtp_tx_sequence;
|
||||||
|
uint32_t alt_rtp_tx_ssrc;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_rtp_codec {
|
||||||
|
uint32_t rate;
|
||||||
|
int channels;
|
||||||
|
uint32_t frame_duration_num;
|
||||||
|
uint32_t frame_duration_den;
|
||||||
|
|
||||||
|
int payload_type;
|
||||||
|
char audio_name[64];
|
||||||
|
char subtype_name[64];
|
||||||
|
|
||||||
|
bool param_present;
|
||||||
|
struct mgcp_codec_param param;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 'mgcp_rtp_end': basically a wrapper around the RTP+RTCP ports */
|
||||||
|
struct mgcp_rtp_end {
|
||||||
|
/* remote IP address of the RTP socket */
|
||||||
|
struct osmo_sockaddr addr;
|
||||||
|
|
||||||
|
/* in network byte order */
|
||||||
|
int rtcp_port;
|
||||||
|
|
||||||
|
/* currently selected audio codec */
|
||||||
|
struct mgcp_rtp_codec *codec;
|
||||||
|
|
||||||
|
/* array with assigned audio codecs to choose from (SDP) */
|
||||||
|
struct mgcp_rtp_codec codecs[MGCP_MAX_CODECS];
|
||||||
|
|
||||||
|
/* number of assigned audio codecs (SDP) */
|
||||||
|
unsigned int codecs_assigned;
|
||||||
|
|
||||||
|
/* per endpoint data */
|
||||||
|
int frames_per_packet;
|
||||||
|
uint32_t packet_duration_ms;
|
||||||
|
int maximum_packet_time; /* -1: not set */
|
||||||
|
/* are we transmitting packets (true) or dropping (false) outbound packets */
|
||||||
|
bool output_enabled;
|
||||||
|
/* FIXME: This parameter can be set + printed, but is nowhere used! */
|
||||||
|
int force_output_ptime;
|
||||||
|
|
||||||
|
/* RTP patching */
|
||||||
|
int force_constant_ssrc; /* -1: always, 0: don't, 1: once */
|
||||||
|
/* should we perform align_rtp_timestamp_offset() (1) or not (0) */
|
||||||
|
int force_aligned_timing;
|
||||||
|
bool rfc5993_hr_convert;
|
||||||
|
|
||||||
|
/* Each end has a separate socket for RTP and RTCP */
|
||||||
|
struct osmo_io_fd *rtp;
|
||||||
|
struct osmo_io_fd *rtcp;
|
||||||
|
|
||||||
|
/* local UDP port number of the RTP socket; RTCP is +1 */
|
||||||
|
int local_port;
|
||||||
|
/* where the endpoint RTP connection binds to, set during CRCX and
|
||||||
|
* possibly updated during MDCX */
|
||||||
|
char local_addr[INET6_ADDRSTRLEN];
|
||||||
|
};
|
||||||
|
|
||||||
|
bool mgcp_rtp_end_remote_addr_available(const struct mgcp_rtp_end *rtp_end);
|
||||||
|
|
||||||
|
struct mgcp_rtp_tap {
|
||||||
|
/* is this tap active (1) or not (0) */
|
||||||
|
int enabled;
|
||||||
|
/* IP/port to which we're forwarding the tapped data */
|
||||||
|
struct osmo_sockaddr forward;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_conn;
|
||||||
|
|
||||||
|
int mgcp_send(struct mgcp_endpoint *endp, int is_rtp, struct osmo_sockaddr *addr,
|
||||||
|
struct msgb *msg, struct mgcp_conn_rtp *conn_src,
|
||||||
|
struct mgcp_conn_rtp *conn_dst);
|
||||||
|
int mgcp_send_dummy(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn);
|
||||||
|
int mgcp_dispatch_rtp_bridge_cb(struct msgb *msg);
|
||||||
|
void mgcp_cleanup_rtp_bridge_cb(struct mgcp_endpoint *endp, struct mgcp_conn *conn);
|
||||||
|
int mgcp_dispatch_e1_bridge_cb(struct msgb *msg);
|
||||||
|
void mgcp_cleanup_e1_bridge_cb(struct mgcp_endpoint *endp, struct mgcp_conn *conn);
|
||||||
|
int mgcp_bind_net_rtp_port(struct mgcp_endpoint *endp, int rtp_port,
|
||||||
|
struct mgcp_conn_rtp *conn);
|
||||||
|
void mgcp_free_rtp_port(struct mgcp_rtp_end *end);
|
||||||
|
void mgcp_patch_and_count(const struct mgcp_endpoint *endp,
|
||||||
|
struct mgcp_rtp_state *state,
|
||||||
|
struct mgcp_rtp_end *rtp_end,
|
||||||
|
struct osmo_sockaddr *addr, struct msgb *msg);
|
||||||
|
int mgcp_get_local_addr(char *addr, struct mgcp_conn_rtp *conn);
|
||||||
|
|
||||||
|
/* payload processing default functions */
|
||||||
|
int mgcp_rtp_processing_default(struct mgcp_endpoint *endp, struct mgcp_rtp_end *dst_end, struct msgb *msg);
|
||||||
|
|
||||||
|
int mgcp_setup_rtp_processing_default(struct mgcp_endpoint *endp,
|
||||||
|
struct mgcp_conn_rtp *conn_dst,
|
||||||
|
struct mgcp_conn_rtp *conn_src);
|
||||||
|
|
||||||
|
void mgcp_get_net_downlink_format_default(struct mgcp_endpoint *endp,
|
||||||
|
const struct mgcp_rtp_codec **codec,
|
||||||
|
const char **fmtp_extra,
|
||||||
|
struct mgcp_conn_rtp *conn);
|
||||||
|
|
||||||
|
/* internal RTP Annex A counting */
|
||||||
|
void mgcp_rtp_annex_count(const struct mgcp_endpoint *endp, struct mgcp_rtp_state *state,
|
||||||
|
const uint16_t seq, const int32_t transit,
|
||||||
|
const uint32_t ssrc, const bool marker_bit);
|
||||||
|
|
||||||
|
void rtpconn_rate_ctr_add(struct mgcp_conn_rtp *conn_rtp, struct mgcp_endpoint *endp,
|
||||||
|
int id, int inc);
|
||||||
|
void rtpconn_rate_ctr_inc(struct mgcp_conn_rtp *conn_rtp, struct mgcp_endpoint *endp,
|
||||||
|
int id);
|
||||||
|
void forward_data_tap(struct osmo_io_fd *iofd, struct mgcp_rtp_tap *tap, struct msgb *msg);
|
||||||
|
uint32_t mgcp_get_current_ts(unsigned codec_rate);
|
||||||
|
|
||||||
|
int amr_oa_bwe_convert(struct mgcp_endpoint *endp, struct msgb *msg, bool target_is_oa);
|
30
include/osmocom/mgcp/mgcp_protocol.h
Normal file
30
include/osmocom/mgcp/mgcp_protocol.h
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* Internal structure while parsing a request */
|
||||||
|
struct mgcp_parse_data {
|
||||||
|
struct mgcp_config *cfg;
|
||||||
|
char *epname;
|
||||||
|
char *trans;
|
||||||
|
char *save;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Local connection options */
|
||||||
|
struct mgcp_lco {
|
||||||
|
char *string;
|
||||||
|
char *codec;
|
||||||
|
int pkt_period_min; /* time in ms */
|
||||||
|
int pkt_period_max; /* time in ms */
|
||||||
|
};
|
||||||
|
|
||||||
|
char *mgcp_debug_get_last_endpoint_name(void);
|
||||||
|
|
||||||
|
char *get_lco_identifier(const char *options);
|
||||||
|
int check_local_cx_options(void *ctx, const char *options);
|
||||||
|
|
||||||
|
struct mgcp_rtp_end;
|
||||||
|
struct mgcp_endpoint;
|
||||||
|
void mgcp_rtp_end_config(struct mgcp_endpoint *endp, int expect_ssrc_change,
|
||||||
|
struct mgcp_rtp_end *rtp);
|
||||||
|
|
||||||
|
uint32_t mgcp_rtp_packet_duration(const struct mgcp_endpoint *endp,
|
||||||
|
const struct mgcp_rtp_end *rtp);
|
109
include/osmocom/mgcp/mgcp_ratectr.h
Normal file
109
include/osmocom/mgcp/mgcp_ratectr.h
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* Global MCGP general rate counters */
|
||||||
|
enum {
|
||||||
|
MGCP_GENERAL_RX_MSGS_TOTAL,
|
||||||
|
MGCP_GENERAL_RX_MSGS_RETRANSMITTED,
|
||||||
|
MGCP_GENERAL_RX_MSGS_HANDLED,
|
||||||
|
MGCP_GENERAL_RX_MSGS_UNHANDLED,
|
||||||
|
MGCP_GENERAL_RX_FAIL_MSG_PARSE,
|
||||||
|
MGCP_GENERAL_RX_FAIL_NO_ENDPOINT,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Trunk-global MCGP CRCX related rate counters */
|
||||||
|
enum {
|
||||||
|
MGCP_CRCX_SUCCESS,
|
||||||
|
MGCP_CRCX_FAIL_BAD_ACTION,
|
||||||
|
MGCP_CRCX_FAIL_UNHANDLED_PARAM,
|
||||||
|
MGCP_CRCX_FAIL_MISSING_CALLID,
|
||||||
|
MGCP_CRCX_FAIL_INVALID_MODE,
|
||||||
|
MGCP_CRCX_FAIL_LIMIT_EXCEEDED,
|
||||||
|
MGCP_CRCX_FAIL_UNKNOWN_CALLID,
|
||||||
|
MGCP_CRCX_FAIL_ALLOC_CONN,
|
||||||
|
MGCP_CRCX_FAIL_NO_REMOTE_CONN_DESC,
|
||||||
|
MGCP_CRCX_FAIL_START_RTP,
|
||||||
|
MGCP_CRCX_FAIL_NO_OSMUX,
|
||||||
|
MGCP_CRCX_FAIL_INVALID_CONN_OPTIONS,
|
||||||
|
MGCP_CRCX_FAIL_CODEC_NEGOTIATION,
|
||||||
|
MGCP_CRCX_FAIL_BIND_PORT,
|
||||||
|
MGCP_CRCX_FAIL_AVAIL,
|
||||||
|
MGCP_CRCX_FAIL_CLAIM,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Trunk-global MCGP MDCX related rate counters */
|
||||||
|
enum {
|
||||||
|
MGCP_MDCX_SUCCESS,
|
||||||
|
MGCP_MDCX_FAIL_WILDCARD,
|
||||||
|
MGCP_MDCX_FAIL_NO_CONN,
|
||||||
|
MGCP_MDCX_FAIL_INVALID_CALLID,
|
||||||
|
MGCP_MDCX_FAIL_INVALID_CONNID,
|
||||||
|
MGCP_MDCX_FAIL_UNHANDLED_PARAM,
|
||||||
|
MGCP_MDCX_FAIL_NO_CONNID,
|
||||||
|
MGCP_MDCX_FAIL_CONN_NOT_FOUND,
|
||||||
|
MGCP_MDCX_FAIL_INVALID_MODE,
|
||||||
|
MGCP_MDCX_FAIL_INVALID_CONN_OPTIONS,
|
||||||
|
MGCP_MDCX_FAIL_NO_REMOTE_CONN_DESC,
|
||||||
|
MGCP_MDCX_FAIL_START_RTP,
|
||||||
|
MGCP_MDCX_FAIL_AVAIL,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Trunk-global MCGP DLCX related rate counters */
|
||||||
|
enum {
|
||||||
|
MGCP_DLCX_SUCCESS,
|
||||||
|
MGCP_DLCX_FAIL_NO_CONN,
|
||||||
|
MGCP_DLCX_FAIL_INVALID_CALLID,
|
||||||
|
MGCP_DLCX_FAIL_INVALID_CONNID,
|
||||||
|
MGCP_DLCX_FAIL_UNHANDLED_PARAM,
|
||||||
|
MGCP_DLCX_FAIL_AVAIL,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Trunk-global E1 related counters */
|
||||||
|
enum {
|
||||||
|
E1_I460_TRAU_RX_FAIL_CTR,
|
||||||
|
E1_I460_TRAU_TX_FAIL_CTR,
|
||||||
|
E1_I460_TRAU_MUX_EMPTY_CTR,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* NOTE: When adding counters, also the dump_ratectr_* routines in vty.c must be updated. */
|
||||||
|
|
||||||
|
struct mgcp_ratectr_global {
|
||||||
|
/* Rate counter group which contains stats for generic MGCP events. */
|
||||||
|
struct rate_ctr_group *mgcp_general_ctr_group;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_ratectr_trunk {
|
||||||
|
/* Rate counter group which contains stats for processed CRCX commands. */
|
||||||
|
struct rate_ctr_group *mgcp_crcx_ctr_group;
|
||||||
|
/* Rate counter group which contains stats for processed MDCX commands. */
|
||||||
|
struct rate_ctr_group *mgcp_mdcx_ctr_group;
|
||||||
|
/* Rate counter group which contains stats for processed DLCX commands. */
|
||||||
|
struct rate_ctr_group *mgcp_dlcx_ctr_group;
|
||||||
|
/* Rate counter group which aggregates stats of individual RTP connections. */
|
||||||
|
struct rate_ctr_group *all_rtp_conn_stats;
|
||||||
|
/* Rate counter group which aggregates stats of individual Osmux connections. */
|
||||||
|
struct rate_ctr_group *all_osmux_conn_stats;
|
||||||
|
/* Rate counter group which contains stats for E1 events (only valid for E1 trunks) */
|
||||||
|
struct rate_ctr_group *e1_stats;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_config;
|
||||||
|
struct mgcp_trunk;
|
||||||
|
|
||||||
|
int mgcp_ratectr_global_alloc(struct mgcp_config *cfg);
|
||||||
|
void mgcp_ratectr_global_free(struct mgcp_config *cfg);
|
||||||
|
int mgcp_ratectr_trunk_alloc(struct mgcp_trunk *trunk);
|
||||||
|
void mgcp_ratectr_trunk_free(struct mgcp_trunk *trunk);
|
||||||
|
|
||||||
|
/* Trunk-global common stat items */
|
||||||
|
enum {
|
||||||
|
TRUNK_STAT_ENDPOINTS_TOTAL,
|
||||||
|
TRUNK_STAT_ENDPOINTS_USED,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_stat_trunk {
|
||||||
|
/* Stat item group which contains general status values of the trunk. */
|
||||||
|
struct osmo_stat_item_group *common;
|
||||||
|
};
|
||||||
|
|
||||||
|
int mgcp_stat_trunk_alloc(struct mgcp_trunk *trunk);
|
||||||
|
void mgcp_stat_trunk_free(struct mgcp_trunk *trunk);
|
@@ -1,6 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* (C) 2010-2013 by Holger Hans Peter Freyther <zecke@selfish.org>
|
* SDP generation and parsing
|
||||||
* (C) 2010-2013 by On-Waves
|
*
|
||||||
|
* (C) 2009-2015 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||||
|
* (C) 2009-2014 by On-Waves
|
||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -18,14 +20,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef OSMO_BSC_GRACE_H
|
#pragma once
|
||||||
#define OSMO_BSC_GRACE_H
|
|
||||||
|
|
||||||
#include "gsm_data.h"
|
int mgcp_parse_sdp_data(const struct mgcp_endpoint *endp,
|
||||||
|
struct mgcp_conn_rtp *conn,
|
||||||
|
struct mgcp_parse_data *p);
|
||||||
|
|
||||||
struct osmo_msc_data;
|
int mgcp_write_response_sdp(const struct mgcp_endpoint *endp,
|
||||||
|
const struct mgcp_conn_rtp *conn, struct msgb *sdp,
|
||||||
int bsc_grace_allow_new_connection(struct gsm_network *net, struct gsm_bts *bts);
|
const char *addr);
|
||||||
int bsc_grace_paging_request(struct gsm_subscriber *sub, int type, struct osmo_msc_data *msc);
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,7 +1,10 @@
|
|||||||
/* Generic BTS - VTY code tries to allocate this BTS before type is known */
|
/* A Media Gateway Control Protocol Media Gateway: RFC 3435 */
|
||||||
|
/* The statistics generator */
|
||||||
|
|
||||||
/* (C) 2010 by Daniel Willmann <daniel@totalueberwachung.de>
|
/*
|
||||||
*
|
* (C) 2009-2012 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||||
|
* (C) 2009-2012 by On-Waves
|
||||||
|
* (C) 2017 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
|
||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -19,22 +22,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include <openbsc/gsm_data.h>
|
#include <inttypes.h>
|
||||||
#include <osmocom/gsm/tlv.h>
|
|
||||||
#include <openbsc/abis_nm.h>
|
|
||||||
|
|
||||||
static struct gsm_bts_model model_unknown = {
|
void mgcp_format_stats(char *str, size_t str_len, struct mgcp_conn *conn);
|
||||||
.type = GSM_BTS_TYPE_UNKNOWN,
|
|
||||||
.name = "unknown",
|
|
||||||
.oml_rcvmsg = &abis_nm_rcvmsg,
|
|
||||||
.nm_att_tlvdef = {
|
|
||||||
.def = {
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
int bts_model_unknown_init(void)
|
/* Exposed for test purposes only, do not use actively */
|
||||||
{
|
void calc_loss(struct mgcp_conn_rtp *conn, uint32_t *expected, int *loss);
|
||||||
return gsm_bts_model_register(&model_unknown);
|
|
||||||
}
|
/* Exposed for test purposes only, do not use actively */
|
||||||
|
uint32_t calc_jitter(struct mgcp_rtp_state *);
|
52
include/osmocom/mgcp/mgcp_threads_queue.h
Normal file
52
include/osmocom/mgcp/mgcp_threads_queue.h
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* (C) 2021 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
|
||||||
|
* All Rights Reserved
|
||||||
|
*
|
||||||
|
* Author: Eric Wild
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdatomic.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
struct spsc {
|
||||||
|
atomic_uint readptr;
|
||||||
|
atomic_uint writeptr;
|
||||||
|
|
||||||
|
int efd_r, efd_w; /* eventfds used to block/notify readers/writers */
|
||||||
|
|
||||||
|
int count;
|
||||||
|
int size_per_buf;
|
||||||
|
|
||||||
|
void *buf; /* buffer size count*size_per_buf */
|
||||||
|
uintptr_t data[0]; /* count sized array of pointers to size_per_buf chunks in buf array*/
|
||||||
|
};
|
||||||
|
|
||||||
|
struct qchan {
|
||||||
|
struct spsc *a;
|
||||||
|
struct spsc *b;
|
||||||
|
};
|
||||||
|
|
||||||
|
bool spsc_push(struct spsc *q, void *elem);
|
||||||
|
bool spsc_pop(struct spsc *q, void *elem);
|
||||||
|
ssize_t spsc_prep_pop(struct spsc *q);
|
||||||
|
int spsc_get_a_rdfd(struct qchan *q);
|
||||||
|
|
||||||
|
struct qchan spsc_chan_init(void *talloc_ctx, unsigned int count, unsigned int size_per_buf);
|
||||||
|
struct qchan spsc_chan_init_ex(void *talloc_ctx, unsigned int count, unsigned int size_per_buf, bool blockr_a,
|
||||||
|
bool blockw_a, bool blockr_b, bool blockw_b);
|
||||||
|
void spsc_chan_close(struct qchan *q);
|
85
include/osmocom/mgcp/mgcp_trunk.h
Normal file
85
include/osmocom/mgcp/mgcp_trunk.h
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <osmocom/gsm/i460_mux.h>
|
||||||
|
#include <osmocom/abis/e1_input.h>
|
||||||
|
#include <osmocom/mgcp/mgcp_ratectr.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define LOGPTRUNK(trunk, cat, level, fmt, args...) \
|
||||||
|
LOGP(cat, level, "trunk:%u " fmt, \
|
||||||
|
trunk ? trunk->trunk_nr : 0, \
|
||||||
|
## args)
|
||||||
|
|
||||||
|
enum mgcp_trunk_type {
|
||||||
|
MGCP_TRUNK_VIRTUAL,
|
||||||
|
MGCP_TRUNK_E1,
|
||||||
|
};
|
||||||
|
|
||||||
|
extern const struct value_string mgcp_trunk_type_strs[];
|
||||||
|
static inline const char *mgcp_trunk_type_strs_str(enum mgcp_trunk_type val)
|
||||||
|
{ return get_value_string(mgcp_trunk_type_strs, val); }
|
||||||
|
|
||||||
|
struct mgcp_trunk {
|
||||||
|
struct llist_head entry;
|
||||||
|
|
||||||
|
struct mgcp_config *cfg;
|
||||||
|
|
||||||
|
unsigned int trunk_nr;
|
||||||
|
enum mgcp_trunk_type trunk_type;
|
||||||
|
|
||||||
|
int audio_send_ptime;
|
||||||
|
int audio_send_name;
|
||||||
|
|
||||||
|
int omit_rtcp;
|
||||||
|
int keepalive_interval;
|
||||||
|
|
||||||
|
/* RTP patching */
|
||||||
|
int force_constant_ssrc; /* 0: don't, 1: once */
|
||||||
|
int force_aligned_timing;
|
||||||
|
bool rfc5993_hr_convert;
|
||||||
|
|
||||||
|
/* spec handling */
|
||||||
|
int force_realloc;
|
||||||
|
|
||||||
|
/* timer */
|
||||||
|
struct osmo_timer_list keepalive_timer;
|
||||||
|
|
||||||
|
/* When set, incoming RTP packets are not filtered
|
||||||
|
* when ports and ip-address do not match (debug) */
|
||||||
|
int rtp_accept_all;
|
||||||
|
|
||||||
|
unsigned int number_endpoints;
|
||||||
|
struct mgcp_endpoint **endpoints;
|
||||||
|
|
||||||
|
/* rate counters and stat items to measure the trunks overall performance and health */
|
||||||
|
struct mgcp_ratectr_trunk ratectr;
|
||||||
|
struct mgcp_stat_trunk stats;
|
||||||
|
|
||||||
|
union {
|
||||||
|
/* Virtual trunk specific */
|
||||||
|
struct {
|
||||||
|
unsigned int vty_number_endpoints;
|
||||||
|
} v;
|
||||||
|
/* E1 specific */
|
||||||
|
struct {
|
||||||
|
unsigned int vty_line_nr;
|
||||||
|
uint8_t ts_usecount[NUM_E1_TS-1];
|
||||||
|
struct osmo_i460_timeslot i460_ts[NUM_E1_TS-1];
|
||||||
|
/* Note: on an E1 line TS 0 is devoted to framing and
|
||||||
|
* alignment and therefore only NUM_E1_TS-1 timeslots
|
||||||
|
* are available for traffic. */
|
||||||
|
} e1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_trunk *mgcp_trunk_alloc(struct mgcp_config *cfg, enum mgcp_trunk_type ttype, unsigned int nr);
|
||||||
|
int mgcp_trunk_equip(struct mgcp_trunk *trunk);
|
||||||
|
struct mgcp_trunk *mgcp_trunk_by_num(const struct mgcp_config *cfg, enum mgcp_trunk_type ttype, unsigned int nr);
|
||||||
|
struct mgcp_trunk *mgcp_trunk_by_name(const struct mgcp_config *cfg, const char *epname);
|
||||||
|
int e1_trunk_nr_from_epname(unsigned int *trunk_nr, const char *epname);
|
||||||
|
struct mgcp_trunk *mgcp_trunk_by_line_num(const struct mgcp_config *cfg, unsigned int num);
|
||||||
|
|
||||||
|
/* The virtual trunk is always created on trunk id 0 for historical reasons,
|
||||||
|
* use this define constant as ID when allocating a virtual trunk. Other
|
||||||
|
* trunks may be assigned with arbritrary id numbers */
|
||||||
|
#define MGCP_VIRT_TRUNK_ID 0
|
41
include/osmocom/mgcp/osmux.h
Normal file
41
include/osmocom/mgcp/osmux.h
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <osmocom/core/socket.h>
|
||||||
|
|
||||||
|
#include <osmocom/netif/osmux.h>
|
||||||
|
struct mgcp_conn_rtp;
|
||||||
|
struct mgcp_trunk;
|
||||||
|
struct mgcp_endpoint;
|
||||||
|
struct mgcp_conn_rtp;
|
||||||
|
|
||||||
|
int osmux_init(struct mgcp_trunk *trunk);
|
||||||
|
int osmux_init_conn(struct mgcp_conn_rtp *conn);
|
||||||
|
int conn_osmux_enable(struct mgcp_conn_rtp *conn);
|
||||||
|
void conn_osmux_disable(struct mgcp_conn_rtp *conn);
|
||||||
|
int conn_osmux_event_rx_crcx_mdcx(struct mgcp_conn_rtp *conn);
|
||||||
|
int conn_osmux_send_rtp(struct mgcp_conn_rtp *conn, struct msgb *msg);
|
||||||
|
int osmux_send_dummy(struct mgcp_conn_rtp *conn);
|
||||||
|
|
||||||
|
void osmux_cid_pool_get(uint8_t osmux_cid);
|
||||||
|
int osmux_cid_pool_get_next(void);
|
||||||
|
void osmux_cid_pool_put(uint8_t osmux_cid);
|
||||||
|
bool osmux_cid_pool_allocated(uint8_t osmux_cid);
|
||||||
|
int osmux_cid_pool_count_used(void);
|
||||||
|
|
||||||
|
enum osmux_state {
|
||||||
|
OSMUX_STATE_DISABLED = 0, /* Osmux not being currently used by endp */
|
||||||
|
OSMUX_STATE_ACTIVATING, /* Osmux was accepted in MGCP CRCX ACK. It can now be enabled by \ref conn_osmux_enable. */
|
||||||
|
OSMUX_STATE_ENABLED, /* Osmux was initialized by \ref conn_osmux_enable and can process frames */
|
||||||
|
};
|
||||||
|
|
||||||
|
extern const struct value_string osmux_state_strs[];
|
||||||
|
static inline const char *osmux_state_str(enum osmux_state val)
|
||||||
|
{ return get_value_string(osmux_state_strs, val); }
|
||||||
|
|
||||||
|
enum osmux_usage {
|
||||||
|
OSMUX_USAGE_OFF = 0,
|
||||||
|
OSMUX_USAGE_ON = 1,
|
||||||
|
OSMUX_USAGE_ONLY = 2,
|
||||||
|
};
|
12
include/osmocom/mgcp/vty.h
Normal file
12
include/osmocom/mgcp/vty.h
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <osmocom/vty/command.h>
|
||||||
|
|
||||||
|
enum mgcp_vty_node {
|
||||||
|
MGCP_NODE = _LAST_OSMOVTY_NODE + 1,
|
||||||
|
TRUNK_NODE,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum mgw_vty_cmd_attr {
|
||||||
|
MGW_CMD_ATTR_NEWCONN = 0,
|
||||||
|
};
|
14
include/osmocom/mgcp_client/Makefile.am
Normal file
14
include/osmocom/mgcp_client/Makefile.am
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
BUILT_SOURCES = \
|
||||||
|
mgcp_common.h \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
noinst_HEADERS = \
|
||||||
|
mgcp_client_internal.h \
|
||||||
|
mgcp_client_pool_internal.h \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
mgcp_common.h: $(top_srcdir)/include/osmocom/mgcp/mgcp_common.h
|
||||||
|
echo -e "/*\n\n DO NOT EDIT THIS FILE!\n THIS IS OVERWRITTEN DURING BUILD\n This is an automatic copy of <osmocom/mgcp/mgcp_common.h>\n\n */" > mgcp_common.h
|
||||||
|
cat $(top_srcdir)/include/osmocom/mgcp/mgcp_common.h >> mgcp_common.h
|
||||||
|
|
||||||
|
CLEANFILES = mgcp_common.h
|
7
include/osmocom/mgcp_client/defs.h
Normal file
7
include/osmocom/mgcp_client/defs.h
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#include <osmocom/core/defs.h>
|
||||||
|
|
||||||
|
#if BUILDING_LIBOSMOMGCPCLIENT
|
||||||
|
# define OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT(text)
|
||||||
|
#else
|
||||||
|
# define OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT(text) OSMO_DEPRECATED(text)
|
||||||
|
#endif
|
127
include/osmocom/mgcp_client/mgcp_client.h
Normal file
127
include/osmocom/mgcp_client/mgcp_client.h
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
#include <osmocom/mgcp_client/defs.h>
|
||||||
|
#include <osmocom/mgcp_client/mgcp_common.h>
|
||||||
|
|
||||||
|
/* See also: RFC 3435, chapter 3.5 Transmission over UDP */
|
||||||
|
#define MGCP_CLIENT_LOCAL_ADDR_DEFAULT NULL /* INADDR(6)_ANY */
|
||||||
|
#define MGCP_CLIENT_LOCAL_PORT_DEFAULT 0
|
||||||
|
#define MGCP_CLIENT_REMOTE_ADDR_DEFAULT "127.0.0.1"
|
||||||
|
#define MGCP_CLIENT_REMOTE_PORT_DEFAULT 2427
|
||||||
|
#define MGCP_CLIENT_KEEPALIVE_DEFAULT_ENDP "null"
|
||||||
|
#define MGCP_CLIENT_MGW_STR "Configure MGCP connection to Media Gateway\n"
|
||||||
|
|
||||||
|
struct msgb;
|
||||||
|
struct vty;
|
||||||
|
struct mgcp_client;
|
||||||
|
|
||||||
|
struct mgcp_client_conf {
|
||||||
|
const char *local_addr;
|
||||||
|
int local_port;
|
||||||
|
const char *remote_addr;
|
||||||
|
int remote_port;
|
||||||
|
|
||||||
|
/* By default, we are always addressing the MGW with e.g. 'rtpbridge/123@mgw'.
|
||||||
|
* If this is nonempty, the contained name will be used instead of 'mgw'. */
|
||||||
|
char endpoint_domain_name[MGCP_ENDPOINT_MAXLEN];
|
||||||
|
|
||||||
|
/* The user may configure certain endpoint names that are reset via DLCX
|
||||||
|
* on startup. Usually this will be one wildcarded endpoint e.g.
|
||||||
|
* 'rtpbridge/(wildcard)' or a number of specific E1 like e.g.
|
||||||
|
* 'ds/e1-0/s-3/su16-4' */
|
||||||
|
struct llist_head reset_epnames;
|
||||||
|
|
||||||
|
/* human readable name / description */
|
||||||
|
char *description;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
uint32_t timeout_sec;
|
||||||
|
uint32_t req_interval_sec;
|
||||||
|
char req_endpoint_name[MGCP_ENDPOINT_MAXLEN];
|
||||||
|
} keepalive;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef unsigned int mgcp_trans_id_t;
|
||||||
|
|
||||||
|
/*! Enumeration of the codec types that mgcp_client is able to handle. */
|
||||||
|
enum mgcp_codecs {
|
||||||
|
CODEC_PCMU_8000_1 = 0,
|
||||||
|
CODEC_GSM_8000_1 = 3,
|
||||||
|
CODEC_PCMA_8000_1 = 8,
|
||||||
|
CODEC_G729_8000_1 = 18,
|
||||||
|
CODEC_GSMEFR_8000_1 = 110, /* 3GPP TS 48.103 table 5.4.2.2.1 */
|
||||||
|
CODEC_GSMHR_8000_1 = 111, /* 3GPP TS 48.103 table 5.4.2.2.1 */
|
||||||
|
CODEC_AMR_8000_1 = 112, /* 3GPP TS 48.103 table 5.4.2.2.1 */
|
||||||
|
CODEC_AMRWB_16000_1 = 113, /* 3GPP TS 48.103 table 5.4.2.2.1 */
|
||||||
|
CODEC_IUFP = 96,
|
||||||
|
CODEC_CLEARMODE = 120, /* 3GPP TS 48.103 table 5.4.2.2.1 */
|
||||||
|
};
|
||||||
|
/* Note: when new codec types are added, the corresponding value strings
|
||||||
|
* in mgcp_client.c (codec_table) must be updated as well. Enumerations
|
||||||
|
* in enum mgcp_codecs must correspond to a valid payload type. However,
|
||||||
|
* this is an internal assumption that is made to avoid lookup tables.
|
||||||
|
* The API-User should not rely on this coincidence! */
|
||||||
|
|
||||||
|
extern const struct value_string osmo_mgcpc_codec_names[];
|
||||||
|
static inline const char *osmo_mgcpc_codec_name(enum mgcp_codecs val)
|
||||||
|
{ return get_value_string(osmo_mgcpc_codec_names, val); }
|
||||||
|
|
||||||
|
/*! Structure to build a payload type map to allow the defiition custom payload
|
||||||
|
* types. */
|
||||||
|
struct ptmap {
|
||||||
|
/*! codec for which a payload type number should be defined */
|
||||||
|
enum mgcp_codecs codec;
|
||||||
|
|
||||||
|
/*! payload type number (96-127) */
|
||||||
|
unsigned int pt;
|
||||||
|
};
|
||||||
|
|
||||||
|
int ptmap_cmp(const struct ptmap *a, const struct ptmap *b);
|
||||||
|
|
||||||
|
enum mgcp_verb {
|
||||||
|
MGCP_VERB_CRCX,
|
||||||
|
MGCP_VERB_MDCX,
|
||||||
|
MGCP_VERB_DLCX,
|
||||||
|
MGCP_VERB_AUEP,
|
||||||
|
MGCP_VERB_RSIP,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_client_conf *mgcp_client_conf_alloc(void *ctx);
|
||||||
|
void mgcp_client_conf_init(struct mgcp_client_conf *conf) OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT("use mgcp_client_conf_alloc() (or even better, switch to the mgcp_client_pool API!)");
|
||||||
|
void mgcp_client_vty_init(void *talloc_ctx, int node, struct mgcp_client_conf *conf);
|
||||||
|
int mgcp_client_config_write(struct vty *vty, const char *indent);
|
||||||
|
struct mgcp_client_conf *mgcp_client_conf_actual(struct mgcp_client *mgcp);
|
||||||
|
|
||||||
|
struct mgcp_client *mgcp_client_init(void *ctx,
|
||||||
|
struct mgcp_client_conf *conf);
|
||||||
|
int mgcp_client_connect(struct mgcp_client *mgcp);
|
||||||
|
int mgcp_client_connect2(struct mgcp_client *mgcp, unsigned int retry_n_ports) OSMO_DEPRECATED("Use mgcp_client_connect() instead");
|
||||||
|
void mgcp_client_disconnect(struct mgcp_client *mgcp);
|
||||||
|
|
||||||
|
const char *mgcp_client_remote_addr_str(struct mgcp_client *mgcp);
|
||||||
|
uint16_t mgcp_client_remote_port(struct mgcp_client *mgcp);
|
||||||
|
uint32_t mgcp_client_remote_addr_n(struct mgcp_client *mgcp) OSMO_DEPRECATED("deprecated, returns 0");
|
||||||
|
|
||||||
|
const char *mgcp_client_endpoint_domain(const struct mgcp_client *mgcp);
|
||||||
|
const char *mgcp_client_rtpbridge_wildcard(const struct mgcp_client *mgcp);
|
||||||
|
const char *mgcp_client_e1_epname(void *ctx, const struct mgcp_client *mgcp, uint8_t trunk_id, uint8_t ts,
|
||||||
|
uint8_t rate, uint8_t offset);
|
||||||
|
|
||||||
|
enum mgcp_connection_mode;
|
||||||
|
|
||||||
|
extern const struct value_string mgcp_client_connection_mode_strs[];
|
||||||
|
static inline const char *mgcp_client_cmode_name(enum mgcp_connection_mode mode)
|
||||||
|
{
|
||||||
|
return get_value_string(mgcp_client_connection_mode_strs, mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
enum mgcp_codecs map_str_to_codec(const char *str);
|
||||||
|
unsigned int map_codec_to_pt(const struct ptmap *ptmap, unsigned int ptmap_len,
|
||||||
|
enum mgcp_codecs codec);
|
||||||
|
enum mgcp_codecs map_pt_to_codec(struct ptmap *ptmap, unsigned int ptmap_len,
|
||||||
|
unsigned int pt);
|
||||||
|
|
||||||
|
const char *mgcp_client_name(const struct mgcp_client *mgcp);
|
55
include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h
Normal file
55
include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
/* FSM to manage multiple connections of an MGW endpoint */
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <osmocom/mgcp_client/mgcp_client_fsm.h>
|
||||||
|
|
||||||
|
#define LOG_MGCPC_EP(ep, level, fmt, args...) do { \
|
||||||
|
LOGPFSML(ep->fi, level, "%s " fmt, \
|
||||||
|
osmo_mgcpc_ep_name(ep), ## args); \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
|
struct osmo_mgcpc_ep;
|
||||||
|
struct osmo_mgcpc_ep_ci;
|
||||||
|
struct osmo_tdef;
|
||||||
|
|
||||||
|
struct osmo_mgcpc_ep *osmo_mgcpc_ep_alloc(struct osmo_fsm_inst *parent, uint32_t parent_term_event,
|
||||||
|
struct mgcp_client *mgcp_client,
|
||||||
|
const struct osmo_tdef *T_defs,
|
||||||
|
const char *fsm_id,
|
||||||
|
const char *endpoint_str_fmt, ...);
|
||||||
|
|
||||||
|
struct osmo_mgcpc_ep_ci *osmo_mgcpc_ep_ci_add(struct osmo_mgcpc_ep *ep, const char *label_fmt, ...);
|
||||||
|
const struct mgcp_conn_peer *osmo_mgcpc_ep_ci_get_rtp_info(const struct osmo_mgcpc_ep_ci *ci);
|
||||||
|
bool osmo_mgcpc_ep_ci_get_crcx_info_to_sockaddr(const struct osmo_mgcpc_ep_ci *ci, struct sockaddr_storage *dest);
|
||||||
|
bool osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(const struct osmo_mgcpc_ep_ci *ci, uint8_t* cid);
|
||||||
|
|
||||||
|
const struct mgcp_conn_peer *osmo_mgcpc_ep_ci_get_remote_rtp_info(const struct osmo_mgcpc_ep_ci *ci);
|
||||||
|
|
||||||
|
void osmo_mgcpc_ep_ci_request(struct osmo_mgcpc_ep_ci *ci,
|
||||||
|
enum mgcp_verb verb, const struct mgcp_conn_peer *verb_info,
|
||||||
|
struct osmo_fsm_inst *notify,
|
||||||
|
uint32_t event_success, uint32_t event_failure,
|
||||||
|
void *notify_data);
|
||||||
|
|
||||||
|
void osmo_mgcpc_ep_cancel_notify(struct osmo_mgcpc_ep *ep, struct osmo_fsm_inst *notify);
|
||||||
|
struct osmo_mgcpc_ep *osmo_mgcpc_ep_ci_ep(struct osmo_mgcpc_ep_ci *ci);
|
||||||
|
|
||||||
|
/*! Dispatch a DLCX for the given connection.
|
||||||
|
* \param ci Connection identifier as obtained from osmo_mgcpc_ep_ci_add().
|
||||||
|
*/
|
||||||
|
static inline void osmo_mgcpc_ep_ci_dlcx(struct osmo_mgcpc_ep_ci *ci)
|
||||||
|
{
|
||||||
|
osmo_mgcpc_ep_ci_request(ci, MGCP_VERB_DLCX, NULL, NULL, 0, 0, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void osmo_mgcpc_ep_clear(struct osmo_mgcpc_ep *ep);
|
||||||
|
|
||||||
|
const char *osmo_mgcpc_ep_name(const struct osmo_mgcpc_ep *ep);
|
||||||
|
const char *osmo_mgcpc_ep_local_name(const struct osmo_mgcpc_ep *ep);
|
||||||
|
const char *osmo_mgcpc_ep_ci_name(const struct osmo_mgcpc_ep_ci *ci);
|
||||||
|
const char *osmo_mgcpc_ep_ci_id(const struct osmo_mgcpc_ep_ci *ci);
|
||||||
|
struct mgcp_client *osmo_mgcpc_ep_client(const struct osmo_mgcpc_ep *ep);
|
||||||
|
|
||||||
|
extern const struct value_string osmo_mgcp_verb_names[];
|
||||||
|
static inline const char *osmo_mgcp_verb_name(enum mgcp_verb val)
|
||||||
|
{ return get_value_string(osmo_mgcp_verb_names, val); }
|
78
include/osmocom/mgcp_client/mgcp_client_fsm.h
Normal file
78
include/osmocom/mgcp_client/mgcp_client_fsm.h
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <osmocom/mgcp_client/mgcp_common.h>
|
||||||
|
#include <osmocom/mgcp_client/mgcp_client.h>
|
||||||
|
#include <osmocom/gsm/protocol/gsm_04_08.h>
|
||||||
|
|
||||||
|
/*! This struct organizes the connection infromation one connection side
|
||||||
|
* (either remote or local). It is used to pass parameters (local) to the FSM
|
||||||
|
* and get responses (remote) from the FSM as pointer attached to the FSM
|
||||||
|
* event.
|
||||||
|
*
|
||||||
|
* When modifiying a connection, the endpoint and call_id members may be left
|
||||||
|
* unpopulated. The call_id field is ignored in this case. If an endpoint
|
||||||
|
* identifier is supplied it is checked against the internal state to make
|
||||||
|
* sure it is correct. */
|
||||||
|
struct mgcp_conn_peer {
|
||||||
|
/*! RTP connection IP-Address (optional, string e.g. "127.0.0.1") */
|
||||||
|
char addr[INET6_ADDRSTRLEN];
|
||||||
|
|
||||||
|
/*! RTP connection IP-Port (optional) */
|
||||||
|
uint16_t port;
|
||||||
|
|
||||||
|
/*! RTP endpoint */
|
||||||
|
char endpoint[MGCP_ENDPOINT_MAXLEN];
|
||||||
|
|
||||||
|
/*! CALL ID (unique per connection) */
|
||||||
|
unsigned int call_id;
|
||||||
|
|
||||||
|
/*! RTP packetization interval (optional) */
|
||||||
|
unsigned int ptime;
|
||||||
|
|
||||||
|
/*! Deprecated. Use only ptmap[].codec in new code. */
|
||||||
|
enum mgcp_codecs codecs[MGCP_MAX_CODECS]
|
||||||
|
OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT("use ptmap[i].codec instead");
|
||||||
|
unsigned int codecs_len
|
||||||
|
OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT("use ptmap[] and ptmap_len instead");
|
||||||
|
|
||||||
|
/*! RTP payload type map (optional, only needed when payload types are
|
||||||
|
* used that differ from what IANA/3GPP defines) */
|
||||||
|
struct ptmap ptmap[MGCP_MAX_CODECS];
|
||||||
|
|
||||||
|
/*! RTP payload type map length (optional, only needed when payload
|
||||||
|
* types are used that differ from what IANA/3GPP defines) */
|
||||||
|
unsigned int ptmap_len;
|
||||||
|
|
||||||
|
/*! If nonzero, send 'X-Osmo-IGN:' header. This is useful e.g. for SCCPlite MSCs where the MSC is
|
||||||
|
* known to issue incoherent or unknown CallIDs / to issue CRCX commands with a different domain
|
||||||
|
* name than the BSC. An OsmoMGW will then ignore these and not fail on mismatches. */
|
||||||
|
uint32_t x_osmo_ign;
|
||||||
|
|
||||||
|
/*! send 'X-Osmux: %d' header (or "*" as wildcard). */
|
||||||
|
bool x_osmo_osmux_use;
|
||||||
|
/*! -1 means send wildcard. */
|
||||||
|
int x_osmo_osmux_cid;
|
||||||
|
|
||||||
|
/*! If left MGCP_CONN_NONE, use MGCP_CONN_RECV_ONLY or MGCP_CONN_RECV_SEND, depending on whether an audio RTP
|
||||||
|
* address is set. If != MGCP_CONN_NONE, force this conn mode. */
|
||||||
|
enum mgcp_connection_mode conn_mode;
|
||||||
|
|
||||||
|
/*! If the codec requires additional format parameters (fmtp), those cann be set here, see also
|
||||||
|
* mgcp_common.h */
|
||||||
|
bool param_present;
|
||||||
|
struct mgcp_codec_param param;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct osmo_fsm_inst *mgcp_conn_create(struct mgcp_client *mgcp, struct osmo_fsm_inst *parent_fi, uint32_t parent_term_evt,
|
||||||
|
uint32_t parent_evt, struct mgcp_conn_peer *conn_peer)
|
||||||
|
OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT("use osmo_mgcpc_ep_alloc() and osmo_mgcpc_ep_ci_add() instead");
|
||||||
|
int mgcp_conn_modify(struct osmo_fsm_inst *fi, uint32_t parent_evt, struct mgcp_conn_peer *conn_peer)
|
||||||
|
OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT("use osmo_mgcpc_ep_ci_request() instead");
|
||||||
|
void mgcp_conn_delete(struct osmo_fsm_inst *fi)
|
||||||
|
OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT("use osmo_mgcpc_ep_ci_dlcx() instead");
|
||||||
|
|
||||||
|
const char *mgcp_conn_get_ci(struct osmo_fsm_inst *fi)
|
||||||
|
OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT("use osmo_mgcpc_ep_ci.mgcp_ci_str instead");
|
||||||
|
struct mgcp_client *mgcp_conn_get_client(struct osmo_fsm_inst *fi);
|
||||||
|
|
||||||
|
const char *osmo_mgcpc_conn_peer_name(const struct mgcp_conn_peer *info);
|
101
include/osmocom/mgcp_client/mgcp_client_internal.h
Normal file
101
include/osmocom/mgcp_client/mgcp_client_internal.h
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <osmocom/core/osmo_io.h>
|
||||||
|
#include <osmocom/core/timer.h>
|
||||||
|
|
||||||
|
#define MSGB_CB_MGCP_TRANS_ID 0
|
||||||
|
|
||||||
|
/* Struct that holds one endpoint name */
|
||||||
|
struct reset_ep {
|
||||||
|
struct llist_head list;
|
||||||
|
char name[MGCP_ENDPOINT_MAXLEN];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_client {
|
||||||
|
struct mgcp_client_conf actual;
|
||||||
|
struct osmo_io_fd *iofd;
|
||||||
|
mgcp_trans_id_t next_trans_id;
|
||||||
|
struct llist_head responses_pending;
|
||||||
|
struct mgcp_client_pool_member *pool_member;
|
||||||
|
struct osmo_timer_list keepalive_tx_timer;
|
||||||
|
struct osmo_timer_list keepalive_rx_timer;
|
||||||
|
bool conn_up;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_response_head {
|
||||||
|
int response_code;
|
||||||
|
mgcp_trans_id_t trans_id;
|
||||||
|
char comment[MGCP_COMMENT_MAXLEN];
|
||||||
|
char conn_id[MGCP_CONN_ID_MAXLEN];
|
||||||
|
char endpoint[MGCP_ENDPOINT_MAXLEN];
|
||||||
|
bool x_osmo_osmux_use;
|
||||||
|
uint8_t x_osmo_osmux_cid;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_response {
|
||||||
|
char *body;
|
||||||
|
struct mgcp_response_head head;
|
||||||
|
uint16_t audio_port;
|
||||||
|
char audio_ip[INET6_ADDRSTRLEN];
|
||||||
|
unsigned int ptime;
|
||||||
|
struct ptmap ptmap[MGCP_MAX_CODECS];
|
||||||
|
unsigned int ptmap_len;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Invoked when an MGCP response is received or sending failed. When the
|
||||||
|
* response is passed as NULL, this indicates failure during transmission. */
|
||||||
|
typedef void (*mgcp_response_cb_t)(struct mgcp_response *response, void *priv);
|
||||||
|
|
||||||
|
struct mgcp_response_pending {
|
||||||
|
struct llist_head entry;
|
||||||
|
|
||||||
|
mgcp_trans_id_t trans_id;
|
||||||
|
mgcp_response_cb_t response_cb;
|
||||||
|
void *priv;
|
||||||
|
};
|
||||||
|
|
||||||
|
int mgcp_client_rx(struct mgcp_client *mgcp, struct msgb *msg);
|
||||||
|
|
||||||
|
struct mgcp_response_pending * mgcp_client_pending_add(
|
||||||
|
struct mgcp_client *mgcp,
|
||||||
|
mgcp_trans_id_t trans_id,
|
||||||
|
mgcp_response_cb_t response_cb,
|
||||||
|
void *priv);
|
||||||
|
|
||||||
|
#define MGCP_MSG_PRESENCE_ENDPOINT 0x0001
|
||||||
|
#define MGCP_MSG_PRESENCE_CALL_ID 0x0002
|
||||||
|
#define MGCP_MSG_PRESENCE_CONN_ID 0x0004
|
||||||
|
#define MGCP_MSG_PRESENCE_AUDIO_IP 0x0008
|
||||||
|
#define MGCP_MSG_PRESENCE_AUDIO_PORT 0x0010
|
||||||
|
#define MGCP_MSG_PRESENCE_CONN_MODE 0x0020
|
||||||
|
#define MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID 0x4000
|
||||||
|
#define MGCP_MSG_PRESENCE_X_OSMO_IGN 0x8000
|
||||||
|
|
||||||
|
struct mgcp_msg {
|
||||||
|
enum mgcp_verb verb;
|
||||||
|
/* See MGCP_MSG_PRESENCE_* constants */
|
||||||
|
uint32_t presence;
|
||||||
|
char endpoint[MGCP_ENDPOINT_MAXLEN];
|
||||||
|
unsigned int call_id;
|
||||||
|
char *conn_id;
|
||||||
|
uint16_t audio_port;
|
||||||
|
char *audio_ip;
|
||||||
|
enum mgcp_connection_mode conn_mode;
|
||||||
|
unsigned int ptime;
|
||||||
|
struct ptmap ptmap[MGCP_MAX_CODECS];
|
||||||
|
unsigned int ptmap_len;
|
||||||
|
uint32_t x_osmo_ign;
|
||||||
|
bool x_osmo_osmux_use;
|
||||||
|
int x_osmo_osmux_cid; /* -1 is wildcard */
|
||||||
|
bool param_present;
|
||||||
|
struct mgcp_codec_param param;
|
||||||
|
};
|
||||||
|
|
||||||
|
int mgcp_response_parse_params(struct mgcp_response *r);
|
||||||
|
|
||||||
|
int mgcp_client_tx(struct mgcp_client *mgcp, struct msgb *msg,
|
||||||
|
mgcp_response_cb_t response_cb, void *priv);
|
||||||
|
int mgcp_client_cancel(struct mgcp_client *mgcp, mgcp_trans_id_t trans_id);
|
||||||
|
|
||||||
|
struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg);
|
||||||
|
mgcp_trans_id_t mgcp_msg_trans_id(struct msgb *msg);
|
24
include/osmocom/mgcp_client/mgcp_client_pool.h
Normal file
24
include/osmocom/mgcp_client/mgcp_client_pool.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include <osmocom/vty/vty.h>
|
||||||
|
|
||||||
|
struct mgcp_client;
|
||||||
|
struct mgcp_client_pool;
|
||||||
|
struct mgcp_client_pool_member;
|
||||||
|
|
||||||
|
struct mgcp_client_pool *mgcp_client_pool_alloc(void *talloc_ctx);
|
||||||
|
|
||||||
|
void mgcp_client_pool_vty_init(int parent_node, int mgw_node, const char *indent, struct mgcp_client_pool *pool);
|
||||||
|
int mgcp_client_pool_config_write(struct vty *vty, const char *indent);
|
||||||
|
unsigned int mgcp_client_pool_connect(struct mgcp_client_pool *pool);
|
||||||
|
void mgcp_client_pool_register_single(struct mgcp_client_pool *pool, struct mgcp_client *mgcp_client);
|
||||||
|
bool mgcp_client_pool_empty(const struct mgcp_client_pool *pool);
|
||||||
|
|
||||||
|
struct mgcp_client *mgcp_client_pool_get(struct mgcp_client_pool *pool);
|
||||||
|
void mgcp_client_pool_put(struct mgcp_client *mgcp_client);
|
||||||
|
|
||||||
|
struct mgcp_client_pool_member *mgcp_client_pool_find_member_by_nr(struct mgcp_client_pool *pool, unsigned int nr);
|
||||||
|
struct mgcp_client *mgcp_client_pool_member_get(struct mgcp_client_pool_member *pool_member);
|
||||||
|
bool mgcp_client_pool_member_is_blocked(const struct mgcp_client_pool_member *pool_member);
|
52
include/osmocom/mgcp_client/mgcp_client_pool_internal.h
Normal file
52
include/osmocom/mgcp_client/mgcp_client_pool_internal.h
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* Struct to handle a pool of MGWs. (Use _pool functions) */
|
||||||
|
struct mgcp_client_pool {
|
||||||
|
|
||||||
|
/* A pointer to a 'single' mgcp client. This is a non-pooled MGCP client that is configured using
|
||||||
|
* mgcp_client_vty_init() and actively registered by the API user using mgcp_client_pool_register_single() */
|
||||||
|
struct mgcp_client *mgcp_client_single;
|
||||||
|
|
||||||
|
/* A list that manages the pool members (see mgcp_client_pool_member->list above) */
|
||||||
|
struct llist_head member_list;
|
||||||
|
|
||||||
|
/* String to use for indentation when writing the configuration file to the VTY. This field is populated by
|
||||||
|
* mgcp_client_pool_vty_init() */
|
||||||
|
char *vty_indent;
|
||||||
|
|
||||||
|
/* VTY node specification used with this pool. This field is populated by mgcp_client_pool_vty_init() */
|
||||||
|
struct cmd_node *vty_node;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Struct to handle a member of a pool of MGWs. */
|
||||||
|
struct mgcp_client_pool_member {
|
||||||
|
/* Entry in llist mgcp_client_pool->pool. */
|
||||||
|
struct llist_head list;
|
||||||
|
|
||||||
|
/* The pool managing this object: */
|
||||||
|
struct mgcp_client_pool *pool;
|
||||||
|
|
||||||
|
/* Reference number assinged by VTY. This number is used to manage the pool from the VTY and to identify it in
|
||||||
|
* the log. */
|
||||||
|
unsigned int nr;
|
||||||
|
|
||||||
|
/* MGCP client configuration, this is not the running configuration, when mgcp_client_init() is executed, a
|
||||||
|
* copy of this config is created. */
|
||||||
|
struct mgcp_client_conf conf;
|
||||||
|
|
||||||
|
/* MGCP client descriptor, will be automatically allocated when mgcp_client_pool_connect() is called. (the MGCP
|
||||||
|
* client is connected when this pointer is populated) */
|
||||||
|
struct mgcp_client *client;
|
||||||
|
|
||||||
|
/* A pool member may be set as 'blocked' from the VTY, this means that the pool member may still work and serve
|
||||||
|
* ongoing calls, but it won't be picked from the pool anymore. */
|
||||||
|
bool blocked;
|
||||||
|
|
||||||
|
/* Reference counter to count how often this pool member is currently picked. */
|
||||||
|
unsigned int refcount;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct mgcp_client_pool_member *mgcp_client_pool_member_alloc(struct mgcp_client_pool *pool, unsigned int nr);
|
||||||
|
void mgcp_client_pool_member_free(struct mgcp_client_pool_member *pool_member);
|
||||||
|
int mgcp_client_pool_member_reinit_client(struct mgcp_client_pool_member *pool_member);
|
||||||
|
const char *mgcp_client_pool_member_name(const struct mgcp_client_pool_member *pool_member);
|
10
libosmo-mgcp-client.pc.in
Normal file
10
libosmo-mgcp-client.pc.in
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
libdir=@libdir@
|
||||||
|
includedir=@includedir@
|
||||||
|
|
||||||
|
Name: Osmocom Media Gateway Control Protocol Client library
|
||||||
|
Description: C Utility Library
|
||||||
|
Version: @VERSION@
|
||||||
|
Libs: -L${libdir} -losmo-mgcp-client
|
||||||
|
Cflags: -I${includedir}/
|
@@ -1,144 +0,0 @@
|
|||||||
diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linux-2.6.27.4-clean/drivers/isdn/mISDN/layer2.c linux-2.6.27.4/drivers/isdn/mISDN/layer2.c
|
|
||||||
--- linux-2.6.27.4-clean/drivers/isdn/mISDN/layer2.c 2008-10-26 00:05:07.000000000 +0200
|
|
||||||
+++ linux-2.6.27.4/drivers/isdn/mISDN/layer2.c 2008-12-23 16:16:29.000000000 +0100
|
|
||||||
@@ -94,8 +94,10 @@
|
|
||||||
struct layer2 *l2 = fi->userdata;
|
|
||||||
va_list va;
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
if (!(*debug & DEBUG_L2_FSM))
|
|
||||||
return;
|
|
||||||
+#endif
|
|
||||||
va_start(va, fmt);
|
|
||||||
printk(KERN_DEBUG "l2 (tei %d): ", l2->tei);
|
|
||||||
vprintk(fmt, va);
|
|
||||||
@@ -882,6 +884,8 @@
|
|
||||||
l2->va = 0;
|
|
||||||
l2->vr = 0;
|
|
||||||
l2->sow = 0;
|
|
||||||
+ l2->sapi = skb->data[0] >> 2;
|
|
||||||
+ set_channel_address(&l2->ch, l2->sapi, l2->tei);
|
|
||||||
clear_exception(l2);
|
|
||||||
send_uframe(l2, NULL, UA | get_PollFlag(l2, skb), RSP);
|
|
||||||
mISDN_FsmChangeState(fi, ST_L2_7);
|
|
||||||
@@ -898,6 +902,7 @@
|
|
||||||
struct layer2 *l2 = fi->userdata;
|
|
||||||
struct sk_buff *skb = arg;
|
|
||||||
|
|
||||||
+ printk(KERN_DEBUG "l2_send_UA()\n");
|
|
||||||
send_uframe(l2, skb, UA | get_PollFlag(l2, skb), RSP);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -931,6 +936,8 @@
|
|
||||||
l2->va = 0;
|
|
||||||
l2->vr = 0;
|
|
||||||
l2->sow = 0;
|
|
||||||
+ l2->sapi = skb->data[0] >> 2;
|
|
||||||
+ set_channel_address(&l2->ch, l2->sapi, l2->tei);
|
|
||||||
mISDN_FsmChangeState(fi, ST_L2_7);
|
|
||||||
stop_t200(l2, 3);
|
|
||||||
mISDN_FsmRestartTimer(&l2->t203, l2->T203, EV_L2_T203, NULL, 3);
|
|
||||||
@@ -982,6 +989,8 @@
|
|
||||||
} else if (l2->vs != l2->va) {
|
|
||||||
skb_queue_purge(&l2->i_queue);
|
|
||||||
pr = DL_ESTABLISH_IND;
|
|
||||||
+ //l2->sapi = skb->data[0] >> 2;
|
|
||||||
+ //set_channel_address(&l2->ch, l2->sapi, l2->tei);
|
|
||||||
}
|
|
||||||
stop_t200(l2, 5);
|
|
||||||
l2->vr = 0;
|
|
||||||
@@ -1841,11 +1850,14 @@
|
|
||||||
u_int l;
|
|
||||||
int c = 0;
|
|
||||||
|
|
||||||
+ printk(KERN_DEBUG "ph_data_indication 0x%x 0x%x 0x%x\n", datap[0], datap[1], datap[2]);
|
|
||||||
+
|
|
||||||
l = l2addrsize(l2);
|
|
||||||
if (skb->len <= l) {
|
|
||||||
mISDN_FsmEvent(&l2->l2m, EV_L2_FRAME_ERROR, (void *) 'N');
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
+#if 0
|
|
||||||
if (test_bit(FLG_LAPD, &l2->flag)) { /* Maybe not needed */
|
|
||||||
psapi = *datap++;
|
|
||||||
ptei = *datap++;
|
|
||||||
@@ -1875,6 +1887,7 @@
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
+#endif
|
|
||||||
datap += l;
|
|
||||||
if (!(*datap & 1)) { /* I-Frame */
|
|
||||||
c = iframe_error(l2, skb);
|
|
||||||
@@ -1890,6 +1903,7 @@
|
|
||||||
ret = mISDN_FsmEvent(&l2->l2m, EV_L2_UI, skb);
|
|
||||||
} else if (IsSABME(datap, l2)) {
|
|
||||||
c = unnum_error(l2, skb, CMD);
|
|
||||||
+ printk(KERN_DEBUG "IsSABME() returned true, unnum_error=%d\n", c);
|
|
||||||
if (!c)
|
|
||||||
ret = mISDN_FsmEvent(&l2->l2m, EV_L2_SABME, skb);
|
|
||||||
} else if (IsUA(datap)) {
|
|
||||||
@@ -2087,7 +2101,7 @@
|
|
||||||
test_and_set_bit(FLG_LAPD, &l2->flag);
|
|
||||||
test_and_set_bit(FLG_LAPD_NET, &l2->flag);
|
|
||||||
test_and_set_bit(FLG_MOD128, &l2->flag);
|
|
||||||
- l2->sapi = 0;
|
|
||||||
+ l2->sapi = 62;
|
|
||||||
l2->maxlen = MAX_DFRAME_LEN;
|
|
||||||
if (test_bit(OPTION_L2_PMX, &options))
|
|
||||||
l2->window = 7;
|
|
||||||
diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linux-2.6.27.4-clean/drivers/isdn/mISDN/tei.c linux-2.6.27.4/drivers/isdn/mISDN/tei.c
|
|
||||||
--- linux-2.6.27.4-clean/drivers/isdn/mISDN/tei.c 2008-10-26 00:05:07.000000000 +0200
|
|
||||||
+++ linux-2.6.27.4/drivers/isdn/mISDN/tei.c 2008-12-23 16:32:59.000000000 +0100
|
|
||||||
@@ -830,18 +830,29 @@
|
|
||||||
int tei, ri;
|
|
||||||
struct layer2 *l2;
|
|
||||||
|
|
||||||
+ printk(KERN_DEBUG "new tei request: tei=%d\n", dp[3] >> 1);
|
|
||||||
+
|
|
||||||
ri = dp[0] << 8;
|
|
||||||
ri += dp[1];
|
|
||||||
- if (!mgr->up)
|
|
||||||
- goto denied;
|
|
||||||
- tei = get_free_tei(mgr);
|
|
||||||
- if (tei < 0) {
|
|
||||||
- printk(KERN_WARNING "%s:No free tei\n", __func__);
|
|
||||||
+ if (!mgr->up) {
|
|
||||||
+ printk(KERN_DEBUG "mgr->up == NULL\n");
|
|
||||||
goto denied;
|
|
||||||
}
|
|
||||||
+ if (dp[3] != 0xff) {
|
|
||||||
+ /* This is a TEI request according to 3GPP TS 08.56 6.1.11.2 */
|
|
||||||
+ tei = dp[3] >> 1;
|
|
||||||
+ } else {
|
|
||||||
+ tei = get_free_tei(mgr);
|
|
||||||
+ if (tei < 0) {
|
|
||||||
+ printk(KERN_WARNING "%s:No free tei\n", __func__);
|
|
||||||
+ goto denied;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
l2 = create_new_tei(mgr, tei);
|
|
||||||
- if (!l2)
|
|
||||||
+ if (!l2) {
|
|
||||||
+ printk(KERN_DEBUG "create_new_tei == NULL\n");
|
|
||||||
goto denied;
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
mISDN_FsmEvent(&l2->tm->tei_m, EV_ASSIGN_REQ, dp);
|
|
||||||
return;
|
|
||||||
@@ -1159,12 +1170,14 @@
|
|
||||||
return -ENOTCONN;
|
|
||||||
if (skb->len != 3)
|
|
||||||
return -ENOTCONN;
|
|
||||||
+#if 0
|
|
||||||
if (skb->data[0] != 0)
|
|
||||||
/* only SAPI 0 command */
|
|
||||||
return -ENOTCONN;
|
|
||||||
+#endif
|
|
||||||
if (!(skb->data[1] & 1)) /* invalid EA1 */
|
|
||||||
return -EINVAL;
|
|
||||||
- tei = skb->data[1] >> 0;
|
|
||||||
+ tei = skb->data[1] >> 1;
|
|
||||||
if (tei > 63) /* not a fixed tei */
|
|
||||||
return -ENOTCONN;
|
|
||||||
if ((skb->data[2] & ~0x10) != SABME)
|
|
@@ -1,486 +0,0 @@
|
|||||||
This experimental patch splits one E1 card into three virtual cards,
|
|
||||||
|
|
||||||
TS 1,2,3,4,5 is card 0
|
|
||||||
TS 6,7,8,9,10 is card 1
|
|
||||||
TS 11,12,13,14 is card 2
|
|
||||||
|
|
||||||
This allows you to run one L2 TEI handler on each of the virtual cards,
|
|
||||||
which is required if you want to run multiple BTS on a single E1 link.
|
|
||||||
|
|
||||||
Thanks to Andreas Eversberg for this patch.
|
|
||||||
|
|
||||||
diff --git a/drivers/isdn/hardware/mISDN/hfc_multi.h b/drivers/isdn/hardware/mISDN/hfc_multi.h
|
|
||||||
index 0c77386..02dd4a1 100644
|
|
||||||
--- a/drivers/isdn/hardware/mISDN/hfc_multi.h
|
|
||||||
+++ b/drivers/isdn/hardware/mISDN/hfc_multi.h
|
|
||||||
@@ -209,14 +209,17 @@ struct hfc_multi {
|
|
||||||
u_long ledstate; /* save last state of leds */
|
|
||||||
int opticalsupport; /* has the e1 board */
|
|
||||||
/* an optical Interface */
|
|
||||||
- int dslot; /* channel # of d-channel (E1) default 16 */
|
|
||||||
+
|
|
||||||
+ u_int bmask[32]; /* bitmask of bchannels for port */
|
|
||||||
+ u_char dnum[32]; /* array of used dchannel numbers for port */
|
|
||||||
+ u_char created[32]; /* what port is created */
|
|
||||||
+ u_int activity[32]; /* if there is any action on this */
|
|
||||||
+ /* port (will be cleared after */
|
|
||||||
+ /* showing led-states) */
|
|
||||||
|
|
||||||
u_long wdcount; /* every 500 ms we need to */
|
|
||||||
/* send the watchdog a signal */
|
|
||||||
u_char wdbyte; /* watchdog toggle byte */
|
|
||||||
- u_int activity[8]; /* if there is any action on this */
|
|
||||||
- /* port (will be cleared after */
|
|
||||||
- /* showing led-states) */
|
|
||||||
int e1_state; /* keep track of last state */
|
|
||||||
int e1_getclock; /* if sync is retrieved from interface */
|
|
||||||
int syncronized; /* keep track of existing sync interface */
|
|
||||||
@@ -233,7 +236,6 @@ struct hfc_multi {
|
|
||||||
* the bch->channel is equvalent to the hfc-channel
|
|
||||||
*/
|
|
||||||
struct hfc_chan chan[32];
|
|
||||||
- u_char created[8]; /* what port is created */
|
|
||||||
signed char slot_owner[256]; /* owner channel of slot */
|
|
||||||
};
|
|
||||||
|
|
||||||
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
|
|
||||||
index e1dab30..4fe2d27 100644
|
|
||||||
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
|
|
||||||
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
|
|
||||||
@@ -1619,8 +1619,8 @@ hfcmulti_leds(struct hfc_multi *hc)
|
|
||||||
* left red: frame sync, but no L1
|
|
||||||
* right green: L2 active
|
|
||||||
*/
|
|
||||||
- if (hc->chan[hc->dslot].sync != 2) { /* no frame sync */
|
|
||||||
- if (hc->chan[hc->dslot].dch->dev.D.protocol
|
|
||||||
+ if (hc->chan[hc->dnum[0]].sync != 2) { /* no frame sync */
|
|
||||||
+ if (hc->chan[hc->dnum[0]].dch->dev.D.protocol
|
|
||||||
!= ISDN_P_NT_E1) {
|
|
||||||
led[0] = 1;
|
|
||||||
led[1] = 1;
|
|
||||||
@@ -2428,55 +2428,56 @@ handle_timer_irq(struct hfc_multi *hc)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (hc->ctype == HFC_TYPE_E1 && hc->created[0]) {
|
|
||||||
- dch = hc->chan[hc->dslot].dch;
|
|
||||||
- if (test_bit(HFC_CFG_REPORT_LOS, &hc->chan[hc->dslot].cfg)) {
|
|
||||||
+#warning todo: put interface parameters to hc
|
|
||||||
+ dch = hc->chan[hc->dnum[0]].dch;
|
|
||||||
+ if (test_bit(HFC_CFG_REPORT_LOS, &hc->chan[hc->dnum[0]].cfg)) {
|
|
||||||
/* LOS */
|
|
||||||
temp = HFC_inb_nodebug(hc, R_SYNC_STA) & V_SIG_LOS;
|
|
||||||
- if (!temp && hc->chan[hc->dslot].los)
|
|
||||||
+ if (!temp && hc->chan[hc->dnum[0]].los)
|
|
||||||
signal_state_up(dch, L1_SIGNAL_LOS_ON,
|
|
||||||
"LOS detected");
|
|
||||||
- if (temp && !hc->chan[hc->dslot].los)
|
|
||||||
+ if (temp && !hc->chan[hc->dnum[0]].los)
|
|
||||||
signal_state_up(dch, L1_SIGNAL_LOS_OFF,
|
|
||||||
"LOS gone");
|
|
||||||
- hc->chan[hc->dslot].los = temp;
|
|
||||||
+ hc->chan[hc->dnum[0]].los = temp;
|
|
||||||
}
|
|
||||||
- if (test_bit(HFC_CFG_REPORT_AIS, &hc->chan[hc->dslot].cfg)) {
|
|
||||||
+ if (test_bit(HFC_CFG_REPORT_AIS, &hc->chan[hc->dnum[0]].cfg)) {
|
|
||||||
/* AIS */
|
|
||||||
temp = HFC_inb_nodebug(hc, R_SYNC_STA) & V_AIS;
|
|
||||||
- if (!temp && hc->chan[hc->dslot].ais)
|
|
||||||
+ if (!temp && hc->chan[hc->dnum[0]].ais)
|
|
||||||
signal_state_up(dch, L1_SIGNAL_AIS_ON,
|
|
||||||
"AIS detected");
|
|
||||||
- if (temp && !hc->chan[hc->dslot].ais)
|
|
||||||
+ if (temp && !hc->chan[hc->dnum[0]].ais)
|
|
||||||
signal_state_up(dch, L1_SIGNAL_AIS_OFF,
|
|
||||||
"AIS gone");
|
|
||||||
- hc->chan[hc->dslot].ais = temp;
|
|
||||||
+ hc->chan[hc->dnum[0]].ais = temp;
|
|
||||||
}
|
|
||||||
- if (test_bit(HFC_CFG_REPORT_SLIP, &hc->chan[hc->dslot].cfg)) {
|
|
||||||
+ if (test_bit(HFC_CFG_REPORT_SLIP, &hc->chan[hc->dnum[0]].cfg)) {
|
|
||||||
/* SLIP */
|
|
||||||
temp = HFC_inb_nodebug(hc, R_SLIP) & V_FOSLIP_RX;
|
|
||||||
- if (!temp && hc->chan[hc->dslot].slip_rx)
|
|
||||||
+ if (!temp && hc->chan[hc->dnum[0]].slip_rx)
|
|
||||||
signal_state_up(dch, L1_SIGNAL_SLIP_RX,
|
|
||||||
" bit SLIP detected RX");
|
|
||||||
- hc->chan[hc->dslot].slip_rx = temp;
|
|
||||||
+ hc->chan[hc->dnum[0]].slip_rx = temp;
|
|
||||||
temp = HFC_inb_nodebug(hc, R_SLIP) & V_FOSLIP_TX;
|
|
||||||
- if (!temp && hc->chan[hc->dslot].slip_tx)
|
|
||||||
+ if (!temp && hc->chan[hc->dnum[0]].slip_tx)
|
|
||||||
signal_state_up(dch, L1_SIGNAL_SLIP_TX,
|
|
||||||
" bit SLIP detected TX");
|
|
||||||
- hc->chan[hc->dslot].slip_tx = temp;
|
|
||||||
+ hc->chan[hc->dnum[0]].slip_tx = temp;
|
|
||||||
}
|
|
||||||
- if (test_bit(HFC_CFG_REPORT_RDI, &hc->chan[hc->dslot].cfg)) {
|
|
||||||
+ if (test_bit(HFC_CFG_REPORT_RDI, &hc->chan[hc->dnum[0]].cfg)) {
|
|
||||||
/* RDI */
|
|
||||||
temp = HFC_inb_nodebug(hc, R_RX_SL0_0) & V_A;
|
|
||||||
- if (!temp && hc->chan[hc->dslot].rdi)
|
|
||||||
+ if (!temp && hc->chan[hc->dnum[0]].rdi)
|
|
||||||
signal_state_up(dch, L1_SIGNAL_RDI_ON,
|
|
||||||
"RDI detected");
|
|
||||||
- if (temp && !hc->chan[hc->dslot].rdi)
|
|
||||||
+ if (temp && !hc->chan[hc->dnum[0]].rdi)
|
|
||||||
signal_state_up(dch, L1_SIGNAL_RDI_OFF,
|
|
||||||
"RDI gone");
|
|
||||||
- hc->chan[hc->dslot].rdi = temp;
|
|
||||||
+ hc->chan[hc->dnum[0]].rdi = temp;
|
|
||||||
}
|
|
||||||
temp = HFC_inb_nodebug(hc, R_JATT_DIR);
|
|
||||||
- switch (hc->chan[hc->dslot].sync) {
|
|
||||||
+ switch (hc->chan[hc->dnum[0]].sync) {
|
|
||||||
case 0:
|
|
||||||
if ((temp & 0x60) == 0x60) {
|
|
||||||
if (debug & DEBUG_HFCMULTI_SYNC)
|
|
||||||
@@ -2485,10 +2486,10 @@ handle_timer_irq(struct hfc_multi *hc)
|
|
||||||
"in clock sync\n",
|
|
||||||
__func__, hc->id);
|
|
||||||
HFC_outb(hc, R_RX_OFF,
|
|
||||||
- hc->chan[hc->dslot].jitter | V_RX_INIT);
|
|
||||||
+ hc->chan[hc->dnum[0]].jitter | V_RX_INIT);
|
|
||||||
HFC_outb(hc, R_TX_OFF,
|
|
||||||
- hc->chan[hc->dslot].jitter | V_RX_INIT);
|
|
||||||
- hc->chan[hc->dslot].sync = 1;
|
|
||||||
+ hc->chan[hc->dnum[0]].jitter | V_RX_INIT);
|
|
||||||
+ hc->chan[hc->dnum[0]].sync = 1;
|
|
||||||
goto check_framesync;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
@@ -2499,7 +2500,7 @@ handle_timer_irq(struct hfc_multi *hc)
|
|
||||||
"%s: (id=%d) E1 "
|
|
||||||
"lost clock sync\n",
|
|
||||||
__func__, hc->id);
|
|
||||||
- hc->chan[hc->dslot].sync = 0;
|
|
||||||
+ hc->chan[hc->dnum[0]].sync = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
check_framesync:
|
|
||||||
@@ -2510,7 +2511,7 @@ check_framesync:
|
|
||||||
"%s: (id=%d) E1 "
|
|
||||||
"now in frame sync\n",
|
|
||||||
__func__, hc->id);
|
|
||||||
- hc->chan[hc->dslot].sync = 2;
|
|
||||||
+ hc->chan[hc->dnum[0]].sync = 2;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
@@ -2520,7 +2521,7 @@ check_framesync:
|
|
||||||
"%s: (id=%d) E1 lost "
|
|
||||||
"clock & frame sync\n",
|
|
||||||
__func__, hc->id);
|
|
||||||
- hc->chan[hc->dslot].sync = 0;
|
|
||||||
+ hc->chan[hc->dnum[0]].sync = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
temp = HFC_inb_nodebug(hc, R_SYNC_STA);
|
|
||||||
@@ -2530,7 +2531,7 @@ check_framesync:
|
|
||||||
"%s: (id=%d) E1 "
|
|
||||||
"lost frame sync\n",
|
|
||||||
__func__, hc->id);
|
|
||||||
- hc->chan[hc->dslot].sync = 1;
|
|
||||||
+ hc->chan[hc->dnum[0]].sync = 1;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
@@ -2746,7 +2747,8 @@ hfcmulti_interrupt(int intno, void *dev_id)
|
|
||||||
if (r_irq_misc & V_STA_IRQ) {
|
|
||||||
if (hc->ctype == HFC_TYPE_E1) {
|
|
||||||
/* state machine */
|
|
||||||
- dch = hc->chan[hc->dslot].dch;
|
|
||||||
+#warning todo
|
|
||||||
+ dch = hc->chan[hc->dnum[0]].dch;
|
|
||||||
e1_syncsta = HFC_inb_nodebug(hc, R_SYNC_STA);
|
|
||||||
if (test_bit(HFC_CHIP_PLXSD, &hc->chip)
|
|
||||||
&& hc->e1_getclock) {
|
|
||||||
@@ -2768,7 +2770,15 @@ hfcmulti_interrupt(int intno, void *dev_id)
|
|
||||||
}
|
|
||||||
dch->state = HFC_inb_nodebug(hc, R_E1_RD_STA)
|
|
||||||
& 0x7;
|
|
||||||
+#warning todo hack!!! broadcast state change!!!
|
|
||||||
+ dch = hc->chan[hc->dnum[0]].dch;
|
|
||||||
schedule_event(dch, FLG_PHCHANGE);
|
|
||||||
+ dch = hc->chan[hc->dnum[1]].dch;
|
|
||||||
+ dch->state = HFC_inb_nodebug(hc, R_E1_RD_STA)
|
|
||||||
+ & 0x7;
|
|
||||||
+ schedule_event(dch, FLG_PHCHANGE);
|
|
||||||
+
|
|
||||||
+
|
|
||||||
if (debug & DEBUG_HFCMULTI_STATE)
|
|
||||||
printk(KERN_DEBUG
|
|
||||||
"%s: E1 (id=%d) newstate %x\n",
|
|
||||||
@@ -3851,31 +3861,35 @@ hfcmulti_initmode(struct dchannel *dch)
|
|
||||||
if (debug & DEBUG_HFCMULTI_INIT)
|
|
||||||
printk(KERN_DEBUG "%s: entered\n", __func__);
|
|
||||||
|
|
||||||
+ i = dch->slot;
|
|
||||||
+ pt = hc->chan[i].port;
|
|
||||||
if (hc->ctype == HFC_TYPE_E1) {
|
|
||||||
- hc->chan[hc->dslot].slot_tx = -1;
|
|
||||||
- hc->chan[hc->dslot].slot_rx = -1;
|
|
||||||
- hc->chan[hc->dslot].conf = -1;
|
|
||||||
- if (hc->dslot) {
|
|
||||||
- mode_hfcmulti(hc, hc->dslot, dch->dev.D.protocol,
|
|
||||||
+ /* E1 */
|
|
||||||
+#warning todo: don''t do it if dnum == 0
|
|
||||||
+ hc->chan[hc->dnum[pt]].slot_tx = -1;
|
|
||||||
+ hc->chan[hc->dnum[pt]].slot_rx = -1;
|
|
||||||
+ hc->chan[hc->dnum[pt]].conf = -1;
|
|
||||||
+ if (hc->dnum[pt]) {
|
|
||||||
+ mode_hfcmulti(hc, dch->slot, dch->dev.D.protocol,
|
|
||||||
-1, 0, -1, 0);
|
|
||||||
dch->timer.function = (void *) hfcmulti_dbusy_timer;
|
|
||||||
dch->timer.data = (long) dch;
|
|
||||||
init_timer(&dch->timer);
|
|
||||||
}
|
|
||||||
for (i = 1; i <= 31; i++) {
|
|
||||||
- if (i == hc->dslot)
|
|
||||||
+ if (!((1 << i) & hc->bmask[pt])) /* skip unused channel */
|
|
||||||
continue;
|
|
||||||
hc->chan[i].slot_tx = -1;
|
|
||||||
hc->chan[i].slot_rx = -1;
|
|
||||||
hc->chan[i].conf = -1;
|
|
||||||
mode_hfcmulti(hc, i, ISDN_P_NONE, -1, 0, -1, 0);
|
|
||||||
}
|
|
||||||
- /* E1 */
|
|
||||||
- if (test_bit(HFC_CFG_REPORT_LOS, &hc->chan[hc->dslot].cfg)) {
|
|
||||||
+#warning todo (global)
|
|
||||||
+ if (test_bit(HFC_CFG_REPORT_LOS, &hc->chan[hc->dnum[pt]].cfg)) {
|
|
||||||
HFC_outb(hc, R_LOS0, 255); /* 2 ms */
|
|
||||||
HFC_outb(hc, R_LOS1, 255); /* 512 ms */
|
|
||||||
}
|
|
||||||
- if (test_bit(HFC_CFG_OPTICAL, &hc->chan[hc->dslot].cfg)) {
|
|
||||||
+ if (test_bit(HFC_CFG_OPTICAL, &hc->chan[hc->dnum[pt]].cfg)) {
|
|
||||||
HFC_outb(hc, R_RX0, 0);
|
|
||||||
hc->hw.r_tx0 = 0 | V_OUT_EN;
|
|
||||||
} else {
|
|
||||||
@@ -3888,12 +3902,12 @@ hfcmulti_initmode(struct dchannel *dch)
|
|
||||||
HFC_outb(hc, R_TX_FR0, 0x00);
|
|
||||||
HFC_outb(hc, R_TX_FR1, 0xf8);
|
|
||||||
|
|
||||||
- if (test_bit(HFC_CFG_CRC4, &hc->chan[hc->dslot].cfg))
|
|
||||||
+ if (test_bit(HFC_CFG_CRC4, &hc->chan[hc->dnum[pt]].cfg))
|
|
||||||
HFC_outb(hc, R_TX_FR2, V_TX_MF | V_TX_E | V_NEG_E);
|
|
||||||
|
|
||||||
HFC_outb(hc, R_RX_FR0, V_AUTO_RESYNC | V_AUTO_RECO | 0);
|
|
||||||
|
|
||||||
- if (test_bit(HFC_CFG_CRC4, &hc->chan[hc->dslot].cfg))
|
|
||||||
+ if (test_bit(HFC_CFG_CRC4, &hc->chan[hc->dnum[pt]].cfg))
|
|
||||||
HFC_outb(hc, R_RX_FR1, V_RX_MF | V_RX_MF_SYNC);
|
|
||||||
|
|
||||||
if (dch->dev.D.protocol == ISDN_P_NT_E1) {
|
|
||||||
@@ -3957,7 +3971,7 @@ hfcmulti_initmode(struct dchannel *dch)
|
|
||||||
plxsd_checksync(hc, 0);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- i = dch->slot;
|
|
||||||
+ /* ST */
|
|
||||||
hc->chan[i].slot_tx = -1;
|
|
||||||
hc->chan[i].slot_rx = -1;
|
|
||||||
hc->chan[i].conf = -1;
|
|
||||||
@@ -3973,8 +3987,6 @@ hfcmulti_initmode(struct dchannel *dch)
|
|
||||||
hc->chan[i - 1].slot_rx = -1;
|
|
||||||
hc->chan[i - 1].conf = -1;
|
|
||||||
mode_hfcmulti(hc, i - 1, ISDN_P_NONE, -1, 0, -1, 0);
|
|
||||||
- /* ST */
|
|
||||||
- pt = hc->chan[i].port;
|
|
||||||
/* select interface */
|
|
||||||
HFC_outb(hc, R_ST_SEL, pt);
|
|
||||||
/* undocumented: delay after R_ST_SEL */
|
|
||||||
@@ -4557,6 +4569,8 @@ release_port(struct hfc_multi *hc, struct dchannel *dch)
|
|
||||||
}
|
|
||||||
/* free channels */
|
|
||||||
for (i = 0; i <= 31; i++) {
|
|
||||||
+ if (!((1 << i) & hc->bmask[pt])) /* skip unused channel */
|
|
||||||
+ continue;
|
|
||||||
if (hc->chan[i].bch) {
|
|
||||||
if (debug & DEBUG_HFCMULTI_INIT)
|
|
||||||
printk(KERN_DEBUG
|
|
||||||
@@ -4680,12 +4694,13 @@ release_card(struct hfc_multi *hc)
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
-init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
|
||||||
+init_e1_port(struct hfc_multi *hc, struct hm_map *m, int pt)
|
|
||||||
{
|
|
||||||
struct dchannel *dch;
|
|
||||||
struct bchannel *bch;
|
|
||||||
int ch, ret = 0;
|
|
||||||
char name[MISDN_MAX_IDLEN];
|
|
||||||
+ int bcount = 0;
|
|
||||||
|
|
||||||
dch = kzalloc(sizeof(struct dchannel), GFP_KERNEL);
|
|
||||||
if (!dch)
|
|
||||||
@@ -4698,13 +4713,12 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
|
||||||
(1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));
|
|
||||||
dch->dev.D.send = handle_dmsg;
|
|
||||||
dch->dev.D.ctrl = hfcm_dctrl;
|
|
||||||
- dch->dev.nrbchan = (hc->dslot) ? 30 : 31;
|
|
||||||
- dch->slot = hc->dslot;
|
|
||||||
- hc->chan[hc->dslot].dch = dch;
|
|
||||||
- hc->chan[hc->dslot].port = 0;
|
|
||||||
- hc->chan[hc->dslot].nt_timer = -1;
|
|
||||||
+ dch->slot = hc->dnum[pt];
|
|
||||||
+ hc->chan[hc->dnum[pt]].dch = dch;
|
|
||||||
+ hc->chan[hc->dnum[pt]].port = pt;
|
|
||||||
+ hc->chan[hc->dnum[pt]].nt_timer = -1;
|
|
||||||
for (ch = 1; ch <= 31; ch++) {
|
|
||||||
- if (ch == hc->dslot) /* skip dchannel */
|
|
||||||
+ if (!((1 << ch) & hc->bmask[pt])) /* skip unused channel */
|
|
||||||
continue;
|
|
||||||
bch = kzalloc(sizeof(struct bchannel), GFP_KERNEL);
|
|
||||||
if (!bch) {
|
|
||||||
@@ -4733,7 +4747,10 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
|
||||||
hc->chan[ch].bch = bch;
|
|
||||||
hc->chan[ch].port = 0;
|
|
||||||
set_channelmap(bch->nr, dch->dev.channelmap);
|
|
||||||
+ bcount++;
|
|
||||||
}
|
|
||||||
+ dch->dev.nrbchan = bcount;
|
|
||||||
+#warning todo: must be set globally, and must be a seperate function
|
|
||||||
/* set optical line type */
|
|
||||||
if (port[Port_cnt] & 0x001) {
|
|
||||||
if (!m->opticalsupport) {
|
|
||||||
@@ -4749,7 +4766,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
|
||||||
__func__,
|
|
||||||
HFC_cnt + 1, 1);
|
|
||||||
test_and_set_bit(HFC_CFG_OPTICAL,
|
|
||||||
- &hc->chan[hc->dslot].cfg);
|
|
||||||
+ &hc->chan[hc->dnum[pt]].cfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* set LOS report */
|
|
||||||
@@ -4759,7 +4776,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
|
||||||
"LOS report: card(%d) port(%d)\n",
|
|
||||||
__func__, HFC_cnt + 1, 1);
|
|
||||||
test_and_set_bit(HFC_CFG_REPORT_LOS,
|
|
||||||
- &hc->chan[hc->dslot].cfg);
|
|
||||||
+ &hc->chan[hc->dnum[pt]].cfg);
|
|
||||||
}
|
|
||||||
/* set AIS report */
|
|
||||||
if (port[Port_cnt] & 0x008) {
|
|
||||||
@@ -4768,7 +4785,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
|
||||||
"AIS report: card(%d) port(%d)\n",
|
|
||||||
__func__, HFC_cnt + 1, 1);
|
|
||||||
test_and_set_bit(HFC_CFG_REPORT_AIS,
|
|
||||||
- &hc->chan[hc->dslot].cfg);
|
|
||||||
+ &hc->chan[hc->dnum[pt]].cfg);
|
|
||||||
}
|
|
||||||
/* set SLIP report */
|
|
||||||
if (port[Port_cnt] & 0x010) {
|
|
||||||
@@ -4778,7 +4795,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
|
||||||
"card(%d) port(%d)\n",
|
|
||||||
__func__, HFC_cnt + 1, 1);
|
|
||||||
test_and_set_bit(HFC_CFG_REPORT_SLIP,
|
|
||||||
- &hc->chan[hc->dslot].cfg);
|
|
||||||
+ &hc->chan[hc->dnum[pt]].cfg);
|
|
||||||
}
|
|
||||||
/* set RDI report */
|
|
||||||
if (port[Port_cnt] & 0x020) {
|
|
||||||
@@ -4788,7 +4805,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
|
||||||
"card(%d) port(%d)\n",
|
|
||||||
__func__, HFC_cnt + 1, 1);
|
|
||||||
test_and_set_bit(HFC_CFG_REPORT_RDI,
|
|
||||||
- &hc->chan[hc->dslot].cfg);
|
|
||||||
+ &hc->chan[hc->dnum[pt]].cfg);
|
|
||||||
}
|
|
||||||
/* set CRC-4 Mode */
|
|
||||||
if (!(port[Port_cnt] & 0x100)) {
|
|
||||||
@@ -4797,7 +4814,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
|
||||||
" card(%d) port(%d)\n",
|
|
||||||
__func__, HFC_cnt + 1, 1);
|
|
||||||
test_and_set_bit(HFC_CFG_CRC4,
|
|
||||||
- &hc->chan[hc->dslot].cfg);
|
|
||||||
+ &hc->chan[hc->dnum[pt]].cfg);
|
|
||||||
} else {
|
|
||||||
if (debug & DEBUG_HFCMULTI_INIT)
|
|
||||||
printk(KERN_DEBUG "%s: PORT turn off CRC4"
|
|
||||||
@@ -4829,20 +4846,23 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m)
|
|
||||||
}
|
|
||||||
/* set elastic jitter buffer */
|
|
||||||
if (port[Port_cnt] & 0x3000) {
|
|
||||||
- hc->chan[hc->dslot].jitter = (port[Port_cnt]>>12) & 0x3;
|
|
||||||
+ hc->chan[hc->dnum[pt]].jitter = (port[Port_cnt]>>12) & 0x3;
|
|
||||||
if (debug & DEBUG_HFCMULTI_INIT)
|
|
||||||
printk(KERN_DEBUG
|
|
||||||
"%s: PORT set elastic "
|
|
||||||
"buffer to %d: card(%d) port(%d)\n",
|
|
||||||
- __func__, hc->chan[hc->dslot].jitter,
|
|
||||||
+ __func__, hc->chan[hc->dnum[pt]].jitter,
|
|
||||||
HFC_cnt + 1, 1);
|
|
||||||
} else
|
|
||||||
- hc->chan[hc->dslot].jitter = 2; /* default */
|
|
||||||
- snprintf(name, MISDN_MAX_IDLEN - 1, "hfc-e1.%d", HFC_cnt + 1);
|
|
||||||
+ hc->chan[hc->dnum[pt]].jitter = 2; /* default */
|
|
||||||
+ if (hc->ports > 1)
|
|
||||||
+ snprintf(name, MISDN_MAX_IDLEN - 1, "hfc-e1.%d-%d", HFC_cnt + 1, pt+1);
|
|
||||||
+ else
|
|
||||||
+ snprintf(name, MISDN_MAX_IDLEN - 1, "hfc-e1.%d", HFC_cnt + 1);
|
|
||||||
ret = mISDN_register_device(&dch->dev, &hc->pci_dev->dev, name);
|
|
||||||
if (ret)
|
|
||||||
goto free_chan;
|
|
||||||
- hc->created[0] = 1;
|
|
||||||
+ hc->created[pt] = 1;
|
|
||||||
return ret;
|
|
||||||
free_chan:
|
|
||||||
release_port(hc, dch);
|
|
||||||
@@ -5009,18 +5029,30 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
|
|
||||||
hc->id = HFC_cnt;
|
|
||||||
hc->pcm = pcm[HFC_cnt];
|
|
||||||
hc->io_mode = iomode[HFC_cnt];
|
|
||||||
+#warning todo: rework module parameters for customizing e1 fragments.... yea, let''s call it: fragments
|
|
||||||
if (dslot[HFC_cnt] < 0 && hc->ctype == HFC_TYPE_E1) {
|
|
||||||
- hc->dslot = 0;
|
|
||||||
+ hc->dnum[0] = 0;
|
|
||||||
printk(KERN_INFO "HFC-E1 card has disabled D-channel, but "
|
|
||||||
"31 B-channels\n");
|
|
||||||
}
|
|
||||||
if (dslot[HFC_cnt] > 0 && dslot[HFC_cnt] < 32
|
|
||||||
&& hc->ctype == HFC_TYPE_E1) {
|
|
||||||
- hc->dslot = dslot[HFC_cnt];
|
|
||||||
+ hc->dnum[0] = dslot[HFC_cnt];
|
|
||||||
printk(KERN_INFO "HFC-E1 card has alternating D-channel on "
|
|
||||||
"time slot %d\n", dslot[HFC_cnt]);
|
|
||||||
} else
|
|
||||||
- hc->dslot = 16;
|
|
||||||
+ hc->dnum[0] = 16;
|
|
||||||
+
|
|
||||||
+#warning todo HACK!!! just a small map of two "fragments"
|
|
||||||
+ if (hc->ctype == HFC_TYPE_E1) {
|
|
||||||
+ hc->dnum[0] = 1;
|
|
||||||
+ hc->bmask[0] = 0x0000003c;
|
|
||||||
+ hc->dnum[1] = 6;
|
|
||||||
+ hc->bmask[1] = 0x00000780;
|
|
||||||
+ hc->dnum[2] = 11;
|
|
||||||
+ hc->bmask[2] = 0x00007800;
|
|
||||||
+ hc->ports = 3;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
/* set chip specific features */
|
|
||||||
hc->masterclk = -1;
|
|
||||||
@@ -5103,7 +5135,7 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
|
|
||||||
goto free_card;
|
|
||||||
}
|
|
||||||
if (hc->ctype == HFC_TYPE_E1)
|
|
||||||
- ret_err = init_e1_port(hc, m);
|
|
||||||
+ ret_err = init_e1_port(hc, m, pt);
|
|
||||||
else
|
|
||||||
ret_err = init_multi_port(hc, pt);
|
|
||||||
if (debug & DEBUG_HFCMULTI_INIT)
|
|
||||||
@@ -5115,10 +5147,14 @@ hfcmulti_init(struct hm_map *m, struct pci_dev *pdev,
|
|
||||||
if (ret_err) {
|
|
||||||
while (pt) { /* release already registered ports */
|
|
||||||
pt--;
|
|
||||||
- release_port(hc, hc->chan[(pt << 2) + 2].dch);
|
|
||||||
+ if (hc->ctype == HFC_TYPE_E1)
|
|
||||||
+ release_port(hc, hc->chan[hc->dnum[pt]].dch);
|
|
||||||
+ else
|
|
||||||
+ release_port(hc, hc->chan[(pt << 2) + 2].dch);
|
|
||||||
}
|
|
||||||
goto free_card;
|
|
||||||
}
|
|
||||||
+#warning todo: count it right, add additional "fragment" counter...
|
|
||||||
Port_cnt++;
|
|
||||||
}
|
|
||||||
|
|
3
m4/README
Normal file
3
m4/README
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
We want to avoid creating too many external build-time dependencies
|
||||||
|
like this one to autoconf-archive. This directory provides a local
|
||||||
|
copy of required m4 rules.
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user