mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
Compare commits
848 Commits
openbsc/0.
...
openbsc/0.
Author | SHA1 | Date | |
---|---|---|---|
|
b7849987e5 | ||
|
c7921c9205 | ||
|
e86b3ebf2e | ||
|
23cf666359 | ||
|
e31816c83b | ||
|
c90499bb28 | ||
|
1cf43ece12 | ||
|
bc82f92a8d | ||
|
457a081379 | ||
|
2c1ae479ab | ||
|
1a07e21eaf | ||
|
f6093a4d0e | ||
|
8b65ab9d91 | ||
|
d134cc7d9d | ||
|
df680288a9 | ||
|
850dc6bbfa | ||
|
32bc11698a | ||
|
978714d752 | ||
|
28307643d7 | ||
|
5ac0179f47 | ||
|
3300c01e82 | ||
|
472e7e937c | ||
|
135a648ad7 | ||
|
d64c0bca17 | ||
|
6be350c045 | ||
|
b96be39d47 | ||
|
bb6034e2d8 | ||
|
9bdf5a9ef7 | ||
|
e36b487958 | ||
|
acc4031cf5 | ||
|
9c20571280 | ||
|
2e2ff34021 | ||
|
df8e6e9e4a | ||
|
ad75eababc | ||
|
384ef09920 | ||
|
1d54c40dd6 | ||
|
20102b0c82 | ||
|
f2c1f25612 | ||
|
4e318f5938 | ||
|
4e4fa4ce9b | ||
|
792edebb4f | ||
|
9e26773167 | ||
|
2b245c4f2b | ||
|
db1bd6998b | ||
|
80cffaf323 | ||
|
f142c97907 | ||
|
cdc59ff5cc | ||
|
867d9f3985 | ||
|
15c6172a8d | ||
|
a85515bea5 | ||
|
0d2881ad58 | ||
|
c68f754b3b | ||
|
6e52b88a17 | ||
|
d2a7878b35 | ||
|
1e9ae4be66 | ||
|
c0370e4399 | ||
|
d3080be131 | ||
|
67cd75f9fa | ||
|
99beb96fc0 | ||
|
ebf8b0a291 | ||
|
0e1620ff4a | ||
|
5d41b90e60 | ||
|
52defe9506 | ||
|
eb113137c8 | ||
|
88b6a1fa80 | ||
|
66f27ed0cb | ||
|
9cbdf1138f | ||
|
ef466d4f06 | ||
|
ab46cf38d4 | ||
|
c0d17f2266 | ||
|
dfb342c19a | ||
|
e1273b1f3c | ||
|
bbc5b99a6b | ||
|
4db9299286 | ||
|
bf540cb7c3 | ||
|
286ba0e68f | ||
|
0dc36f1e3a | ||
|
ef1e587008 | ||
|
6860c44071 | ||
|
474698abef | ||
|
1ffe98c175 | ||
|
66e14cdda6 | ||
|
5a081bbb1d | ||
|
e188010512 | ||
|
2a9eeaa588 | ||
|
a78b6026c9 | ||
|
163f612326 | ||
|
de2b860dff | ||
|
c3f28320c2 | ||
|
5deb6c3c5f | ||
|
0b03f16cdb | ||
|
71dd06cfcb | ||
|
123bc32834 | ||
|
91b9a45be4 | ||
|
e5d324981d | ||
|
a64037cd4a | ||
|
80352e03ca | ||
|
d447e99587 | ||
|
0e7d071e47 | ||
|
a8a09df6a6 | ||
|
c42ad8b686 | ||
|
5cde92cb0e | ||
|
06009c8d5a | ||
|
fede54c821 | ||
|
7e737007d9 | ||
|
4c80a516f8 | ||
|
25ffe54118 | ||
|
23b1b808f1 | ||
|
91afbbc56a | ||
|
ca05d432d7 | ||
|
0d20b63574 | ||
|
81863cde82 | ||
|
090493863b | ||
|
18fe88933c | ||
|
0e8facca42 | ||
|
390ba3faa0 | ||
|
cfccedd74a | ||
|
0d93fb4127 | ||
|
ffcf66f30e | ||
|
b326100b12 | ||
|
5d7b65b407 | ||
|
755f7442dd | ||
|
9f1294d623 | ||
|
c281b4e85a | ||
|
625295b14f | ||
|
66add64b71 | ||
|
22f58a9a58 | ||
|
3ab864a860 | ||
|
55ef5fb7ef | ||
|
4b41746ce3 | ||
|
7d73642d0e | ||
|
ef38e85542 | ||
|
da2f769681 | ||
|
165fe56260 | ||
|
f22e348287 | ||
|
4c9557ef24 | ||
|
13673749ff | ||
|
a18b11602c | ||
|
9e7e55f164 | ||
|
6a7babd658 | ||
|
d000c27d3b | ||
|
06f4fc79a2 | ||
|
fcac2911cf | ||
|
6110a3f3fa | ||
|
3c409c249d | ||
|
928cb33eb4 | ||
|
7c6b8cbbed | ||
|
d36ff76f9d | ||
|
136f453dd2 | ||
|
3848770669 | ||
|
50e529d44e | ||
|
c76fb5dd10 | ||
|
739a566961 | ||
|
5d7ad47386 | ||
|
682587748f | ||
|
16b7f5c4ef | ||
|
40d1c3fef1 | ||
|
8b277ac381 | ||
|
1484d88d7a | ||
|
f38ca9aec7 | ||
|
d529db6e50 | ||
|
af9b810419 | ||
|
217c6b6ad2 | ||
|
e898ecc57b | ||
|
1edc2b4c85 | ||
|
ba9adbb951 | ||
|
4fcd3570cb | ||
|
75755c5d87 | ||
|
8aeac19dbd | ||
|
f6d6b21ec2 | ||
|
aff63bc089 | ||
|
1164dce679 | ||
|
3ede723cb4 | ||
|
e6e8383a92 | ||
|
5748c20be1 | ||
|
d4571f41a3 | ||
|
53492c86e8 | ||
|
52af3aee5a | ||
|
bab983764e | ||
|
366d215dbd | ||
|
f9cf961a66 | ||
|
a0ce349f0c | ||
|
c08e8be4ee | ||
|
c1b2cfafd4 | ||
|
388cbbfc41 | ||
|
17a7634043 | ||
|
63467e8f28 | ||
|
26d7907b02 | ||
|
fd355a3c6f | ||
|
89579b4317 | ||
|
5a6b68f416 | ||
|
bd34be0a96 | ||
|
e5e36af8ae | ||
|
a17faf8512 | ||
|
31c00f7d6f | ||
|
9349d7ff7c | ||
|
955c3d1894 | ||
|
afb883956d | ||
|
6990687f4c | ||
|
44016fee14 | ||
|
1f0c5b4742 | ||
|
74e61110e5 | ||
|
6ea7e777f5 | ||
|
cdba04978d | ||
|
0e939fec42 | ||
|
ab3bb9d444 | ||
|
d011c91512 | ||
|
88ad7723b4 | ||
|
dfdf8d929a | ||
|
9212d9d636 | ||
|
9ec030d32d | ||
|
a9e9331285 | ||
|
7b07b2dcff | ||
|
86c1db6338 | ||
|
ed500e3877 | ||
|
7e0cc50e44 | ||
|
867d69bbcb | ||
|
ec1921dfa3 | ||
|
b62b12398b | ||
|
11762459e8 | ||
|
00c805f213 | ||
|
37ac420254 | ||
|
6a458eac2c | ||
|
6c79a68103 | ||
|
ca8f3b59c1 | ||
|
21bbda242e | ||
|
4d54d0b883 | ||
|
5ec26fe983 | ||
|
f358964fb2 | ||
|
91fa850791 | ||
|
4446b3bf34 | ||
|
6e1a676e21 | ||
|
8dcebd3e7f | ||
|
64c07d213c | ||
|
b01bf33ad4 | ||
|
e925205c28 | ||
|
da87154093 | ||
|
ebec58e8ba | ||
|
59eee42b05 | ||
|
face7edc62 | ||
|
a0fe72de6f | ||
|
fdb71949db | ||
|
d88a3878cc | ||
|
9c0958bf4c | ||
|
a02085dab0 | ||
|
a8e6a652ca | ||
|
b7eebf8699 | ||
|
c4989a8e5e | ||
|
9f0866c2a3 | ||
|
bd3137c2dd | ||
|
15ccc77f62 | ||
|
82b03a1f2b | ||
|
cca849a825 | ||
|
0896b50197 | ||
|
909212fc87 | ||
|
c834b70d04 | ||
|
174a51a761 | ||
|
b3d70fd0bd | ||
|
dcf42e6cd2 | ||
|
334c5ab2e6 | ||
|
b0ec9e3dae | ||
|
8bcb1a0a99 | ||
|
0741ffe69f | ||
|
56ee6b8075 | ||
|
563d316106 | ||
|
8024d8ff58 | ||
|
8d4a472cc4 | ||
|
810e32394d | ||
|
6fec79da18 | ||
|
51c8238024 | ||
|
e1d5eca916 | ||
|
7354107946 | ||
|
bc867d9a17 | ||
|
9a311ec25e | ||
|
b80e14e567 | ||
|
03cc8a810b | ||
|
db44f6012d | ||
|
09cefee4db | ||
|
a4898a868b | ||
|
1a00d823b3 | ||
|
00ee4b78db | ||
|
44f04da379 | ||
|
95aa5c4ae3 | ||
|
f27d043032 | ||
|
f338a03b0c | ||
|
f3956cbb20 | ||
|
fb9e06f310 | ||
|
c471d3d8a2 | ||
|
5e106d7765 | ||
|
36f98d9c53 | ||
|
b63c3639eb | ||
|
62d460301b | ||
|
4ee2eaf3c4 | ||
|
8fc66a0c4d | ||
|
1458ec6571 | ||
|
d38f10593a | ||
|
0ae575536a | ||
|
716d2a47b2 | ||
|
0abc11a0d0 | ||
|
50d369e1a9 | ||
|
ca17ef88f5 | ||
|
1dd68c3d0f | ||
|
ba0db5b7f3 | ||
|
d273529a8d | ||
|
e1de69af7e | ||
|
7e859bc17c | ||
|
30fe64165b | ||
|
cd8b86f124 | ||
|
69245a0496 | ||
|
cc2bc35f2c | ||
|
17289eda65 | ||
|
b1cb8eb7a6 | ||
|
d105e2048a | ||
|
bc6649e942 | ||
|
b5ddc184ff | ||
|
f933de97ba | ||
|
98c98547d0 | ||
|
07bb0daaff | ||
|
889f16eac3 | ||
|
fefb52361a | ||
|
3016d9f299 | ||
|
5455243306 | ||
|
a61c709ef0 | ||
|
6e94d6d10d | ||
|
3fbd244187 | ||
|
b549ddfb04 | ||
|
05bbec7227 | ||
|
91f587ed98 | ||
|
1761d02ddb | ||
|
934676e158 | ||
|
7bbaefb349 | ||
|
64bb754b40 | ||
|
da0a99ab0d | ||
|
95932e7bd0 | ||
|
aace9fc9b9 | ||
|
7a69cf0a98 | ||
|
4bf40c090d | ||
|
18b590de4a | ||
|
32c0962b10 | ||
|
9b5f1d7b43 | ||
|
3b0fd2b0b9 | ||
|
8e3f0e7185 | ||
|
cdfcbee53b | ||
|
c464491b0b | ||
|
368a0a73d4 | ||
|
45c2184c7e | ||
|
f43f2fce82 | ||
|
9f239a2a0f | ||
|
6adac17a10 | ||
|
49b3ed2226 | ||
|
182c81f04e | ||
|
90c0aff174 | ||
|
52ffb922c4 | ||
|
451eb29e37 | ||
|
763b42a92a | ||
|
68c3bf6de8 | ||
|
c02b12086c | ||
|
fc857414ae | ||
|
ebdd3cbd89 | ||
|
ffccb77df0 | ||
|
f72b3d51fc | ||
|
c29043ea24 | ||
|
701076e9d3 | ||
|
96e9f08101 | ||
|
79eff7eeff | ||
|
583e9aef33 | ||
|
dc53af6721 | ||
|
725966d9b4 | ||
|
8e3eb584a8 | ||
|
b56a6bbc55 | ||
|
50c5ff7b94 | ||
|
ebd50a6fd2 | ||
|
f1ba09b2e6 | ||
|
1cc7184bc9 | ||
|
02d45c00f5 | ||
|
f4152d1025 | ||
|
54146271b6 | ||
|
913bc032b9 | ||
|
59234a3eb2 | ||
|
6c4d2443b4 | ||
|
04d362f79d | ||
|
6349b7f15e | ||
|
624e89d3f7 | ||
|
b854b29e32 | ||
|
f0901f0067 | ||
|
91c59c8cb5 | ||
|
eb76c7a93f | ||
|
0d6f930785 | ||
|
02d9966053 | ||
|
ea057d9350 | ||
|
29b64e9708 | ||
|
04dc88fb9d | ||
|
371efe5955 | ||
|
49a2ddeec0 | ||
|
e8e432dd59 | ||
|
fea236e27c | ||
|
31bbbf4e52 | ||
|
76556376c3 | ||
|
3e6376d20d | ||
|
081e14d071 | ||
|
e6da14fde4 | ||
|
54209c2dce | ||
|
9af6ddfcec | ||
|
08eebd59b7 | ||
|
9ae7b29e3a | ||
|
59f787a4c1 | ||
|
8ce8d3a00d | ||
|
cfcf7e84bd | ||
|
f64a20f2e8 | ||
|
9d3e2ec698 | ||
|
c839667324 | ||
|
019d0167b6 | ||
|
c728eeaf9b | ||
|
a9b473a3c2 | ||
|
3357add225 | ||
|
c407ba5ed2 | ||
|
5479fc80d5 | ||
|
203845730f | ||
|
f7e2389eb6 | ||
|
a37e3bc39a | ||
|
a3a659ba5c | ||
|
445e615d03 | ||
|
994dcbb201 | ||
|
7e59c83d66 | ||
|
4dcc5e5f8a | ||
|
3c6f6c25a6 | ||
|
7a0e166fb0 | ||
|
81c0e2582f | ||
|
17164061a6 | ||
|
11b28f9c26 | ||
|
04144c1905 | ||
|
0eb7666efa | ||
|
41c5aaf62c | ||
|
69ac83dd54 | ||
|
9d277d3b33 | ||
|
e3018c7ad6 | ||
|
dd715bd2ee | ||
|
73b878a85a | ||
|
812dad0ff7 | ||
|
e25445b864 | ||
|
3d76e44968 | ||
|
d3baf415b1 | ||
|
ee139e7253 | ||
|
abd0cac0c5 | ||
|
c577ca1822 | ||
|
ae9006aeed | ||
|
f694d5f47a | ||
|
daee5ca7c1 | ||
|
a29e43a26f | ||
|
75e2defc7f | ||
|
eafe22ca72 | ||
|
2cafc4b309 | ||
|
3a3c277b70 | ||
|
b29cea1d9c | ||
|
712ddbcd72 | ||
|
85bded8b50 | ||
|
cd103a9a5d | ||
|
026b4cab36 | ||
|
127af34eea | ||
|
274d015cbb | ||
|
f6bd340df6 | ||
|
985263e55f | ||
|
082b01f18e | ||
|
c9f499f7d3 | ||
|
86dda08762 | ||
|
2862dcac58 | ||
|
d0d2b0b605 | ||
|
53cd7ac44c | ||
|
d4e6872d6c | ||
|
434bb3f39f | ||
|
7ce5e259c9 | ||
|
f93e8fabd8 | ||
|
6003d6b928 | ||
|
28dcbc5ee5 | ||
|
c5faf66b82 | ||
|
3547045c73 | ||
|
e2fee354cf | ||
|
c7782dec4a | ||
|
ceeddf87f5 | ||
|
d49fc5ae24 | ||
|
d85642a1a7 | ||
|
6f615551a4 | ||
|
39e6ba09c2 | ||
|
c7a1a1fd2e | ||
|
d9cdd056ff | ||
|
2391b4c474 | ||
|
90cdd28e6f | ||
|
63dbfc6a2b | ||
|
f604bba026 | ||
|
ec073e9f5b | ||
|
230cd6a720 | ||
|
5f5189e658 | ||
|
f751a10018 | ||
|
7e72fa0250 | ||
|
df30d40b98 | ||
|
98b53cba06 | ||
|
81a8bf1039 | ||
|
12e373c218 | ||
|
3f16da2032 | ||
|
8a31a3fcee | ||
|
5a86e06eb3 | ||
|
0fbfd1bb52 | ||
|
567c8dc7c9 | ||
|
c7ff2572a7 | ||
|
1e24550d3d | ||
|
67706df7c2 | ||
|
e0b06b0293 | ||
|
6d42dbe35c | ||
|
db2c28aef6 | ||
|
318105d58d | ||
|
a36f0ede25 | ||
|
0326cd5ac9 | ||
|
3b71247cd0 | ||
|
fbceea4f0f | ||
|
414bc4a1f4 | ||
|
cf6f71aa7f | ||
|
70c232f75a | ||
|
bb62b3f053 | ||
|
625b6e4dab | ||
|
d283db496f | ||
|
e17c030b76 | ||
|
dab8e27755 | ||
|
e19d6fc1ee | ||
|
09a925b117 | ||
|
e9f7a0d3b9 | ||
|
b4e72f881c | ||
|
16e958dc68 | ||
|
9c838ae069 | ||
|
b79c3c97a2 | ||
|
620c2e678a | ||
|
dbc698aef0 | ||
|
50c579b8c5 | ||
|
fae3c65938 | ||
|
f1f57a84c1 | ||
|
863a55d44d | ||
|
890dfc58ed | ||
|
3485feb49b | ||
|
cf256d678f | ||
|
933daaa016 | ||
|
af4b5fb13e | ||
|
57d304871e | ||
|
00f4cc22c8 | ||
|
ca5c022a32 | ||
|
c97d9b4df1 | ||
|
7e9010892d | ||
|
b8781d2cd5 | ||
|
9b17c769b9 | ||
|
2a8675e49a | ||
|
52d42abdb7 | ||
|
a54732d19d | ||
|
d65305f5b4 | ||
|
5bb874d2f5 | ||
|
cc48fb8083 | ||
|
46c5ab3624 | ||
|
e46f1d6cc4 | ||
|
c2b3270e93 | ||
|
c8166f3a91 | ||
|
58f2cf6494 | ||
|
da488ae343 | ||
|
2d2c910f2c | ||
|
4582586e24 | ||
|
7225fd18e0 | ||
|
1999cf11b9 | ||
|
77cd95d5b5 | ||
|
f05750ca24 | ||
|
abf962b096 | ||
|
8d216c7756 | ||
|
a2e5cb8601 | ||
|
a2828fa4bc | ||
|
088dde8173 | ||
|
7e50c8140b | ||
|
8d380dcadd | ||
|
2603c1f545 | ||
|
4be7d41a50 | ||
|
2f169d64dd | ||
|
45b575fd94 | ||
|
66dcd925c6 | ||
|
46caa3048d | ||
|
b094171c9f | ||
|
e1996f013c | ||
|
6c199e7d99 | ||
|
fce9307553 | ||
|
05c68841a8 | ||
|
85334f1309 | ||
|
8dfd241bc6 | ||
|
d740b688dc | ||
|
928ca743db | ||
|
8cc59036e6 | ||
|
ecd94a4b45 | ||
|
0b369c582b | ||
|
5652cfc0e8 | ||
|
1406977e7e | ||
|
f3d1ae7072 | ||
|
0425c38feb | ||
|
7bf66c5a6e | ||
|
fe16622bf5 | ||
|
45f9e69ac5 | ||
|
4de1116356 | ||
|
5b848f37cf | ||
|
79dcd719e0 | ||
|
8b19dee437 | ||
|
5f2cd84281 | ||
|
3f29cc8303 | ||
|
386a940736 | ||
|
bd7b3c5e45 | ||
|
e97155a2af | ||
|
2126233590 | ||
|
88b597e21c | ||
|
b54048fe25 | ||
|
fbca4ea117 | ||
|
43eb1a3db0 | ||
|
74779c68f7 | ||
|
d414c06fd9 | ||
|
732d9c19bf | ||
|
c4fd45ccf1 | ||
|
afa5a394ab | ||
|
a8a50a87ea | ||
|
54f5352e07 | ||
|
07dfc70276 | ||
|
643931db3d | ||
|
1400310f05 | ||
|
25adfceb3a | ||
|
73bbf89245 | ||
|
a914daf174 | ||
|
76424392e0 | ||
|
0586b0fa47 | ||
|
2484ceb2be | ||
|
f3ca2eeede | ||
|
90bbccfca9 | ||
|
4c401e7a1a | ||
|
ec8a4e23d3 | ||
|
c16c2dc5d3 | ||
|
64b12924bf | ||
|
e393f273e7 | ||
|
3229f442f4 | ||
|
c1578bc747 | ||
|
c1cac1e31a | ||
|
d1effd835f | ||
|
17870cf533 | ||
|
74dc303134 | ||
|
a3967579f8 | ||
|
749497eeb3 | ||
|
8c78b480f9 | ||
|
6b03831495 | ||
|
fbf87a502d | ||
|
def777ae7e | ||
|
8bde2ee61f | ||
|
bc3d8dd89e | ||
|
721c457e61 | ||
|
e512e3fd2f | ||
|
7220ca9778 | ||
|
1fd60631f7 | ||
|
a25d579ab9 | ||
|
7e8da1379e | ||
|
3d38742d1c | ||
|
f961de1108 | ||
|
a09b966cd4 | ||
|
e383980a7e | ||
|
d9e81d0fcf | ||
|
949e0ba648 | ||
|
69cfa179ef | ||
|
4d44fc56e7 | ||
|
19c530c5e7 | ||
|
833fa0bafa | ||
|
3e9a7f80bd | ||
|
9ecf678995 | ||
|
3cb287919e | ||
|
88a5fa0a75 | ||
|
daa0fe7637 | ||
|
0bd60f3317 | ||
|
fad0753b34 | ||
|
d4eed5208f | ||
|
85531cc60d | ||
|
d6613e05d7 | ||
|
0c41b6933e | ||
|
e8e41e611f | ||
|
0c35b5bd79 | ||
|
76c641635b | ||
|
463dc62ae4 | ||
|
12eb9b7bd9 | ||
|
841c2000d3 | ||
|
c0714b85c3 | ||
|
ee8849649b | ||
|
520c1f12ef | ||
|
2f1a984d4f | ||
|
568b9682e0 | ||
|
cf1c8777a4 | ||
|
cd8e810302 | ||
|
0230b34dc5 | ||
|
af8a010448 | ||
|
9aa8a9c5a7 | ||
|
557b1ab15b | ||
|
f2eedff052 | ||
|
b98ba72e0a | ||
|
3b5e3c4d6f | ||
|
218f8564e1 | ||
|
54aaa0fbed | ||
|
c5f9248c3f | ||
|
a2a10ebf03 | ||
|
985f5694c7 | ||
|
249d69a26c | ||
|
6f6801066b | ||
|
e02860af00 | ||
|
0e940e65c7 | ||
|
3c79214727 | ||
|
e3946f458a | ||
|
cd702379fe | ||
|
d2df4cab43 | ||
|
adb6e1cce1 | ||
|
212e105288 | ||
|
1e5ed4e893 | ||
|
1f69b4653b | ||
|
f11af07431 | ||
|
aaa40b8688 | ||
|
2f9d1ef39a | ||
|
32aaef689d | ||
|
eea5a1bcd6 | ||
|
4fcce9ea19 | ||
|
0d711632f2 | ||
|
e09919bc70 | ||
|
6098038968 | ||
|
5832b3e108 | ||
|
469692ca47 | ||
|
79f763fe91 | ||
|
a2aedad005 | ||
|
1502ddefac | ||
|
bd76fab9cb | ||
|
0ab63d73c1 | ||
|
7a1591b3cf | ||
|
9a8b5ae977 | ||
|
47b2601e01 | ||
|
13046202eb | ||
|
3e8e046ee5 | ||
|
85804a80d4 | ||
|
a594342f71 | ||
|
09ecda49d7 | ||
|
e8223cae3d | ||
|
ac2763b47e | ||
|
11ebe1bf05 | ||
|
3268540fc3 | ||
|
d880f54f4b | ||
|
74e0a1b91c | ||
|
909e61fddc | ||
|
3837f99e89 | ||
|
27640fc255 | ||
|
5f54075a8b | ||
|
38158fb941 | ||
|
2e4447baa5 | ||
|
e66bf1fd46 | ||
|
eb241aa1d5 | ||
|
78fab29fa1 | ||
|
6410d93cf8 | ||
|
b0e88b8644 | ||
|
76fc4a34b8 | ||
|
78891078fe | ||
|
5a3a61d88f | ||
|
457c2a879c | ||
|
d368a71398 | ||
|
6ffca132c1 | ||
|
81506b4095 | ||
|
6262643b45 | ||
|
afdb522ced | ||
|
85902a4d4a | ||
|
f7c86c5b4d | ||
|
bf812fa83c | ||
|
d38aa450d7 | ||
|
601180f2d9 | ||
|
7d5bb26fdc | ||
|
8574dcf9da | ||
|
0d8330c8cc | ||
|
45fd07dc33 | ||
|
39cd32e650 | ||
|
c021fbe603 | ||
|
f4b3439206 | ||
|
591003328d | ||
|
82049d8141 | ||
|
cb8c35cd51 | ||
|
9ae28a128a | ||
|
0e6be0e8f8 | ||
|
2c67f47dba | ||
|
7a2c86b67d | ||
|
2c869efcd3 | ||
|
305e2906aa | ||
|
ba43969832 | ||
|
5c55c4901d | ||
|
11e79bdbbb | ||
|
3edb60de7e | ||
|
4dc025b4a8 | ||
|
640d72ab3b | ||
|
2a90a25c93 | ||
|
e0009f10ca | ||
|
c1fa794ed5 | ||
|
5508fe3320 | ||
|
9e9392d5b3 | ||
|
e378cb1341 | ||
|
da340638fd | ||
|
7d47601a35 | ||
|
39a97e24fb | ||
|
869e38eced | ||
|
c2ff55475e | ||
|
5b2726e6b5 | ||
|
b84b5f61ac | ||
|
4634013cde | ||
|
9c31cfc3a2 | ||
|
52ccf6a480 | ||
|
0d44eb6a24 | ||
|
e2170a9f03 | ||
|
7fe2a3d293 | ||
|
414bf401c7 | ||
|
6f36e92cab | ||
|
0e01d09500 | ||
|
260d6ed02c | ||
|
6357a8e311 | ||
|
a39ddd5654 | ||
|
ea97fbf1a1 | ||
|
b97c50db0a | ||
|
d5e6c2374b | ||
|
f138f917ec | ||
|
1be9f2fddc | ||
|
15e7389cf0 | ||
|
a3b46c9ac0 | ||
|
e602cd6988 | ||
|
1fc432984c | ||
|
b615164d75 | ||
|
84e1c47f74 | ||
|
314584ab44 | ||
|
196349dda1 | ||
|
c49212778f | ||
|
bb89aa1430 | ||
|
217d712012 | ||
|
f1a168dc20 | ||
|
58ff219c85 | ||
|
a17d701a70 | ||
|
8b5772ebe4 | ||
|
7f8aec2b2b | ||
|
e66cac359e | ||
|
7cdc62c012 | ||
|
c02f11a04f | ||
|
f1f6bba16d | ||
|
aaf8301a19 | ||
|
bb14e62a7f | ||
|
2f10458831 | ||
|
6526ca720c | ||
|
a64c67dd61 | ||
|
cbfd09843a | ||
|
a99c5b9d0f | ||
|
03a0ad08cf | ||
|
62abaded39 |
26
openbsc/.gitignore
vendored
26
openbsc/.gitignore
vendored
@@ -6,9 +6,9 @@ Makefile.in
|
||||
bscconfig.h
|
||||
bscconfig.h.in
|
||||
openbsc.pc
|
||||
bsc_hack
|
||||
bsc_msc_ip
|
||||
src/osmo-nitb/osmo-nitb
|
||||
bsc_mgcp
|
||||
src/osmo-bsc/osmo-bsc
|
||||
*.*~
|
||||
*.sw?
|
||||
|
||||
@@ -30,22 +30,26 @@ stamp-h1
|
||||
|
||||
# apps and app data
|
||||
hlr.sqlite3
|
||||
bs11_config
|
||||
ipaccess-config
|
||||
ipaccess-find
|
||||
ipaccess-firmware
|
||||
ipaccess-proxy
|
||||
isdnsync
|
||||
bsc_nat
|
||||
osmo-sgsn
|
||||
osmo-gbproxy
|
||||
src/utils/bs11_config
|
||||
src/ipaccess/ipaccess-config
|
||||
src/ipaccess/ipaccess-find
|
||||
src/ipaccess/ipaccess-firmware
|
||||
src/ipaccess/ipaccess-proxy
|
||||
src/utils/isdnsync
|
||||
src/nat/bsc_nat
|
||||
src/gprs/osmo-sgsn
|
||||
src/gprs/osmo-gbproxy
|
||||
src/osmo-bsc_nat/osmo-bsc_nat
|
||||
|
||||
#tests
|
||||
tests/bsc-nat/bsc_nat_test
|
||||
tests/channel/channel_test
|
||||
tests/db/db_test
|
||||
tests/debug/debug_test
|
||||
tests/gsm0408/gsm0408_test
|
||||
tests/mgcp/mgcp_test
|
||||
tests/sccp/sccp_test
|
||||
tests/sms/sms_test
|
||||
tests/timer/timer_test
|
||||
|
||||
src/openbsc.cfg*
|
||||
|
850
openbsc/COPYING
850
openbsc/COPYING
@@ -1,285 +1,624 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
0. Definitions.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
1. Source Code.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
2. Basic Permissions.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
14. Revised Versions of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
NO WARRANTY
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
16. Limitation of Liability.
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
@@ -287,53 +626,36 @@ free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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
|
||||
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 General Public License for more details.
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
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/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
@@ -1,12 +1,13 @@
|
||||
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
|
||||
|
||||
INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
||||
SUBDIRS = include src tests
|
||||
SUBDIRS = doc include src tests
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = openbsc.pc
|
||||
|
||||
BUILT_SOURCES = $(top_srcdir)/.version
|
||||
EXTRA_DIST = git-version-gen
|
||||
$(top_srcdir)/.version:
|
||||
echo $(VERSION) > $@-t && mv $@-t $@
|
||||
dist-hook:
|
||||
|
@@ -43,11 +43,15 @@ AC_ARG_ENABLE([osmo-bsc], [AS_HELP_STRING([--enable-osmo-bsc], [Build the Osmo B
|
||||
])
|
||||
AM_CONDITIONAL(BUILD_BSC, test "x$osmo_ac_build_bsc" = "xyes")
|
||||
|
||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.1.15)
|
||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.1.9)
|
||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.2)
|
||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.0)
|
||||
|
||||
dnl checks for header files
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(dahdi/user.h,,AC_MSG_WARN(DAHDI input driver will not be built))
|
||||
AC_CHECK_HEADERS(dbi/dbd.h,,AC_MSG_ERROR(DBI library is not installed))
|
||||
|
||||
|
||||
dnl Checks for typedefs, structures and compiler characteristics
|
||||
|
||||
@@ -55,13 +59,27 @@ dnl Checks for typedefs, structures and compiler characteristics
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden "
|
||||
AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
|
||||
AC_COMPILE_IFELSE([char foo;],
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
|
||||
[ AC_MSG_RESULT([yes])
|
||||
SYMBOL_VISIBILITY="-fvisibility=hidden"],
|
||||
AC_MSG_RESULT([no]))
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
AC_SUBST(SYMBOL_VISIBILITY)
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
dnl Generate the output
|
||||
AM_CONFIG_HEADER(bscconfig.h)
|
||||
@@ -71,14 +89,27 @@ AC_OUTPUT(
|
||||
include/openbsc/Makefile
|
||||
include/Makefile
|
||||
src/Makefile
|
||||
src/libtrau/Makefile
|
||||
src/libabis/Makefile
|
||||
src/libbsc/Makefile
|
||||
src/libmsc/Makefile
|
||||
src/libmgcp/Makefile
|
||||
src/libcommon/Makefile
|
||||
src/osmo-nitb/Makefile
|
||||
src/osmo-bsc/Makefile
|
||||
src/osmo-bsc_nat/Makefile
|
||||
src/osmo-bsc_mgcp/Makefile
|
||||
src/ipaccess/Makefile
|
||||
src/utils/Makefile
|
||||
src/libgb/Makefile
|
||||
src/gprs/Makefile
|
||||
src/nat/Makefile
|
||||
src/bsc/Makefile
|
||||
tests/Makefile
|
||||
tests/debug/Makefile
|
||||
tests/gsm0408/Makefile
|
||||
tests/db/Makefile
|
||||
tests/channel/Makefile
|
||||
tests/bsc-nat/Makefile
|
||||
tests/mgcp/Makefile
|
||||
doc/Makefile
|
||||
doc/examples/Makefile
|
||||
Makefile)
|
170
openbsc/contrib/a-link/sccp-split-by-con.lua
Normal file
170
openbsc/contrib/a-link/sccp-split-by-con.lua
Normal file
@@ -0,0 +1,170 @@
|
||||
-- Split trace based on SCCP Source
|
||||
-- There are still bugs to find... bugs bugs bugs... hmm
|
||||
do
|
||||
local function init_listener()
|
||||
print("CREATED LISTENER")
|
||||
local tap = Listener.new("ip", "sccp && (ip.src == 172.16.1.81 || ip.dst == 172.16.1.81)")
|
||||
local sccp_type_field = Field.new("sccp.message_type")
|
||||
local sccp_src_field = Field.new("sccp.slr")
|
||||
local sccp_dst_field = Field.new("sccp.dlr")
|
||||
local msg_type_field = Field.new("gsm_a.dtap_msg_mm_type")
|
||||
local lu_rej_field = Field.new("gsm_a.dtap.rej_cause")
|
||||
local ip_src_field = Field.new("ip.src")
|
||||
local ip_dst_field = Field.new("ip.dst")
|
||||
|
||||
--
|
||||
local bssmap_msgtype_field = Field.new("gsm_a.bssmap_msgtype")
|
||||
-- assignment failure 0x03
|
||||
--
|
||||
|
||||
--
|
||||
local dtap_cause_field = Field.new("gsm_a_dtap.cause")
|
||||
local dtap_cc_field = Field.new("gsm_a.dtap_msg_cc_type")
|
||||
|
||||
local connections = {}
|
||||
|
||||
function check_failure(con)
|
||||
check_lu_reject(con)
|
||||
check_disconnect(con)
|
||||
check_failures(con)
|
||||
end
|
||||
|
||||
-- cipher mode reject
|
||||
function check_failures(con)
|
||||
local msgtype = bssmap_msgtype_field()
|
||||
if not msgtype then
|
||||
return
|
||||
end
|
||||
|
||||
msgtype = tonumber(msgtype)
|
||||
if msgtype == 89 then
|
||||
print("Cipher mode reject")
|
||||
con[4] = true
|
||||
elseif msgtype == 0x03 then
|
||||
print("Assignment failure")
|
||||
con[4] = true
|
||||
elseif msgtype == 0x22 then
|
||||
print("Clear Request... RF failure?")
|
||||
con[4] = true
|
||||
end
|
||||
end
|
||||
|
||||
-- check if a DISCONNECT is normal
|
||||
function check_disconnect(con)
|
||||
local msg_type = dtap_cc_field()
|
||||
if not msg_type then
|
||||
return
|
||||
end
|
||||
|
||||
if tonumber(msg_type) ~= 0x25 then
|
||||
return
|
||||
end
|
||||
|
||||
local cause = dtap_cause_field()
|
||||
if not cause then
|
||||
return
|
||||
end
|
||||
|
||||
cause = tonumber(cause)
|
||||
if cause ~= 0x10 then
|
||||
print("DISCONNECT != Normal")
|
||||
con[4] = true
|
||||
end
|
||||
end
|
||||
|
||||
-- check if we have a LU Reject
|
||||
function check_lu_reject(con)
|
||||
local msg_type = msg_type_field()
|
||||
if not msg_type then
|
||||
return
|
||||
end
|
||||
|
||||
msg_type = tonumber(tostring(msg_type))
|
||||
if msg_type == 0x04 then
|
||||
print("LU REJECT with " .. tostring(lu_rej_field()))
|
||||
con[4] = true
|
||||
end
|
||||
end
|
||||
|
||||
function tap.packet(pinfo,tvb,ip)
|
||||
local ip_src = tostring(ip_src_field())
|
||||
local ip_dst = tostring(ip_dst_field())
|
||||
local sccp_type = tonumber(tostring(sccp_type_field()))
|
||||
local sccp_src = sccp_src_field()
|
||||
local sccp_dst = sccp_dst_field()
|
||||
|
||||
local con
|
||||
|
||||
if sccp_type == 0x01 then
|
||||
elseif sccp_type == 0x2 then
|
||||
local src = string.format("%s-%s", ip_src, tostring(sccp_src))
|
||||
local dst = string.format("%s-%s", ip_dst, tostring(sccp_dst))
|
||||
local datestring = os.date("%Y%m%d%H%M%S")
|
||||
local pcap_name = string.format("alink_trace_%s-%s_%s.pcap", src, dst, datestring)
|
||||
local dumper = Dumper.new_for_current(pcap_name)
|
||||
|
||||
local con = { ip_src, tostring(sccp_src), tostring(sccp_dst), false, dumper, pcap_name }
|
||||
|
||||
dumper:dump_current()
|
||||
connections[src] = con
|
||||
connections[dst] = con
|
||||
elseif sccp_type == 0x4 then
|
||||
-- close a connection... remove it from the list
|
||||
local src = string.format("%s-%s", ip_src, tostring(sccp_src))
|
||||
local dst = string.format("%s-%s", ip_dst, tostring(sccp_dst))
|
||||
|
||||
local con = connections[src]
|
||||
if not con then
|
||||
return
|
||||
end
|
||||
|
||||
con[5]:dump_current()
|
||||
con[5]:flush()
|
||||
|
||||
-- this causes a crash on unpacted wireshark
|
||||
con[5]:close()
|
||||
|
||||
-- the connection had a failure
|
||||
if con[4] == true then
|
||||
local datestring = os.date("%Y%m%d%H%M%S")
|
||||
local new_name = string.format("alink_failure_%s_%s-%s.pcap", datestring, con[2], con[3])
|
||||
os.rename(con[6], new_name)
|
||||
else
|
||||
os.remove(con[6])
|
||||
end
|
||||
|
||||
|
||||
-- clear the old connection
|
||||
connections[src] = nil
|
||||
connections[dst] = nil
|
||||
|
||||
elseif sccp_type == 0x5 then
|
||||
-- not handled yet... we should verify stuff here...
|
||||
local dst = string.format("%s-%s", ip_dst, tostring(sccp_dst))
|
||||
local con = connections[dst]
|
||||
if not con then
|
||||
return
|
||||
end
|
||||
con[5]:dump_current()
|
||||
elseif sccp_type == 0x6 then
|
||||
local dst = string.format("%s-%s", ip_dst, tostring(sccp_dst))
|
||||
local con = connections[dst]
|
||||
if not con then
|
||||
print("DON'T KNOW THIS CONNECTION for " .. ip_dst)
|
||||
return
|
||||
end
|
||||
con[5]:dump_current()
|
||||
check_failure(con)
|
||||
end
|
||||
|
||||
end
|
||||
function tap.draw()
|
||||
print("DRAW")
|
||||
end
|
||||
function tap.reset()
|
||||
print("RESET")
|
||||
end
|
||||
end
|
||||
|
||||
init_listener()
|
||||
end
|
1
openbsc/contrib/bsc-test/README
Normal file
1
openbsc/contrib/bsc-test/README
Normal file
@@ -0,0 +1 @@
|
||||
Some crazy scripts call testing... and MSC link failure simulation
|
8
openbsc/contrib/bsc-test/all_dial
Normal file
8
openbsc/contrib/bsc-test/all_dial
Normal file
@@ -0,0 +1,8 @@
|
||||
ABORT BUSY
|
||||
ABORT 'NO CARRIER'
|
||||
ABORT 'OK'
|
||||
|
||||
'' AT
|
||||
SAY "Dialing a number\n"
|
||||
'OK' ATD05660066;
|
||||
|
11
openbsc/contrib/bsc-test/dial.sh
Executable file
11
openbsc/contrib/bsc-test/dial.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# Evil dial script..
|
||||
|
||||
while true;
|
||||
do
|
||||
chat -v -f all_dial < /dev/ttyACM0 > /dev/ttyACM0
|
||||
sleep 5s
|
||||
chat -v -f hangup < /dev/ttyACM0 > /dev/ttyACM0
|
||||
sleep 2s
|
||||
done
|
||||
|
6
openbsc/contrib/bsc-test/drop-oml.sh
Executable file
6
openbsc/contrib/bsc-test/drop-oml.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
sleep 3
|
||||
echo "enable"
|
||||
sleep 1
|
||||
echo "drop bts connection 0 oml"
|
||||
sleep 1
|
8
openbsc/contrib/bsc-test/drop.sh
Executable file
8
openbsc/contrib/bsc-test/drop.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
while true;
|
||||
do
|
||||
echo "Going to drop the OML connection"
|
||||
./drop-oml.sh | telnet 127.0.0.1 4242
|
||||
sleep 58m
|
||||
done
|
4
openbsc/contrib/bsc-test/hangup
Normal file
4
openbsc/contrib/bsc-test/hangup
Normal file
@@ -0,0 +1,4 @@
|
||||
TIMEOUT 10
|
||||
'' ^Z
|
||||
SAY "Waiting for hangup confirm\n"
|
||||
'' ATH;
|
8
openbsc/contrib/bsc-test/msc.sh
Executable file
8
openbsc/contrib/bsc-test/msc.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
while true;
|
||||
do
|
||||
echo "Kill the osmo-bsc"
|
||||
/usr/bin/kill -s SIGUSR2 `pidof osmo-bsc`
|
||||
sleep 58s
|
||||
done
|
80
openbsc/contrib/gprs/gprs-buffer-count.lua
Normal file
80
openbsc/contrib/gprs/gprs-buffer-count.lua
Normal file
@@ -0,0 +1,80 @@
|
||||
-- I count the buffer space needed for LLC PDUs in the worse case and print it
|
||||
|
||||
do
|
||||
local function init_listener()
|
||||
-- handle the port as NS over IP
|
||||
local udp_port_table = DissectorTable.get("udp.port")
|
||||
local gprs_ns_dis = Dissector.get("gprs_ns")
|
||||
udp_port_table:add(23000,gprs_ns_dis)
|
||||
|
||||
-- bssgp filters
|
||||
local bssgp_pdu_get = Field.new("bssgp.pdu_type")
|
||||
local bssgp_delay_get = Field.new("bssgp.delay_val")
|
||||
local llcgprs_get = Field.new("llcgprs")
|
||||
local pdus = nil
|
||||
|
||||
print("START...")
|
||||
|
||||
local tap = Listener.new("ip", "udp.port == 23000 && bssgp.pdu_type == 0")
|
||||
function tap.packet(pinfo,tvb,ip)
|
||||
local pdu = bssgp_pdu_get()
|
||||
local len = llcgprs_get().len
|
||||
local delay = bssgp_delay_get()
|
||||
|
||||
-- only handle bssgp, but we also want the IP frame
|
||||
if not pdu then
|
||||
return
|
||||
end
|
||||
|
||||
if tonumber(tostring(delay)) == 65535 then
|
||||
pdus = { next = pdus,
|
||||
len = len,
|
||||
expires = -1 }
|
||||
else
|
||||
local off = tonumber(tostring(delay)) / 100.0
|
||||
pdus = { next = pdus,
|
||||
len = len,
|
||||
expires = pinfo.rel_ts + off }
|
||||
end
|
||||
local now_time = tonumber(tostring(pinfo.rel_ts))
|
||||
local now_size = 0
|
||||
local l = pdus
|
||||
local prev = nil
|
||||
local count = 0
|
||||
while l do
|
||||
if now_time < l.expires or l.expires == -1 then
|
||||
now_size = now_size + l.len
|
||||
prev = l
|
||||
l = l.next
|
||||
count = count + 1
|
||||
else
|
||||
-- delete things
|
||||
if prev == nil then
|
||||
pdus = nil
|
||||
l = nil
|
||||
else
|
||||
prev.next = l.next
|
||||
l = l.next
|
||||
end
|
||||
end
|
||||
end
|
||||
-- print("TOTAL: " .. now_time .. " PDU_SIZE: " .. now_size)
|
||||
print(now_time .. " " .. now_size / 1024.0 .. " " .. count)
|
||||
-- print("NOW: " .. tostring(pinfo.rel_ts) .. " Delay: " .. tostring(delay) .. " Length: " .. tostring(len))
|
||||
end
|
||||
|
||||
function tap.draw()
|
||||
-- well... this will not be called...
|
||||
-- for ip,bssgp_histo in pairs(dumpers) do
|
||||
-- print("IP " .. ip)
|
||||
-- end
|
||||
print("END")
|
||||
end
|
||||
|
||||
function tap.reset()
|
||||
-- well... this will not be called...
|
||||
end
|
||||
end
|
||||
|
||||
init_listener()
|
||||
end
|
30
openbsc/contrib/nat/test_regexp.c
Normal file
30
openbsc/contrib/nat/test_regexp.c
Normal file
@@ -0,0 +1,30 @@
|
||||
/* make test_regexp */
|
||||
#include <sys/types.h>
|
||||
#include <regex.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
regex_t reg;
|
||||
regmatch_t matches[2];
|
||||
|
||||
if (argc != 4) {
|
||||
printf("Invoke with: test_regexp REGEXP REPLACE NR\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (regcomp(®, argv[1], REG_EXTENDED) != 0) {
|
||||
fprintf(stderr, "Regexp '%s' is not valid.\n", argv[1]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (regexec(®, argv[3], 2, matches, 0) == 0 && matches[1].rm_eo != -1)
|
||||
printf("New Number: %s%s\n", argv[2], &argv[3][matches[1].rm_so]);
|
||||
else
|
||||
printf("No match.\n");
|
||||
|
||||
regfree(®);
|
||||
|
||||
return 0;
|
||||
}
|
66
openbsc/contrib/sms/fill-hlr.st
Normal file
66
openbsc/contrib/sms/fill-hlr.st
Normal file
@@ -0,0 +1,66 @@
|
||||
"I create output for some simple SQL statements for the HLR db"
|
||||
|
||||
|
||||
Eval [
|
||||
|
||||
"Create tables if they don't exist"
|
||||
Transcript show: 'CREATE TABLE SMS (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
created TIMESTAMP NOT NULL,
|
||||
sent TIMESTAMP,
|
||||
sender_id INTEGER NOT NULL,
|
||||
receiver_id INTEGER NOT NULL,
|
||||
deliver_attempts INTEGER NOT NULL DEFAULT 0,
|
||||
valid_until TIMESTAMP,
|
||||
reply_path_req INTEGER NOT NULL,
|
||||
status_rep_req INTEGER NOT NULL,
|
||||
protocol_id INTEGER NOT NULL,
|
||||
data_coding_scheme INTEGER NOT NULL,
|
||||
ud_hdr_ind INTEGER NOT NULL,
|
||||
dest_addr TEXT,
|
||||
user_data BLOB,
|
||||
header BLOB,
|
||||
text TEXT);'; nl;
|
||||
show: 'CREATE TABLE Subscriber (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
created TIMESTAMP NOT NULL,
|
||||
updated TIMESTAMP NOT NULL,
|
||||
imsi NUMERIC UNIQUE NOT NULL,
|
||||
name TEXT,
|
||||
extension TEXT UNIQUE,
|
||||
authorized INTEGER NOT NULL DEFAULT 0,
|
||||
tmsi TEXT UNIQUE,
|
||||
lac INTEGER NOT NULL DEFAULT 0);'; nl.
|
||||
|
||||
"Create some dummy subscribers"
|
||||
num_sub := 1000.
|
||||
num_sms := 30.
|
||||
lac := 1.
|
||||
|
||||
Transcript show: 'BEGIN;'; nl.
|
||||
|
||||
1 to: num_sub do: [:each |
|
||||
Transcript show: 'INSERT INTO Subscriber
|
||||
(imsi, created, updated, authorized, lac, extension)
|
||||
VALUES
|
||||
(%1, datetime(''now''), datetime(''now''), 1, %2, %3);' %
|
||||
{(274090000000000 + each). lac. each}; nl.
|
||||
].
|
||||
|
||||
1 to: num_sms do: [:sms |
|
||||
1 to: num_sub do: [:sub |
|
||||
Transcript show: 'INSERT INTO SMS
|
||||
(created, sender_id, receiver_id, valid_until,
|
||||
reply_path_req, status_rep_req, protocol_id,
|
||||
data_coding_scheme, ud_hdr_ind, dest_addr,
|
||||
text) VALUES
|
||||
(datetime(''now''), 1, %1, ''2222-2-2'',
|
||||
0, 0, 0,
|
||||
0, 0, ''123456'',
|
||||
''abc'');' % {sub}; nl.
|
||||
]
|
||||
].
|
||||
|
||||
Transcript show: 'COMMIT;'; nl.
|
||||
|
||||
]
|
10
openbsc/contrib/sms/hlr-query.st
Normal file
10
openbsc/contrib/sms/hlr-query.st
Normal file
@@ -0,0 +1,10 @@
|
||||
"Query for one SMS"
|
||||
|
||||
Eval [
|
||||
1 to: 100 do: [:each |
|
||||
Transcript show: 'SELECT SMS.* FROM SMS
|
||||
JOIN Subscriber ON SMS.receiver_id = Subscriber.id
|
||||
WHERE SMS.id >= 1 AND SMS.sent IS NULL AND Subscriber.lac > 0
|
||||
ORDER BY SMS.id LIMIT 1;'; nl.
|
||||
].
|
||||
]
|
5
openbsc/contrib/sms/sqlite-probe.tap.d
Normal file
5
openbsc/contrib/sms/sqlite-probe.tap.d
Normal file
@@ -0,0 +1,5 @@
|
||||
probe process("/usr/lib/libsqlite3.so.0.8.6").function("sqlite3_get_table")
|
||||
{
|
||||
a = user_string($zSql);
|
||||
printf("sqlite3_get_table called '%s'\n", a);
|
||||
}
|
11
openbsc/debian/changelog
Normal file
11
openbsc/debian/changelog
Normal file
@@ -0,0 +1,11 @@
|
||||
openbsc (0.9.13.115.eb113-1) natty; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Harald Welte <laforge@gnumonks.org> Wed, 11 May 2011 18:41:24 +0000
|
||||
|
||||
openbsc (0.9.4-1) unstable; urgency=low
|
||||
|
||||
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
|
||||
|
||||
-- Harald Welte <laforge@gnumonks.org> Tue, 24 Aug 2010 13:34:24 +0200
|
1
openbsc/debian/compat
Normal file
1
openbsc/debian/compat
Normal file
@@ -0,0 +1 @@
|
||||
7
|
44
openbsc/debian/control
Normal file
44
openbsc/debian/control
Normal file
@@ -0,0 +1,44 @@
|
||||
Source: openbsc
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Harald Welte <laforge@gnumonks.org>
|
||||
Build-Depends: debhelper (>= 7.0.0~), autotools-dev, pkg-config, libgtp, libosmocore-dev, libosmo-sccp-dev, libdbi0-dev
|
||||
Standards-Version: 3.8.4
|
||||
Homepage: http://openbsc.osmocom.org/
|
||||
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}, libosmocore, libosmo-sccp
|
||||
Description: GSM Base Station Controller; BSC-only version of OpenBSC. Needs a real MSC!
|
||||
|
||||
Package: osmocom-nitb
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libosmocore, libdbd-sqlite3, libdbi0
|
||||
Description: GSM Network-in-a-Box, implements BSC, MSC, SMSC, HLR, VLR
|
||||
|
||||
Package: osmocom-ipaccess-utils
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libosmocore
|
||||
Description: Command line utilities for ip.access nanoBTS
|
||||
|
||||
Package: osmocom-bs11-utils
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libosmocore
|
||||
Description: Command line utilities for Siemens BS-11 BTS
|
||||
|
||||
Package: osmocom-sgsn
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libosmocore, libgtp
|
||||
Description: Osmocom Serving GPRS Support Node
|
||||
|
||||
Package: osmocom-gbproxy
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libosmocore
|
||||
Description: Osmocom GPRS Gb Interface Proxy
|
||||
|
||||
Package: osmocom-bsc-nat
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libosmocore
|
||||
Description: Osmocom Base Station Controller Network Address Translation
|
50
openbsc/debian/copyright
Normal file
50
openbsc/debian/copyright
Normal file
@@ -0,0 +1,50 @@
|
||||
This work was packaged for Debian by:
|
||||
|
||||
Harald Welte <laforge@gnumonks.org> on Tue, 24 Aug 2010 10:55:04 +0200
|
||||
|
||||
It was downloaded from:
|
||||
|
||||
git://bs11-abis.gnumonks.org/openbsc.git
|
||||
|
||||
Upstream Author(s):
|
||||
|
||||
Harald Welte <laforge@gnumonks.org>
|
||||
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".
|
||||
|
||||
# Please also look if there are files or directories which have a
|
||||
# different copyright/license attached and list them here.
|
1
openbsc/debian/docs
Normal file
1
openbsc/debian/docs
Normal file
@@ -0,0 +1 @@
|
||||
README
|
2
openbsc/debian/osmocom-bs11-utils.install
Normal file
2
openbsc/debian/osmocom-bs11-utils.install
Normal file
@@ -0,0 +1,2 @@
|
||||
/usr/bin/bs11_config
|
||||
/usr/bin/isdnsync
|
1
openbsc/debian/osmocom-bsc-nat.install
Normal file
1
openbsc/debian/osmocom-bsc-nat.install
Normal file
@@ -0,0 +1 @@
|
||||
/usr/bin/osmo-bsc_nat
|
1
openbsc/debian/osmocom-bsc.examples
Normal file
1
openbsc/debian/osmocom-bsc.examples
Normal file
@@ -0,0 +1 @@
|
||||
doc/examples/osmo-bsc_mgcp
|
2
openbsc/debian/osmocom-bsc.install
Normal file
2
openbsc/debian/osmocom-bsc.install
Normal file
@@ -0,0 +1,2 @@
|
||||
/usr/bin/bsc_mgcp
|
||||
/usr/bin/osmo-bsc
|
1
openbsc/debian/osmocom-gbproxy.install
Normal file
1
openbsc/debian/osmocom-gbproxy.install
Normal file
@@ -0,0 +1 @@
|
||||
/usr/bin/osmo-gbproxy
|
3
openbsc/debian/osmocom-ipaccess-utils.install
Normal file
3
openbsc/debian/osmocom-ipaccess-utils.install
Normal file
@@ -0,0 +1,3 @@
|
||||
/usr/bin/ipaccess-config
|
||||
/usr/bin/ipaccess-find
|
||||
/usr/bin/ipaccess-proxy
|
2
openbsc/debian/osmocom-nitb.default
Normal file
2
openbsc/debian/osmocom-nitb.default
Normal file
@@ -0,0 +1,2 @@
|
||||
# Configuration file
|
||||
CONFIG_FILE="/etc/osmocom/osmo-nitb.cfg"
|
1
openbsc/debian/osmocom-nitb.examples
Normal file
1
openbsc/debian/osmocom-nitb.examples
Normal file
@@ -0,0 +1 @@
|
||||
doc/examples/osmo-nitb
|
156
openbsc/debian/osmocom-nitb.init
Executable file
156
openbsc/debian/osmocom-nitb.init
Executable file
@@ -0,0 +1,156 @@
|
||||
#!/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
|
||||
DESC=osmo-nitb # Introduce a short description here
|
||||
NAME=osmo-nitb # Introduce the short server's name here
|
||||
DAEMON=/usr/sbin/osmo-nitb # Introduce the server's location here
|
||||
DAEMON_ARGS="-D" # Arguments to run the daemon with
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x $DAEMON ] || exit 0
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
||||
|
||||
# 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 -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 --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|
||||
|| return 1
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --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 --pidfile $PIDFILE --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
|
||||
# Many daemons don't delete their pidfiles when they exit.
|
||||
rm -f $PIDFILE
|
||||
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 $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
openbsc/debian/osmocom-nitb.install
Normal file
1
openbsc/debian/osmocom-nitb.install
Normal file
@@ -0,0 +1 @@
|
||||
/usr/bin/osmo-nitb
|
1
openbsc/debian/osmocom-sgsn.install
Normal file
1
openbsc/debian/osmocom-sgsn.install
Normal file
@@ -0,0 +1 @@
|
||||
/usr/bin/osmo-sgsn
|
29
openbsc/debian/patches/debian-changes-0.9.4-1
Normal file
29
openbsc/debian/patches/debian-changes-0.9.4-1
Normal file
@@ -0,0 +1,29 @@
|
||||
Description: Upstream changes introduced in version 0.9.4-1
|
||||
This patch has been created by dpkg-source during the package build.
|
||||
Here's the last changelog entry, hopefully it gives details on why
|
||||
those changes were made:
|
||||
.
|
||||
openbsc (0.9.4-1) unstable; urgency=low
|
||||
.
|
||||
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
|
||||
.
|
||||
The person named in the Author field signed this changelog entry.
|
||||
Author: Harald Welte <laforge@gnumonks.org>
|
||||
|
||||
---
|
||||
The information above should follow the Patch Tagging Guidelines, please
|
||||
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
||||
are templates for supplementary fields that you might want to add:
|
||||
|
||||
Origin: <vendor|upstream|other>, <url of original patch>
|
||||
Bug: <url in upstream bugtracker>
|
||||
Bug-Debian: http://bugs.debian.org/<bugnumber>
|
||||
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
||||
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
||||
Reviewed-By: <name and email of someone who approved the patch>
|
||||
Last-Update: <YYYY-MM-DD>
|
||||
|
||||
--- /dev/null
|
||||
+++ openbsc-0.9.4/.version
|
||||
@@ -0,0 +1 @@
|
||||
+0.9.4
|
1
openbsc/debian/patches/series
Normal file
1
openbsc/debian/patches/series
Normal file
@@ -0,0 +1 @@
|
||||
debian-changes-0.9.4-1
|
31
openbsc/debian/rules
Executable file
31
openbsc/debian/rules
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
#
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# 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.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
# This has to be exported to make some magic below work.
|
||||
export DH_OPTIONS
|
||||
|
||||
# this requires debhelper 7.0.50 or above, which lenny doesn't have yet!
|
||||
#override_dh_auto_configure:
|
||||
# dh_auto_configure -- --enable-nat --enable-osmo-bsc
|
||||
|
||||
build: build-stamp
|
||||
build-stamp:
|
||||
dh build --before configure
|
||||
dh_auto_configure -- --enable-nat --enable-osmo-bsc
|
||||
dh build --after configure
|
||||
touch build-stamp
|
||||
|
||||
%:
|
||||
dh $@
|
1
openbsc/debian/source/format
Normal file
1
openbsc/debian/source/format
Normal file
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
1
openbsc/doc/Makefile.am
Normal file
1
openbsc/doc/Makefile.am
Normal file
@@ -0,0 +1 @@
|
||||
SUBDIRS = examples
|
@@ -31,46 +31,65 @@ GSM 04.08 3.4.13: RR connection release procedure
|
||||
|
||||
== Implementation in OpenBSC ==
|
||||
|
||||
THIS IS OUTDATED and will be updated...
|
||||
There are two possible reasons a gsm_subscriber_connection
|
||||
will be released. One is a network failure, the other is
|
||||
the completion of an operation/transaction.
|
||||
|
||||
=== Failure ===
|
||||
The BSC API will call the gsm_04_08.c:gsm0408_clear_request callback
|
||||
and the MSC part will release all transactions, operations and such
|
||||
and the channels will be released as error case.
|
||||
|
||||
=== Success ===
|
||||
Every time an 'operation' or 'transaction' is finished msc_release_connection
|
||||
will be called and it will determine if the gsm_subscriber_connection can
|
||||
be released.
|
||||
|
||||
In case it can be released bsc_api.c:gsm0808_clear will be called
|
||||
which will release all lchan's associated with the connection. For the
|
||||
primary channel a SACH Deactivate will be send with the release
|
||||
reason NORMAL RELEASE.
|
||||
|
||||
|
||||
bsc_api.c:gsm0808_clear
|
||||
* Release a channel used for handover
|
||||
* Release the primary lchan with normal release, SACH deactivate
|
||||
|
||||
chan_alloc.c:lchan_release(chan, sach_deactivate, reason)
|
||||
* Start release procedure. It is working in steps with callbacks
|
||||
coming from the abis_rsl.c code.
|
||||
* Release all SAPI's > 0, wait for them to be released
|
||||
* Send SACH Deactivate on SAPI=0
|
||||
* Finally Release the channel
|
||||
|
||||
chan_alloc.c:lchan_auto_release()
|
||||
* checks if use count still > 0 (abort)
|
||||
* calls gsm48_send_rr_release()
|
||||
* which calls rsl_deact_sacch()
|
||||
* calls rsl_release_request()
|
||||
* which sends RLL Link Release request
|
||||
|
||||
RX of RELease INDication:
|
||||
* call rsl_rf_chan_release() (send RF_CHAN_REL)
|
||||
* Calls internal rsl_handle_release which might release the RF.
|
||||
* Informs chan_alloc.c about the release with
|
||||
rsl_lchan_rll_release.
|
||||
|
||||
RX of RELease CONFimem:
|
||||
* call rsl_rf_chan_release() (send RF_CHAN_REL)
|
||||
* Calls internal rsl_handle_release which might release the RF.
|
||||
* Informs chan_alloc.c about the release with
|
||||
rsl_lchan_rll_release.
|
||||
|
||||
* RX of RF_CHAN_REL_ACK
|
||||
* call lchan_free()
|
||||
* subscr_put()
|
||||
* delete release_timer
|
||||
|
||||
|
||||
=== Integration with SMS ===
|
||||
|
||||
* RX of CP_ERROR or unimplemented MT
|
||||
* trigger trans_free() which will lchan_auto_release()
|
||||
* trigger trans_free() which will msc_release_connection()
|
||||
|
||||
* CP TC1* expired while waiting for CP-ACK
|
||||
* trigger trans_free() which will lchan_auto_release()
|
||||
* trigger trans_free() which will msc_release_connection()
|
||||
|
||||
* RX of RP_ERROR
|
||||
* trigger trans_free() which will lchan_auto_release()
|
||||
* trigger trans_free() which will msc_release_connection()
|
||||
|
||||
* TX of CP-ACK in MT DELIVER
|
||||
* trigger trans_free() which will lchan_auto_release()
|
||||
* trigger trans_free() which will msc_release_connection()
|
||||
|
||||
* RX of CP-ACK in MO SUBMIT
|
||||
* trigger trans_free() which will lchan_auto_release()
|
||||
* trigger trans_free() which will msc_release_connection()
|
||||
|
||||
* RX of RP-ACK in MT DELIVER (and no more messages)
|
||||
* trigger rsl_release_request() for SAPI3
|
||||
|
||||
* RX of RP-SMMA in MT DELIVER (and no more messages)
|
||||
* trigger rsl_release_request() for SAPI3
|
||||
|
@@ -52,10 +52,10 @@ int abis_link_event(int event, void *data);
|
||||
signal some event (such as layer 1 connect/disconnect) from the
|
||||
input core to the stack.
|
||||
|
||||
int subch_demux_in(mx, const u_int8_t *data, int len);
|
||||
int subch_demux_in(mx, const uint8_t *data, int len);
|
||||
receive 'len' bytes from a given E1 timeslot (TRAU frames)
|
||||
|
||||
int subchan_mux_out(mx, u_int8_t *data, int len);
|
||||
int subchan_mux_out(mx, uint8_t *data, int len);
|
||||
obtain 'len' bytes of output data to be sent on E1 timeslot
|
||||
|
||||
Intrface by Input Core for Input Plugins
|
||||
@@ -112,8 +112,8 @@ struct e1inp_sign_link {
|
||||
struct llist_head tx_list;
|
||||
|
||||
/* SAPI and TEI on the E1 TS */
|
||||
u_int8_t sapi;
|
||||
u_int8_t tei;
|
||||
uint8_t sapi;
|
||||
uint8_t tei;
|
||||
}
|
||||
|
||||
enum e1inp_ts_type {
|
||||
@@ -140,7 +140,7 @@ struct e1inp_ts {
|
||||
union {
|
||||
struct {
|
||||
/* mISDN driver has one fd for each ts */
|
||||
struct bsc_fd;
|
||||
struct osmo_fd;
|
||||
} misdn;
|
||||
} driver;
|
||||
};
|
||||
@@ -160,7 +160,7 @@ int e1inp_update_ts(struct e1inp_ts *ts);
|
||||
|
||||
/* Receive a packet from the E1 driver */
|
||||
int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg,
|
||||
u_int8_t tei, u_int8_t sapi);
|
||||
uint8_t tei, uint8_t sapi);
|
||||
|
||||
/* Send a packet, callback function in the driver */
|
||||
int e1driver_tx_ts(struct e1inp_ts *ts, struct msgb *msg)
|
||||
|
23
openbsc/doc/examples/Makefile.am
Normal file
23
openbsc/doc/examples/Makefile.am
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
CFG_FILES = find $(srcdir) -name '*.cfg*' | sed -e 's,^$(srcdir),,'
|
||||
|
||||
dist-hook:
|
||||
for f in $$($(CFG_FILES)); do \
|
||||
j="$(distdir)/$$f" && \
|
||||
mkdir -p "$$(dirname $$j)" && \
|
||||
$(INSTALL_DATA) $(srcdir)/$$f $$j; \
|
||||
done
|
||||
|
||||
install-data-hook:
|
||||
for f in $$($(CFG_FILES)); do \
|
||||
j="$(DESTDIR)$(docdir)/examples/$$f" && \
|
||||
mkdir -p "$$(dirname $$j)" && \
|
||||
$(INSTALL_DATA) $(srcdir)/$$f $$j; \
|
||||
done
|
||||
|
||||
uninstall-hook:
|
||||
@$(PRE_UNINSTALL)
|
||||
for f in $$($(CFG_FILES)); do \
|
||||
j="$(DESTDIR)$(docdir)/examples/$$f" && \
|
||||
$(RM) $$j; \
|
||||
done
|
@@ -6,6 +6,8 @@ password foo
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
e1_input
|
||||
e1_line 0 driver misdn
|
||||
network
|
||||
network country code 1
|
||||
mobile network code 1
|
@@ -6,6 +6,8 @@ password foo
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
e1_input
|
||||
e1_line 0 driver misdn
|
||||
network
|
||||
network country code 1
|
||||
mobile network code 1
|
@@ -6,6 +6,8 @@ password foo
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
e1_input
|
||||
e1_line 0 driver misdn
|
||||
network
|
||||
network country code 1
|
||||
mobile network code 1
|
87
openbsc/doc/examples/osmo-nitb/hsl/openbsc.cfg
Normal file
87
openbsc/doc/examples/osmo-nitb/hsl/openbsc.cfg
Normal file
@@ -0,0 +1,87 @@
|
||||
!
|
||||
! OpenBSC (0.9.11.261-32c0) configuration saved from vty
|
||||
!!
|
||||
password foo
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
network
|
||||
network country code 262
|
||||
mobile network code 42
|
||||
short name OpenBSC
|
||||
long name OpenBSC
|
||||
auth policy closed
|
||||
location updating reject cause 13
|
||||
encryption a5 0
|
||||
neci 1
|
||||
paging any use tch 0
|
||||
rrlp mode none
|
||||
mm info 0
|
||||
handover 0
|
||||
handover window rxlev averaging 10
|
||||
handover window rxqual averaging 1
|
||||
handover window rxlev neighbor averaging 10
|
||||
handover power budget interval 6
|
||||
handover power budget hysteresis 3
|
||||
handover maximum distance 9999
|
||||
timer t3101 10
|
||||
timer t3103 0
|
||||
timer t3105 0
|
||||
timer t3107 0
|
||||
timer t3109 0
|
||||
timer t3111 0
|
||||
timer t3113 60
|
||||
timer t3115 0
|
||||
timer t3117 0
|
||||
timer t3119 0
|
||||
timer t3122 0
|
||||
timer t3141 0
|
||||
dtx-used 1
|
||||
subscriber-keep-in-ram 0
|
||||
bts 0
|
||||
type hsl_femto
|
||||
band DCS1800
|
||||
cell_identity 0
|
||||
location_area_code 1
|
||||
training_sequence_code 0
|
||||
base_station_id_code 0
|
||||
ms max power 15
|
||||
cell reselection hysteresis 4
|
||||
rxlev access min 0
|
||||
channel allocator ascending
|
||||
rach tx integer 9
|
||||
rach max transmission 1
|
||||
hsl serial-number 8303701
|
||||
neighbor-list mode automatic
|
||||
gprs mode none
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn 871
|
||||
nominal power 23
|
||||
max_power_red 20
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config CCCH+SDCCH4
|
||||
hopping enabled 0
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
221
openbsc/doc/examples/osmo-nitb/rbs2308/openbsc.cfg
Normal file
221
openbsc/doc/examples/osmo-nitb/rbs2308/openbsc.cfg
Normal file
@@ -0,0 +1,221 @@
|
||||
!
|
||||
! OpenBSC (0.9.11.308-62d46) configuration saved from vty
|
||||
!!
|
||||
password foo
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
network
|
||||
network country code 262
|
||||
mobile network code 42
|
||||
short name OpenBSC
|
||||
long name OpenBSC
|
||||
auth policy closed
|
||||
location updating reject cause 13
|
||||
encryption a5 0
|
||||
neci 0
|
||||
paging any use tch 0
|
||||
rrlp mode none
|
||||
mm info 0
|
||||
handover 0
|
||||
handover window rxlev averaging 10
|
||||
handover window rxqual averaging 1
|
||||
handover window rxlev neighbor averaging 10
|
||||
handover power budget interval 6
|
||||
handover power budget hysteresis 3
|
||||
handover maximum distance 9999
|
||||
timer t3101 10
|
||||
timer t3103 0
|
||||
timer t3105 0
|
||||
timer t3107 0
|
||||
timer t3109 0
|
||||
timer t3111 0
|
||||
timer t3113 60
|
||||
timer t3115 0
|
||||
timer t3117 0
|
||||
timer t3119 0
|
||||
timer t3122 0
|
||||
timer t3141 0
|
||||
dtx-used 0
|
||||
subscriber-keep-in-ram 0
|
||||
bts 0
|
||||
type rbs2000
|
||||
band GSM900
|
||||
cell_identity 0
|
||||
location_area_code 1
|
||||
training_sequence_code 7
|
||||
base_station_id_code 63
|
||||
ms max power 15
|
||||
cell reselection hysteresis 4
|
||||
rxlev access min 0
|
||||
channel allocator descending
|
||||
rach tx integer 9
|
||||
rach max transmission 7
|
||||
oml e1 line 0 timeslot 1 sub-slot full
|
||||
oml e1 tei 62
|
||||
neighbor-list mode automatic
|
||||
gprs mode none
|
||||
is-connection-list add 4 512 12
|
||||
is-connection-list add 16 524 12
|
||||
is-connection-list add 28 536 12
|
||||
is-connection-list add 40 548 12
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn 55
|
||||
nominal power 24
|
||||
max_power_red 12
|
||||
rsl e1 line 0 timeslot 1 sub-slot full
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config CCCH+SDCCH4
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 1 sub-slot full
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 2 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 2 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 2 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 3 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 3 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 3 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 3 sub-slot 3
|
||||
trx 1
|
||||
rf_locked 0
|
||||
arfcn 57
|
||||
nominal power 24
|
||||
max_power_red 12
|
||||
rsl e1 line 0 timeslot 4 sub-slot full
|
||||
rsl e1 tei 1
|
||||
timeslot 0
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 5 sub-slot 0
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 5 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 5 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 5 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 6 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 6 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 6 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 6 sub-slot 3
|
||||
trx 2
|
||||
rf_locked 0
|
||||
arfcn 59
|
||||
nominal power 24
|
||||
max_power_red 12
|
||||
rsl e1 line 0 timeslot 7 sub-slot full
|
||||
rsl e1 tei 2
|
||||
timeslot 0
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 8 sub-slot 0
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 8 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 8 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 8 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 9 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 9 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 9 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 9 sub-slot 3
|
||||
trx 3
|
||||
rf_locked 0
|
||||
arfcn 61
|
||||
nominal power 24
|
||||
max_power_red 12
|
||||
rsl e1 line 0 timeslot 10 sub-slot full
|
||||
rsl e1 tei 3
|
||||
timeslot 0
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 11 sub-slot 0
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 11 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 11 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 11 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 12 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 12 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 12 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 12 sub-slot 3
|
||||
|
||||
e1_input
|
||||
e1_line 0 driver dahdi
|
@@ -12,7 +12,7 @@ specific parameters from channel assignment:
|
||||
|
||||
hopping sequence generation (6.2.3):
|
||||
|
||||
u_int8_t rntable[114] = {
|
||||
uint8_t rntable[114] = {
|
||||
48, 98, 63, 1, 36, 95, 78, 102, 94, 73,
|
||||
0, 64, 25, 81, 76, 59, 124, 23, 104, 100,
|
||||
101, 47, 118, 85, 18, 56, 96, 86, 54, 2,
|
||||
@@ -29,15 +29,15 @@ u_int8_t rntable[114] = {
|
||||
/* mai=0 represents lowest ARFCN in the MA */
|
||||
|
||||
|
||||
u_int8_t hopping_mai(u_int8_t hsn, u_int32_t fn, u_int8_t maio,
|
||||
u_int8_t t1, u_int8_t t2, u_int8_t t3_)
|
||||
uint8_t hopping_mai(uint8_t hsn, uint32_t fn, uint8_t maio,
|
||||
uint8_t t1, uint8_t t2, uint8_t t3_)
|
||||
{
|
||||
u_int8_t mai;
|
||||
uint8_t mai;
|
||||
|
||||
if (hsn == 0) /* cyclic hopping */
|
||||
mai = (fn + maio) % n;
|
||||
else {
|
||||
u_int32_t m, m_, t_, s;
|
||||
uint32_t m, m_, t_, s;
|
||||
|
||||
m = t2 + rntable[(hsn xor (t1 % 64)) + t3];
|
||||
m_ = m % (2^NBIN);
|
||||
|
@@ -10,7 +10,9 @@ noinst_HEADERS = abis_nm.h abis_rsl.h db.h gsm_04_08.h gsm_data.h \
|
||||
crc24.h gprs_bssgp.h gprs_llc.h gprs_ns.h gprs_gmm.h \
|
||||
gb_proxy.h gprs_sgsn.h gsm_04_08_gprs.h sgsn.h \
|
||||
gprs_ns_frgre.h auth.h osmo_msc.h bsc_msc.h bsc_nat.h \
|
||||
osmo_bsc_rf.h osmo_bsc.h network_listen.h bsc_nat_sccp.h
|
||||
osmo_bsc_rf.h osmo_bsc.h network_listen.h bsc_nat_sccp.h \
|
||||
osmo_msc_data.h osmo_bsc_grace.h sms_queue.h abis_om2000.h \
|
||||
bss.h gsm_data_shared.h
|
||||
|
||||
openbsc_HEADERS = gsm_04_08.h meas_rep.h bsc_api.h
|
||||
openbscdir = $(includedir)/openbsc
|
||||
|
@@ -5,33 +5,32 @@
|
||||
* 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 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NM_H
|
||||
#define _NM_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <osmocore/tlv.h>
|
||||
#include <osmocore/protocol/gsm_12_21.h>
|
||||
#include <osmocom/gsm/tlv.h>
|
||||
#include <osmocom/gsm/abis_nm.h>
|
||||
#include <osmocom/gsm/protocol/gsm_12_21.h>
|
||||
|
||||
struct cell_global_id {
|
||||
u_int16_t mcc;
|
||||
u_int16_t mnc;
|
||||
u_int16_t lac;
|
||||
u_int16_t ci;
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint16_t lac;
|
||||
uint16_t ci;
|
||||
};
|
||||
|
||||
/* The BCCH info from an ip.access test, in host byte order
|
||||
@@ -39,26 +38,22 @@ struct cell_global_id {
|
||||
struct ipac_bcch_info {
|
||||
struct llist_head list;
|
||||
|
||||
u_int16_t info_type;
|
||||
u_int8_t freq_qual;
|
||||
u_int16_t arfcn;
|
||||
u_int8_t rx_lev;
|
||||
u_int8_t rx_qual;
|
||||
uint16_t info_type;
|
||||
uint8_t freq_qual;
|
||||
uint16_t arfcn;
|
||||
uint8_t rx_lev;
|
||||
uint8_t rx_qual;
|
||||
int16_t freq_err;
|
||||
u_int16_t frame_offset;
|
||||
u_int32_t frame_nr_offset;
|
||||
u_int8_t bsic;
|
||||
uint16_t frame_offset;
|
||||
uint32_t frame_nr_offset;
|
||||
uint8_t bsic;
|
||||
struct cell_global_id cgi;
|
||||
u_int8_t ba_list_si2[16];
|
||||
u_int8_t ba_list_si2bis[16];
|
||||
u_int8_t ba_list_si2ter[16];
|
||||
u_int8_t ca_list_si1[16];
|
||||
uint8_t ba_list_si2[16];
|
||||
uint8_t ba_list_si2bis[16];
|
||||
uint8_t ba_list_si2ter[16];
|
||||
uint8_t ca_list_si1[16];
|
||||
};
|
||||
|
||||
extern const struct value_string abis_nm_adm_state_names[];
|
||||
extern const struct value_string abis_nm_obj_class_names[];
|
||||
extern const struct tlv_definition nm_att_tlvdef;
|
||||
|
||||
/* PUBLIC */
|
||||
|
||||
struct msgb;
|
||||
@@ -73,60 +68,58 @@ struct abis_nm_cfg {
|
||||
|
||||
extern int abis_nm_rcvmsg(struct msgb *msg);
|
||||
|
||||
int abis_nm_tlv_parse(struct tlv_parsed *tp, struct gsm_bts *bts, const u_int8_t *buf, int len);
|
||||
int abis_nm_tlv_parse(struct tlv_parsed *tp, struct gsm_bts *bts, const uint8_t *buf, int len);
|
||||
int abis_nm_rx(struct msgb *msg);
|
||||
int abis_nm_opstart(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i0, u_int8_t i1, u_int8_t i2);
|
||||
int abis_nm_chg_adm_state(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i0,
|
||||
u_int8_t i1, u_int8_t i2, enum abis_nm_adm_state adm_state);
|
||||
int abis_nm_establish_tei(struct gsm_bts *bts, u_int8_t trx_nr,
|
||||
u_int8_t e1_port, u_int8_t e1_timeslot, u_int8_t e1_subslot,
|
||||
u_int8_t tei);
|
||||
int abis_nm_opstart(struct gsm_bts *bts, uint8_t obj_class, uint8_t i0, uint8_t i1, uint8_t i2);
|
||||
int abis_nm_chg_adm_state(struct gsm_bts *bts, uint8_t obj_class, uint8_t i0,
|
||||
uint8_t i1, uint8_t i2, enum abis_nm_adm_state adm_state);
|
||||
int abis_nm_establish_tei(struct gsm_bts *bts, uint8_t trx_nr,
|
||||
uint8_t e1_port, uint8_t e1_timeslot, uint8_t e1_subslot,
|
||||
uint8_t tei);
|
||||
int abis_nm_conn_terr_sign(struct gsm_bts_trx *trx,
|
||||
u_int8_t e1_port, u_int8_t e1_timeslot, u_int8_t e1_subslot);
|
||||
uint8_t e1_port, uint8_t e1_timeslot, uint8_t e1_subslot);
|
||||
int abis_nm_conn_terr_traf(struct gsm_bts_trx_ts *ts,
|
||||
u_int8_t e1_port, u_int8_t e1_timeslot,
|
||||
u_int8_t e1_subslot);
|
||||
int abis_nm_set_bts_attr(struct gsm_bts *bts, u_int8_t *attr, int attr_len);
|
||||
int abis_nm_set_radio_attr(struct gsm_bts_trx *trx, u_int8_t *attr, int attr_len);
|
||||
int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, u_int8_t chan_comb);
|
||||
int abis_nm_sw_act_req_ack(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i1,
|
||||
u_int8_t i2, u_int8_t i3, int nack, u_int8_t *attr, int att_len);
|
||||
int abis_nm_raw_msg(struct gsm_bts *bts, int len, u_int8_t *msg);
|
||||
uint8_t e1_port, uint8_t e1_timeslot,
|
||||
uint8_t e1_subslot);
|
||||
int abis_nm_set_bts_attr(struct gsm_bts *bts, uint8_t *attr, int attr_len);
|
||||
int abis_nm_set_radio_attr(struct gsm_bts_trx *trx, uint8_t *attr, int attr_len);
|
||||
int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, uint8_t chan_comb);
|
||||
int abis_nm_sw_act_req_ack(struct gsm_bts *bts, uint8_t obj_class, uint8_t i1,
|
||||
uint8_t i2, uint8_t i3, int nack, uint8_t *attr, int att_len);
|
||||
int abis_nm_raw_msg(struct gsm_bts *bts, int len, uint8_t *msg);
|
||||
int abis_nm_event_reports(struct gsm_bts *bts, int on);
|
||||
int abis_nm_reset_resource(struct gsm_bts *bts);
|
||||
int abis_nm_software_load(struct gsm_bts *bts, int trx_nr, const char *fname,
|
||||
u_int8_t win_size, int forced,
|
||||
uint8_t win_size, int forced,
|
||||
gsm_cbfn *cbfn, void *cb_data);
|
||||
int abis_nm_software_load_status(struct gsm_bts *bts);
|
||||
int abis_nm_software_activate(struct gsm_bts *bts, const char *fname,
|
||||
gsm_cbfn *cbfn, void *cb_data);
|
||||
|
||||
int abis_nm_conn_mdrop_link(struct gsm_bts *bts, u_int8_t e1_port0, u_int8_t ts0,
|
||||
u_int8_t e1_port1, u_int8_t ts1);
|
||||
int abis_nm_conn_mdrop_link(struct gsm_bts *bts, uint8_t e1_port0, uint8_t ts0,
|
||||
uint8_t e1_port1, uint8_t ts1);
|
||||
|
||||
int abis_nm_perform_test(struct gsm_bts *bts, u_int8_t obj_class,
|
||||
u_int8_t bts_nr, u_int8_t trx_nr, u_int8_t ts_nr,
|
||||
u_int8_t test_nr, u_int8_t auton_report, struct msgb *msg);
|
||||
|
||||
int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan);
|
||||
int abis_nm_perform_test(struct gsm_bts *bts, uint8_t obj_class,
|
||||
uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
|
||||
uint8_t test_nr, uint8_t auton_report, struct msgb *msg);
|
||||
|
||||
/* Siemens / BS-11 specific */
|
||||
int abis_nm_bs11_reset_resource(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_db_transmission(struct gsm_bts *bts, int begin);
|
||||
int abis_nm_bs11_create_object(struct gsm_bts *bts, enum abis_bs11_objtype type,
|
||||
u_int8_t idx, u_int8_t attr_len, const u_int8_t *attr);
|
||||
int abis_nm_bs11_create_envaBTSE(struct gsm_bts *bts, u_int8_t idx);
|
||||
int abis_nm_bs11_create_bport(struct gsm_bts *bts, u_int8_t idx);
|
||||
uint8_t idx, uint8_t attr_len, const uint8_t *attr);
|
||||
int abis_nm_bs11_create_envaBTSE(struct gsm_bts *bts, uint8_t idx);
|
||||
int abis_nm_bs11_create_bport(struct gsm_bts *bts, uint8_t idx);
|
||||
int abis_nm_bs11_delete_object(struct gsm_bts *bts,
|
||||
enum abis_bs11_objtype type, u_int8_t idx);
|
||||
int abis_nm_bs11_delete_bport(struct gsm_bts *bts, u_int8_t idx);
|
||||
int abis_nm_bs11_conn_oml_tei(struct gsm_bts *bts, u_int8_t e1_port,
|
||||
u_int8_t e1_timeslot, u_int8_t e1_subslot, u_int8_t tei);
|
||||
enum abis_bs11_objtype type, uint8_t idx);
|
||||
int abis_nm_bs11_delete_bport(struct gsm_bts *bts, uint8_t idx);
|
||||
int abis_nm_bs11_conn_oml_tei(struct gsm_bts *bts, uint8_t e1_port,
|
||||
uint8_t e1_timeslot, uint8_t e1_subslot, uint8_t tei);
|
||||
int abis_nm_bs11_get_oml_tei_ts(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_get_serno(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_set_trx_power(struct gsm_bts_trx *trx, u_int8_t level);
|
||||
int abis_nm_bs11_set_trx_power(struct gsm_bts_trx *trx, uint8_t level);
|
||||
int abis_nm_bs11_get_trx_power(struct gsm_bts_trx *trx);
|
||||
int abis_nm_bs11_logon(struct gsm_bts *bts, u_int8_t level, const char *name, int on);
|
||||
int abis_nm_bs11_logon(struct gsm_bts *bts, uint8_t level, const char *name, int on);
|
||||
int abis_nm_bs11_factory_logon(struct gsm_bts *bts, int on);
|
||||
int abis_nm_bs11_infield_logon(struct gsm_bts *bts, int on);
|
||||
int abis_nm_bs11_set_trx1_pw(struct gsm_bts *bts, const char *password);
|
||||
@@ -136,42 +129,36 @@ int abis_nm_bs11_set_pll(struct gsm_bts *bts, int value);
|
||||
int abis_nm_bs11_get_cclk(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_get_state(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_load_swl(struct gsm_bts *bts, const char *fname,
|
||||
u_int8_t win_size, int forced, gsm_cbfn *cbfn);
|
||||
uint8_t win_size, int forced, gsm_cbfn *cbfn);
|
||||
int abis_nm_bs11_set_ext_time(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_set_bport_line_cfg(struct gsm_bts *bts, u_int8_t bport, enum abis_bs11_line_cfg line_cfg);
|
||||
int abis_nm_bs11_get_bport_line_cfg(struct gsm_bts *bts, uint8_t bport);
|
||||
int abis_nm_bs11_set_bport_line_cfg(struct gsm_bts *bts, uint8_t bport, enum abis_bs11_line_cfg line_cfg);
|
||||
int abis_nm_bs11_bsc_disconnect(struct gsm_bts *bts, int reconnect);
|
||||
int abis_nm_bs11_restart(struct gsm_bts *bts);
|
||||
|
||||
/* ip.access nanoBTS specific commands */
|
||||
int abis_nm_ipaccess_msg(struct gsm_bts *bts, u_int8_t msg_type,
|
||||
u_int8_t obj_class, u_int8_t bts_nr,
|
||||
u_int8_t trx_nr, u_int8_t ts_nr,
|
||||
u_int8_t *attr, int attr_len);
|
||||
int abis_nm_ipaccess_set_nvattr(struct gsm_bts_trx *trx, u_int8_t *attr,
|
||||
int abis_nm_ipaccess_msg(struct gsm_bts *bts, uint8_t msg_type,
|
||||
uint8_t obj_class, uint8_t bts_nr,
|
||||
uint8_t trx_nr, uint8_t ts_nr,
|
||||
uint8_t *attr, int attr_len);
|
||||
int abis_nm_ipaccess_set_nvattr(struct gsm_bts_trx *trx, uint8_t *attr,
|
||||
int attr_len);
|
||||
int abis_nm_ipaccess_restart(struct gsm_bts_trx *trx);
|
||||
int abis_nm_ipaccess_set_attr(struct gsm_bts *bts, u_int8_t obj_class,
|
||||
u_int8_t bts_nr, u_int8_t trx_nr, u_int8_t ts_nr,
|
||||
u_int8_t *attr, u_int8_t attr_len);
|
||||
int abis_nm_ipaccess_set_attr(struct gsm_bts *bts, uint8_t obj_class,
|
||||
uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
|
||||
uint8_t *attr, uint8_t attr_len);
|
||||
int abis_nm_ipaccess_rsl_connect(struct gsm_bts_trx *trx,
|
||||
u_int32_t ip, u_int16_t port, u_int8_t stream);
|
||||
void abis_nm_ipaccess_cgi(u_int8_t *buf, struct gsm_bts *bts);
|
||||
int ipac_parse_bcch_info(struct ipac_bcch_info *binf, u_int8_t *buf);
|
||||
const char *ipacc_testres_name(u_int8_t res);
|
||||
uint32_t ip, uint16_t port, uint8_t stream);
|
||||
void abis_nm_ipaccess_cgi(uint8_t *buf, struct gsm_bts *bts);
|
||||
int ipac_parse_bcch_info(struct ipac_bcch_info *binf, uint8_t *buf);
|
||||
const char *ipacc_testres_name(uint8_t res);
|
||||
|
||||
/* Functions calling into other code parts */
|
||||
enum nm_evt {
|
||||
EVT_STATECHG_OPER,
|
||||
EVT_STATECHG_ADM,
|
||||
};
|
||||
int nm_state_event(enum nm_evt evt, u_int8_t obj_class, void *obj,
|
||||
struct gsm_nm_state *old_state, struct gsm_nm_state *new_state,
|
||||
struct abis_om_obj_inst *obj_inst);
|
||||
|
||||
const char *nm_opstate_name(u_int8_t os);
|
||||
const char *nm_avail_name(u_int8_t avail);
|
||||
int nm_is_running(struct gsm_nm_state *s);
|
||||
|
||||
int abis_nm_vty_init(void);
|
||||
|
||||
void abis_nm_clear_queue(struct gsm_bts *bts);
|
||||
|
||||
|
||||
#endif /* _NM_H */
|
||||
|
98
openbsc/include/openbsc/abis_om2000.h
Normal file
98
openbsc/include/openbsc/abis_om2000.h
Normal file
@@ -0,0 +1,98 @@
|
||||
#ifndef OPENBSC_ABIS_OM2K_H
|
||||
#define OPENBSC_ABIS_OM2K_H
|
||||
/* Ericsson RBS 2xxx GSM O&M (OM2000) messages on the A-bis interface
|
||||
* implemented based on protocol trace analysis, no formal documentation */
|
||||
|
||||
/* (C) 2010-2011 by Harald Welte <laforge@gnumonks.org>
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
enum abis_om2k_mo_cls {
|
||||
OM2K_MO_CLS_TRXC = 0x01,
|
||||
OM2K_MO_CLS_TS = 0x03,
|
||||
OM2K_MO_CLS_TF = 0x04,
|
||||
OM2K_MO_CLS_IS = 0x05,
|
||||
OM2K_MO_CLS_CON = 0x06,
|
||||
OM2K_MO_CLS_DP = 0x07,
|
||||
OM2K_MO_CLS_CF = 0x0a,
|
||||
OM2K_MO_CLS_TX = 0x0b,
|
||||
OM2K_MO_CLS_RX = 0x0c,
|
||||
};
|
||||
|
||||
enum om2k_mo_state {
|
||||
OM2K_MO_S_RESET = 0,
|
||||
OM2K_MO_S_STARTED,
|
||||
OM2K_MO_S_ENABLED,
|
||||
OM2K_MO_S_DISABLED,
|
||||
};
|
||||
|
||||
struct abis_om2k_mo {
|
||||
uint8_t class;
|
||||
uint8_t bts;
|
||||
uint8_t assoc_so;
|
||||
uint8_t inst;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* on-wire format for IS conn group */
|
||||
struct om2k_is_conn_grp {
|
||||
uint16_t icp1;
|
||||
uint16_t icp2;
|
||||
uint8_t cont_idx;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* internal data formant for IS conn group */
|
||||
struct is_conn_group {
|
||||
struct llist_head list;
|
||||
uint16_t icp1;
|
||||
uint16_t icp2;
|
||||
uint8_t ci;
|
||||
};
|
||||
|
||||
extern const struct abis_om2k_mo om2k_mo_cf;
|
||||
extern const struct abis_om2k_mo om2k_mo_is;
|
||||
extern const struct abis_om2k_mo om2k_mo_con;
|
||||
extern const struct abis_om2k_mo om2k_mo_tf;
|
||||
|
||||
extern const struct value_string om2k_mo_class_short_vals[];
|
||||
|
||||
int abis_om2k_rcvmsg(struct msgb *msg);
|
||||
|
||||
extern const struct abis_om2k_mo om2k_mo_cf;
|
||||
|
||||
int abis_om2k_tx_reset_cmd(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_start_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_status_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_connect_cmd(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_disconnect_cmd(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_enable_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_disable_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_test_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_op_info(struct gsm_bts *bts, const struct abis_om2k_mo *mo,
|
||||
uint8_t operational);
|
||||
int abis_om2k_tx_is_conf_req(struct gsm_bts *bts);
|
||||
int abis_om2k_tx_tf_conf_req(struct gsm_bts *bts);
|
||||
int abis_om2k_tx_rx_conf_req(struct gsm_bts_trx *trx);
|
||||
int abis_om2k_tx_tx_conf_req(struct gsm_bts_trx *trx);
|
||||
int abis_om2k_tx_ts_conf_req(struct gsm_bts_trx_ts *ts);
|
||||
|
||||
int abis_om2k_vty_init(void);
|
||||
|
||||
struct vty;
|
||||
void abis_om2k_config_write_bts(struct vty *vty, struct gsm_bts *bts);
|
||||
|
||||
#endif /* OPENBCS_ABIS_OM2K_H */
|
@@ -5,82 +5,83 @@
|
||||
* 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 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _RSL_H
|
||||
#define _RSL_H
|
||||
|
||||
#include <osmocore/protocol/gsm_08_58.h>
|
||||
#include <osmocom/gsm/protocol/gsm_08_58.h>
|
||||
|
||||
#include <osmocore/msgb.h>
|
||||
#include <osmocom/core/msgb.h>
|
||||
|
||||
int rsl_bcch_info(struct gsm_bts_trx *trx, u_int8_t type,
|
||||
const u_int8_t *data, int len);
|
||||
int rsl_sacch_filling(struct gsm_bts_trx *trx, u_int8_t type,
|
||||
const u_int8_t *data, int len);
|
||||
int rsl_chan_activate(struct gsm_bts_trx *trx, u_int8_t chan_nr,
|
||||
u_int8_t act_type,
|
||||
struct gsm_bts;
|
||||
struct gsm_lchan;
|
||||
struct gsm_subscriber;
|
||||
struct gsm_bts_trx_ts;
|
||||
|
||||
|
||||
int rsl_bcch_info(struct gsm_bts_trx *trx, uint8_t type,
|
||||
const uint8_t *data, int len);
|
||||
int rsl_sacch_filling(struct gsm_bts_trx *trx, uint8_t type,
|
||||
const uint8_t *data, int len);
|
||||
int rsl_chan_activate(struct gsm_bts_trx *trx, uint8_t chan_nr,
|
||||
uint8_t act_type,
|
||||
struct rsl_ie_chan_mode *chan_mode,
|
||||
struct rsl_ie_chan_ident *chan_ident,
|
||||
u_int8_t bs_power, u_int8_t ms_power,
|
||||
u_int8_t ta);
|
||||
int rsl_chan_activate_lchan(struct gsm_lchan *lchan, u_int8_t act_type,
|
||||
u_int8_t ta, u_int8_t ho_ref);
|
||||
uint8_t bs_power, uint8_t ms_power,
|
||||
uint8_t ta);
|
||||
int rsl_chan_activate_lchan(struct gsm_lchan *lchan, uint8_t act_type,
|
||||
uint8_t ta, uint8_t ho_ref);
|
||||
int rsl_chan_mode_modify_req(struct gsm_lchan *ts);
|
||||
int rsl_encryption_cmd(struct msgb *msg);
|
||||
int rsl_paging_cmd(struct gsm_bts *bts, u_int8_t paging_group, u_int8_t len,
|
||||
u_int8_t *ms_ident, u_int8_t chan_needed);
|
||||
int rsl_paging_cmd_subscr(struct gsm_bts *bts, u_int8_t chan_needed,
|
||||
struct gsm_subscriber *subscr);
|
||||
int rsl_imm_assign_cmd(struct gsm_bts *bts, u_int8_t len, u_int8_t *val);
|
||||
int rsl_paging_cmd(struct gsm_bts *bts, uint8_t paging_group, uint8_t len,
|
||||
uint8_t *ms_ident, uint8_t chan_needed);
|
||||
int rsl_imm_assign_cmd(struct gsm_bts *bts, uint8_t len, uint8_t *val);
|
||||
|
||||
int rsl_data_request(struct msgb *msg, u_int8_t link_id);
|
||||
int rsl_establish_request(struct gsm_lchan *lchan, u_int8_t link_id);
|
||||
int rsl_relase_request(struct gsm_lchan *lchan, u_int8_t link_id);
|
||||
int rsl_data_request(struct msgb *msg, uint8_t link_id);
|
||||
int rsl_establish_request(struct gsm_lchan *lchan, uint8_t link_id);
|
||||
int rsl_relase_request(struct gsm_lchan *lchan, uint8_t link_id);
|
||||
|
||||
/* Siemens vendor-specific RSL extensions */
|
||||
int rsl_siemens_mrpci(struct gsm_lchan *lchan, struct rsl_mrpci *mrpci);
|
||||
|
||||
/* ip.access specfic RSL extensions */
|
||||
int rsl_ipacc_crcx(struct gsm_lchan *lchan);
|
||||
int rsl_ipacc_mdcx(struct gsm_lchan *lchan, u_int32_t ip,
|
||||
u_int16_t port, u_int8_t rtp_payload2);
|
||||
int rsl_ipacc_mdcx(struct gsm_lchan *lchan, uint32_t ip,
|
||||
uint16_t port, uint8_t rtp_payload2);
|
||||
int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan);
|
||||
int rsl_ipacc_pdch_activate(struct gsm_lchan *lchan, int act);
|
||||
int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act);
|
||||
|
||||
int abis_rsl_rcvmsg(struct msgb *msg);
|
||||
|
||||
unsigned int get_paging_group(u_int64_t imsi, unsigned int bs_cc_chans,
|
||||
int n_pag_blocks);
|
||||
unsigned int n_pag_blocks(int bs_ccch_sdcch_comb, unsigned int bs_ag_blks_res);
|
||||
u_int64_t str_to_imsi(const char *imsi_str);
|
||||
u_int8_t lchan2chan_nr(const struct gsm_lchan *lchan);
|
||||
int rsl_release_request(struct gsm_lchan *lchan, u_int8_t link_id, u_int8_t reason);
|
||||
uint64_t str_to_imsi(const char *imsi_str);
|
||||
int rsl_release_request(struct gsm_lchan *lchan, uint8_t link_id, uint8_t reason);
|
||||
|
||||
int rsl_lchan_set_state(struct gsm_lchan *lchan, int);
|
||||
|
||||
/* to be provided by external code */
|
||||
int abis_rsl_sendmsg(struct msgb *msg);
|
||||
int rsl_deact_sacch(struct gsm_lchan *lchan);
|
||||
int rsl_lchan_rll_release(struct gsm_lchan *lchan, u_int8_t link_id);
|
||||
int rsl_lchan_rll_release(struct gsm_lchan *lchan, uint8_t link_id);
|
||||
|
||||
/* BCCH related code */
|
||||
int rsl_ccch_conf_to_bs_cc_chans(int ccch_conf);
|
||||
int rsl_ccch_conf_to_bs_ccch_sdcch_comb(int ccch_conf);
|
||||
int rsl_number_of_paging_subchannels(struct gsm_bts *bts);
|
||||
|
||||
int rsl_sacch_info_modify(struct gsm_lchan *lchan, uint8_t type,
|
||||
const uint8_t *data, int len);
|
||||
|
||||
int rsl_chan_bs_power_ctrl(struct gsm_lchan *lchan, unsigned int fpc, int db);
|
||||
int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan, unsigned int fpc, int dbm);
|
||||
|
@@ -4,6 +4,13 @@
|
||||
struct gsm_auth_tuple;
|
||||
struct gsm_subscriber;
|
||||
|
||||
enum auth_action {
|
||||
AUTH_NOT_AVAIL = 0, /* No auth tuple available */
|
||||
AUTH_DO_AUTH_THAN_CIPH = 1, /* Firsth authenticate, then cipher */
|
||||
AUTH_DO_CIPH = 2, /* Only ciphering */
|
||||
AUTH_DO_AUTH = 3, /* Only authentication, no ciphering */
|
||||
};
|
||||
|
||||
int auth_get_tuple_for_subscr(struct gsm_auth_tuple *atuple,
|
||||
struct gsm_subscriber *subscr, int key_seq);
|
||||
|
||||
|
@@ -12,25 +12,24 @@ struct bsc_api {
|
||||
void (*sapi_n_reject)(struct gsm_subscriber_connection *conn, int dlci);
|
||||
void (*cipher_mode_compl)(struct gsm_subscriber_connection *conn,
|
||||
struct msgb *msg, uint8_t chosen_encr);
|
||||
void (*cipher_mode_reject)(struct gsm_subscriber_connection *conn,
|
||||
struct msgb *msg, uint16_t reason);
|
||||
int (*compl_l3)(struct gsm_subscriber_connection *conn,
|
||||
struct msgb *msg, uint16_t chosen_channel);
|
||||
void (*dtap)(struct gsm_subscriber_connection *conn, struct msgb *msg);
|
||||
void (*dtap)(struct gsm_subscriber_connection *conn, uint8_t link_id,
|
||||
struct msgb *msg);
|
||||
void (*assign_compl)(struct gsm_subscriber_connection *conn,
|
||||
uint16_t rr_cause);
|
||||
uint8_t rr_cause, uint8_t chosen_channel,
|
||||
uint8_t encr_alg_id, uint8_t speech_mode);
|
||||
void (*assign_fail)(struct gsm_subscriber_connection *conn,
|
||||
uint16_t rr_cause);
|
||||
void (*clear_request)(struct gsm_subscriber_connection *conn,
|
||||
uint8_t cause, uint8_t *rr_cause);
|
||||
int (*clear_request)(struct gsm_subscriber_connection *conn,
|
||||
uint32_t cause);
|
||||
void (*clear_compl)(struct gsm_subscriber_connection *conn);
|
||||
};
|
||||
|
||||
int bsc_api_init(struct gsm_network *network, struct bsc_api *api);
|
||||
int gsm0808_submit_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg, int link_id);
|
||||
int gsm0808_assign_req(struct gsm_subscriber_connection *conn, int chan_type, int audio);
|
||||
int gsm0808_submit_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg, int link_id, int allow_sach);
|
||||
int gsm0808_assign_req(struct gsm_subscriber_connection *conn, int chan_mode, int full_rate);
|
||||
int gsm0808_cipher_mode(struct gsm_subscriber_connection *conn, int cipher,
|
||||
uint8_t *key, int len);
|
||||
const uint8_t *key, int len, int include_imeisv);
|
||||
int gsm0808_page(struct gsm_bts *bts, unsigned int page_group,
|
||||
unsigned int mi_len, uint8_t *mi, int chan_type);
|
||||
int gsm0808_clear(struct gsm_subscriber_connection *conn);
|
||||
|
@@ -5,43 +5,50 @@
|
||||
* 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 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BSC_MSC_H
|
||||
#define BSC_MSC_H
|
||||
|
||||
#include <osmocore/write_queue.h>
|
||||
#include <osmocore/timer.h>
|
||||
#include <osmocom/core/write_queue.h>
|
||||
#include <osmocom/core/timer.h>
|
||||
|
||||
struct bsc_msc_dest {
|
||||
struct llist_head list;
|
||||
|
||||
char *ip;
|
||||
int port;
|
||||
int dscp;
|
||||
};
|
||||
|
||||
|
||||
struct bsc_msc_connection {
|
||||
struct write_queue write_queue;
|
||||
struct osmo_wqueue write_queue;
|
||||
int is_connected;
|
||||
int is_authenticated;
|
||||
int first_contact;
|
||||
const char *ip;
|
||||
int port;
|
||||
int prio;
|
||||
|
||||
struct llist_head *dests;
|
||||
|
||||
void (*connection_loss) (struct bsc_msc_connection *);
|
||||
void (*connected) (struct bsc_msc_connection *);
|
||||
struct timer_list reconnect_timer;
|
||||
struct timer_list timeout_timer;
|
||||
struct osmo_timer_list reconnect_timer;
|
||||
struct osmo_timer_list timeout_timer;
|
||||
};
|
||||
|
||||
struct bsc_msc_connection *bsc_msc_create(const char *ip, int port, int prio);
|
||||
struct bsc_msc_connection *bsc_msc_create(void *ctx, struct llist_head *dest);
|
||||
int bsc_msc_connect(struct bsc_msc_connection *);
|
||||
void bsc_msc_schedule_connect(struct bsc_msc_connection *);
|
||||
|
||||
|
@@ -1,21 +1,20 @@
|
||||
/*
|
||||
* (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2010 by On-Waves
|
||||
* (C) 2010-2011 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2010-2011 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 General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,35 +23,49 @@
|
||||
|
||||
#include "mgcp.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <osmocore/select.h>
|
||||
#include <osmocore/msgb.h>
|
||||
#include <osmocore/timer.h>
|
||||
#include <osmocore/write_queue.h>
|
||||
#include <osmocore/rate_ctr.h>
|
||||
#include <osmocore/statistics.h>
|
||||
#include <osmocom/core/select.h>
|
||||
#include <osmocom/core/msgb.h>
|
||||
#include <osmocom/core/msgfile.h>
|
||||
#include <osmocom/core/timer.h>
|
||||
#include <osmocom/core/write_queue.h>
|
||||
#include <osmocom/core/rate_ctr.h>
|
||||
#include <osmocom/core/statistics.h>
|
||||
#include <osmocom/gsm/protocol/gsm_04_08.h>
|
||||
|
||||
#include <regex.h>
|
||||
|
||||
#define DIR_BSC 1
|
||||
#define DIR_MSC 2
|
||||
|
||||
#define NAT_IPAC_PROTO_MGCP 0xfc
|
||||
#define PAGIN_GROUP_UNASSIGNED -1
|
||||
|
||||
struct sccp_source_reference;
|
||||
struct sccp_connections;
|
||||
struct bsc_nat_parsed;
|
||||
struct bsc_nat;
|
||||
struct bsc_nat_ussd_con;
|
||||
|
||||
enum {
|
||||
NAT_CON_TYPE_NONE,
|
||||
NAT_CON_TYPE_LU,
|
||||
NAT_CON_TYPE_CM_SERV_REQ,
|
||||
NAT_CON_TYPE_PAG_RESP,
|
||||
NAT_CON_TYPE_SSA,
|
||||
NAT_CON_TYPE_LOCAL_REJECT,
|
||||
NAT_CON_TYPE_OTHER,
|
||||
};
|
||||
|
||||
/*
|
||||
* Is this terminated to the MSC, to the local machine (release
|
||||
* handling for IMSI filtering) or to a USSD provider?
|
||||
*/
|
||||
enum {
|
||||
NAT_CON_END_MSC,
|
||||
NAT_CON_END_LOCAL,
|
||||
NAT_CON_END_USSD,
|
||||
};
|
||||
|
||||
/*
|
||||
* Per BSC data structure
|
||||
*/
|
||||
@@ -63,17 +76,23 @@ struct bsc_connection {
|
||||
int authenticated;
|
||||
|
||||
/* the fd we use to communicate */
|
||||
struct write_queue write_queue;
|
||||
struct osmo_wqueue write_queue;
|
||||
|
||||
/* the BSS associated */
|
||||
struct bsc_config *cfg;
|
||||
|
||||
/* a timeout node */
|
||||
struct timer_list id_timeout;
|
||||
struct osmo_timer_list id_timeout;
|
||||
|
||||
/* pong timeout */
|
||||
struct timer_list ping_timeout;
|
||||
struct timer_list pong_timeout;
|
||||
struct osmo_timer_list ping_timeout;
|
||||
struct osmo_timer_list pong_timeout;
|
||||
|
||||
/* mgcp related code */
|
||||
char *_endpoint_status;
|
||||
int number_multiplexes;
|
||||
int max_endpoints;
|
||||
int last_endpoint;
|
||||
|
||||
/* a back pointer */
|
||||
struct bsc_nat *nat;
|
||||
@@ -92,6 +111,14 @@ enum bsc_cfg_ctr {
|
||||
BCFG_CTR_NET_RECONN,
|
||||
BCFG_CTR_DROPPED_SCCP,
|
||||
BCFG_CTR_DROPPED_CALLS,
|
||||
BCFG_CTR_REJECTED_CR,
|
||||
BCFG_CTR_REJECTED_MSG,
|
||||
BCFG_CTR_ILL_PACKET,
|
||||
BCFG_CTR_CON_TYPE_LU,
|
||||
BCFG_CTR_CON_CMSERV_RQ,
|
||||
BCFG_CTR_CON_PAG_RESP,
|
||||
BCFG_CTR_CON_SSA,
|
||||
BCFG_CTR_CON_OTHER,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -101,7 +128,6 @@ struct bsc_config {
|
||||
struct llist_head entry;
|
||||
|
||||
char *token;
|
||||
unsigned int lac;
|
||||
int nr;
|
||||
|
||||
char *description;
|
||||
@@ -110,17 +136,38 @@ struct bsc_config {
|
||||
char *acc_lst_name;
|
||||
|
||||
int forbid_paging;
|
||||
int paging_group;
|
||||
|
||||
/* audio handling */
|
||||
int max_endpoints;
|
||||
|
||||
/* backpointer */
|
||||
struct bsc_nat *nat;
|
||||
|
||||
struct bsc_config_stats stats;
|
||||
|
||||
struct llist_head lac_list;
|
||||
};
|
||||
|
||||
struct bsc_lac_entry {
|
||||
struct llist_head entry;
|
||||
uint16_t lac;
|
||||
};
|
||||
|
||||
struct bsc_nat_paging_group {
|
||||
struct llist_head entry;
|
||||
|
||||
/* list of lac entries */
|
||||
struct llist_head lists;
|
||||
int nr;
|
||||
};
|
||||
|
||||
/**
|
||||
* BSCs point of view of endpoints
|
||||
*/
|
||||
struct bsc_endpoint {
|
||||
/* the operation that is carried out */
|
||||
int transaction_state;
|
||||
/* the pending transaction id */
|
||||
char *transaction_id;
|
||||
/* the bsc we are talking to */
|
||||
@@ -132,23 +179,35 @@ struct bsc_endpoint {
|
||||
*/
|
||||
struct bsc_nat_statistics {
|
||||
struct {
|
||||
struct counter *conn;
|
||||
struct counter *calls;
|
||||
struct osmo_counter *conn;
|
||||
struct osmo_counter *calls;
|
||||
} sccp;
|
||||
|
||||
struct {
|
||||
struct counter *reconn;
|
||||
struct counter *auth_fail;
|
||||
struct osmo_counter *reconn;
|
||||
struct osmo_counter *auth_fail;
|
||||
} bsc;
|
||||
|
||||
struct {
|
||||
struct counter *reconn;
|
||||
struct osmo_counter *reconn;
|
||||
} msc;
|
||||
|
||||
struct {
|
||||
struct osmo_counter *reconn;
|
||||
} ussd;
|
||||
};
|
||||
|
||||
enum bsc_nat_acc_ctr {
|
||||
ACC_LIST_BSC_FILTER,
|
||||
ACC_LIST_NAT_FILTER,
|
||||
};
|
||||
|
||||
struct bsc_nat_acc_lst {
|
||||
struct llist_head list;
|
||||
|
||||
/* counter */
|
||||
struct rate_ctr_group *stats;
|
||||
|
||||
/* the name of the list */
|
||||
const char *name;
|
||||
struct llist_head fltr_list;
|
||||
@@ -177,6 +236,9 @@ struct bsc_nat {
|
||||
/* access lists */
|
||||
struct llist_head access_lists;
|
||||
|
||||
/* paging groups */
|
||||
struct llist_head paging_groups;
|
||||
|
||||
/* known BSC's */
|
||||
struct llist_head bsc_configs;
|
||||
int num_bsc;
|
||||
@@ -184,13 +246,12 @@ struct bsc_nat {
|
||||
|
||||
/* MGCP config */
|
||||
struct mgcp_config *mgcp_cfg;
|
||||
struct write_queue mgcp_queue;
|
||||
uint8_t mgcp_msg[4096];
|
||||
int mgcp_length;
|
||||
|
||||
/* msc things */
|
||||
char *msc_ip;
|
||||
int msc_port;
|
||||
struct llist_head dests;
|
||||
struct bsc_msc_dest *main_dest;
|
||||
struct bsc_msc_connection *msc_con;
|
||||
char *token;
|
||||
|
||||
@@ -204,13 +265,47 @@ struct bsc_nat {
|
||||
/* filter */
|
||||
char *acc_lst_name;
|
||||
|
||||
/* number rewriting */
|
||||
char *num_rewr_name;
|
||||
struct llist_head num_rewr;
|
||||
|
||||
char *smsc_rewr_name;
|
||||
struct llist_head smsc_rewr;
|
||||
char *tpdest_match_name;
|
||||
struct llist_head tpdest_match;
|
||||
|
||||
/* USSD messages we want to match */
|
||||
char *ussd_lst_name;
|
||||
char *ussd_query;
|
||||
regex_t ussd_query_re;
|
||||
char *ussd_token;
|
||||
char *ussd_local;
|
||||
struct osmo_fd ussd_listen;
|
||||
struct bsc_nat_ussd_con *ussd_con;
|
||||
|
||||
/* for maintainenance */
|
||||
int blocked;
|
||||
|
||||
/* statistics */
|
||||
struct bsc_nat_statistics stats;
|
||||
};
|
||||
|
||||
struct bsc_nat_ussd_con {
|
||||
struct osmo_wqueue queue;
|
||||
struct bsc_nat *nat;
|
||||
int authorized;
|
||||
|
||||
struct osmo_timer_list auth_timeout;
|
||||
};
|
||||
|
||||
/* create and init the structures */
|
||||
struct bsc_config *bsc_config_alloc(struct bsc_nat *nat, const char *token, unsigned int lac);
|
||||
struct bsc_config *bsc_config_alloc(struct bsc_nat *nat, const char *token);
|
||||
struct bsc_config *bsc_config_num(struct bsc_nat *nat, int num);
|
||||
void bsc_config_free(struct bsc_config *);
|
||||
void bsc_config_add_lac(struct bsc_config *cfg, int lac);
|
||||
void bsc_config_del_lac(struct bsc_config *cfg, int lac);
|
||||
int bsc_config_handles_lac(struct bsc_config *cfg, int lac);
|
||||
|
||||
struct bsc_nat *bsc_nat_alloc(void);
|
||||
struct bsc_connection *bsc_connection_alloc(struct bsc_nat *nat);
|
||||
void bsc_nat_set_msc_ip(struct bsc_nat *bsc, const char *ip);
|
||||
@@ -230,13 +325,15 @@ struct bsc_nat_parsed *bsc_nat_parse(struct msgb *msg);
|
||||
*/
|
||||
int bsc_nat_filter_ipa(int direction, struct msgb *msg, struct bsc_nat_parsed *parsed);
|
||||
int bsc_nat_vty_init(struct bsc_nat *nat);
|
||||
struct bsc_connection *bsc_nat_find_bsc(struct bsc_nat *nat, struct msgb *msg, int *_lac);
|
||||
int bsc_nat_find_paging(struct msgb *msg, const uint8_t **,int *len);
|
||||
|
||||
/**
|
||||
* Content filtering.
|
||||
*/
|
||||
int bsc_nat_filter_sccp_cr(struct bsc_connection *bsc, struct msgb *msg,
|
||||
struct bsc_nat_parsed *, int *con_type);
|
||||
struct bsc_nat_parsed *, int *con_type, char **imsi);
|
||||
int bsc_nat_filter_dt(struct bsc_connection *bsc, struct msgb *msg,
|
||||
struct sccp_connections *con, struct bsc_nat_parsed *parsed);
|
||||
|
||||
/**
|
||||
* SCCP patching and handling
|
||||
@@ -246,36 +343,74 @@ int update_sccp_src_ref(struct sccp_connections *sccp, struct bsc_nat_parsed *pa
|
||||
void remove_sccp_src_ref(struct bsc_connection *bsc, struct msgb *msg, struct bsc_nat_parsed *parsed);
|
||||
struct sccp_connections *patch_sccp_src_ref_to_bsc(struct msgb *, struct bsc_nat_parsed *, struct bsc_nat *);
|
||||
struct sccp_connections *patch_sccp_src_ref_to_msc(struct msgb *, struct bsc_nat_parsed *, struct bsc_connection *);
|
||||
struct sccp_connections *bsc_nat_find_con_by_bsc(struct bsc_nat *, struct sccp_source_reference *);
|
||||
|
||||
/**
|
||||
* MGCP/Audio handling
|
||||
*/
|
||||
int bsc_mgcp_nr_multiplexes(int max_endpoints);
|
||||
int bsc_write_mgcp(struct bsc_connection *bsc, const uint8_t *data, unsigned int length);
|
||||
int bsc_mgcp_assign(struct sccp_connections *, struct msgb *msg);
|
||||
int bsc_mgcp_assign_patch(struct sccp_connections *, struct msgb *msg);
|
||||
void bsc_mgcp_init(struct sccp_connections *);
|
||||
void bsc_mgcp_dlcx(struct sccp_connections *);
|
||||
void bsc_mgcp_free_endpoints(struct bsc_nat *nat);
|
||||
int bsc_mgcp_nat_init(struct bsc_nat *nat);
|
||||
|
||||
struct sccp_connections *bsc_mgcp_find_con(struct bsc_nat *, int endpoint_number);
|
||||
struct msgb *bsc_mgcp_rewrite(char *input, int length, const char *ip, int port);
|
||||
struct msgb *bsc_mgcp_rewrite(char *input, int length, int endp, const char *ip, int port);
|
||||
void bsc_mgcp_forward(struct bsc_connection *bsc, struct msgb *msg);
|
||||
|
||||
void bsc_mgcp_clear_endpoints_for(struct bsc_connection *bsc);
|
||||
int bsc_mgcp_parse_response(const char *str, int *code, char transaction[60]);
|
||||
int bsc_mgcp_extract_ci(const char *resp);
|
||||
uint32_t bsc_mgcp_extract_ci(const char *resp);
|
||||
|
||||
|
||||
int bsc_write(struct bsc_connection *bsc, struct msgb *msg, int id);
|
||||
int bsc_do_write(struct osmo_wqueue *queue, struct msgb *msg, int id);
|
||||
int bsc_write_msg(struct osmo_wqueue *queue, struct msgb *msg);
|
||||
int bsc_write_cb(struct osmo_fd *bfd, struct msgb *msg);
|
||||
|
||||
/* IMSI allow/deny handling */
|
||||
void bsc_parse_reg(void *ctx, regex_t *reg, char **imsi, int argc, const char **argv);
|
||||
int bsc_parse_reg(void *ctx, regex_t *reg, char **imsi, int argc, const char **argv) __attribute__ ((warn_unused_result));
|
||||
struct bsc_nat_acc_lst *bsc_nat_acc_lst_find(struct bsc_nat *nat, const char *name);
|
||||
struct bsc_nat_acc_lst *bsc_nat_acc_lst_get(struct bsc_nat *nat, const char *name);
|
||||
void bsc_nat_acc_lst_delete(struct bsc_nat_acc_lst *lst);
|
||||
|
||||
struct bsc_nat_acc_lst_entry *bsc_nat_acc_lst_entry_create(struct bsc_nat_acc_lst *);
|
||||
int bsc_nat_lst_check_allow(struct bsc_nat_acc_lst *lst, const char *imsi);
|
||||
|
||||
int bsc_nat_msc_is_connected(struct bsc_nat *nat);
|
||||
|
||||
int bsc_conn_type_to_ctr(struct sccp_connections *conn);
|
||||
|
||||
struct gsm48_hdr *bsc_unpack_dtap(struct bsc_nat_parsed *parsed, struct msgb *msg, uint32_t *len);
|
||||
|
||||
/** USSD filtering */
|
||||
int bsc_ussd_init(struct bsc_nat *nat);
|
||||
int bsc_check_ussd(struct sccp_connections *con, struct bsc_nat_parsed *parsed, struct msgb *msg);
|
||||
int bsc_close_ussd_connections(struct bsc_nat *nat);
|
||||
|
||||
struct msgb *bsc_nat_rewrite_msg(struct bsc_nat *nat, struct msgb *msg, struct bsc_nat_parsed *, const char *imsi);
|
||||
|
||||
/** paging group handling */
|
||||
struct bsc_nat_paging_group *bsc_nat_paging_group_num(struct bsc_nat *nat, int group);
|
||||
struct bsc_nat_paging_group *bsc_nat_paging_group_create(struct bsc_nat *nat, int group);
|
||||
void bsc_nat_paging_group_delete(struct bsc_nat_paging_group *);
|
||||
void bsc_nat_paging_group_add_lac(struct bsc_nat_paging_group *grp, int lac);
|
||||
void bsc_nat_paging_group_del_lac(struct bsc_nat_paging_group *grp, int lac);
|
||||
|
||||
/**
|
||||
* Number rewriting support below
|
||||
*/
|
||||
struct bsc_nat_num_rewr_entry {
|
||||
struct llist_head list;
|
||||
|
||||
regex_t msisdn_reg;
|
||||
regex_t num_reg;
|
||||
|
||||
char *replace;
|
||||
};
|
||||
|
||||
void bsc_nat_num_rewr_entry_adapt(void *ctx, struct llist_head *head, const struct osmo_config_list *);
|
||||
|
||||
#endif
|
||||
|
@@ -5,25 +5,23 @@
|
||||
* 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 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BSC_NAT_SCCP_H
|
||||
#define BSC_NAT_SCCP_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <osmocom/sccp/sccp_types.h>
|
||||
|
||||
/*
|
||||
@@ -78,11 +76,19 @@ struct sccp_connections {
|
||||
/* status */
|
||||
int con_type;
|
||||
int con_local;
|
||||
int authorized;
|
||||
int imsi_checked;
|
||||
char *imsi;
|
||||
|
||||
/* GSM audio handling. That is 32 * multiplex + ts */
|
||||
int crcx;
|
||||
int msc_timeslot;
|
||||
int bsc_timeslot;
|
||||
/* remember which Transactions we run over the bypass */
|
||||
char ussd_ti[8];
|
||||
|
||||
/*
|
||||
* audio handling. Remember if we have ever send a CRCX,
|
||||
* remember the endpoint used by the MSC and BSC.
|
||||
*/
|
||||
int msc_endp;
|
||||
int bsc_endp;
|
||||
|
||||
/* timeout handling */
|
||||
struct timespec creation_time;
|
||||
|
@@ -10,10 +10,10 @@ enum bsc_rllr_ind {
|
||||
BSC_RLLR_IND_TIMEOUT,
|
||||
};
|
||||
|
||||
int rll_establish(struct gsm_lchan *lchan, u_int8_t link_id,
|
||||
void (*cb)(struct gsm_lchan *, u_int8_t, void *,
|
||||
int rll_establish(struct gsm_lchan *lchan, uint8_t link_id,
|
||||
void (*cb)(struct gsm_lchan *, uint8_t, void *,
|
||||
enum bsc_rllr_ind),
|
||||
void *data);
|
||||
void rll_indication(struct gsm_lchan *lchan, u_int8_t link_id, u_int8_t type);
|
||||
void rll_indication(struct gsm_lchan *lchan, uint8_t link_id, uint8_t type);
|
||||
|
||||
#endif /* _BSC_RLL_H */
|
||||
|
17
openbsc/include/openbsc/bss.h
Normal file
17
openbsc/include/openbsc/bss.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef _BSS_H_
|
||||
#define _BSS_H_
|
||||
|
||||
struct gsm_network;
|
||||
struct msgb;
|
||||
|
||||
/* start and stop network */
|
||||
extern int bsc_bootstrap_network(int (*mncc_recv)(struct gsm_network *, struct msgb *), const char *cfg_file);
|
||||
extern int bsc_shutdown_net(struct gsm_network *net);
|
||||
|
||||
/* register all supported BTS */
|
||||
extern int bts_init(void);
|
||||
extern int bts_model_bs11_init(void);
|
||||
extern int bts_model_rbs2k_init(void);
|
||||
extern int bts_model_nanobts_init(void);
|
||||
extern int bts_model_hslfemto_init(void);
|
||||
#endif
|
@@ -4,24 +4,23 @@
|
||||
* 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 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
#ifndef _CHAN_ALLOC_H
|
||||
#define _CHAN_ALLOC_H
|
||||
|
||||
#include "gsm_subscriber.h"
|
||||
#include "gsm_data.h"
|
||||
|
||||
struct gsm_subscriber_connection;
|
||||
|
||||
@@ -40,7 +39,7 @@ void ts_free(struct gsm_bts_trx_ts *ts);
|
||||
struct gsm_subscriber_connection *connection_for_subscr(struct gsm_subscriber *subscr);
|
||||
|
||||
/* Allocate a logical channel (SDCCH, TCH, ...) */
|
||||
struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type);
|
||||
struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type, int allow_bigger);
|
||||
|
||||
/* Free a logical channel (SDCCH, TCH, ...) */
|
||||
void lchan_free(struct gsm_lchan *lchan);
|
||||
|
@@ -1,8 +1,10 @@
|
||||
#ifndef _CRC24_H
|
||||
#define _CRC24_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define INIT_CRC24 0xffffff
|
||||
|
||||
u_int32_t crc24_calc(u_int32_t fcs, u_int8_t *cp, unsigned int len);
|
||||
uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len);
|
||||
|
||||
#endif
|
||||
|
@@ -3,27 +3,31 @@
|
||||
* 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 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _DB_H
|
||||
#define _DB_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "gsm_subscriber.h"
|
||||
|
||||
#include <openbsc/gsm_subscriber.h>
|
||||
struct gsm_equipment;
|
||||
struct gsm_network;
|
||||
struct gsm_auth_info;
|
||||
struct gsm_auth_tuple;
|
||||
struct gsm_sms;
|
||||
struct gsm_subscriber;
|
||||
|
||||
/* one time initialisation */
|
||||
int db_init(const char *name);
|
||||
@@ -31,17 +35,18 @@ int db_prepare();
|
||||
int db_fini();
|
||||
|
||||
/* subscriber management */
|
||||
struct gsm_subscriber* db_create_subscriber(struct gsm_network *net,
|
||||
struct gsm_subscriber *db_create_subscriber(struct gsm_network *net,
|
||||
char *imsi);
|
||||
struct gsm_subscriber* db_get_subscriber(struct gsm_network *net,
|
||||
struct gsm_subscriber *db_get_subscriber(struct gsm_network *net,
|
||||
enum gsm_subscriber_field field,
|
||||
const char *subscr);
|
||||
int db_sync_subscriber(struct gsm_subscriber* subscriber);
|
||||
int db_subscriber_alloc_tmsi(struct gsm_subscriber* subscriber);
|
||||
int db_subscriber_alloc_exten(struct gsm_subscriber* subscriber);
|
||||
int db_subscriber_alloc_token(struct gsm_subscriber* subscriber, u_int32_t* token);
|
||||
int db_subscriber_assoc_imei(struct gsm_subscriber* subscriber, char *imei);
|
||||
int db_sync_subscriber(struct gsm_subscriber *subscriber);
|
||||
int db_subscriber_alloc_tmsi(struct gsm_subscriber *subscriber);
|
||||
int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber);
|
||||
int db_subscriber_alloc_token(struct gsm_subscriber *subscriber, uint32_t* token);
|
||||
int db_subscriber_assoc_imei(struct gsm_subscriber *subscriber, char *imei);
|
||||
int db_sync_equipment(struct gsm_equipment *equip);
|
||||
int db_subscriber_update(struct gsm_subscriber *subscriber);
|
||||
|
||||
/* auth info */
|
||||
int db_get_authinfo_for_subscr(struct gsm_auth_info *ainfo,
|
||||
@@ -55,19 +60,21 @@ int db_sync_lastauthtuple_for_subscr(struct gsm_auth_tuple *atuple,
|
||||
|
||||
/* SMS store-and-forward */
|
||||
int db_sms_store(struct gsm_sms *sms);
|
||||
struct gsm_sms *db_sms_get(struct gsm_network *net, unsigned long long id);
|
||||
struct gsm_sms *db_sms_get_unsent(struct gsm_network *net, unsigned long long min_id);
|
||||
struct gsm_sms *db_sms_get_unsent_by_subscr(struct gsm_network *net, unsigned long long min_subscr_id);
|
||||
struct gsm_sms *db_sms_get_unsent_by_subscr(struct gsm_network *net, unsigned long long min_subscr_id, unsigned int failed);
|
||||
struct gsm_sms *db_sms_get_unsent_for_subscr(struct gsm_subscriber *subscr);
|
||||
int db_sms_mark_sent(struct gsm_sms *sms);
|
||||
int db_sms_inc_deliver_attempts(struct gsm_sms *sms);
|
||||
|
||||
/* APDU blob storage */
|
||||
int db_apdu_blob_store(struct gsm_subscriber *subscr,
|
||||
u_int8_t apdu_id_flags, u_int8_t len,
|
||||
u_int8_t *apdu);
|
||||
uint8_t apdu_id_flags, uint8_t len,
|
||||
uint8_t *apdu);
|
||||
|
||||
/* Statistics counter storage */
|
||||
struct counter;
|
||||
int db_store_counter(struct counter *ctr);
|
||||
struct osmo_counter;
|
||||
int db_store_counter(struct osmo_counter *ctr);
|
||||
struct rate_ctr_group;
|
||||
int db_store_rate_ctr_group(struct rate_ctr_group *ctrg);
|
||||
|
||||
|
@@ -2,10 +2,10 @@
|
||||
#define _DEBUG_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <osmocore/linuxlist.h>
|
||||
#include <osmocom/core/linuxlist.h>
|
||||
|
||||
#define DEBUG
|
||||
#include <osmocore/logging.h>
|
||||
#include <osmocom/core/logging.h>
|
||||
|
||||
/* Debug Areas of the code */
|
||||
enum {
|
||||
|
@@ -4,10 +4,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <osmocore/linuxlist.h>
|
||||
#include <osmocom/core/linuxlist.h>
|
||||
#include <openbsc/gsm_data.h>
|
||||
#include <osmocore/msgb.h>
|
||||
#include <osmocore/select.h>
|
||||
#include <osmocom/core/msgb.h>
|
||||
#include <osmocom/core/select.h>
|
||||
#include <openbsc/subchan_demux.h>
|
||||
|
||||
#define NUM_E1_TS 32
|
||||
@@ -37,12 +37,12 @@ struct e1inp_sign_link {
|
||||
struct llist_head tx_list;
|
||||
|
||||
/* SAPI and TEI on the E1 TS */
|
||||
u_int8_t sapi;
|
||||
u_int8_t tei;
|
||||
uint8_t sapi;
|
||||
uint8_t tei;
|
||||
|
||||
union {
|
||||
struct {
|
||||
u_int8_t channel;
|
||||
uint8_t channel;
|
||||
} misdn;
|
||||
} driver;
|
||||
};
|
||||
@@ -66,8 +66,10 @@ struct e1inp_ts {
|
||||
struct {
|
||||
/* list of all signalling links on this TS */
|
||||
struct llist_head sign_links;
|
||||
/* delay for the queue */
|
||||
int delay;
|
||||
/* timer when to dequeue next frame */
|
||||
struct timer_list tx_timer;
|
||||
struct osmo_timer_list tx_timer;
|
||||
} sign;
|
||||
struct {
|
||||
/* subchannel demuxer for frames from E1 */
|
||||
@@ -79,13 +81,17 @@ struct e1inp_ts {
|
||||
union {
|
||||
struct {
|
||||
/* mISDN driver has one fd for each ts */
|
||||
struct bsc_fd fd;
|
||||
struct osmo_fd fd;
|
||||
} misdn;
|
||||
struct {
|
||||
/* ip.access driver has one fd for each ts */
|
||||
struct bsc_fd fd;
|
||||
struct osmo_fd fd;
|
||||
} ipaccess;
|
||||
|
||||
struct {
|
||||
/* DAHDI driver has one fd for each ts */
|
||||
struct osmo_fd fd;
|
||||
struct lapd_instance *lapd;
|
||||
} dahdi;
|
||||
} driver;
|
||||
};
|
||||
|
||||
@@ -93,6 +99,8 @@ struct e1inp_driver {
|
||||
struct llist_head list;
|
||||
const char *name;
|
||||
int (*want_write)(struct e1inp_ts *ts);
|
||||
int (*line_update)(struct e1inp_line *line);
|
||||
int default_delay;
|
||||
};
|
||||
|
||||
struct e1inp_line {
|
||||
@@ -110,22 +118,28 @@ struct e1inp_line {
|
||||
/* register a driver with the E1 core */
|
||||
int e1inp_driver_register(struct e1inp_driver *drv);
|
||||
|
||||
/* fine a previously registered driver */
|
||||
struct e1inp_driver *e1inp_driver_find(const char *name);
|
||||
|
||||
/* register a line with the E1 core */
|
||||
int e1inp_line_register(struct e1inp_line *line);
|
||||
|
||||
/* ensure a certain line exists, return pointer to it */
|
||||
struct e1inp_line *e1inp_line_get_create(u_int8_t e1_nr);
|
||||
/* get a line by its ID */
|
||||
struct e1inp_line *e1inp_line_get(uint8_t e1_nr);
|
||||
|
||||
/* create a line in the E1 input core */
|
||||
struct e1inp_line *e1inp_line_create(uint8_t e1_nr, const char *driver_name);
|
||||
|
||||
/* find a sign_link for given TEI and SAPI in a TS */
|
||||
struct e1inp_sign_link *
|
||||
e1inp_lookup_sign_link(struct e1inp_ts *ts, u_int8_t tei,
|
||||
u_int8_t sapi);
|
||||
e1inp_lookup_sign_link(struct e1inp_ts *ts, uint8_t tei,
|
||||
uint8_t sapi);
|
||||
|
||||
/* create a new signalling link in a E1 timeslot */
|
||||
struct e1inp_sign_link *
|
||||
e1inp_sign_link_create(struct e1inp_ts *ts, enum e1inp_sign_type type,
|
||||
struct gsm_bts_trx *trx, u_int8_t tei,
|
||||
u_int8_t sapi);
|
||||
struct gsm_bts_trx *trx, uint8_t tei,
|
||||
uint8_t sapi);
|
||||
|
||||
/* configure and initialize one e1inp_ts */
|
||||
int e1inp_ts_config(struct e1inp_ts *ts, struct e1inp_line *line,
|
||||
@@ -136,20 +150,20 @@ int e1inp_update_ts(struct e1inp_ts *ts);
|
||||
|
||||
/* Receive a packet from the E1 driver */
|
||||
int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg,
|
||||
u_int8_t tei, u_int8_t sapi);
|
||||
uint8_t tei, uint8_t sapi);
|
||||
|
||||
/* called by driver if it wants to transmit on a given TS */
|
||||
struct msgb *e1inp_tx_ts(struct e1inp_ts *e1i_ts,
|
||||
struct e1inp_sign_link **sign_link);
|
||||
|
||||
/* called by driver in case some kind of link state event */
|
||||
int e1inp_event(struct e1inp_ts *ts, int evt, u_int8_t tei, u_int8_t sapi);
|
||||
int e1inp_event(struct e1inp_ts *ts, int evt, uint8_t tei, uint8_t sapi);
|
||||
|
||||
/* Write LAPD frames to the fd. */
|
||||
void e1_set_pcap_fd(int fd);
|
||||
|
||||
/* called by TRAU muxer to obtain the destination mux entity */
|
||||
struct subch_mux *e1inp_get_mux(u_int8_t e1_nr, u_int8_t ts_nr);
|
||||
struct subch_mux *e1inp_get_mux(uint8_t e1_nr, uint8_t ts_nr);
|
||||
|
||||
void e1inp_sign_link_destroy(struct e1inp_sign_link *link);
|
||||
int e1inp_line_update(struct e1inp_line *line);
|
||||
@@ -161,8 +175,14 @@ int e1_reconfig_bts(struct gsm_bts *bts);
|
||||
|
||||
int ia_config_connect(struct gsm_bts *bts, struct sockaddr_in *sin);
|
||||
int ipaccess_setup(struct gsm_network *gsmnet);
|
||||
int hsl_setup(struct gsm_network *gsmnet);
|
||||
|
||||
extern struct llist_head e1inp_driver_list;
|
||||
extern struct llist_head e1inp_line_list;
|
||||
|
||||
int e1inp_vty_init(void);
|
||||
void e1inp_init(void);
|
||||
|
||||
int _abis_nm_sendmsg(struct msgb *msg, int to_trx_oml);
|
||||
|
||||
#endif /* _E1_INPUT_H */
|
||||
|
@@ -1,16 +1,15 @@
|
||||
#ifndef _GB_PROXY_H
|
||||
#define _GB_PROXY_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <osmocore/msgb.h>
|
||||
#include <osmocom/core/msgb.h>
|
||||
|
||||
#include <openbsc/gprs_ns.h>
|
||||
#include <osmocom/vty/command.h>
|
||||
|
||||
struct gbproxy_config {
|
||||
/* parsed from config file */
|
||||
u_int16_t nsip_sgsn_nsei;
|
||||
uint16_t nsip_sgsn_nsei;
|
||||
|
||||
/* misc */
|
||||
struct gprs_ns_inst *nsi;
|
||||
|
@@ -182,7 +182,7 @@ struct bssgp_bvc_ctx *btsctx_by_raid_cid(const struct gprs_ra_id *raid, uint16_t
|
||||
/* Find a BTS context based on BVCI+NSEI tuple */
|
||||
struct bssgp_bvc_ctx *btsctx_by_bvci_nsei(uint16_t bvci, uint16_t nsei);
|
||||
|
||||
#include <osmocore/tlv.h>
|
||||
#include <osmocom/gsm/tlv.h>
|
||||
|
||||
/* BSSGP-UL-UNITDATA.ind */
|
||||
int gprs_bssgp_rcvmsg(struct msgb *msg);
|
||||
|
@@ -1,9 +1,10 @@
|
||||
#ifndef _GPRS_GMM_H
|
||||
#define _GPRS_GMM_H
|
||||
|
||||
#include <osmocore/msgb.h>
|
||||
#include <osmocom/core/msgb.h>
|
||||
#include <openbsc/gprs_sgsn.h>
|
||||
|
||||
int gsm48_tx_gsm_deact_pdp_req(struct sgsn_pdp_ctx *pdp, uint8_t sm_cause);
|
||||
int gsm48_tx_gsm_act_pdp_rej(struct sgsn_mm_ctx *mm, uint8_t tid,
|
||||
uint8_t cause, uint8_t pco_len, uint8_t *pco_v);
|
||||
int gsm48_tx_gsm_act_pdp_acc(struct sgsn_pdp_ctx *pdp);
|
||||
|
@@ -99,8 +99,8 @@ struct gprs_llc_lle {
|
||||
|
||||
enum gprs_llc_lle_state state;
|
||||
|
||||
struct timer_list t200;
|
||||
struct timer_list t201; /* wait for acknowledgement */
|
||||
struct osmo_timer_list t200;
|
||||
struct osmo_timer_list t201; /* wait for acknowledgement */
|
||||
|
||||
uint16_t v_sent;
|
||||
uint16_t v_ack;
|
||||
|
@@ -77,10 +77,10 @@ enum ns_cause {
|
||||
|
||||
/* Our Implementation */
|
||||
#include <netinet/in.h>
|
||||
#include <osmocore/linuxlist.h>
|
||||
#include <osmocore/msgb.h>
|
||||
#include <osmocore/timer.h>
|
||||
#include <osmocore/select.h>
|
||||
#include <osmocom/core/linuxlist.h>
|
||||
#include <osmocom/core/msgb.h>
|
||||
#include <osmocom/core/timer.h>
|
||||
#include <osmocom/core/select.h>
|
||||
|
||||
#define NS_TIMERS_COUNT 7
|
||||
#define NS_TIMERS "(tns-block|tns-block-retries|tns-reset|tns-reset-retries|tns-test|tns-alive|tns-alive-retries)"
|
||||
@@ -133,13 +133,13 @@ struct gprs_ns_inst {
|
||||
|
||||
/* NS-over-IP specific bits */
|
||||
struct {
|
||||
struct bsc_fd fd;
|
||||
struct osmo_fd fd;
|
||||
uint32_t local_ip;
|
||||
uint16_t local_port;
|
||||
} nsip;
|
||||
/* NS-over-FR-over-GRE-over-IP specific bits */
|
||||
struct {
|
||||
struct bsc_fd fd;
|
||||
struct osmo_fd fd;
|
||||
uint32_t local_ip;
|
||||
int enabled:1;
|
||||
} frgre;
|
||||
@@ -163,7 +163,7 @@ struct gprs_nsvc {
|
||||
uint32_t state;
|
||||
uint32_t remote_state;
|
||||
|
||||
struct timer_list timer;
|
||||
struct osmo_timer_list timer;
|
||||
enum nsvc_timer_mode timer_mode;
|
||||
int alive_retries;
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#include <stdint.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <osmocore/gsm48.h>
|
||||
#include <osmocom/gsm/gsm48.h>
|
||||
|
||||
#include <osmocom/crypt/gprs_cipher.h>
|
||||
|
||||
@@ -102,7 +102,7 @@ struct sgsn_mm_ctx {
|
||||
uint16_t nsei;
|
||||
uint16_t bvci;
|
||||
struct rate_ctr_group *ctrg;
|
||||
struct timer_list timer;
|
||||
struct osmo_timer_list timer;
|
||||
unsigned int T; /* Txxxx number */
|
||||
unsigned int num_T_exp; /* number of consecutive T expirations */
|
||||
|
||||
@@ -119,12 +119,17 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_by_imsi(const char *imsi);
|
||||
/* Allocate a new SGSN MM context */
|
||||
struct sgsn_mm_ctx *sgsn_mm_ctx_alloc(uint32_t tlli,
|
||||
const struct gprs_ra_id *raid);
|
||||
void sgsn_mm_ctx_free(struct sgsn_mm_ctx *mm);
|
||||
|
||||
|
||||
enum pdp_ctx_state {
|
||||
PDP_STATE_NONE,
|
||||
PDP_STATE_CR_REQ,
|
||||
PDP_STATE_CR_CONF,
|
||||
|
||||
/* 04.08 / Figure 6.2 / 6.1.2.2 */
|
||||
PDP_STATE_INACT_PEND,
|
||||
PDP_STATE_INACTIVE = PDP_STATE_NONE,
|
||||
};
|
||||
|
||||
enum pdp_type {
|
||||
@@ -162,6 +167,10 @@ struct sgsn_pdp_ctx {
|
||||
uint32_t rx_gtp_snu;
|
||||
//uint32_t charging_id;
|
||||
int reordering_reqd;
|
||||
|
||||
struct osmo_timer_list timer;
|
||||
unsigned int T; /* Txxxx number */
|
||||
unsigned int num_T_exp; /* number of consecutive T expirations */
|
||||
};
|
||||
|
||||
|
||||
@@ -182,10 +191,12 @@ struct sgsn_ggsn_ctx {
|
||||
uint32_t id;
|
||||
unsigned int gtp_version;
|
||||
struct in_addr remote_addr;
|
||||
int remote_restart_ctr;
|
||||
struct gsn_t *gsn;
|
||||
};
|
||||
struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_alloc(uint32_t id);
|
||||
struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_id(uint32_t id);
|
||||
struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_addr(struct in_addr *addr);
|
||||
struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_find_alloc(uint32_t id);
|
||||
|
||||
struct apn_ctx {
|
||||
@@ -202,4 +213,8 @@ extern struct llist_head sgsn_pdp_ctxts;
|
||||
|
||||
uint32_t sgsn_alloc_ptmsi(void);
|
||||
|
||||
/* High-level function to be called in case a GGSN has disappeared or
|
||||
* ottherwise lost state (recovery procedure) */
|
||||
int drop_all_pdp_for_ggsn(struct sgsn_ggsn_ctx *ggsn);
|
||||
|
||||
#endif /* _GPRS_SGSN_H */
|
||||
|
@@ -3,8 +3,8 @@
|
||||
|
||||
#include <openbsc/meas_rep.h>
|
||||
|
||||
#include <osmocore/protocol/gsm_04_08.h>
|
||||
#include <osmocore/gsm48.h>
|
||||
#include <osmocom/gsm/protocol/gsm_04_08.h>
|
||||
#include <osmocom/gsm/gsm48.h>
|
||||
|
||||
struct msgb;
|
||||
struct gsm_bts;
|
||||
@@ -13,8 +13,8 @@ struct gsm_network;
|
||||
struct gsm_trans;
|
||||
struct gsm_subscriber_connection;
|
||||
|
||||
#define GSM48_ALLOC_SIZE 1024
|
||||
#define GSM48_ALLOC_HEADROOM 128
|
||||
#define GSM48_ALLOC_SIZE 2048
|
||||
#define GSM48_ALLOC_HEADROOM 256
|
||||
|
||||
static inline struct msgb *gsm48_msgb_alloc(void)
|
||||
{
|
||||
@@ -25,40 +25,40 @@ static inline struct msgb *gsm48_msgb_alloc(void)
|
||||
/* config options controlling the behaviour of the lower leves */
|
||||
void gsm0408_allow_everyone(int allow);
|
||||
void gsm0408_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause);
|
||||
void gsm0408_clear_all_trans(struct gsm_network *net, int protocol);
|
||||
int gsm0408_dispatch(struct gsm_subscriber_connection *conn, struct msgb *msg);
|
||||
|
||||
int gsm0408_rcvmsg(struct msgb *msg, u_int8_t link_id);
|
||||
int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id);
|
||||
int gsm0408_new_conn(struct gsm_subscriber_connection *conn);
|
||||
enum gsm_chan_t get_ctype_by_chreq(struct gsm_bts *bts, u_int8_t ra, int neci);
|
||||
enum gsm_chreq_reason_t get_reason_by_chreq(struct gsm_bts *bts, u_int8_t ra, int neci);
|
||||
enum gsm_chan_t get_ctype_by_chreq(struct gsm_network *bts, uint8_t ra);
|
||||
enum gsm_chreq_reason_t get_reason_by_chreq(uint8_t ra, int neci);
|
||||
void gsm_net_update_ctype(struct gsm_network *net);
|
||||
|
||||
int gsm48_tx_mm_info(struct gsm_subscriber_connection *conn);
|
||||
int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, u_int8_t *rand, int key_seq);
|
||||
int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, uint8_t *rand, int key_seq);
|
||||
int gsm48_tx_mm_auth_rej(struct gsm_subscriber_connection *conn);
|
||||
int gsm48_send_rr_release(struct gsm_lchan *lchan);
|
||||
int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv);
|
||||
int gsm48_send_rr_app_info(struct gsm_subscriber_connection *conn, u_int8_t apdu_id,
|
||||
u_int8_t apdu_len, const u_int8_t *apdu);
|
||||
int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, u_int8_t power_class);
|
||||
int gsm48_send_rr_app_info(struct gsm_subscriber_connection *conn, uint8_t apdu_id,
|
||||
uint8_t apdu_len, const uint8_t *apdu);
|
||||
int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, uint8_t power_class);
|
||||
int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan,
|
||||
u_int8_t power_command, u_int8_t ho_ref);
|
||||
uint8_t power_command, uint8_t ho_ref);
|
||||
|
||||
int bsc_upqueue(struct gsm_network *net);
|
||||
|
||||
int mncc_send(struct gsm_network *net, int msg_type, void *arg);
|
||||
int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg);
|
||||
|
||||
/* convert a ASCII phone number to call-control BCD */
|
||||
int encode_bcd_number(u_int8_t *bcd_lv, u_int8_t max_len,
|
||||
int encode_bcd_number(uint8_t *bcd_lv, uint8_t max_len,
|
||||
int h_len, const char *input);
|
||||
int decode_bcd_number(char *output, int output_len, const u_int8_t *bcd_lv,
|
||||
int decode_bcd_number(char *output, int output_len, const uint8_t *bcd_lv,
|
||||
int h_len);
|
||||
|
||||
int send_siemens_mrpci(struct gsm_lchan *lchan, u_int8_t *classmark2_lv);
|
||||
int send_siemens_mrpci(struct gsm_lchan *lchan, uint8_t *classmark2_lv);
|
||||
int gsm48_extract_mi(uint8_t *classmark2, int length, char *mi_string, uint8_t *mi_type);
|
||||
int gsm48_paging_extract_mi(struct gsm48_pag_resp *pag, int length, char *mi_string, u_int8_t *mi_type);
|
||||
int gsm48_paging_extract_mi(struct gsm48_pag_resp *pag, int length, char *mi_string, uint8_t *mi_type);
|
||||
int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn, struct msgb *msg, struct gsm_subscriber *subscr);
|
||||
|
||||
int gsm48_lchan_modify(struct gsm_lchan *lchan, u_int8_t lchan_mode);
|
||||
int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t lchan_mode);
|
||||
int gsm48_rx_rr_modif_ack(struct msgb *msg);
|
||||
int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg);
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#define _GSM48_GPRS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <osmocore/protocol/gsm_04_08.h>
|
||||
#include <osmocom/gsm/protocol/gsm_04_08.h>
|
||||
|
||||
/* Table 10.4 / 10.4a, GPRS Mobility Management (GMM) */
|
||||
#define GSM48_MT_GMM_ATTACH_REQ 0x01
|
||||
|
@@ -1,26 +1,26 @@
|
||||
#ifndef _GSM_04_11_H
|
||||
#define _GSM_04_11_H
|
||||
|
||||
#include <osmocore/protocol/gsm_04_11.h>
|
||||
#include <osmocom/gsm/protocol/gsm_04_11.h>
|
||||
|
||||
#define UM_SAPI_SMS 3 /* See GSM 04.05/04.06 */
|
||||
|
||||
/* SMS deliver PDU */
|
||||
struct sms_deliver {
|
||||
u_int8_t mti:2; /* message type indicator */
|
||||
u_int8_t mms:1; /* more messages to send */
|
||||
u_int8_t rp:1; /* reply path */
|
||||
u_int8_t udhi:1; /* user data header indicator */
|
||||
u_int8_t sri:1; /* status report indication */
|
||||
u_int8_t *orig_addr; /* originating address */
|
||||
u_int8_t pid; /* protocol identifier */
|
||||
u_int8_t dcs; /* data coding scheme */
|
||||
uint8_t mti:2; /* message type indicator */
|
||||
uint8_t mms:1; /* more messages to send */
|
||||
uint8_t rp:1; /* reply path */
|
||||
uint8_t udhi:1; /* user data header indicator */
|
||||
uint8_t sri:1; /* status report indication */
|
||||
uint8_t *orig_addr; /* originating address */
|
||||
uint8_t pid; /* protocol identifier */
|
||||
uint8_t dcs; /* data coding scheme */
|
||||
/* service centre time stamp */
|
||||
u_int8_t ud_len; /* user data length */
|
||||
u_int8_t *user_data; /* user data */
|
||||
uint8_t ud_len; /* user data length */
|
||||
uint8_t *user_data; /* user data */
|
||||
|
||||
u_int8_t msg_ref; /* message reference */
|
||||
u_int8_t *smsc;
|
||||
uint8_t msg_ref; /* message reference */
|
||||
uint8_t *smsc;
|
||||
};
|
||||
|
||||
struct msgb;
|
||||
@@ -29,9 +29,12 @@ int gsm0411_rcv_sms(struct gsm_subscriber_connection *conn, struct msgb *msg);
|
||||
|
||||
struct gsm_sms *sms_alloc(void);
|
||||
void sms_free(struct gsm_sms *sms);
|
||||
struct gsm_sms *sms_from_text(struct gsm_subscriber *receiver, int dcs, const char *text);
|
||||
|
||||
void _gsm411_sms_trans_free(struct gsm_trans *trans);
|
||||
int gsm411_send_sms_subscr(struct gsm_subscriber *subscr,
|
||||
struct gsm_sms *sms);
|
||||
int gsm411_send_sms(struct gsm_subscriber_connection *conn,
|
||||
struct gsm_sms *sms);
|
||||
void gsm411_sapi_n_reject(struct gsm_subscriber_connection *conn);
|
||||
#endif
|
||||
|
@@ -1,21 +1,12 @@
|
||||
#ifndef _GSM_04_80_H
|
||||
#define _GSM_04_80_H
|
||||
|
||||
#include <osmocore/msgb.h>
|
||||
#include <osmocore/protocol/gsm_04_80.h>
|
||||
|
||||
#define MAX_LEN_USSD_STRING 31
|
||||
#include <osmocom/core/msgb.h>
|
||||
#include <osmocom/gsm/protocol/gsm_04_80.h>
|
||||
#include <osmocom/gsm/gsm0480.h>
|
||||
|
||||
struct gsm_subscriber_connection;
|
||||
|
||||
struct ussd_request {
|
||||
char text[MAX_LEN_USSD_STRING + 1];
|
||||
u_int8_t transaction_id;
|
||||
u_int8_t invoke_id;
|
||||
};
|
||||
|
||||
int gsm0480_decode_ussd_request(const struct msgb *msg,
|
||||
struct ussd_request *request);
|
||||
int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn,
|
||||
const struct msgb *in_msg, const char* response_text,
|
||||
const struct ussd_request *req);
|
||||
@@ -23,12 +14,6 @@ int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn,
|
||||
const struct msgb *msg,
|
||||
const struct ussd_request *request);
|
||||
|
||||
struct msgb *gsm0480_create_notifySS(const char *text);
|
||||
struct msgb *gsm0480_create_unstructuredSS_Notify(int alertLevel, const char *text);
|
||||
|
||||
int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id);
|
||||
int gsm0480_wrap_facility(struct msgb *msg);
|
||||
|
||||
int gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, int level, const char *text);
|
||||
int gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn);
|
||||
|
||||
|
@@ -1,87 +1,14 @@
|
||||
#ifndef _GSM_DATA_H
|
||||
#define _GSM_DATA_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
enum gsm_phys_chan_config {
|
||||
GSM_PCHAN_NONE,
|
||||
GSM_PCHAN_CCCH,
|
||||
GSM_PCHAN_CCCH_SDCCH4,
|
||||
GSM_PCHAN_TCH_F,
|
||||
GSM_PCHAN_TCH_H,
|
||||
GSM_PCHAN_SDCCH8_SACCH8C,
|
||||
GSM_PCHAN_PDCH, /* GPRS PDCH */
|
||||
GSM_PCHAN_TCH_F_PDCH, /* TCH/F if used, PDCH otherwise */
|
||||
GSM_PCHAN_UNKNOWN,
|
||||
};
|
||||
#include <osmocom/core/timer.h>
|
||||
#include <osmocom/core/select.h>
|
||||
|
||||
enum gsm_chan_t {
|
||||
GSM_LCHAN_NONE,
|
||||
GSM_LCHAN_SDCCH,
|
||||
GSM_LCHAN_TCH_F,
|
||||
GSM_LCHAN_TCH_H,
|
||||
GSM_LCHAN_UNKNOWN,
|
||||
};
|
||||
#include <openbsc/rest_octets.h>
|
||||
|
||||
/* RRLP mode of operation */
|
||||
enum rrlp_mode {
|
||||
RRLP_MODE_NONE,
|
||||
RRLP_MODE_MS_BASED,
|
||||
RRLP_MODE_MS_PREF,
|
||||
RRLP_MODE_ASS_PREF,
|
||||
};
|
||||
|
||||
/* Channel Request reason */
|
||||
enum gsm_chreq_reason_t {
|
||||
GSM_CHREQ_REASON_EMERG,
|
||||
GSM_CHREQ_REASON_PAG,
|
||||
GSM_CHREQ_REASON_CALL,
|
||||
GSM_CHREQ_REASON_LOCATION_UPD,
|
||||
GSM_CHREQ_REASON_OTHER,
|
||||
};
|
||||
|
||||
#include <osmocore/timer.h>
|
||||
#include <openbsc/gsm_04_08.h>
|
||||
#include <openbsc/abis_rsl.h>
|
||||
#include <openbsc/system_information.h>
|
||||
#include <openbsc/mncc.h>
|
||||
|
||||
#include <osmocore/tlv.h>
|
||||
#include <osmocore/bitvec.h>
|
||||
#include <osmocore/statistics.h>
|
||||
#include <osmocore/gsm_utils.h>
|
||||
#include <osmocore/utils.h>
|
||||
#include <osmocore/rxlev_stat.h>
|
||||
|
||||
#define TRX_NR_TS 8
|
||||
#define TS_MAX_LCHAN 8
|
||||
|
||||
#define HARDCODED_ARFCN 123
|
||||
#define HARDCODED_TSC 7
|
||||
#define HARDCODED_BSIC 0x3f /* NCC = 7 / BCC = 7 */
|
||||
|
||||
/* for multi-drop config */
|
||||
#define HARDCODED_BTS0_TS 1
|
||||
#define HARDCODED_BTS1_TS 6
|
||||
#define HARDCODED_BTS2_TS 11
|
||||
|
||||
enum gsm_hooks {
|
||||
GSM_HOOK_NM_SWLOAD,
|
||||
GSM_HOOK_RR_PAGING,
|
||||
GSM_HOOK_RR_SECURITY,
|
||||
};
|
||||
|
||||
enum gsm_paging_event {
|
||||
GSM_PAGING_SUCCEEDED,
|
||||
GSM_PAGING_EXPIRED,
|
||||
GSM_PAGING_OOM,
|
||||
};
|
||||
|
||||
enum bts_gprs_mode {
|
||||
BTS_GPRS_NONE = 0,
|
||||
BTS_GPRS_GPRS = 1,
|
||||
BTS_GPRS_EGPRS = 2,
|
||||
};
|
||||
#define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3]
|
||||
|
||||
/* the data structure stored in msgb->cb for openbsc apps */
|
||||
struct openbsc_msgb_cb {
|
||||
@@ -92,11 +19,11 @@ struct openbsc_msgb_cb {
|
||||
unsigned char *bssgp_cell_id;
|
||||
|
||||
/* Identifiers of a BTS, equal to 'struct bssgp_bts_ctx' */
|
||||
u_int16_t nsei;
|
||||
u_int16_t bvci;
|
||||
uint16_t nsei;
|
||||
uint16_t bvci;
|
||||
|
||||
/* Identifier of a MS (inside BTS), equal to 'struct sgsn_mm_ctx' */
|
||||
u_int32_t tlli;
|
||||
uint32_t tlli;
|
||||
} __attribute__((packed));
|
||||
#define OBSC_MSGB_CB(__msgb) ((struct openbsc_msgb_cb *)&((__msgb)->cb[0]))
|
||||
#define msgb_tlli(__x) OBSC_MSGB_CB(__x)->tlli
|
||||
@@ -132,32 +59,18 @@ enum gsm_auth_algo {
|
||||
struct gsm_auth_info {
|
||||
enum gsm_auth_algo auth_algo;
|
||||
unsigned int a3a8_ki_len;
|
||||
u_int8_t a3a8_ki[16];
|
||||
uint8_t a3a8_ki[16];
|
||||
};
|
||||
|
||||
struct gsm_auth_tuple {
|
||||
int use_count;
|
||||
int key_seq;
|
||||
u_int8_t rand[16];
|
||||
u_int8_t sres[4];
|
||||
u_int8_t kc[8];
|
||||
uint8_t rand[16];
|
||||
uint8_t sres[4];
|
||||
uint8_t kc[8];
|
||||
};
|
||||
#define GSM_KEY_SEQ_INVAL 7 /* GSM 04.08 - 10.5.1.2 */
|
||||
|
||||
|
||||
struct gsm_lchan;
|
||||
struct gsm_subscriber;
|
||||
struct gsm_mncc;
|
||||
struct rtp_socket;
|
||||
struct bsc_api;
|
||||
|
||||
/* Network Management State */
|
||||
struct gsm_nm_state {
|
||||
u_int8_t operational;
|
||||
u_int8_t administrative;
|
||||
u_int8_t availability;
|
||||
};
|
||||
|
||||
/*
|
||||
* LOCATION UPDATING REQUEST state
|
||||
*
|
||||
@@ -166,7 +79,7 @@ struct gsm_nm_state {
|
||||
* - Accept/Reject according to global policy
|
||||
*/
|
||||
struct gsm_loc_updating_operation {
|
||||
struct timer_list updating_timer;
|
||||
struct osmo_timer_list updating_timer;
|
||||
unsigned int waiting_for_imsi : 1;
|
||||
unsigned int waiting_for_imei : 1;
|
||||
unsigned int key_seq : 4;
|
||||
@@ -186,7 +99,7 @@ struct gsm_security_operation {
|
||||
* a couple of seconds to work around MSC issues.
|
||||
*/
|
||||
struct gsm_anchor_operation {
|
||||
struct timer_list timeout;
|
||||
struct osmo_timer_list timeout;
|
||||
};
|
||||
|
||||
/* Maximum number of neighbor cells whose average we track */
|
||||
@@ -196,36 +109,17 @@ struct gsm_anchor_operation {
|
||||
|
||||
/* processed neighbor measurements for one cell */
|
||||
struct neigh_meas_proc {
|
||||
u_int16_t arfcn;
|
||||
u_int8_t bsic;
|
||||
u_int8_t rxlev[MAX_WIN_NEIGH_AVG];
|
||||
uint16_t arfcn;
|
||||
uint8_t bsic;
|
||||
uint8_t rxlev[MAX_WIN_NEIGH_AVG];
|
||||
unsigned int rxlev_cnt;
|
||||
u_int8_t last_seen_nr;
|
||||
};
|
||||
|
||||
#define MAX_A5_KEY_LEN (128/8)
|
||||
#define A38_XOR_MIN_KEY_LEN 12
|
||||
#define A38_XOR_MAX_KEY_LEN 16
|
||||
#define A38_COMP128_KEY_LEN 16
|
||||
#define RSL_ENC_ALG_A5(x) (x+1)
|
||||
|
||||
/* is the data link established? who established it? */
|
||||
#define LCHAN_SAPI_UNUSED 0
|
||||
#define LCHAN_SAPI_MS 1
|
||||
#define LCHAN_SAPI_NET 2
|
||||
|
||||
/* state of a logical channel */
|
||||
enum gsm_lchan_state {
|
||||
LCHAN_S_NONE, /* channel is not active */
|
||||
LCHAN_S_ACT_REQ, /* channel activatin requested */
|
||||
LCHAN_S_ACTIVE, /* channel is active and operational */
|
||||
LCHAN_S_REL_REQ, /* channel release has been requested */
|
||||
LCHAN_S_REL_ERR, /* channel is in an error state */
|
||||
LCHAN_S_INACTIVE, /* channel is set inactive */
|
||||
uint8_t last_seen_nr;
|
||||
};
|
||||
|
||||
/* the per subscriber data for lchan */
|
||||
struct gsm_subscriber_connection {
|
||||
struct llist_head entry;
|
||||
|
||||
/* To whom we are allocated at the moment */
|
||||
struct gsm_subscriber *subscr;
|
||||
|
||||
@@ -238,409 +132,77 @@ struct gsm_subscriber_connection {
|
||||
|
||||
/* Are we part of a special "silent" call */
|
||||
int silent_call;
|
||||
int put_channel;
|
||||
|
||||
/* bsc structures */
|
||||
struct osmo_bsc_sccp_con *sccp_con;
|
||||
|
||||
/* back pointers */
|
||||
int in_release;
|
||||
struct gsm_lchan *lchan;
|
||||
struct gsm_lchan *ho_lchan;
|
||||
struct gsm_bts *bts;
|
||||
|
||||
/* for assignment handling */
|
||||
struct osmo_timer_list T10;
|
||||
struct gsm_lchan *secondary_lchan;
|
||||
|
||||
};
|
||||
|
||||
struct gsm_lchan {
|
||||
/* The TS that we're part of */
|
||||
struct gsm_bts_trx_ts *ts;
|
||||
/* The logical subslot number in the TS */
|
||||
u_int8_t nr;
|
||||
/* The logical channel type */
|
||||
enum gsm_chan_t type;
|
||||
/* RSL channel mode */
|
||||
enum rsl_cmod_spd rsl_cmode;
|
||||
/* If TCH, traffic channel mode */
|
||||
enum gsm48_chan_mode tch_mode;
|
||||
/* State */
|
||||
enum gsm_lchan_state state;
|
||||
/* Power levels for MS and BTS */
|
||||
u_int8_t bs_power;
|
||||
u_int8_t ms_power;
|
||||
/* Encryption information */
|
||||
struct {
|
||||
u_int8_t alg_id;
|
||||
u_int8_t key_len;
|
||||
u_int8_t key[MAX_A5_KEY_LEN];
|
||||
} encr;
|
||||
|
||||
struct timer_list T3101;
|
||||
struct timer_list T3111;
|
||||
struct timer_list error_timer;
|
||||
#define ROLE_BSC
|
||||
#include "gsm_data_shared.h"
|
||||
|
||||
/* AMR bits */
|
||||
struct gsm48_multi_rate_conf mr_conf;
|
||||
|
||||
/* Established data link layer services */
|
||||
u_int8_t sapis[8];
|
||||
int sach_deact;
|
||||
int release_reason;
|
||||
|
||||
/* GSM Random Access data */
|
||||
struct gsm48_req_ref *rqd_ref;
|
||||
uint8_t rqd_ta;
|
||||
|
||||
/* cache of last measurement reports on this lchan */
|
||||
struct gsm_meas_rep meas_rep[6];
|
||||
int meas_rep_idx;
|
||||
|
||||
/* table of neighbor cell measurements */
|
||||
struct neigh_meas_proc neigh_meas[MAX_NEIGH_MEAS];
|
||||
|
||||
struct {
|
||||
u_int32_t bound_ip;
|
||||
u_int32_t connect_ip;
|
||||
u_int16_t bound_port;
|
||||
u_int16_t connect_port;
|
||||
u_int16_t conn_id;
|
||||
u_int8_t rtp_payload;
|
||||
u_int8_t rtp_payload2;
|
||||
u_int8_t speech_mode;
|
||||
struct rtp_socket *rtp_socket;
|
||||
} abis_ip;
|
||||
|
||||
struct gsm_subscriber_connection *conn;
|
||||
};
|
||||
|
||||
struct gsm_e1_subslot {
|
||||
/* Number of E1 link */
|
||||
u_int8_t e1_nr;
|
||||
/* Number of E1 TS inside E1 link */
|
||||
u_int8_t e1_ts;
|
||||
/* Sub-slot within the E1 TS, 0xff if full TS */
|
||||
u_int8_t e1_ts_ss;
|
||||
};
|
||||
|
||||
#define TS_F_PDCH_MODE 0x1000
|
||||
/* One Timeslot in a TRX */
|
||||
struct gsm_bts_trx_ts {
|
||||
struct gsm_bts_trx *trx;
|
||||
/* number of this timeslot at the TRX */
|
||||
u_int8_t nr;
|
||||
|
||||
enum gsm_phys_chan_config pchan;
|
||||
|
||||
unsigned int flags;
|
||||
struct gsm_nm_state nm_state;
|
||||
struct tlv_parsed nm_attr;
|
||||
u_int8_t nm_chan_comb;
|
||||
|
||||
struct {
|
||||
/* Parameters below are configured by VTY */
|
||||
int enabled;
|
||||
u_int8_t maio;
|
||||
u_int8_t hsn;
|
||||
struct bitvec arfcns;
|
||||
u_int8_t arfcns_data[1024/8];
|
||||
/* This is the pre-computed MA for channel assignments */
|
||||
struct bitvec ma;
|
||||
u_int8_t ma_len; /* part of ma_data that is used */
|
||||
u_int8_t ma_data[8]; /* 10.5.2.21: max 8 bytes value part */
|
||||
} hopping;
|
||||
|
||||
/* To which E1 subslot are we connected */
|
||||
struct gsm_e1_subslot e1_link;
|
||||
|
||||
struct gsm_lchan lchan[TS_MAX_LCHAN];
|
||||
};
|
||||
|
||||
/* One TRX in a BTS */
|
||||
struct gsm_bts_trx {
|
||||
/* list header in bts->trx_list */
|
||||
struct llist_head list;
|
||||
|
||||
struct gsm_bts *bts;
|
||||
/* number of this TRX in the BTS */
|
||||
u_int8_t nr;
|
||||
/* human readable name / description */
|
||||
char *description;
|
||||
/* how do we talk RSL with this TRX? */
|
||||
struct gsm_e1_subslot rsl_e1_link;
|
||||
u_int8_t rsl_tei;
|
||||
struct e1inp_sign_link *rsl_link;
|
||||
|
||||
struct gsm_nm_state nm_state;
|
||||
struct tlv_parsed nm_attr;
|
||||
struct {
|
||||
struct gsm_nm_state nm_state;
|
||||
} bb_transc;
|
||||
|
||||
u_int16_t arfcn;
|
||||
int nominal_power; /* in dBm */
|
||||
unsigned int max_power_red; /* in actual dB */
|
||||
|
||||
union {
|
||||
struct {
|
||||
struct {
|
||||
struct gsm_nm_state nm_state;
|
||||
} bbsig;
|
||||
struct {
|
||||
struct gsm_nm_state nm_state;
|
||||
} pa;
|
||||
} bs11;
|
||||
struct {
|
||||
unsigned int test_state;
|
||||
u_int8_t test_nr;
|
||||
struct rxlev_stats rxlev_stat;
|
||||
} ipaccess;
|
||||
};
|
||||
struct gsm_bts_trx_ts ts[TRX_NR_TS];
|
||||
};
|
||||
|
||||
#define GSM_BTS_SI(bts, i) (void *)(bts->si_buf[i])
|
||||
|
||||
enum gsm_bts_type {
|
||||
GSM_BTS_TYPE_UNKNOWN,
|
||||
GSM_BTS_TYPE_BS11,
|
||||
GSM_BTS_TYPE_NANOBTS,
|
||||
};
|
||||
|
||||
struct gsm_bts_model {
|
||||
struct llist_head list;
|
||||
|
||||
enum gsm_bts_type type;
|
||||
const char *name;
|
||||
|
||||
struct tlv_definition nm_att_tlvdef;
|
||||
|
||||
struct bitvec features;
|
||||
uint8_t _features_data[128/8];
|
||||
};
|
||||
|
||||
enum gsm_bts_features {
|
||||
BTS_FEAT_HSCSD,
|
||||
BTS_FEAT_GPRS,
|
||||
BTS_FEAT_EGPRS,
|
||||
BTS_FEAT_ECSD,
|
||||
BTS_FEAT_HOPPING,
|
||||
};
|
||||
|
||||
/**
|
||||
* A pending paging request
|
||||
*/
|
||||
struct gsm_paging_request {
|
||||
/* list_head for list of all paging requests */
|
||||
struct llist_head entry;
|
||||
/* the subscriber which we're paging. Later gsm_paging_request
|
||||
* should probably become a part of the gsm_subscriber struct? */
|
||||
struct gsm_subscriber *subscr;
|
||||
/* back-pointer to the BTS on which we are paging */
|
||||
struct gsm_bts *bts;
|
||||
/* what kind of channel type do we ask the MS to establish */
|
||||
int chan_type;
|
||||
|
||||
/* Timer 3113: how long do we try to page? */
|
||||
struct timer_list T3113;
|
||||
|
||||
/* callback to be called in case paging completes */
|
||||
gsm_cbfn *cbfn;
|
||||
void *cbfn_param;
|
||||
};
|
||||
|
||||
/*
|
||||
* This keeps track of the paging status of one BTS. It
|
||||
* includes a number of pending requests, a back pointer
|
||||
* to the gsm_bts, a timer and some more state.
|
||||
*/
|
||||
struct gsm_bts_paging_state {
|
||||
/* pending requests */
|
||||
struct llist_head pending_requests;
|
||||
struct gsm_bts *bts;
|
||||
|
||||
struct timer_list work_timer;
|
||||
|
||||
/* load */
|
||||
u_int16_t available_slots;
|
||||
};
|
||||
|
||||
struct gsm_envabtse {
|
||||
struct gsm_nm_state nm_state;
|
||||
};
|
||||
|
||||
struct gsm_bts_gprs_nsvc {
|
||||
struct gsm_bts *bts;
|
||||
/* data read via VTY config file, to configure the BTS
|
||||
* via OML from BSC */
|
||||
int id;
|
||||
u_int16_t nsvci;
|
||||
u_int16_t local_port; /* on the BTS */
|
||||
u_int16_t remote_port; /* on the SGSN */
|
||||
u_int32_t remote_ip; /* on the SGSN */
|
||||
|
||||
struct gsm_nm_state nm_state;
|
||||
};
|
||||
|
||||
/* One BTS */
|
||||
struct gsm_bts {
|
||||
/* list header in net->bts_list */
|
||||
struct llist_head list;
|
||||
|
||||
struct gsm_network *network;
|
||||
/* number of ths BTS in network */
|
||||
u_int8_t nr;
|
||||
/* human readable name / description */
|
||||
char *description;
|
||||
/* Cell Identity */
|
||||
u_int16_t cell_identity;
|
||||
/* location area code of this BTS */
|
||||
u_int16_t location_area_code;
|
||||
/* Training Sequence Code */
|
||||
u_int8_t tsc;
|
||||
/* Base Station Identification Code (BSIC) */
|
||||
u_int8_t bsic;
|
||||
/* type of BTS */
|
||||
enum gsm_bts_type type;
|
||||
struct gsm_bts_model *model;
|
||||
enum gsm_band band;
|
||||
/* should the channel allocator allocate channels from high TRX to TRX0,
|
||||
* rather than starting from TRX0 and go upwards? */
|
||||
int chan_alloc_reverse;
|
||||
/* maximum Tx power that the MS is permitted to use in this cell */
|
||||
int ms_max_power;
|
||||
|
||||
/* how do we talk OML with this TRX? */
|
||||
struct gsm_e1_subslot oml_e1_link;
|
||||
u_int8_t oml_tei;
|
||||
struct e1inp_sign_link *oml_link;
|
||||
|
||||
/* Abis network management O&M handle */
|
||||
struct abis_nm_h *nmh;
|
||||
struct gsm_nm_state nm_state;
|
||||
struct tlv_parsed nm_attr;
|
||||
|
||||
/* number of this BTS on given E1 link */
|
||||
u_int8_t bts_nr;
|
||||
|
||||
/* paging state and control */
|
||||
struct gsm_bts_paging_state paging;
|
||||
|
||||
/* CCCH is on C0 */
|
||||
struct gsm_bts_trx *c0;
|
||||
|
||||
struct {
|
||||
struct gsm_nm_state nm_state;
|
||||
} site_mgr;
|
||||
|
||||
/* parameters from which we build SYSTEM INFORMATION */
|
||||
struct {
|
||||
struct gsm48_rach_control rach_control;
|
||||
u_int8_t ncc_permitted;
|
||||
struct gsm48_cell_sel_par cell_sel_par;
|
||||
struct gsm48_cell_options cell_options;
|
||||
struct gsm48_control_channel_descr chan_desc;
|
||||
struct bitvec neigh_list;
|
||||
struct bitvec cell_alloc;
|
||||
struct {
|
||||
/* bitmask large enough for all possible ARFCN's */
|
||||
u_int8_t neigh_list[1024/8];
|
||||
u_int8_t cell_alloc[1024/8];
|
||||
} data;
|
||||
} si_common;
|
||||
|
||||
/* do we use static (user-defined) system information messages? (bitmask) */
|
||||
uint32_t si_mode_static;
|
||||
/* bitmask of all SI that are present/valid in si_buf */
|
||||
uint32_t si_valid;
|
||||
/* buffers where we put the pre-computed SI */
|
||||
sysinfo_buf_t si_buf[_MAX_SYSINFO_TYPE];
|
||||
|
||||
/* ip.accesss Unit ID's have Site/BTS/TRX layout */
|
||||
union {
|
||||
struct {
|
||||
u_int16_t site_id;
|
||||
u_int16_t bts_id;
|
||||
u_int32_t flags;
|
||||
} ip_access;
|
||||
struct {
|
||||
struct {
|
||||
struct gsm_nm_state nm_state;
|
||||
} cclk;
|
||||
struct {
|
||||
struct gsm_nm_state nm_state;
|
||||
} rack;
|
||||
struct gsm_envabtse envabtse[4];
|
||||
} bs11;
|
||||
};
|
||||
|
||||
/* Not entirely sure how ip.access specific this is */
|
||||
struct {
|
||||
enum bts_gprs_mode mode;
|
||||
struct {
|
||||
struct gsm_nm_state nm_state;
|
||||
u_int16_t nsei;
|
||||
uint8_t timer[7];
|
||||
} nse;
|
||||
struct {
|
||||
struct gsm_nm_state nm_state;
|
||||
u_int16_t bvci;
|
||||
uint8_t timer[11];
|
||||
} cell;
|
||||
struct gsm_bts_gprs_nsvc nsvc[2];
|
||||
u_int8_t rac;
|
||||
} gprs;
|
||||
|
||||
/* RACH NM values */
|
||||
int rach_b_thresh;
|
||||
int rach_ldavg_slots;
|
||||
|
||||
/* transceivers */
|
||||
int num_trx;
|
||||
struct llist_head trx_list;
|
||||
};
|
||||
|
||||
/* Some statistics of our network */
|
||||
struct gsmnet_stats {
|
||||
struct {
|
||||
struct counter *total;
|
||||
struct counter *no_channel;
|
||||
struct osmo_counter *total;
|
||||
struct osmo_counter *no_channel;
|
||||
} chreq;
|
||||
struct {
|
||||
struct counter *attempted;
|
||||
struct counter *no_channel; /* no channel available */
|
||||
struct counter *timeout; /* T3103 timeout */
|
||||
struct counter *completed; /* HO COMPL received */
|
||||
struct counter *failed; /* HO FAIL received */
|
||||
struct osmo_counter *attempted;
|
||||
struct osmo_counter *no_channel; /* no channel available */
|
||||
struct osmo_counter *timeout; /* T3103 timeout */
|
||||
struct osmo_counter *completed; /* HO COMPL received */
|
||||
struct osmo_counter *failed; /* HO FAIL received */
|
||||
} handover;
|
||||
struct {
|
||||
struct counter *attach;
|
||||
struct counter *normal;
|
||||
struct counter *periodic;
|
||||
struct counter *detach;
|
||||
struct osmo_counter *attach;
|
||||
struct osmo_counter *normal;
|
||||
struct osmo_counter *periodic;
|
||||
struct osmo_counter *detach;
|
||||
} loc_upd_type;
|
||||
struct {
|
||||
struct counter *reject;
|
||||
struct counter *accept;
|
||||
struct osmo_counter *reject;
|
||||
struct osmo_counter *accept;
|
||||
} loc_upd_resp;
|
||||
struct {
|
||||
struct counter *attempted;
|
||||
struct counter *detached;
|
||||
struct counter *completed;
|
||||
struct counter *expired;
|
||||
struct osmo_counter *attempted;
|
||||
struct osmo_counter *detached;
|
||||
struct osmo_counter *completed;
|
||||
struct osmo_counter *expired;
|
||||
} paging;
|
||||
struct {
|
||||
struct counter *submitted; /* MO SMS submissions */
|
||||
struct counter *no_receiver;
|
||||
struct counter *delivered; /* MT SMS deliveries */
|
||||
struct counter *rp_err_mem;
|
||||
struct counter *rp_err_other;
|
||||
struct osmo_counter *submitted; /* MO SMS submissions */
|
||||
struct osmo_counter *no_receiver;
|
||||
struct osmo_counter *delivered; /* MT SMS deliveries */
|
||||
struct osmo_counter *rp_err_mem;
|
||||
struct osmo_counter *rp_err_other;
|
||||
} sms;
|
||||
struct {
|
||||
struct counter *dialled; /* total number of dialled calls */
|
||||
struct counter *alerted; /* we alerted the other end */
|
||||
struct counter *connected;/* how many calls were accepted */
|
||||
struct osmo_counter *mo_setup;
|
||||
struct osmo_counter *mo_connect_ack;
|
||||
struct osmo_counter *mt_setup;
|
||||
struct osmo_counter *mt_connect;
|
||||
} call;
|
||||
struct {
|
||||
struct counter *rf_fail;
|
||||
struct counter *rll_err;
|
||||
struct osmo_counter *rf_fail;
|
||||
struct osmo_counter *rll_err;
|
||||
} chan;
|
||||
struct {
|
||||
struct counter *oml_fail;
|
||||
struct counter *rsl_fail;
|
||||
struct osmo_counter *oml_fail;
|
||||
struct osmo_counter *rsl_fail;
|
||||
} bts;
|
||||
};
|
||||
|
||||
@@ -655,8 +217,8 @@ enum gsm_auth_policy {
|
||||
|
||||
struct gsm_network {
|
||||
/* global parameters */
|
||||
u_int16_t country_code;
|
||||
u_int16_t network_code;
|
||||
uint16_t country_code;
|
||||
uint16_t network_code;
|
||||
char *name_long;
|
||||
char *name_short;
|
||||
enum gsm_auth_policy auth_policy;
|
||||
@@ -684,7 +246,7 @@ struct gsm_network {
|
||||
struct gsmnet_stats stats;
|
||||
|
||||
/* layer 4 */
|
||||
int (*mncc_recv) (struct gsm_network *net, int msg_type, void *arg);
|
||||
int (*mncc_recv) (struct gsm_network *net, struct msgb *msg);
|
||||
struct llist_head upqueue;
|
||||
struct llist_head trans_list;
|
||||
struct bsc_api *bsc_api;
|
||||
@@ -703,13 +265,29 @@ struct gsm_network {
|
||||
int T3115;
|
||||
int T3117;
|
||||
int T3119;
|
||||
int T3122;
|
||||
int T3141;
|
||||
|
||||
/* Radio Resource Location Protocol (TS 04.31) */
|
||||
struct {
|
||||
enum rrlp_mode mode;
|
||||
} rrlp;
|
||||
int msc_prio;
|
||||
|
||||
/* enable the DTXu and DTXd for this network */
|
||||
int dtx_enabled;
|
||||
|
||||
enum gsm_chan_t ctype_by_chreq[16];
|
||||
|
||||
/* Use a TCH for handling requests of type paging any */
|
||||
int pag_any_tch;
|
||||
|
||||
/* MSC data in case we are a true BSC */
|
||||
struct osmo_msc_data *msc_data;
|
||||
int hardcoded_rtp_payload;
|
||||
|
||||
/* subscriber related features */
|
||||
int keep_subscr;
|
||||
struct gsm_sms_queue *sms_queue;
|
||||
};
|
||||
|
||||
#define SMS_HDR_SIZE 128
|
||||
@@ -720,56 +298,32 @@ struct gsm_sms {
|
||||
struct gsm_subscriber *receiver;
|
||||
|
||||
unsigned long validity_minutes;
|
||||
u_int8_t reply_path_req;
|
||||
u_int8_t status_rep_req;
|
||||
u_int8_t ud_hdr_ind;
|
||||
u_int8_t protocol_id;
|
||||
u_int8_t data_coding_scheme;
|
||||
u_int8_t msg_ref;
|
||||
uint8_t reply_path_req;
|
||||
uint8_t status_rep_req;
|
||||
uint8_t ud_hdr_ind;
|
||||
uint8_t protocol_id;
|
||||
uint8_t data_coding_scheme;
|
||||
uint8_t msg_ref;
|
||||
char dest_addr[20+1]; /* DA LV is 12 bytes max, i.e. 10 bytes
|
||||
* BCD == 20 bytes string */
|
||||
u_int8_t user_data_len;
|
||||
u_int8_t user_data[SMS_TEXT_SIZE];
|
||||
uint8_t user_data_len;
|
||||
uint8_t user_data[SMS_TEXT_SIZE];
|
||||
|
||||
char text[SMS_TEXT_SIZE];
|
||||
};
|
||||
|
||||
|
||||
struct gsm_network *gsm_network_init(u_int16_t country_code, u_int16_t network_code,
|
||||
int (*mncc_recv)(struct gsm_network *, int, void *));
|
||||
struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, enum gsm_bts_type type,
|
||||
u_int8_t tsc, u_int8_t bsic);
|
||||
struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts);
|
||||
struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_code,
|
||||
int (*mncc_recv)(struct gsm_network *, struct msgb *));
|
||||
int gsm_set_bts_type(struct gsm_bts *bts, enum gsm_bts_type type);
|
||||
|
||||
struct gsm_bts *gsm_bts_num(struct gsm_network *net, int num);
|
||||
|
||||
/* Get reference to a neighbor cell on a given BCCH ARFCN */
|
||||
struct gsm_bts *gsm_bts_neighbor(const struct gsm_bts *bts,
|
||||
u_int16_t arfcn, u_int8_t bsic);
|
||||
uint16_t arfcn, uint8_t bsic);
|
||||
|
||||
struct gsm_bts_trx *gsm_bts_trx_num(struct gsm_bts *bts, int num);
|
||||
|
||||
const char *gsm_pchan_name(enum gsm_phys_chan_config c);
|
||||
enum gsm_phys_chan_config gsm_pchan_parse(const char *name);
|
||||
const char *gsm_lchant_name(enum gsm_chan_t c);
|
||||
const char *gsm_chreq_name(enum gsm_chreq_reason_t c);
|
||||
char *gsm_trx_name(struct gsm_bts_trx *trx);
|
||||
char *gsm_ts_name(struct gsm_bts_trx_ts *ts);
|
||||
char *gsm_lchan_name(struct gsm_lchan *lchan);
|
||||
const char *gsm_lchans_name(enum gsm_lchan_state s);
|
||||
|
||||
enum gsm_e1_event {
|
||||
EVT_E1_NONE,
|
||||
EVT_E1_TEI_UP,
|
||||
EVT_E1_TEI_DN,
|
||||
};
|
||||
|
||||
void set_ts_e1link(struct gsm_bts_trx_ts *ts, u_int8_t e1_nr,
|
||||
u_int8_t e1_ts, u_int8_t e1_ts_ss);
|
||||
enum gsm_bts_type parse_btstype(const char *arg);
|
||||
const char *btstype2str(enum gsm_bts_type type);
|
||||
struct gsm_bts_trx *gsm_bts_trx_by_nr(struct gsm_bts *bts, int nr);
|
||||
struct gsm_bts *gsm_bts_by_lac(struct gsm_network *net, unsigned int lac,
|
||||
struct gsm_bts *start_bts);
|
||||
|
||||
@@ -799,7 +353,6 @@ static inline int is_siemens_bts(struct gsm_bts *bts)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
enum gsm_auth_policy gsm_auth_policy_parse(const char *arg);
|
||||
const char *gsm_auth_policy_name(enum gsm_auth_policy policy);
|
||||
|
||||
@@ -809,17 +362,24 @@ const char *rrlp_mode_name(enum rrlp_mode mode);
|
||||
enum bts_gprs_mode bts_gprs_mode_parse(const char *arg);
|
||||
const char *bts_gprs_mode_name(enum bts_gprs_mode mode);
|
||||
|
||||
void gsm_trx_lock_rf(struct gsm_bts_trx *trx, int locked);
|
||||
|
||||
int gsm48_ra_id_by_bts(u_int8_t *buf, struct gsm_bts *bts);
|
||||
int gsm48_ra_id_by_bts(uint8_t *buf, struct gsm_bts *bts);
|
||||
void gprs_ra_id_by_bts(struct gprs_ra_id *raid, struct gsm_bts *bts);
|
||||
struct gsm_meas_rep *lchan_next_meas_rep(struct gsm_lchan *lchan);
|
||||
|
||||
int gsm_btsmodel_set_feature(struct gsm_bts_model *model, enum gsm_bts_features feat);
|
||||
int gsm_bts_has_feature(struct gsm_bts *bts, enum gsm_bts_features feat);
|
||||
int gsm_bts_model_register(struct gsm_bts_model *model);
|
||||
|
||||
struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan);
|
||||
void subscr_con_free(struct gsm_subscriber_connection *conn);
|
||||
|
||||
#endif
|
||||
struct gsm_bts *gsm_bts_alloc_register(struct gsm_network *net,
|
||||
enum gsm_bts_type type,
|
||||
uint8_t tsc, uint8_t bsic);
|
||||
void set_ts_e1link(struct gsm_bts_trx_ts *ts, uint8_t e1_nr,
|
||||
uint8_t e1_ts, uint8_t e1_ts_ss);
|
||||
|
||||
void gsm_trx_lock_rf(struct gsm_bts_trx *trx, int locked);
|
||||
int gsm_bts_has_feature(struct gsm_bts *bts, enum gsm_bts_features feat);
|
||||
struct gsm_bts_trx *gsm_bts_trx_by_nr(struct gsm_bts *bts, int nr);
|
||||
|
||||
#endif /* _GSM_DATA_H */
|
||||
|
590
openbsc/include/openbsc/gsm_data_shared.h
Normal file
590
openbsc/include/openbsc/gsm_data_shared.h
Normal file
@@ -0,0 +1,590 @@
|
||||
#ifndef _GSM_DATA_SHAREDH
|
||||
#define _GSM_DATA_SHAREDH
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <osmocom/core/timer.h>
|
||||
#include <osmocom/core/bitvec.h>
|
||||
#include <osmocom/core/statistics.h>
|
||||
#include <osmocom/core/utils.h>
|
||||
#include <osmocom/gsm/gsm_utils.h>
|
||||
#include <osmocom/gsm/tlv.h>
|
||||
#include <osmocom/gsm/rxlev_stat.h>
|
||||
#include <osmocom/gsm/sysinfo.h>
|
||||
|
||||
#include <osmocom/gsm/protocol/gsm_08_58.h>
|
||||
#include <osmocom/gsm/protocol/gsm_12_21.h>
|
||||
|
||||
struct osmo_msc_data;
|
||||
struct osmo_bsc_sccp_con;
|
||||
struct gsm_sms_queue;
|
||||
|
||||
/* RRLP mode of operation */
|
||||
enum rrlp_mode {
|
||||
RRLP_MODE_NONE,
|
||||
RRLP_MODE_MS_BASED,
|
||||
RRLP_MODE_MS_PREF,
|
||||
RRLP_MODE_ASS_PREF,
|
||||
};
|
||||
|
||||
/* Channel Request reason */
|
||||
enum gsm_chreq_reason_t {
|
||||
GSM_CHREQ_REASON_EMERG,
|
||||
GSM_CHREQ_REASON_PAG,
|
||||
GSM_CHREQ_REASON_CALL,
|
||||
GSM_CHREQ_REASON_LOCATION_UPD,
|
||||
GSM_CHREQ_REASON_OTHER,
|
||||
};
|
||||
|
||||
#define TRX_NR_TS 8
|
||||
#define TS_MAX_LCHAN 8
|
||||
|
||||
#define HARDCODED_ARFCN 123
|
||||
#define HARDCODED_TSC 7
|
||||
#define HARDCODED_BSIC 0x3f /* NCC = 7 / BCC = 7 */
|
||||
|
||||
/* for multi-drop config */
|
||||
#define HARDCODED_BTS0_TS 1
|
||||
#define HARDCODED_BTS1_TS 6
|
||||
#define HARDCODED_BTS2_TS 11
|
||||
|
||||
/* reserved according to GSM 03.03 § 2.4 */
|
||||
#define GSM_RESERVED_TMSI 0xFFFFFFFF
|
||||
|
||||
enum gsm_hooks {
|
||||
GSM_HOOK_NM_SWLOAD,
|
||||
GSM_HOOK_RR_PAGING,
|
||||
GSM_HOOK_RR_SECURITY,
|
||||
};
|
||||
|
||||
enum gsm_paging_event {
|
||||
GSM_PAGING_SUCCEEDED,
|
||||
GSM_PAGING_EXPIRED,
|
||||
GSM_PAGING_OOM,
|
||||
GSM_PAGING_BUSY,
|
||||
};
|
||||
|
||||
enum bts_gprs_mode {
|
||||
BTS_GPRS_NONE = 0,
|
||||
BTS_GPRS_GPRS = 1,
|
||||
BTS_GPRS_EGPRS = 2,
|
||||
};
|
||||
|
||||
struct gsm_lchan;
|
||||
struct gsm_subscriber;
|
||||
struct gsm_mncc;
|
||||
struct rtp_socket;
|
||||
struct bsc_api;
|
||||
|
||||
/* Network Management State */
|
||||
struct gsm_nm_state {
|
||||
uint8_t operational;
|
||||
uint8_t administrative;
|
||||
uint8_t availability;
|
||||
};
|
||||
|
||||
struct gsm_abis_mo {
|
||||
uint8_t obj_class;
|
||||
struct abis_om_obj_inst obj_inst;
|
||||
const char *name;
|
||||
struct gsm_nm_state nm_state;
|
||||
struct tlv_parsed *nm_attr;
|
||||
struct gsm_bts *bts;
|
||||
};
|
||||
|
||||
#define MAX_A5_KEY_LEN (128/8)
|
||||
#define A38_XOR_MIN_KEY_LEN 12
|
||||
#define A38_XOR_MAX_KEY_LEN 16
|
||||
#define A38_COMP128_KEY_LEN 16
|
||||
#define RSL_ENC_ALG_A5(x) (x+1)
|
||||
|
||||
/* is the data link established? who established it? */
|
||||
#define LCHAN_SAPI_UNUSED 0
|
||||
#define LCHAN_SAPI_MS 1
|
||||
#define LCHAN_SAPI_NET 2
|
||||
|
||||
/* state of a logical channel */
|
||||
enum gsm_lchan_state {
|
||||
LCHAN_S_NONE, /* channel is not active */
|
||||
LCHAN_S_ACT_REQ, /* channel activatin requested */
|
||||
LCHAN_S_ACTIVE, /* channel is active and operational */
|
||||
LCHAN_S_REL_REQ, /* channel release has been requested */
|
||||
LCHAN_S_REL_ERR, /* channel is in an error state */
|
||||
LCHAN_S_INACTIVE, /* channel is set inactive */
|
||||
};
|
||||
|
||||
/* BTS ONLY */
|
||||
#define MAX_NUM_UL_MEAS 104
|
||||
#define LC_UL_M_F_L1_VALID (1 << 0)
|
||||
#define LC_UL_M_F_RES_VALID (1 << 1)
|
||||
|
||||
struct bts_ul_meas {
|
||||
/* BER in units of 0.01%: 10.000 == 100% ber, 0 == 0% ber */
|
||||
uint16_t ber10k;
|
||||
/* timing advance offset (in quarter bits) */
|
||||
int16_t ta_offs_qbits;
|
||||
/* C/I ratio in dB */
|
||||
float c_i;
|
||||
/* flags */
|
||||
uint8_t is_sub:1;
|
||||
/* RSSI in dBm * -1 */
|
||||
uint8_t inv_rssi;
|
||||
};
|
||||
/* /BTS ONLY */
|
||||
|
||||
struct gsm_lchan {
|
||||
/* The TS that we're part of */
|
||||
struct gsm_bts_trx_ts *ts;
|
||||
/* The logical subslot number in the TS */
|
||||
uint8_t nr;
|
||||
/* The logical channel type */
|
||||
enum gsm_chan_t type;
|
||||
/* RSL channel mode */
|
||||
enum rsl_cmod_spd rsl_cmode;
|
||||
/* If TCH, traffic channel mode */
|
||||
enum gsm48_chan_mode tch_mode;
|
||||
/* State */
|
||||
enum gsm_lchan_state state;
|
||||
/* Power levels for MS and BTS */
|
||||
uint8_t bs_power;
|
||||
uint8_t ms_power;
|
||||
/* Encryption information */
|
||||
struct {
|
||||
uint8_t alg_id;
|
||||
uint8_t key_len;
|
||||
uint8_t key[MAX_A5_KEY_LEN];
|
||||
} encr;
|
||||
|
||||
/* AMR bits */
|
||||
struct gsm48_multi_rate_conf mr_conf;
|
||||
|
||||
/* Established data link layer services */
|
||||
uint8_t sapis[8];
|
||||
int sach_deact;
|
||||
int release_reason;
|
||||
|
||||
struct {
|
||||
uint32_t bound_ip;
|
||||
uint32_t connect_ip;
|
||||
uint16_t bound_port;
|
||||
uint16_t connect_port;
|
||||
uint16_t conn_id;
|
||||
uint8_t rtp_payload;
|
||||
uint8_t rtp_payload2;
|
||||
uint8_t speech_mode;
|
||||
struct rtp_socket *rtp_socket;
|
||||
} abis_ip;
|
||||
|
||||
uint8_t rqd_ta;
|
||||
|
||||
#ifdef ROLE_BSC
|
||||
struct osmo_timer_list T3101;
|
||||
struct osmo_timer_list T3111;
|
||||
struct osmo_timer_list error_timer;
|
||||
|
||||
/* table of neighbor cell measurements */
|
||||
struct neigh_meas_proc neigh_meas[MAX_NEIGH_MEAS];
|
||||
|
||||
/* cache of last measurement reports on this lchan */
|
||||
struct gsm_meas_rep meas_rep[6];
|
||||
int meas_rep_idx;
|
||||
|
||||
/* GSM Random Access data */
|
||||
struct gsm48_req_ref *rqd_ref;
|
||||
|
||||
struct gsm_subscriber_connection *conn;
|
||||
#else
|
||||
struct lapdm_channel lapdm_ch;
|
||||
struct {
|
||||
/* bitmask of all SI that are present/valid in si_buf */
|
||||
uint32_t valid;
|
||||
uint32_t last;
|
||||
/* buffers where we put the pre-computed SI */
|
||||
sysinfo_buf_t buf[_MAX_SYSINFO_TYPE];
|
||||
} si;
|
||||
struct {
|
||||
uint8_t flags;
|
||||
/* RSL measurment result number, 0 at lchan_act */
|
||||
uint8_t res_nr;
|
||||
/* current Tx power level of the BTS */
|
||||
uint8_t bts_tx_pwr;
|
||||
/* number of measurements stored in array below */
|
||||
uint8_t num_ul_meas;
|
||||
struct bts_ul_meas uplink[MAX_NUM_UL_MEAS];
|
||||
/* last L1 header from the MS */
|
||||
uint8_t l1_info[2];
|
||||
struct {
|
||||
uint8_t rxlev_full;
|
||||
uint8_t rxlev_sub;
|
||||
uint8_t rxqual_full;
|
||||
uint8_t rxqual_sub;
|
||||
} res;
|
||||
} meas;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
struct gsm_e1_subslot {
|
||||
/* Number of E1 link */
|
||||
uint8_t e1_nr;
|
||||
/* Number of E1 TS inside E1 link */
|
||||
uint8_t e1_ts;
|
||||
/* Sub-slot within the E1 TS, 0xff if full TS */
|
||||
uint8_t e1_ts_ss;
|
||||
};
|
||||
|
||||
#define TS_F_PDCH_MODE 0x1000
|
||||
/* One Timeslot in a TRX */
|
||||
struct gsm_bts_trx_ts {
|
||||
struct gsm_bts_trx *trx;
|
||||
/* number of this timeslot at the TRX */
|
||||
uint8_t nr;
|
||||
|
||||
enum gsm_phys_chan_config pchan;
|
||||
|
||||
unsigned int flags;
|
||||
struct gsm_abis_mo mo;
|
||||
struct tlv_parsed nm_attr;
|
||||
uint8_t nm_chan_comb;
|
||||
int tsc; /* -1 == use BTS TSC */
|
||||
|
||||
struct {
|
||||
/* Parameters below are configured by VTY */
|
||||
int enabled;
|
||||
uint8_t maio;
|
||||
uint8_t hsn;
|
||||
struct bitvec arfcns;
|
||||
uint8_t arfcns_data[1024/8];
|
||||
/* This is the pre-computed MA for channel assignments */
|
||||
struct bitvec ma;
|
||||
uint8_t ma_len; /* part of ma_data that is used */
|
||||
uint8_t ma_data[8]; /* 10.5.2.21: max 8 bytes value part */
|
||||
} hopping;
|
||||
|
||||
/* To which E1 subslot are we connected */
|
||||
struct gsm_e1_subslot e1_link;
|
||||
|
||||
struct gsm_lchan lchan[TS_MAX_LCHAN];
|
||||
};
|
||||
|
||||
/* One TRX in a BTS */
|
||||
struct gsm_bts_trx {
|
||||
/* list header in bts->trx_list */
|
||||
struct llist_head list;
|
||||
|
||||
struct gsm_bts *bts;
|
||||
/* number of this TRX in the BTS */
|
||||
uint8_t nr;
|
||||
/* human readable name / description */
|
||||
char *description;
|
||||
/* how do we talk RSL with this TRX? */
|
||||
struct gsm_e1_subslot rsl_e1_link;
|
||||
uint8_t rsl_tei;
|
||||
struct e1inp_sign_link *rsl_link;
|
||||
/* Some BTS (specifically Ericsson RBS) have a per-TRX OML Link */
|
||||
struct e1inp_sign_link *oml_link;
|
||||
|
||||
struct gsm_abis_mo mo;
|
||||
struct tlv_parsed nm_attr;
|
||||
struct {
|
||||
struct gsm_abis_mo mo;
|
||||
} bb_transc;
|
||||
|
||||
uint16_t arfcn;
|
||||
int nominal_power; /* in dBm */
|
||||
unsigned int max_power_red; /* in actual dB */
|
||||
|
||||
struct {
|
||||
void *l1h;
|
||||
} role_bts;
|
||||
|
||||
union {
|
||||
struct {
|
||||
struct {
|
||||
struct gsm_abis_mo mo;
|
||||
} bbsig;
|
||||
struct {
|
||||
struct gsm_abis_mo mo;
|
||||
} pa;
|
||||
} bs11;
|
||||
struct {
|
||||
unsigned int test_state;
|
||||
uint8_t test_nr;
|
||||
struct rxlev_stats rxlev_stat;
|
||||
} ipaccess;
|
||||
};
|
||||
struct gsm_bts_trx_ts ts[TRX_NR_TS];
|
||||
};
|
||||
|
||||
#define GSM_BTS_SI(bts, i) (void *)(bts->si_buf[i])
|
||||
|
||||
enum gsm_bts_type {
|
||||
GSM_BTS_TYPE_UNKNOWN,
|
||||
GSM_BTS_TYPE_BS11,
|
||||
GSM_BTS_TYPE_NANOBTS,
|
||||
GSM_BTS_TYPE_RBS2000,
|
||||
GSM_BTS_TYPE_HSL_FEMTO,
|
||||
};
|
||||
|
||||
struct vty;
|
||||
|
||||
struct gsm_bts_model {
|
||||
struct llist_head list;
|
||||
|
||||
enum gsm_bts_type type;
|
||||
const char *name;
|
||||
|
||||
bool started;
|
||||
int (*start)(struct gsm_network *net);
|
||||
int (*oml_rcvmsg)(struct msgb *msg);
|
||||
|
||||
void (*config_write_bts)(struct vty *vty, struct gsm_bts *bts);
|
||||
void (*config_write_trx)(struct vty *vty, struct gsm_bts_trx *trx);
|
||||
void (*config_write_ts)(struct vty *vty, struct gsm_bts_trx_ts *ts);
|
||||
|
||||
struct tlv_definition nm_att_tlvdef;
|
||||
|
||||
struct bitvec features;
|
||||
uint8_t _features_data[128/8];
|
||||
};
|
||||
|
||||
enum gsm_bts_features {
|
||||
BTS_FEAT_HSCSD,
|
||||
BTS_FEAT_GPRS,
|
||||
BTS_FEAT_EGPRS,
|
||||
BTS_FEAT_ECSD,
|
||||
BTS_FEAT_HOPPING,
|
||||
};
|
||||
|
||||
/*
|
||||
* This keeps track of the paging status of one BTS. It
|
||||
* includes a number of pending requests, a back pointer
|
||||
* to the gsm_bts, a timer and some more state.
|
||||
*/
|
||||
struct gsm_bts_paging_state {
|
||||
/* pending requests */
|
||||
struct llist_head pending_requests;
|
||||
struct gsm_bts *bts;
|
||||
|
||||
struct osmo_timer_list work_timer;
|
||||
struct osmo_timer_list credit_timer;
|
||||
|
||||
/* free chans needed */
|
||||
int free_chans_need;
|
||||
|
||||
/* load */
|
||||
uint16_t available_slots;
|
||||
};
|
||||
|
||||
struct gsm_envabtse {
|
||||
struct gsm_abis_mo mo;
|
||||
};
|
||||
|
||||
struct gsm_bts_gprs_nsvc {
|
||||
struct gsm_bts *bts;
|
||||
/* data read via VTY config file, to configure the BTS
|
||||
* via OML from BSC */
|
||||
int id;
|
||||
uint16_t nsvci;
|
||||
uint16_t local_port; /* on the BTS */
|
||||
uint16_t remote_port; /* on the SGSN */
|
||||
uint32_t remote_ip; /* on the SGSN */
|
||||
|
||||
struct gsm_abis_mo mo;
|
||||
};
|
||||
|
||||
enum neigh_list_manual_mode {
|
||||
NL_MODE_AUTOMATIC = 0,
|
||||
NL_MODE_MANUAL = 1,
|
||||
NL_MODE_MANUAL_SI5SEP = 2, /* SI2 and SI5 have separate neighbor lists */
|
||||
};
|
||||
|
||||
/* One BTS */
|
||||
struct gsm_bts {
|
||||
/* list header in net->bts_list */
|
||||
struct llist_head list;
|
||||
|
||||
/* number of ths BTS in network */
|
||||
uint8_t nr;
|
||||
/* human readable name / description */
|
||||
char *description;
|
||||
/* Cell Identity */
|
||||
uint16_t cell_identity;
|
||||
/* location area code of this BTS */
|
||||
uint16_t location_area_code;
|
||||
/* Training Sequence Code */
|
||||
uint8_t tsc;
|
||||
/* Base Station Identification Code (BSIC) */
|
||||
uint8_t bsic;
|
||||
/* type of BTS */
|
||||
enum gsm_bts_type type;
|
||||
struct gsm_bts_model *model;
|
||||
enum gsm_band band;
|
||||
/* maximum Tx power that the MS is permitted to use in this cell */
|
||||
int ms_max_power;
|
||||
|
||||
/* how do we talk OML with this TRX? */
|
||||
struct gsm_e1_subslot oml_e1_link;
|
||||
uint8_t oml_tei;
|
||||
struct e1inp_sign_link *oml_link;
|
||||
|
||||
/* Abis network management O&M handle */
|
||||
struct abis_nm_h *nmh;
|
||||
|
||||
struct gsm_abis_mo mo;
|
||||
|
||||
/* number of this BTS on given E1 link */
|
||||
uint8_t bts_nr;
|
||||
|
||||
/* paging state and control */
|
||||
struct gsm_bts_paging_state paging;
|
||||
|
||||
/* CCCH is on C0 */
|
||||
struct gsm_bts_trx *c0;
|
||||
|
||||
struct {
|
||||
struct gsm_abis_mo mo;
|
||||
} site_mgr;
|
||||
|
||||
/* bitmask of all SI that are present/valid in si_buf */
|
||||
uint32_t si_valid;
|
||||
/* buffers where we put the pre-computed SI */
|
||||
sysinfo_buf_t si_buf[_MAX_SYSINFO_TYPE];
|
||||
|
||||
/* ip.accesss Unit ID's have Site/BTS/TRX layout */
|
||||
union {
|
||||
struct {
|
||||
uint16_t site_id;
|
||||
uint16_t bts_id;
|
||||
uint32_t flags;
|
||||
} ip_access;
|
||||
struct {
|
||||
struct {
|
||||
struct gsm_abis_mo mo;
|
||||
} cclk;
|
||||
struct {
|
||||
struct gsm_abis_mo mo;
|
||||
} rack;
|
||||
struct gsm_envabtse envabtse[4];
|
||||
} bs11;
|
||||
struct {
|
||||
struct {
|
||||
struct gsm_abis_mo mo;
|
||||
struct llist_head conn_groups;
|
||||
} is;
|
||||
struct {
|
||||
struct gsm_abis_mo mo;
|
||||
struct llist_head conn_groups;
|
||||
} con;
|
||||
struct {
|
||||
struct gsm_abis_mo mo;
|
||||
} dp;
|
||||
struct {
|
||||
struct gsm_abis_mo mo;
|
||||
} tf;
|
||||
} rbs2000;
|
||||
struct {
|
||||
unsigned long serno;
|
||||
} hsl;
|
||||
};
|
||||
|
||||
/* Not entirely sure how ip.access specific this is */
|
||||
struct {
|
||||
enum bts_gprs_mode mode;
|
||||
struct {
|
||||
struct gsm_abis_mo mo;
|
||||
uint16_t nsei;
|
||||
uint8_t timer[7];
|
||||
} nse;
|
||||
struct {
|
||||
struct gsm_abis_mo mo;
|
||||
uint16_t bvci;
|
||||
uint8_t timer[11];
|
||||
} cell;
|
||||
struct gsm_bts_gprs_nsvc nsvc[2];
|
||||
uint8_t rac;
|
||||
} gprs;
|
||||
|
||||
/* RACH NM values */
|
||||
int rach_b_thresh;
|
||||
int rach_ldavg_slots;
|
||||
|
||||
/* transceivers */
|
||||
int num_trx;
|
||||
struct llist_head trx_list;
|
||||
|
||||
#ifdef ROLE_BSC
|
||||
/* Abis NM queue */
|
||||
struct llist_head abis_queue;
|
||||
int abis_nm_pend;
|
||||
|
||||
struct gsm_network *network;
|
||||
|
||||
/* should the channel allocator allocate channels from high TRX to TRX0,
|
||||
* rather than starting from TRX0 and go upwards? */
|
||||
int chan_alloc_reverse;
|
||||
|
||||
enum neigh_list_manual_mode neigh_list_manual_mode;
|
||||
/* parameters from which we build SYSTEM INFORMATION */
|
||||
struct {
|
||||
struct gsm48_rach_control rach_control;
|
||||
uint8_t ncc_permitted;
|
||||
struct gsm48_cell_sel_par cell_sel_par;
|
||||
struct gsm48_si_selection_params cell_ro_sel_par; /* rest octet */
|
||||
struct gsm48_cell_options cell_options;
|
||||
struct gsm48_control_channel_descr chan_desc;
|
||||
struct bitvec neigh_list;
|
||||
struct bitvec cell_alloc;
|
||||
struct bitvec si5_neigh_list;
|
||||
struct {
|
||||
/* bitmask large enough for all possible ARFCN's */
|
||||
uint8_t neigh_list[1024/8];
|
||||
uint8_t cell_alloc[1024/8];
|
||||
/* If the user wants a different neighbor list in SI5 than in SI2 */
|
||||
uint8_t si5_neigh_list[1024/8];
|
||||
} data;
|
||||
} si_common;
|
||||
|
||||
/* do we use static (user-defined) system information messages? (bitmask) */
|
||||
uint32_t si_mode_static;
|
||||
#endif /* ROLE_BSC */
|
||||
void *role;
|
||||
};
|
||||
|
||||
|
||||
struct gsm_bts *gsm_bts_alloc(void *talloc_ctx);
|
||||
struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts);
|
||||
|
||||
struct gsm_bts_trx *gsm_bts_trx_num(struct gsm_bts *bts, int num);
|
||||
|
||||
const char *gsm_pchan_name(enum gsm_phys_chan_config c);
|
||||
enum gsm_phys_chan_config gsm_pchan_parse(const char *name);
|
||||
const char *gsm_lchant_name(enum gsm_chan_t c);
|
||||
const char *gsm_chreq_name(enum gsm_chreq_reason_t c);
|
||||
char *gsm_trx_name(struct gsm_bts_trx *trx);
|
||||
char *gsm_ts_name(struct gsm_bts_trx_ts *ts);
|
||||
char *gsm_lchan_name(struct gsm_lchan *lchan);
|
||||
const char *gsm_lchans_name(enum gsm_lchan_state s);
|
||||
|
||||
|
||||
void gsm_abis_mo_reset(struct gsm_abis_mo *mo);
|
||||
|
||||
struct gsm_abis_mo *
|
||||
gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class,
|
||||
struct abis_om_obj_inst *obj_inst);
|
||||
|
||||
struct gsm_nm_state *
|
||||
gsm_objclass2nmstate(struct gsm_bts *bts, uint8_t obj_class,
|
||||
struct abis_om_obj_inst *obj_inst);
|
||||
void *
|
||||
gsm_objclass2obj(struct gsm_bts *bts, uint8_t obj_class,
|
||||
struct abis_om_obj_inst *obj_inst);
|
||||
|
||||
/* reset the state of all MO in the BTS */
|
||||
void gsm_bts_mo_reset(struct gsm_bts *bts);
|
||||
|
||||
uint8_t gsm_ts2chan_nr(const struct gsm_bts_trx_ts *ts, uint8_t lchan_nr);
|
||||
uint8_t gsm_lchan2chan_nr(const struct gsm_lchan *lchan);
|
||||
|
||||
#endif
|
@@ -1,9 +1,8 @@
|
||||
#ifndef _GSM_SUBSCR_H
|
||||
#define _GSM_SUBSCR_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "gsm_data.h"
|
||||
#include <osmocore/linuxlist.h>
|
||||
#include <osmocom/core/linuxlist.h>
|
||||
|
||||
#define GSM_IMEI_LENGTH 17
|
||||
#define GSM_IMSI_LENGTH 17
|
||||
@@ -13,37 +12,35 @@
|
||||
#define GSM_MIN_EXTEN 20000
|
||||
#define GSM_MAX_EXTEN 49999
|
||||
|
||||
/* reserved according to GSM 03.03 § 2.4 */
|
||||
#define GSM_RESERVED_TMSI 0xFFFFFFFF
|
||||
|
||||
|
||||
#define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001
|
||||
#define tmsi_from_string(str) strtoul(str, NULL, 10)
|
||||
|
||||
struct vty;
|
||||
|
||||
struct gsm_equipment {
|
||||
long long unsigned int id;
|
||||
char imei[GSM_IMEI_LENGTH];
|
||||
char name[GSM_NAME_LENGTH];
|
||||
|
||||
struct gsm48_classmark1 classmark1;
|
||||
u_int8_t classmark2_len;
|
||||
u_int8_t classmark2[3];
|
||||
u_int8_t classmark3_len;
|
||||
u_int8_t classmark3[14];
|
||||
uint8_t classmark2_len;
|
||||
uint8_t classmark2[3];
|
||||
uint8_t classmark3_len;
|
||||
uint8_t classmark3[14];
|
||||
};
|
||||
|
||||
struct gsm_subscriber {
|
||||
struct gsm_network *net;
|
||||
long long unsigned int id;
|
||||
char imsi[GSM_IMSI_LENGTH];
|
||||
u_int32_t tmsi;
|
||||
u_int16_t lac;
|
||||
uint32_t tmsi;
|
||||
uint16_t lac;
|
||||
char name[GSM_NAME_LENGTH];
|
||||
char extension[GSM_EXTENSION_LENGTH];
|
||||
int authorized;
|
||||
|
||||
/* Temporary field which is not stored in the DB/HLR */
|
||||
u_int32_t flags;
|
||||
uint32_t flags;
|
||||
|
||||
/* Every user can only have one equipment in use at any given
|
||||
* point in time */
|
||||
@@ -74,20 +71,34 @@ enum gsm_subscriber_update_reason {
|
||||
struct gsm_subscriber *subscr_get(struct gsm_subscriber *subscr);
|
||||
struct gsm_subscriber *subscr_put(struct gsm_subscriber *subscr);
|
||||
struct gsm_subscriber *subscr_get_by_tmsi(struct gsm_network *net,
|
||||
u_int32_t tmsi);
|
||||
uint32_t tmsi);
|
||||
struct gsm_subscriber *subscr_get_by_imsi(struct gsm_network *net,
|
||||
const char *imsi);
|
||||
struct gsm_subscriber *subscr_get_by_extension(struct gsm_network *net,
|
||||
const char *ext);
|
||||
struct gsm_subscriber *subscr_get_by_id(struct gsm_network *net,
|
||||
unsigned long long id);
|
||||
struct gsm_subscriber *subscr_get_or_create(struct gsm_network *net,
|
||||
const char *imsi);
|
||||
int subscr_update(struct gsm_subscriber *s, struct gsm_bts *bts, int reason);
|
||||
void subscr_put_channel(struct gsm_subscriber_connection *conn);
|
||||
void subscr_put_channel(struct gsm_subscriber *subscr);
|
||||
void subscr_get_channel(struct gsm_subscriber *subscr,
|
||||
int type, gsm_cbfn *cbfn, void *param);
|
||||
struct gsm_subscriber *subscr_active_by_tmsi(struct gsm_network *net,
|
||||
uint32_t tmsi);
|
||||
struct gsm_subscriber *subscr_active_by_imsi(struct gsm_network *net,
|
||||
const char *imsi);
|
||||
|
||||
int subscr_pending_requests(struct gsm_subscriber *subscr);
|
||||
int subscr_pending_clear(struct gsm_subscriber *subscr);
|
||||
int subscr_pending_dump(struct gsm_subscriber *subscr, struct vty *vty);
|
||||
int subscr_pending_kick(struct gsm_subscriber *subscr);
|
||||
|
||||
char *subscr_name(struct gsm_subscriber *subscr);
|
||||
|
||||
int subscr_purge_inactive(struct gsm_network *net);
|
||||
void subscr_update_from_db(struct gsm_subscriber *subscr);
|
||||
|
||||
/* internal */
|
||||
struct gsm_subscriber *subscr_alloc(void);
|
||||
extern struct llist_head active_subscribers;
|
||||
|
@@ -9,6 +9,6 @@ struct gsm_subscriber_connection;
|
||||
int bsc_handover_start(struct gsm_lchan *old_lchan, struct gsm_bts *bts);
|
||||
|
||||
/* clear any operation for this connection */
|
||||
void bsc_clear_handover(struct gsm_subscriber_connection *conn);
|
||||
void bsc_clear_handover(struct gsm_subscriber_connection *conn, int free_lchan);
|
||||
|
||||
#endif /* _HANDOVER_H */
|
||||
|
@@ -2,92 +2,50 @@
|
||||
#define _IPACCESS_H
|
||||
|
||||
#include "e1_input.h"
|
||||
#include <osmocore/linuxlist.h>
|
||||
#include "gsm_subscriber.h"
|
||||
#include <osmocom/core/linuxlist.h>
|
||||
#include <osmocom/gsm/protocol/ipaccess.h>
|
||||
|
||||
#define IPA_TCP_PORT_OML 3002
|
||||
#define IPA_TCP_PORT_RSL 3003
|
||||
struct ipac_msgt_sccp_state {
|
||||
uint8_t src_ref[3];
|
||||
uint8_t dst_ref[3];
|
||||
uint8_t trans_id;
|
||||
uint8_t invoke_id;
|
||||
char imsi[GSM_IMSI_LENGTH];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct ipaccess_head {
|
||||
u_int16_t len; /* network byte order */
|
||||
u_int8_t proto;
|
||||
u_int8_t data[0];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
enum ipaccess_proto {
|
||||
IPAC_PROTO_RSL = 0x00,
|
||||
IPAC_PROTO_IPACCESS = 0xfe,
|
||||
IPAC_PROTO_SCCP = 0xfd,
|
||||
IPAC_PROTO_OML = 0xff,
|
||||
};
|
||||
|
||||
enum ipaccess_msgtype {
|
||||
IPAC_MSGT_PING = 0x00,
|
||||
IPAC_MSGT_PONG = 0x01,
|
||||
IPAC_MSGT_ID_GET = 0x04,
|
||||
IPAC_MSGT_ID_RESP = 0x05,
|
||||
IPAC_MSGT_ID_ACK = 0x06,
|
||||
};
|
||||
|
||||
enum ipaccess_id_tags {
|
||||
IPAC_IDTAG_SERNR = 0x00,
|
||||
IPAC_IDTAG_UNITNAME = 0x01,
|
||||
IPAC_IDTAG_LOCATION1 = 0x02,
|
||||
IPAC_IDTAG_LOCATION2 = 0x03,
|
||||
IPAC_IDTAG_EQUIPVERS = 0x04,
|
||||
IPAC_IDTAG_SWVERSION = 0x05,
|
||||
IPAC_IDTAG_IPADDR = 0x06,
|
||||
IPAC_IDTAG_MACADDR = 0x07,
|
||||
IPAC_IDTAG_UNIT = 0x08,
|
||||
};
|
||||
/*
|
||||
* @add_remove 0 for remove, 1 for add, 3 to asK
|
||||
* @nr_lacs Number of extra lacs inside this package
|
||||
* @lac One lac entry
|
||||
*/
|
||||
struct ipac_ext_lac_cmd {
|
||||
uint8_t add_remove;
|
||||
uint8_t nr_extra_lacs;
|
||||
uint16_t lac;
|
||||
uint8_t data[0];
|
||||
} __attribute__((packed));
|
||||
|
||||
int ipaccess_connect(struct e1inp_line *line, struct sockaddr_in *sa);
|
||||
|
||||
/*
|
||||
* methods for parsing and sending a message
|
||||
*/
|
||||
int ipaccess_rcvmsg_base(struct msgb *msg, struct bsc_fd *bfd);
|
||||
struct msgb *ipaccess_read_msg(struct bsc_fd *bfd, int *error);
|
||||
int ipaccess_rcvmsg_base(struct msgb *msg, struct osmo_fd *bfd);
|
||||
struct msgb *ipaccess_read_msg(struct osmo_fd *bfd, int *error);
|
||||
void ipaccess_prepend_header(struct msgb *msg, int proto);
|
||||
void ipaccess_prepend_header_ext(struct msgb *msg, int proto);
|
||||
int ipaccess_send_pong(int fd);
|
||||
int ipaccess_send_id_ack(int fd);
|
||||
int ipaccess_send_id_req(int fd);
|
||||
|
||||
const char *ipaccess_idtag_name(uint8_t tag);
|
||||
int ipaccess_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len);
|
||||
int ipaccess_parse_unitid(const char *str, uint16_t *site_id, uint16_t *bts_id, uint16_t *trx_id);
|
||||
|
||||
int ipaccess_drop_oml(struct gsm_bts *bts);
|
||||
int ipaccess_drop_rsl(struct gsm_bts_trx *trx);
|
||||
|
||||
/*
|
||||
* Firmware specific header
|
||||
*/
|
||||
struct sdp_firmware {
|
||||
char magic[4];
|
||||
char more_magic[2];
|
||||
u_int16_t more_more_magic;
|
||||
u_int32_t header_length;
|
||||
u_int32_t file_length;
|
||||
char sw_part[20];
|
||||
char text1[64];
|
||||
char time[12];
|
||||
char date[14];
|
||||
char text2[10];
|
||||
char version[20];
|
||||
u_int16_t table_offset;
|
||||
/* stuff i don't know */
|
||||
} __attribute__((packed));
|
||||
|
||||
struct sdp_header_entry {
|
||||
u_int16_t something1;
|
||||
char text1[64];
|
||||
char time[12];
|
||||
char date[14];
|
||||
char text2[10];
|
||||
char version[20];
|
||||
u_int32_t length;
|
||||
u_int32_t addr1;
|
||||
u_int32_t addr2;
|
||||
u_int32_t start;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct sdp_header_item {
|
||||
struct sdp_header_entry header_entry;
|
||||
struct llist_head entry;
|
||||
|
@@ -1,21 +1,23 @@
|
||||
#ifndef _MEAS_REP_H
|
||||
#define _MEAS_REP_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define MRC_F_PROCESSED 0x0001
|
||||
|
||||
/* extracted from a L3 measurement report IE */
|
||||
struct gsm_meas_rep_cell {
|
||||
u_int8_t rxlev;
|
||||
u_int8_t bsic;
|
||||
u_int8_t neigh_idx;
|
||||
u_int16_t arfcn;
|
||||
uint8_t rxlev;
|
||||
uint8_t bsic;
|
||||
uint8_t neigh_idx;
|
||||
uint16_t arfcn;
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
/* RX Level and RX Quality */
|
||||
struct gsm_rx_lev_qual {
|
||||
u_int8_t rx_lev;
|
||||
u_int8_t rx_qual;
|
||||
uint8_t rx_lev;
|
||||
uint8_t rx_qual;
|
||||
};
|
||||
|
||||
/* unidirectional measumrement report */
|
||||
@@ -38,7 +40,7 @@ struct gsm_meas_rep {
|
||||
struct gsm_lchan *lchan;
|
||||
|
||||
/* number of the measurement report */
|
||||
u_int8_t nr;
|
||||
uint8_t nr;
|
||||
/* flags, see MEAS_REP_F_* */
|
||||
unsigned int flags;
|
||||
|
||||
@@ -46,11 +48,11 @@ struct gsm_meas_rep {
|
||||
struct gsm_meas_rep_unidir ul;
|
||||
struct gsm_meas_rep_unidir dl;
|
||||
|
||||
u_int8_t bs_power;
|
||||
u_int8_t ms_timing_offset;
|
||||
uint8_t bs_power;
|
||||
uint8_t ms_timing_offset;
|
||||
struct {
|
||||
int8_t pwr; /* MS power in dBm */
|
||||
u_int8_t ta; /* MS timing advance */
|
||||
uint8_t ta; /* MS timing advance */
|
||||
} ms_l1;
|
||||
|
||||
/* neighbor measurement reports for up to 6 cells */
|
||||
|
@@ -1,34 +1,37 @@
|
||||
/* A Media Gateway Control Protocol Media Gateway: RFC 3435 */
|
||||
|
||||
/*
|
||||
* (C) 2009-2010 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2009-2010 by On-Waves
|
||||
* (C) 2009-2011 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2009-2011 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 General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef OPENBSC_MGCP_H
|
||||
#define OPENBSC_MGCP_H
|
||||
|
||||
#include <osmocore/msgb.h>
|
||||
#include <osmocom/core/msgb.h>
|
||||
#include <osmocom/core/write_queue.h>
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#define RTP_PORT_DEFAULT 4000
|
||||
#define RTP_PORT_NET_DEFAULT 16000
|
||||
|
||||
/**
|
||||
* Calculate the RTP audio port for the given multiplex
|
||||
@@ -60,6 +63,7 @@ static inline int rtp_calculate_port(int multiplex, int base)
|
||||
*/
|
||||
struct mgcp_endpoint;
|
||||
struct mgcp_config;
|
||||
struct mgcp_trunk_config;
|
||||
|
||||
#define MGCP_ENDP_CRCX 1
|
||||
#define MGCP_ENDP_DLCX 2
|
||||
@@ -75,61 +79,115 @@ struct mgcp_config;
|
||||
#define MGCP_POLICY_REJECT 5
|
||||
#define MGCP_POLICY_DEFER 6
|
||||
|
||||
typedef int (*mgcp_change)(struct mgcp_config *cfg, int endpoint, int state, int local_rtp);
|
||||
typedef int (*mgcp_policy)(struct mgcp_config *cfg, int endpoint, int state, const char *transactio_id);
|
||||
typedef int (*mgcp_realloc)(struct mgcp_trunk_config *cfg, int endpoint);
|
||||
typedef int (*mgcp_change)(struct mgcp_trunk_config *cfg, int endpoint, int state);
|
||||
typedef int (*mgcp_policy)(struct mgcp_trunk_config *cfg, int endpoint, int state, const char *transactio_id);
|
||||
typedef int (*mgcp_reset)(struct mgcp_config *cfg);
|
||||
|
||||
#define PORT_ALLOC_STATIC 0
|
||||
#define PORT_ALLOC_DYNAMIC 1
|
||||
|
||||
/**
|
||||
* This holds information on how to allocate ports
|
||||
*/
|
||||
struct mgcp_port_range {
|
||||
int mode;
|
||||
|
||||
/* pre-allocated from a base? */
|
||||
int base_port;
|
||||
|
||||
/* dynamically allocated */
|
||||
int range_start;
|
||||
int range_end;
|
||||
int last_port;
|
||||
};
|
||||
|
||||
struct mgcp_trunk_config {
|
||||
struct llist_head entry;
|
||||
|
||||
struct mgcp_config *cfg;
|
||||
|
||||
int trunk_nr;
|
||||
int trunk_type;
|
||||
|
||||
char *audio_name;
|
||||
int audio_payload;
|
||||
int audio_loop;
|
||||
|
||||
/* spec handling */
|
||||
int force_realloc;
|
||||
|
||||
unsigned int number_endpoints;
|
||||
struct mgcp_endpoint *endpoints;
|
||||
};
|
||||
|
||||
struct mgcp_config {
|
||||
int source_port;
|
||||
char *local_ip;
|
||||
char *source_addr;
|
||||
unsigned int number_endpoints;
|
||||
char *bts_ip;
|
||||
char *call_agent_addr;
|
||||
|
||||
struct in_addr bts_in;
|
||||
char *audio_name;
|
||||
int audio_payload;
|
||||
int audio_loop;
|
||||
int early_bind;
|
||||
int rtp_base_port;
|
||||
|
||||
/* transcoder handling */
|
||||
char *transcoder_ip;
|
||||
struct in_addr transcoder_in;
|
||||
int transcoder_remote_base;
|
||||
|
||||
struct osmo_wqueue gw_fd;
|
||||
|
||||
struct mgcp_port_range bts_ports;
|
||||
struct mgcp_port_range net_ports;
|
||||
struct mgcp_port_range transcoder_ports;
|
||||
int endp_dscp;
|
||||
|
||||
char *forward_ip;
|
||||
int forward_port;
|
||||
|
||||
/* spec handling */
|
||||
int force_realloc;
|
||||
|
||||
mgcp_change change_cb;
|
||||
mgcp_policy policy_cb;
|
||||
mgcp_reset reset_cb;
|
||||
mgcp_realloc realloc_cb;
|
||||
void *data;
|
||||
|
||||
struct mgcp_endpoint *endpoints;
|
||||
unsigned int last_call_id;
|
||||
uint32_t last_call_id;
|
||||
|
||||
/* trunk handling */
|
||||
struct mgcp_trunk_config trunk;
|
||||
struct llist_head trunks;
|
||||
|
||||
/* only used for start with a static configuration */
|
||||
int last_net_port;
|
||||
int last_bts_port;
|
||||
};
|
||||
|
||||
/* config management */
|
||||
struct mgcp_config *mgcp_config_alloc(void);
|
||||
int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg);
|
||||
int mgcp_vty_init(void);
|
||||
int mgcp_endpoints_allocate(struct mgcp_config *cfg);
|
||||
int mgcp_bind_rtp_port(struct mgcp_endpoint *endp, int rtp_port);
|
||||
int mgcp_endpoints_allocate(struct mgcp_trunk_config *cfg);
|
||||
void mgcp_free_endp(struct mgcp_endpoint *endp);
|
||||
int mgcp_reset_transcoder(struct mgcp_config *cfg);
|
||||
|
||||
/*
|
||||
* format helper functions
|
||||
*/
|
||||
struct msgb *mgcp_handle_message(struct mgcp_config *cfg, struct msgb *msg);
|
||||
struct msgb *mgcp_create_response_with_data(int code, const char *msg, const char *trans, const char *data);
|
||||
struct msgb *mgcp_create_response_with_data(int code, const char *txt, const char *msg, const char *trans, const char *data);
|
||||
|
||||
/* adc helper */
|
||||
static inline int mgcp_timeslot_to_endpoint(int multiplex, int timeslot)
|
||||
{
|
||||
if (timeslot == 0)
|
||||
timeslot = 1;
|
||||
return timeslot + (31 * multiplex);
|
||||
if (timeslot == 0) {
|
||||
LOGP(DMGCP, LOGL_ERROR, "Timeslot should not be 0\n");
|
||||
timeslot = 255;
|
||||
}
|
||||
|
||||
return timeslot + (32 * multiplex);
|
||||
}
|
||||
|
||||
static inline void mgcp_endpoint_to_timeslot(int endpoint, int *multiplex, int *timeslot)
|
||||
{
|
||||
*multiplex = endpoint / 32;
|
||||
*timeslot = endpoint % 32;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,30 +1,29 @@
|
||||
/* MGCP Private Data */
|
||||
|
||||
/*
|
||||
* (C) 2009-2010 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2009-2010 by On-Waves
|
||||
* (C) 2009-2011 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2009-2011 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 General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef OPENBSC_MGCP_DATA_H
|
||||
#define OPENBSC_MGCP_DATA_H
|
||||
|
||||
#include <osmocore/select.h>
|
||||
#include <osmocom/core/select.h>
|
||||
|
||||
#define CI_UNUSED 0
|
||||
|
||||
@@ -36,6 +35,11 @@ enum mgcp_connection_mode {
|
||||
MGCP_CONN_LOOPBACK = 4,
|
||||
};
|
||||
|
||||
enum mgcp_trunk_type {
|
||||
MGCP_TRUNK_VIRTUAL,
|
||||
MGCP_TRUNK_E1,
|
||||
};
|
||||
|
||||
struct mgcp_rtp_state {
|
||||
int initialized;
|
||||
int patch;
|
||||
@@ -49,47 +53,78 @@ struct mgcp_rtp_state {
|
||||
int32_t timestamp_offset;
|
||||
};
|
||||
|
||||
struct mgcp_rtp_end {
|
||||
/* statistics */
|
||||
unsigned int packets;
|
||||
struct in_addr addr;
|
||||
|
||||
/* in network byte order */
|
||||
int rtp_port, rtcp_port;
|
||||
|
||||
int payload_type;
|
||||
|
||||
/*
|
||||
* Each end has a socket...
|
||||
*/
|
||||
struct osmo_fd rtp;
|
||||
struct osmo_fd rtcp;
|
||||
|
||||
int local_port;
|
||||
int local_alloc;
|
||||
};
|
||||
|
||||
enum {
|
||||
MGCP_TAP_BTS_IN,
|
||||
MGCP_TAP_BTS_OUT,
|
||||
MGCP_TAP_NET_IN,
|
||||
MGCP_TAP_NET_OUT,
|
||||
|
||||
/* last element */
|
||||
MGCP_TAP_COUNT
|
||||
};
|
||||
|
||||
struct mgcp_rtp_tap {
|
||||
int enabled;
|
||||
struct sockaddr_in forward;
|
||||
};
|
||||
|
||||
struct mgcp_endpoint {
|
||||
int ci;
|
||||
int allocated;
|
||||
uint32_t ci;
|
||||
char *callid;
|
||||
char *local_options;
|
||||
int conn_mode;
|
||||
int orig_mode;
|
||||
|
||||
int bts_payload_type;
|
||||
int net_payload_type;
|
||||
|
||||
/* the local rtp port we are binding to */
|
||||
int rtp_port;
|
||||
|
||||
/*
|
||||
* RTP mangling:
|
||||
* - we get RTP and RTCP to us and need to forward to the BTS
|
||||
* - we get RTP and RTCP from the BTS and forward to the network
|
||||
*/
|
||||
struct bsc_fd local_rtp;
|
||||
struct bsc_fd local_rtcp;
|
||||
|
||||
struct in_addr remote;
|
||||
struct in_addr bts;
|
||||
|
||||
/* in network byte order */
|
||||
int net_rtp, net_rtcp;
|
||||
int bts_rtp, bts_rtcp;
|
||||
|
||||
/* backpointer */
|
||||
struct mgcp_config *cfg;
|
||||
struct mgcp_trunk_config *tcfg;
|
||||
|
||||
/* statistics */
|
||||
unsigned int in_bts;
|
||||
unsigned int in_remote;
|
||||
/* port status for bts/net */
|
||||
struct mgcp_rtp_end bts_end;
|
||||
struct mgcp_rtp_end net_end;
|
||||
|
||||
/*
|
||||
* For transcoding we will send from the local_port
|
||||
* of trans_bts and it will arrive at trans_net from
|
||||
* where we will forward it to the network.
|
||||
*/
|
||||
struct mgcp_rtp_end trans_bts;
|
||||
struct mgcp_rtp_end trans_net;
|
||||
int is_transcoded;
|
||||
|
||||
/* sequence bits */
|
||||
struct mgcp_rtp_state net_state;
|
||||
struct mgcp_rtp_state bts_state;
|
||||
|
||||
/* SSRC/seq/ts patching for loop */
|
||||
int allow_patch;
|
||||
|
||||
/* tap for the endpoint */
|
||||
struct mgcp_rtp_tap taps[MGCP_TAP_COUNT];
|
||||
};
|
||||
|
||||
#define ENDPOINT_NUMBER(endp) abs(endp - endp->cfg->endpoints)
|
||||
#define ENDPOINT_NUMBER(endp) abs(endp - endp->tcfg->endpoints)
|
||||
|
||||
struct mgcp_msg_ptr {
|
||||
unsigned int start;
|
||||
@@ -100,5 +135,20 @@ int mgcp_analyze_header(struct mgcp_config *cfg, struct msgb *msg,
|
||||
struct mgcp_msg_ptr *ptr, int size,
|
||||
const char **transaction_id, struct mgcp_endpoint **endp);
|
||||
int mgcp_send_dummy(struct mgcp_endpoint *endp);
|
||||
int mgcp_bind_bts_rtp_port(struct mgcp_endpoint *endp, int rtp_port);
|
||||
int mgcp_bind_net_rtp_port(struct mgcp_endpoint *endp, int rtp_port);
|
||||
int mgcp_bind_trans_bts_rtp_port(struct mgcp_endpoint *enp, int rtp_port);
|
||||
int mgcp_bind_trans_net_rtp_port(struct mgcp_endpoint *enp, int rtp_port);
|
||||
int mgcp_free_rtp_port(struct mgcp_rtp_end *end);
|
||||
|
||||
/* For transcoding we need to manage an in and an output that are connected */
|
||||
static inline int endp_back_channel(int endpoint)
|
||||
{
|
||||
return endpoint + 60;
|
||||
}
|
||||
|
||||
struct mgcp_trunk_config *mgcp_trunk_alloc(struct mgcp_config *cfg, int index);
|
||||
struct mgcp_trunk_config *mgcp_trunk_num(struct mgcp_config *cfg, int index);
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -2,18 +2,17 @@
|
||||
* 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 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -23,7 +22,6 @@
|
||||
#include "e1_input.h"
|
||||
|
||||
int mi_setup(int cardnr, struct e1inp_line *line, int release_l2);
|
||||
int _abis_nm_sendmsg(struct msgb *msg);
|
||||
int mi_e1_line_update(struct e1inp_line *line);
|
||||
|
||||
#endif
|
||||
|
@@ -7,26 +7,31 @@
|
||||
* 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 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _MNCC_H
|
||||
#define _MNCC_H
|
||||
|
||||
#include <osmocore/linuxlist.h>
|
||||
#include <osmocore/mncc.h>
|
||||
#include <osmocom/core/linuxlist.h>
|
||||
#include <osmocom/gsm/mncc.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct gsm_network;
|
||||
struct msgb;
|
||||
|
||||
|
||||
/* One end of a call */
|
||||
struct gsm_call {
|
||||
@@ -36,9 +41,9 @@ struct gsm_call {
|
||||
void *net;
|
||||
|
||||
/* the 'local' transaction */
|
||||
u_int32_t callref;
|
||||
uint32_t callref;
|
||||
/* the 'remote' transaction */
|
||||
u_int32_t remote_ref;
|
||||
uint32_t remote_ref;
|
||||
};
|
||||
|
||||
#define MNCC_SETUP_REQ 0x0101
|
||||
@@ -112,11 +117,11 @@ struct gsm_call {
|
||||
|
||||
struct gsm_mncc {
|
||||
/* context based information */
|
||||
u_int32_t msg_type;
|
||||
u_int32_t callref;
|
||||
uint32_t msg_type;
|
||||
uint32_t callref;
|
||||
|
||||
/* which fields are present */
|
||||
u_int32_t fields;
|
||||
uint32_t fields;
|
||||
|
||||
/* data derived informations (MNCC_F_ based) */
|
||||
struct gsm_mncc_bearer_cap bearer_cap;
|
||||
@@ -147,13 +152,21 @@ struct gsm_mncc {
|
||||
};
|
||||
|
||||
struct gsm_data_frame {
|
||||
u_int32_t msg_type;
|
||||
u_int32_t callref;
|
||||
uint32_t msg_type;
|
||||
uint32_t callref;
|
||||
unsigned char data[0];
|
||||
};
|
||||
|
||||
char *get_mncc_name(int value);
|
||||
int mncc_recv(struct gsm_network *net, int msg_type, void *arg);
|
||||
void mncc_set_cause(struct gsm_mncc *data, int loc, int val);
|
||||
void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg);
|
||||
|
||||
/* input from CC code into mncc_builtin */
|
||||
int int_mncc_recv(struct gsm_network *net, struct msgb *msg);
|
||||
|
||||
/* input from CC code into mncc_sock */
|
||||
int mncc_sock_from_cc(struct gsm_network *net, struct msgb *msg);
|
||||
|
||||
int mncc_sock_init(struct gsm_network *gsmnet);
|
||||
|
||||
#endif
|
||||
|
@@ -4,18 +4,17 @@
|
||||
* 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 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -5,6 +5,39 @@
|
||||
|
||||
#include "bsc_api.h"
|
||||
|
||||
struct sccp_connection;
|
||||
|
||||
struct osmo_bsc_sccp_con {
|
||||
struct llist_head entry;
|
||||
|
||||
int ciphering_handled;
|
||||
int rtp_port;
|
||||
|
||||
/* SCCP connection realted */
|
||||
struct sccp_connection *sccp;
|
||||
struct bsc_msc_connection *msc_con;
|
||||
struct osmo_timer_list sccp_it_timeout;
|
||||
struct osmo_timer_list sccp_cc_timeout;
|
||||
|
||||
struct llist_head sccp_queue;
|
||||
unsigned int sccp_queue_size;
|
||||
|
||||
struct gsm_subscriber_connection *conn;
|
||||
uint8_t new_subscriber;
|
||||
};
|
||||
|
||||
struct bsc_api *osmo_bsc_api();
|
||||
|
||||
int bsc_queue_for_msc(struct osmo_bsc_sccp_con *conn, struct msgb *msg);
|
||||
int bsc_open_connection(struct osmo_bsc_sccp_con *sccp, struct msgb *msg);
|
||||
int bsc_create_new_connection(struct gsm_subscriber_connection *conn);
|
||||
int bsc_delete_connection(struct osmo_bsc_sccp_con *sccp);
|
||||
|
||||
int bsc_scan_bts_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);
|
||||
int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);
|
||||
|
||||
int bsc_handle_udt(struct gsm_network *net, struct bsc_msc_connection *conn, struct msgb *msg, unsigned int length);
|
||||
int bsc_handle_dt1(struct osmo_bsc_sccp_con *conn, struct msgb *msg, unsigned int len);
|
||||
|
||||
|
||||
#endif
|
||||
|
28
openbsc/include/openbsc/osmo_bsc_grace.h
Normal file
28
openbsc/include/openbsc/osmo_bsc_grace.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2010 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef OSMO_BSC_GRACE_H
|
||||
#define OSMO_BSC_GRACE_H
|
||||
|
||||
#include "gsm_data.h"
|
||||
|
||||
int bsc_grace_allow_new_connection(struct gsm_network *network);
|
||||
|
||||
#endif
|
@@ -1,18 +1,33 @@
|
||||
#ifndef OSMO_BSC_RF
|
||||
#define OSMO_BSC_RF
|
||||
|
||||
#include <osmocore/write_queue.h>
|
||||
#include <osmocom/core/write_queue.h>
|
||||
#include <osmocom/core/timer.h>
|
||||
|
||||
struct gsm_network;
|
||||
|
||||
struct osmo_bsc_rf {
|
||||
struct bsc_fd listen;
|
||||
/* the value of signal.h */
|
||||
int policy;
|
||||
struct osmo_fd listen;
|
||||
struct gsm_network *gsm_network;
|
||||
|
||||
const char *last_state_command;
|
||||
|
||||
/* delay the command */
|
||||
char last_request;
|
||||
struct osmo_timer_list delay_cmd;
|
||||
|
||||
/* verify that RF is up as it should be */
|
||||
struct osmo_timer_list rf_check;
|
||||
|
||||
/* some handling for the automatic grace switch */
|
||||
struct osmo_timer_list grace_timeout;
|
||||
};
|
||||
|
||||
struct osmo_bsc_rf_conn {
|
||||
struct write_queue queue;
|
||||
struct gsm_network *gsm_network;
|
||||
struct osmo_wqueue queue;
|
||||
struct osmo_bsc_rf *rf;
|
||||
};
|
||||
|
||||
struct osmo_bsc_rf *osmo_bsc_rf_create(const char *path, struct gsm_network *net);
|
||||
|
80
openbsc/include/openbsc/osmo_msc_data.h
Normal file
80
openbsc/include/openbsc/osmo_msc_data.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Data for the true BSC
|
||||
*
|
||||
* (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2010 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _OSMO_MSC_DATA_H
|
||||
#define _OSMO_MSC_DATA_H
|
||||
|
||||
#include "bsc_msc.h"
|
||||
|
||||
#include <osmocom/core/timer.h>
|
||||
|
||||
struct osmo_bsc_rf;
|
||||
struct gsm_network;
|
||||
|
||||
struct gsm_audio_support {
|
||||
uint8_t hr : 1,
|
||||
ver : 7;
|
||||
};
|
||||
|
||||
struct osmo_msc_data {
|
||||
/* Back pointer */
|
||||
struct gsm_network *network;
|
||||
|
||||
/* Connection data */
|
||||
char *bsc_token;
|
||||
int ping_timeout;
|
||||
int pong_timeout;
|
||||
struct osmo_timer_list ping_timer;
|
||||
struct osmo_timer_list pong_timer;
|
||||
struct bsc_msc_connection *msc_con;
|
||||
int core_ncc;
|
||||
int core_mcc;
|
||||
int rtp_base;
|
||||
|
||||
/* audio codecs */
|
||||
struct gsm_audio_support **audio_support;
|
||||
int audio_length;
|
||||
|
||||
/* destinations */
|
||||
struct llist_head dests;
|
||||
|
||||
|
||||
/* mgcp agent */
|
||||
struct osmo_wqueue mgcp_agent;
|
||||
|
||||
/* rf ctl related bits */
|
||||
char *mid_call_txt;
|
||||
int mid_call_timeout;
|
||||
char *rf_ctrl_name;
|
||||
struct osmo_bsc_rf *rf_ctl;
|
||||
|
||||
/* ussd welcome text */
|
||||
char *ussd_welcome_txt;
|
||||
};
|
||||
|
||||
int osmo_bsc_msc_init(struct gsm_network *network);
|
||||
int osmo_bsc_sccp_init(struct gsm_network *gsmnet);
|
||||
int msc_queue_write(struct bsc_msc_connection *conn, struct msgb *msg, int proto);
|
||||
|
||||
int osmo_bsc_audio_init(struct gsm_network *network);
|
||||
|
||||
#endif
|
@@ -3,18 +3,17 @@
|
||||
* 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 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,13 +23,35 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <osmocore/linuxlist.h>
|
||||
#include <osmocom/core/linuxlist.h>
|
||||
#include "gsm_data.h"
|
||||
#include "gsm_subscriber.h"
|
||||
#include <osmocore/timer.h>
|
||||
#include <osmocom/core/timer.h>
|
||||
|
||||
/* call once for every gsm_bts... */
|
||||
void paging_init(struct gsm_bts *bts);
|
||||
/**
|
||||
* A pending paging request
|
||||
*/
|
||||
struct gsm_paging_request {
|
||||
/* list_head for list of all paging requests */
|
||||
struct llist_head entry;
|
||||
/* the subscriber which we're paging. Later gsm_paging_request
|
||||
* should probably become a part of the gsm_subscriber struct? */
|
||||
struct gsm_subscriber *subscr;
|
||||
/* back-pointer to the BTS on which we are paging */
|
||||
struct gsm_bts *bts;
|
||||
/* what kind of channel type do we ask the MS to establish */
|
||||
int chan_type;
|
||||
|
||||
/* Timer 3113: how long do we try to page? */
|
||||
struct osmo_timer_list T3113;
|
||||
|
||||
/* How often did we ask the BTS to page? */
|
||||
int attempts;
|
||||
|
||||
/* callback to be called in case paging completes */
|
||||
gsm_cbfn *cbfn;
|
||||
void *cbfn_param;
|
||||
};
|
||||
|
||||
/* schedule paging request */
|
||||
int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr,
|
||||
@@ -38,9 +59,13 @@ int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr,
|
||||
|
||||
/* stop paging requests */
|
||||
void paging_request_stop(struct gsm_bts *bts, struct gsm_subscriber *subscr,
|
||||
struct gsm_subscriber_connection *conn);
|
||||
struct gsm_subscriber_connection *conn,
|
||||
struct msgb *msg);
|
||||
|
||||
/* update paging load */
|
||||
void paging_update_buffer_space(struct gsm_bts *bts, u_int16_t);
|
||||
void paging_update_buffer_space(struct gsm_bts *bts, uint16_t);
|
||||
|
||||
/* pending paging requests */
|
||||
unsigned int paging_pending_requests_nr(struct gsm_bts *bts);
|
||||
|
||||
#endif
|
||||
|
@@ -1,14 +1,13 @@
|
||||
#ifndef _REST_OCTETS_H
|
||||
#define _REST_OCTETS_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <openbsc/gsm_04_08.h>
|
||||
|
||||
/* generate SI1 rest octets */
|
||||
int rest_octets_si1(u_int8_t *data, u_int8_t *nch_pos);
|
||||
int rest_octets_si1(uint8_t *data, uint8_t *nch_pos);
|
||||
|
||||
struct gsm48_si_selection_params {
|
||||
u_int16_t penalty_time:5,
|
||||
uint16_t penalty_time:5,
|
||||
temp_offs:3,
|
||||
cell_resel_off:6,
|
||||
cbq:1,
|
||||
@@ -16,18 +15,18 @@ struct gsm48_si_selection_params {
|
||||
};
|
||||
|
||||
struct gsm48_si_power_offset {
|
||||
u_int8_t power_offset:2,
|
||||
uint8_t power_offset:2,
|
||||
present:1;
|
||||
};
|
||||
|
||||
struct gsm48_si3_gprs_ind {
|
||||
u_int8_t si13_position:1,
|
||||
uint8_t si13_position:1,
|
||||
ra_colour:3,
|
||||
present:1;
|
||||
};
|
||||
|
||||
struct gsm48_lsa_params {
|
||||
u_int32_t prio_thr:3,
|
||||
uint32_t prio_thr:3,
|
||||
lsa_offset:3,
|
||||
mcc:12,
|
||||
mnc:12;
|
||||
@@ -37,26 +36,26 @@ struct gsm48_lsa_params {
|
||||
struct gsm48_si_ro_info {
|
||||
struct gsm48_si_selection_params selection_params;
|
||||
struct gsm48_si_power_offset power_offset;
|
||||
u_int8_t si2ter_indicator;
|
||||
u_int8_t early_cm_ctrl;
|
||||
uint8_t si2ter_indicator;
|
||||
uint8_t early_cm_ctrl;
|
||||
struct {
|
||||
u_int8_t where:3,
|
||||
uint8_t where:3,
|
||||
present:1;
|
||||
} scheduling;
|
||||
struct gsm48_si3_gprs_ind gprs_ind;
|
||||
|
||||
/* SI 4 specific */
|
||||
struct gsm48_lsa_params lsa_params;
|
||||
u_int16_t cell_id;
|
||||
u_int8_t break_ind; /* do we have SI7 + SI8 ? */
|
||||
uint16_t cell_id;
|
||||
uint8_t break_ind; /* do we have SI7 + SI8 ? */
|
||||
};
|
||||
|
||||
|
||||
/* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */
|
||||
int rest_octets_si3(u_int8_t *data, const struct gsm48_si_ro_info *si3);
|
||||
int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3);
|
||||
|
||||
/* Generate SI4 Rest Octets (Chapter 10.5.2.35) */
|
||||
int rest_octets_si4(u_int8_t *data, const struct gsm48_si_ro_info *si4);
|
||||
int rest_octets_si4(uint8_t *data, const struct gsm48_si_ro_info *si4);
|
||||
|
||||
enum pbcch_carrier_type {
|
||||
PBCCH_BCCH,
|
||||
@@ -75,59 +74,59 @@ enum gprs_nmo {
|
||||
struct gprs_cell_options {
|
||||
enum gprs_nmo nmo;
|
||||
/* T3168: wait for packet uplink assignment message */
|
||||
u_int32_t t3168; /* in milliseconds */
|
||||
uint32_t t3168; /* in milliseconds */
|
||||
/* T3192: wait for release of the TBF after reception of the final block */
|
||||
u_int32_t t3192; /* in milliseconds */
|
||||
u_int32_t drx_timer_max;/* in seconds */
|
||||
u_int32_t bs_cv_max;
|
||||
uint32_t t3192; /* in milliseconds */
|
||||
uint32_t drx_timer_max;/* in seconds */
|
||||
uint32_t bs_cv_max;
|
||||
|
||||
u_int8_t ext_info_present;
|
||||
uint8_t ext_info_present;
|
||||
struct {
|
||||
u_int8_t egprs_supported;
|
||||
u_int8_t use_egprs_p_ch_req;
|
||||
u_int8_t bep_period;
|
||||
u_int8_t pfc_supported;
|
||||
u_int8_t dtm_supported;
|
||||
u_int8_t bss_paging_coordination;
|
||||
uint8_t egprs_supported;
|
||||
uint8_t use_egprs_p_ch_req;
|
||||
uint8_t bep_period;
|
||||
uint8_t pfc_supported;
|
||||
uint8_t dtm_supported;
|
||||
uint8_t bss_paging_coordination;
|
||||
} ext_info;
|
||||
};
|
||||
|
||||
/* TS 04.60 Table 12.9.2 */
|
||||
struct gprs_power_ctrl_pars {
|
||||
u_int8_t alpha;
|
||||
u_int8_t t_avg_w;
|
||||
u_int8_t t_avg_t;
|
||||
u_int8_t pc_meas_chan;
|
||||
u_int8_t n_avg_i;
|
||||
uint8_t alpha;
|
||||
uint8_t t_avg_w;
|
||||
uint8_t t_avg_t;
|
||||
uint8_t pc_meas_chan;
|
||||
uint8_t n_avg_i;
|
||||
};
|
||||
|
||||
struct gsm48_si13_info {
|
||||
struct gprs_cell_options cell_opts;
|
||||
struct gprs_power_ctrl_pars pwr_ctrl_pars;
|
||||
u_int8_t bcch_change_mark;
|
||||
u_int8_t si_change_field;
|
||||
u_int8_t pbcch_present;
|
||||
uint8_t bcch_change_mark;
|
||||
uint8_t si_change_field;
|
||||
uint8_t pbcch_present;
|
||||
|
||||
union {
|
||||
struct {
|
||||
u_int8_t rac;
|
||||
u_int8_t spgc_ccch_sup;
|
||||
u_int8_t net_ctrl_ord;
|
||||
u_int8_t prio_acc_thr;
|
||||
uint8_t rac;
|
||||
uint8_t spgc_ccch_sup;
|
||||
uint8_t net_ctrl_ord;
|
||||
uint8_t prio_acc_thr;
|
||||
} no_pbcch;
|
||||
struct {
|
||||
u_int8_t psi1_rep_per;
|
||||
u_int8_t pb;
|
||||
u_int8_t tsc;
|
||||
u_int8_t tn;
|
||||
uint8_t psi1_rep_per;
|
||||
uint8_t pb;
|
||||
uint8_t tsc;
|
||||
uint8_t tn;
|
||||
enum pbcch_carrier_type carrier_type;
|
||||
u_int16_t arfcn;
|
||||
u_int8_t maio;
|
||||
uint16_t arfcn;
|
||||
uint8_t maio;
|
||||
} pbcch;
|
||||
};
|
||||
};
|
||||
|
||||
/* Generate SI13 Rest Octests (Chapter 10.5.2.37b) */
|
||||
int rest_octets_si13(u_int8_t *data, const struct gsm48_si13_info *si13);
|
||||
int rest_octets_si13(uint8_t *data, const struct gsm48_si13_info *si13);
|
||||
|
||||
#endif /* _REST_OCTETS_H */
|
||||
|
@@ -7,26 +7,27 @@
|
||||
* 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 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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 <netinet/in.h>
|
||||
|
||||
#include <osmocore/linuxlist.h>
|
||||
#include <osmocore/select.h>
|
||||
#include <osmocom/core/linuxlist.h>
|
||||
#include <osmocom/core/select.h>
|
||||
|
||||
#include <openbsc/mncc.h>
|
||||
|
||||
#define RTP_PT_GSM_FULL 3
|
||||
#define RTP_PT_GSM_HALF 96
|
||||
@@ -49,7 +50,7 @@ struct rtp_sub_socket {
|
||||
struct sockaddr_in sin_local;
|
||||
struct sockaddr_in sin_remote;
|
||||
|
||||
struct bsc_fd bfd;
|
||||
struct osmo_fd bfd;
|
||||
/* linked list of to-be-transmitted msgb's */
|
||||
struct llist_head tx_queue;
|
||||
};
|
||||
@@ -68,23 +69,23 @@ struct rtp_socket {
|
||||
} proxy;
|
||||
struct {
|
||||
struct gsm_network *net;
|
||||
u_int32_t callref;
|
||||
uint32_t callref;
|
||||
} receive;
|
||||
};
|
||||
enum rtp_tx_action tx_action;
|
||||
struct {
|
||||
u_int16_t sequence;
|
||||
u_int32_t timestamp;
|
||||
u_int32_t ssrc;
|
||||
uint16_t sequence;
|
||||
uint32_t timestamp;
|
||||
uint32_t ssrc;
|
||||
struct timeval last_tv;
|
||||
} transmit;
|
||||
};
|
||||
|
||||
struct rtp_socket *rtp_socket_create(void);
|
||||
int rtp_socket_bind(struct rtp_socket *rs, u_int32_t ip);
|
||||
int rtp_socket_connect(struct rtp_socket *rs, u_int32_t ip, u_int16_t port);
|
||||
int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip);
|
||||
int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port);
|
||||
int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other);
|
||||
int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, u_int32_t callref);
|
||||
int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, uint32_t callref);
|
||||
int rtp_socket_free(struct rtp_socket *rs);
|
||||
int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame);
|
||||
|
||||
|
@@ -1,9 +1,8 @@
|
||||
#ifndef _SGSN_H
|
||||
#define _SGSN_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <osmocore/msgb.h>
|
||||
#include <osmocom/core/msgb.h>
|
||||
|
||||
#include <openbsc/gprs_ns.h>
|
||||
#include <openbsc/gprs_sgsn.h>
|
||||
@@ -22,11 +21,11 @@ struct sgsn_instance {
|
||||
char *config_file;
|
||||
struct sgsn_config cfg;
|
||||
/* File descriptor wrappers for LibGTP */
|
||||
struct bsc_fd gtp_fd0;
|
||||
struct bsc_fd gtp_fd1c;
|
||||
struct bsc_fd gtp_fd1u;
|
||||
struct osmo_fd gtp_fd0;
|
||||
struct osmo_fd gtp_fd1c;
|
||||
struct osmo_fd gtp_fd1u;
|
||||
/* Timer for libGTP */
|
||||
struct timer_list gtp_timer;
|
||||
struct osmo_timer_list gtp_timer;
|
||||
/* GSN instance for libgtp */
|
||||
struct gsn_t *gsn;
|
||||
};
|
||||
|
@@ -1,21 +1,21 @@
|
||||
/* Generic signalling/notification infrastructure */
|
||||
/* (C) 2009-2010 by Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
* (C) 2009 by Harald Welte <laforge@gnumonks.org>
|
||||
* (C) 2010 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 General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* 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 General Public License for more details.
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <openbsc/gsm_data.h>
|
||||
|
||||
#include <osmocore/signal.h>
|
||||
#include <osmocom/core/signal.h>
|
||||
|
||||
/*
|
||||
* Signalling subsystems
|
||||
@@ -45,6 +45,9 @@ enum signal_subsystems {
|
||||
SS_NS,
|
||||
SS_IPAC_NWL,
|
||||
SS_RF,
|
||||
SS_MSC,
|
||||
SS_HO,
|
||||
SS_INPUT,
|
||||
};
|
||||
|
||||
/* SS_PAGING signals */
|
||||
@@ -59,6 +62,7 @@ enum signal_sms {
|
||||
S_SMS_DELIVERED, /* A SMS has been successfully delivered to a MS */
|
||||
S_SMS_SMMA, /* A MS tells us it has more space available */
|
||||
S_SMS_MEM_EXCEEDED, /* A MS tells us it has no more space available */
|
||||
S_SMS_UNKNOWN_ERROR, /* A MS tells us it has an error */
|
||||
};
|
||||
|
||||
/* SS_ABISIP signals */
|
||||
@@ -78,6 +82,9 @@ enum signal_nm {
|
||||
S_NM_IPACC_RESTART_ACK, /* nanoBTS has send a restart ack */
|
||||
S_NM_IPACC_RESTART_NACK,/* nanoBTS has send a restart ack */
|
||||
S_NM_TEST_REP, /* GSM 12.21 Test Report */
|
||||
S_NM_STATECHG_OPER, /* Operational State changed*/
|
||||
S_NM_STATECHG_ADM, /* Administrative State changed */
|
||||
S_NM_OM2K_CONF_RES, /* OM2K Configuration Result */
|
||||
};
|
||||
|
||||
/* SS_LCHAN signals */
|
||||
@@ -123,6 +130,7 @@ enum signal_ipaccess {
|
||||
|
||||
enum signal_global {
|
||||
S_GLOBAL_SHUTDOWN,
|
||||
S_GLOBAL_BTS_CLOSE_OM,
|
||||
};
|
||||
|
||||
/* SS_RF signals */
|
||||
@@ -132,12 +140,24 @@ enum signal_rf {
|
||||
S_RF_GRACE,
|
||||
};
|
||||
|
||||
/* SS_INPUT signals */
|
||||
enum signal_input {
|
||||
S_INP_NONE,
|
||||
S_INP_TEI_UP,
|
||||
S_INP_TEI_DN,
|
||||
S_INP_LINE_INIT,
|
||||
S_INP_LINE_ALARM,
|
||||
S_INP_LINE_NOALARM,
|
||||
};
|
||||
|
||||
struct gsm_subscriber;
|
||||
|
||||
struct paging_signal_data {
|
||||
struct gsm_subscriber *subscr;
|
||||
struct gsm_bts *bts;
|
||||
|
||||
int paging_result;
|
||||
|
||||
/* NULL in case the paging didn't work */
|
||||
struct gsm_subscriber_connection *conn;
|
||||
};
|
||||
@@ -150,7 +170,30 @@ struct scall_signal_data {
|
||||
|
||||
struct ipacc_ack_signal_data {
|
||||
struct gsm_bts_trx *trx;
|
||||
u_int8_t msg_type;
|
||||
uint8_t msg_type;
|
||||
};
|
||||
|
||||
struct abis_om2k_mo;
|
||||
|
||||
struct nm_statechg_signal_data {
|
||||
struct gsm_bts *bts;
|
||||
uint8_t obj_class;
|
||||
void *obj;
|
||||
struct gsm_nm_state *old_state;
|
||||
struct gsm_nm_state *new_state;
|
||||
|
||||
/* This pointer is vaold for TS 12.21 MO */
|
||||
struct abis_om_obj_inst *obj_inst;
|
||||
/* This pointer is vaold for RBS2000 MO */
|
||||
struct abis_om2k_mo *om2k_mo;
|
||||
};
|
||||
|
||||
struct nm_om2k_signal_data {
|
||||
struct gsm_bts *bts;
|
||||
void *obj;
|
||||
struct abis_om2k_mo *om2k_mo;
|
||||
|
||||
uint8_t accordance_ind;
|
||||
};
|
||||
|
||||
struct nm_nack_signal_data {
|
||||
@@ -168,6 +211,22 @@ struct rf_signal_data {
|
||||
struct gsm_network *net;
|
||||
};
|
||||
|
||||
struct sms_signal_data {
|
||||
/* The transaction where this occured */
|
||||
struct gsm_trans *trans;
|
||||
/* Can be NULL for SMMA */
|
||||
struct gsm_sms *sms;
|
||||
/* int paging result. Only the ones with > 0 */
|
||||
int paging_result;
|
||||
};
|
||||
|
||||
struct lchan_signal_data {
|
||||
/* The lchan the signal happened on */
|
||||
struct gsm_lchan *lchan;
|
||||
/* Measurement reports on this lchan */
|
||||
struct gsm_meas_rep *mr;
|
||||
};
|
||||
|
||||
enum signal_ns {
|
||||
S_NS_RESET,
|
||||
S_NS_BLOCK,
|
||||
@@ -180,4 +239,33 @@ struct ns_signal_data {
|
||||
uint8_t cause;
|
||||
};
|
||||
|
||||
/* MSC signals */
|
||||
enum signal_msc {
|
||||
S_MSC_LOST,
|
||||
S_MSC_CONNECTED,
|
||||
};
|
||||
|
||||
struct osmo_msc_data;
|
||||
struct msc_signal_data {
|
||||
struct osmo_msc_data *data;
|
||||
};
|
||||
|
||||
/* handover */
|
||||
enum signal_ho {
|
||||
S_HANDOVER_ACK,
|
||||
};
|
||||
|
||||
struct ho_signal_data {
|
||||
struct gsm_lchan *old_lchan;
|
||||
struct gsm_lchan *new_lchan;
|
||||
};
|
||||
|
||||
struct input_signal_data {
|
||||
int link_type;
|
||||
uint8_t tei;
|
||||
uint8_t sapi;
|
||||
struct gsm_bts_trx *trx;
|
||||
struct e1inp_line *line;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
17
openbsc/include/openbsc/sms_queue.h
Normal file
17
openbsc/include/openbsc/sms_queue.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef SMS_QUEUE_H
|
||||
#define SMS_QUEUE_H
|
||||
|
||||
struct gsm_network;
|
||||
struct gsm_sms_queue;
|
||||
struct vty;
|
||||
|
||||
int sms_queue_start(struct gsm_network *, int in_flight);
|
||||
int sms_queue_trigger(struct gsm_sms_queue *);
|
||||
|
||||
/* vty helper functions */
|
||||
int sms_queue_stats(struct gsm_sms_queue *, struct vty* vty);
|
||||
int sms_queue_set_max_pending(struct gsm_sms_queue *, int max);
|
||||
int sms_queue_set_max_failure(struct gsm_sms_queue *, int fail);
|
||||
int sms_queue_clear(struct gsm_sms_queue *);
|
||||
|
||||
#endif
|
@@ -1,14 +1,14 @@
|
||||
#ifndef _BSC_SOCKET_H
|
||||
#define _BSC_SOCKET_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <osmocore/select.h>
|
||||
#include <osmocom/core/select.h>
|
||||
|
||||
#ifndef IPPROTO_GRE
|
||||
#define IPPROTO_GRE 47
|
||||
#endif
|
||||
|
||||
int make_sock(struct bsc_fd *bfd, int proto, u_int32_t ip, u_int16_t port,
|
||||
int (*cb)(struct bsc_fd *fd, unsigned int what));
|
||||
int make_sock(struct osmo_fd *bfd, int proto,
|
||||
uint32_t ip, uint16_t port, int priv_nr,
|
||||
int (*cb)(struct osmo_fd *fd, unsigned int what), void *data);
|
||||
|
||||
#endif /* _BSC_SOCKET_H */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user