mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-21 01:24:10 +08:00
Compare commits
1267 Commits
add_libblo
...
fwmngr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04c9366ead | ||
|
|
2045279f37 | ||
|
|
70de560e6e | ||
|
|
4d22b5e535 | ||
|
|
a633ad36e9 | ||
|
|
427215500e | ||
|
|
54cb7ca79b | ||
|
|
af719cfab9 | ||
|
|
8644a80d80 | ||
|
|
e8c51b6977 | ||
|
|
51305266e8 | ||
|
|
832c0753ce | ||
|
|
453fc865ee | ||
|
|
dead9fca70 | ||
|
|
7f048bbf57 | ||
|
|
6ae1e846ee | ||
|
|
4286dec1a1 | ||
|
|
6d3399ccb8 | ||
|
|
a3b547ab80 | ||
|
|
f80b0b3eac | ||
|
|
09b8975174 | ||
|
|
9cdba3b3e0 | ||
|
|
e6eba50913 | ||
|
|
7e6a3f4a1f | ||
|
|
faff3b9337 | ||
|
|
11e613ce05 | ||
|
|
04413be781 | ||
|
|
fa95755642 | ||
|
|
72f6521710 | ||
|
|
2a9012763e | ||
|
|
c06016bc5b | ||
|
|
b946c2842a | ||
|
|
356c6c76d2 | ||
|
|
27f466ae8d | ||
|
|
3f0f5ba019 | ||
|
|
1e4c3cec94 | ||
|
|
e21a57e76c | ||
|
|
7abe44c412 | ||
|
|
c24a0ccd66 | ||
|
|
9926d0fa80 | ||
|
|
b598e31ca3 | ||
|
|
0faae8cfad | ||
|
|
4535954699 | ||
|
|
e9d0a81e8e | ||
|
|
d6333aa476 | ||
|
|
5b702e1991 | ||
|
|
cb2ce4a8a3 | ||
|
|
82ab0e5367 | ||
|
|
d8506b4239 | ||
|
|
5ded1fc682 | ||
|
|
8f4010d0cf | ||
|
|
2319f033f7 | ||
|
|
9bf0b5ff70 | ||
|
|
c414fc6259 | ||
|
|
43d3d72620 | ||
|
|
800597ae2b | ||
|
|
291bef2007 | ||
|
|
39f1bbe436 | ||
|
|
43b5e66431 | ||
|
|
d21c3f33b6 | ||
|
|
a58b047723 | ||
|
|
9ef7c35ee0 | ||
|
|
3d4708bd68 | ||
|
|
7536b725b4 | ||
|
|
8101ef0c5a | ||
|
|
80d027ba12 | ||
|
|
fb0310b8f6 | ||
|
|
8482cb4ddc | ||
|
|
1700c3fa19 | ||
|
|
63fd69ad75 | ||
|
|
548be0303f | ||
|
|
8b39953242 | ||
|
|
6d0de809ec | ||
|
|
8c2a353096 | ||
|
|
a5d275147d | ||
|
|
12b6711a73 | ||
|
|
b0fd3e8295 | ||
|
|
80a7f348ad | ||
|
|
a56049b5db | ||
|
|
53e6168c8c | ||
|
|
b17e5140ce | ||
|
|
95d1a7cc30 | ||
|
|
b8b2dcb6fe | ||
|
|
504d124486 | ||
|
|
380daf4a00 | ||
|
|
248fadbf9d | ||
|
|
78a272d633 | ||
|
|
9174ce4b47 | ||
|
|
ec4dd70279 | ||
|
|
97093db976 | ||
|
|
2aba8381a8 | ||
|
|
5ce0a2213c | ||
|
|
d3599d5ed3 | ||
|
|
98939b4868 | ||
|
|
89df7486bd | ||
|
|
e9b42e1008 | ||
|
|
72578c94e5 | ||
|
|
2f20ec448d | ||
|
|
ddfab6f729 | ||
|
|
5ea154d45d | ||
|
|
1beb50b0f3 | ||
|
|
1539bd4698 | ||
|
|
10895fcdfd | ||
|
|
5f36059857 | ||
|
|
b04ae36466 | ||
|
|
1d433ee82a | ||
|
|
2ec27f40be | ||
|
|
d99b63f6cf | ||
|
|
37a064dc55 | ||
|
|
f8375dd9e0 | ||
|
|
38c523375b | ||
|
|
8bdc8a0bb7 | ||
|
|
ecaf8ab2e9 | ||
|
|
dbeaf1111d | ||
|
|
cb8f4d060b | ||
|
|
013b26e692 | ||
|
|
1db3d69571 | ||
|
|
272493dc31 | ||
|
|
75215e4909 | ||
|
|
d3b21a3ae7 | ||
|
|
9e9b46f4a2 | ||
|
|
b73f43e200 | ||
|
|
911f9a28b5 | ||
|
|
f76e77585c | ||
|
|
1ba45eb368 | ||
|
|
adfcc9a55c | ||
|
|
d3247ed266 | ||
|
|
3cc1dc5bb7 | ||
|
|
214901dfe6 | ||
|
|
ed6b6e169d | ||
|
|
295e8c2d9e | ||
|
|
ea4b3432c0 | ||
|
|
c2ebd96aab | ||
|
|
d80d488656 | ||
|
|
7e26836e48 | ||
|
|
64e5753381 | ||
|
|
78642492bf | ||
|
|
388fb57b7a | ||
|
|
fdde24d9e9 | ||
|
|
70a24dfa69 | ||
|
|
403af75f87 | ||
|
|
40444a3fe9 | ||
|
|
559215189a | ||
|
|
57ac13c87e | ||
|
|
018939d301 | ||
|
|
e1cf78ef2b | ||
|
|
b5eb3a0433 | ||
|
|
dd8b1c3635 | ||
|
|
c53a7a0368 | ||
|
|
3feaa262be | ||
|
|
7496af52d7 | ||
|
|
293f1f7d47 | ||
|
|
3f3533134c | ||
|
|
b505d6af02 | ||
|
|
3aac39c4f7 | ||
|
|
b1417f539d | ||
|
|
5f234ade12 | ||
|
|
1564d8b8c4 | ||
|
|
e64aba2c2c | ||
|
|
7129467410 | ||
|
|
504cc025a2 | ||
|
|
6906fada68 | ||
|
|
649e2a7a76 | ||
|
|
24c455cdc6 | ||
|
|
69806152aa | ||
|
|
1a22bc45c1 | ||
|
|
02a87fb94c | ||
|
|
55ba31c7d3 | ||
|
|
da34a6f7c1 | ||
|
|
6a4b29d6f6 | ||
|
|
dd55c60bd6 | ||
|
|
f735ec7d3e | ||
|
|
3e15668da5 | ||
|
|
75117cba49 | ||
|
|
0a1bf10fc3 | ||
|
|
6865aa2ff7 | ||
|
|
46292ef117 | ||
|
|
af74715a84 | ||
|
|
ad6a3fcf99 | ||
|
|
bed61fea08 | ||
|
|
0a34d99b6e | ||
|
|
6dbfa5897c | ||
|
|
9eee63b031 | ||
|
|
21106d98d0 | ||
|
|
8727a7a809 | ||
|
|
99612516b6 | ||
|
|
198f30b1ae | ||
|
|
fbc8a916ac | ||
|
|
4f295d01af | ||
|
|
e8554bcd03 | ||
|
|
749e095b04 | ||
|
|
45f47de514 | ||
|
|
174ba8951a | ||
|
|
d59793c752 | ||
|
|
6b93fd6e27 | ||
|
|
35b45c4045 | ||
|
|
cc61f8ab1f | ||
|
|
19a224d375 | ||
|
|
82e5b81fda | ||
|
|
ba493b07e7 | ||
|
|
8521b7133d | ||
|
|
153409f3b5 | ||
|
|
0a41cfeeac | ||
|
|
47b90c4939 | ||
|
|
4385b647c1 | ||
|
|
322c381ed4 | ||
|
|
88d5b5ac57 | ||
|
|
52835de6c9 | ||
|
|
39edba2ab3 | ||
|
|
bac9790dab | ||
|
|
eba395c22f | ||
|
|
9f59d9ce20 | ||
|
|
6110a9f8b7 | ||
|
|
111dc5950b | ||
|
|
f1f96516d0 | ||
|
|
0ed837ffda | ||
|
|
98bd33aa29 | ||
|
|
56af888ded | ||
|
|
9fa2e983ad | ||
|
|
c3e17f0df8 | ||
|
|
ddbd9a5b70 | ||
|
|
2f6c5433ce | ||
|
|
4bd1e59c20 | ||
|
|
598f3cbf8b | ||
|
|
4c7899dc1e | ||
|
|
97f5d60d7c | ||
|
|
16aeb4e6fe | ||
|
|
45d3cce3e6 | ||
|
|
8e5f474c1f | ||
|
|
aa1adcad3c | ||
|
|
570cd68d15 | ||
|
|
e3947e44bd | ||
|
|
9a1a93c25e | ||
|
|
c9ea556273 | ||
|
|
aee2c22afe | ||
|
|
f6bf0f3a96 | ||
|
|
3fc9f450f9 | ||
|
|
c26327306b | ||
|
|
5c10cfcb99 | ||
|
|
67f114cf29 | ||
|
|
2658e12c52 | ||
|
|
0a454a0967 | ||
|
|
9800d4a335 | ||
|
|
e3d00ebb68 | ||
|
|
c9fefe95aa | ||
|
|
fdb22bff37 | ||
|
|
3eba14e0a6 | ||
|
|
f2b5016920 | ||
|
|
3eedd0dd23 | ||
|
|
555babf34c | ||
|
|
ec165a9042 | ||
|
|
d4b2d251d6 | ||
|
|
78aecb52ca | ||
|
|
8eb17ec066 | ||
|
|
01c1899208 | ||
|
|
bec7eeaa33 | ||
|
|
dc49178002 | ||
|
|
ddf59c0756 | ||
|
|
6dc1e0de1c | ||
|
|
4dd401a0cb | ||
|
|
e60ef9d02e | ||
|
|
9f2a6f3265 | ||
|
|
36db9285f6 | ||
|
|
559ea53e69 | ||
|
|
f7ade9751e | ||
|
|
963e1ecc6c | ||
|
|
35ca583dc1 | ||
|
|
8b12debefe | ||
|
|
a0caa174d0 | ||
|
|
8bd2d74316 | ||
|
|
e6015f5db2 | ||
|
|
a227490dcb | ||
|
|
c0c5cf032d | ||
|
|
25c09589f2 | ||
|
|
22b273faf0 | ||
|
|
fd850636a5 | ||
|
|
2568cba699 | ||
|
|
2968ad5dd8 | ||
|
|
6311e0f8b0 | ||
|
|
7449779f37 | ||
|
|
459bc4f9ff | ||
|
|
a574514a41 | ||
|
|
ceb70ecefb | ||
|
|
bc0e021b3c | ||
|
|
19d372a4ad | ||
|
|
8a08dd3916 | ||
|
|
a672e1708f | ||
|
|
4b4407c3f9 | ||
|
|
2d1c7428b6 | ||
|
|
ad28f56744 | ||
|
|
a8c1c6b25f | ||
|
|
4a89da8067 | ||
|
|
386649b0bb | ||
|
|
e050489073 | ||
|
|
94895ef110 | ||
|
|
4c93c01d22 | ||
|
|
9228b44a94 | ||
|
|
7ace7892b1 | ||
|
|
f4dfdc46f1 | ||
|
|
cc8b0f70d6 | ||
|
|
d943a0e0d1 | ||
|
|
c25c241008 | ||
|
|
59aad46280 | ||
|
|
65a754935e | ||
|
|
99f0cc9a01 | ||
|
|
371e27e92e | ||
|
|
724c62684f | ||
|
|
040123d2b1 | ||
|
|
c5f26d1217 | ||
|
|
55e87e47f1 | ||
|
|
bb9b397caa | ||
|
|
e1c9006b2d | ||
|
|
b7a95f200f | ||
|
|
fb15ed7deb | ||
|
|
9535b226ce | ||
|
|
48e6c149a6 | ||
|
|
068307171c | ||
|
|
b7957f5dd4 | ||
|
|
4c40999c71 | ||
|
|
ff786da6a2 | ||
|
|
25955bfeca | ||
|
|
b9f25bcd90 | ||
|
|
b8dfa5eebe | ||
|
|
10719b6c92 | ||
|
|
cdb029dcb8 | ||
|
|
55fa399ea6 | ||
|
|
c0bdff6a1c | ||
|
|
48d35004d4 | ||
|
|
e95cc9a39d | ||
|
|
c260fb4c61 | ||
|
|
4b279a83a9 | ||
|
|
3cebc8aee5 | ||
|
|
58035970a4 | ||
|
|
707a62b678 | ||
|
|
2c738bb96c | ||
|
|
fa24932e7c | ||
|
|
b8fc416fed | ||
|
|
7ad065a756 | ||
|
|
54a54d048c | ||
|
|
28fef8f5ea | ||
|
|
92a1c1e25d | ||
|
|
34c5ae9c71 | ||
|
|
1c68b9bba0 | ||
|
|
6b7d2d7c69 | ||
|
|
3482a3e94f | ||
|
|
b96d6a5a1b | ||
|
|
01625e3382 | ||
|
|
8243861c49 | ||
|
|
744c5828a5 | ||
|
|
a33b438ddc | ||
|
|
445e50f011 | ||
|
|
e845aa2a51 | ||
|
|
39aebfc782 | ||
|
|
6441d2fd01 | ||
|
|
36f02fa5f8 | ||
|
|
e80ca4319b | ||
|
|
350186614e | ||
|
|
6caec3ea06 | ||
|
|
f45ec2b32b | ||
|
|
c361b4e589 | ||
|
|
ef4e5fbef6 | ||
|
|
d9fe7d6927 | ||
|
|
920832c5c7 | ||
|
|
a1a1dafb2f | ||
|
|
45eda81ccc | ||
|
|
83db5d1e2d | ||
|
|
71e7a8121f | ||
|
|
0368ef0498 | ||
|
|
34b8267b03 | ||
|
|
13e8f80a5d | ||
|
|
f9bbd87b5d | ||
|
|
b5150eb926 | ||
|
|
ab078ad644 | ||
|
|
676244b0c7 | ||
|
|
c1b990837d | ||
|
|
7dc38d0a4a | ||
|
|
6fdb0e1e4c | ||
|
|
4712d9be73 | ||
|
|
724c060372 | ||
|
|
45e996e2fa | ||
|
|
66f4780410 | ||
|
|
f2b3838451 | ||
|
|
17e67528cc | ||
|
|
6dfd959020 | ||
|
|
65d4d6538d | ||
|
|
63efd921ed | ||
|
|
2bbe7b1eef | ||
|
|
9c6f6acf6c | ||
|
|
6bc1456655 | ||
|
|
663412be0b | ||
|
|
272d4defc0 | ||
|
|
c7f81e4ad8 | ||
|
|
03ec0f2964 | ||
|
|
53d76aaa4d | ||
|
|
43a68cb1ed | ||
|
|
8f8c6405ea | ||
|
|
1efa6ec0aa | ||
|
|
13bbdaa1e8 | ||
|
|
feeed40395 | ||
|
|
f8022eb73b | ||
|
|
07e1c78029 | ||
|
|
d1ea18952f | ||
|
|
3b0097078d | ||
|
|
9b4c941cd4 | ||
|
|
50bee657ba | ||
|
|
8412f5d2d6 | ||
|
|
eabf5b6e8f | ||
|
|
3dd525d5ff | ||
|
|
a828671570 | ||
|
|
084cb9742a | ||
|
|
f3e4a9717c | ||
|
|
b63033eeab | ||
|
|
c52754d80e | ||
|
|
6adb45d944 | ||
|
|
2478ca8fd9 | ||
|
|
c6492dfeee | ||
|
|
5fcd32a7e8 | ||
|
|
73e7efddae | ||
|
|
a934358614 | ||
|
|
620ba60f2e | ||
|
|
f89b0b1797 | ||
|
|
bafb6f304c | ||
|
|
20e5110ac5 | ||
|
|
083ffd8a3f | ||
|
|
cf8c202d01 | ||
|
|
71bbb8281c | ||
|
|
3b3d7150bd | ||
|
|
130e5c567d | ||
|
|
ba61b6c8dd | ||
|
|
b3715aee80 | ||
|
|
4064c9b98c | ||
|
|
fea576c258 | ||
|
|
189bfe4013 | ||
|
|
2370c6e82e | ||
|
|
bfda6d619e | ||
|
|
930d777931 | ||
|
|
9565fa70d2 | ||
|
|
add4061e7f | ||
|
|
15e0d8e40d | ||
|
|
a1309b2552 | ||
|
|
283f148f74 | ||
|
|
21292de648 | ||
|
|
628872d2fd | ||
|
|
6608a10538 | ||
|
|
7eaf58237a | ||
|
|
f952712b5e | ||
|
|
03d5798ea0 | ||
|
|
4a049cfecd | ||
|
|
d36c76f4de | ||
|
|
fb04949dc3 | ||
|
|
0969cc7a24 | ||
|
|
12dff011cc | ||
|
|
5572cc2ede | ||
|
|
91f5827a4f | ||
|
|
aec92583ea | ||
|
|
63f4adcc97 | ||
|
|
82df16a8c4 | ||
|
|
237f30c3f7 | ||
|
|
2dac7741d4 | ||
|
|
0cff7d0e94 | ||
|
|
5e5abdfd21 | ||
|
|
0a755e5ea5 | ||
|
|
792e3ad20d | ||
|
|
336c5047c6 | ||
|
|
9c999de243 | ||
|
|
9a71a0bc84 | ||
|
|
7fb76b6dcd | ||
|
|
4f924bec0e | ||
|
|
ea4301bf28 | ||
|
|
99fcfcfa7e | ||
|
|
81218bc62d | ||
|
|
a71a0d4036 | ||
|
|
db578ec144 | ||
|
|
9410758de0 | ||
|
|
7b05468390 | ||
|
|
6d43b68d0b | ||
|
|
ae1fb54a3c | ||
|
|
313462e3ab | ||
|
|
be56713329 | ||
|
|
caae6916ae | ||
|
|
4e1db4f14f | ||
|
|
d2298b6097 | ||
|
|
8b1ef3cd74 | ||
|
|
05da8b4210 | ||
|
|
33cd29a47d | ||
|
|
f35b198c05 | ||
|
|
2bba5ad425 | ||
|
|
cbcb5278db | ||
|
|
be032908b0 | ||
|
|
e4d7967cd5 | ||
|
|
2fd0e37395 | ||
|
|
155ed6e0e1 | ||
|
|
4f70901a8c | ||
|
|
faf81a70fd | ||
|
|
680f324a34 | ||
|
|
718c2bdd81 | ||
|
|
d5ef59f028 | ||
|
|
881b8edaa9 | ||
|
|
2b5c30f203 | ||
|
|
1e5ff3a2fd | ||
|
|
7604786437 | ||
|
|
be752464bc | ||
|
|
fe47e30520 | ||
|
|
1623fb6559 | ||
|
|
002dceac35 | ||
|
|
b0b2874fdf | ||
|
|
378ef51ea8 | ||
|
|
241fd05d5c | ||
|
|
3267082ac3 | ||
|
|
fbc67e547c | ||
|
|
57b0cde173 | ||
|
|
222116d122 | ||
|
|
4e51f87eb0 | ||
|
|
a0fa00fd93 | ||
|
|
60989716fb | ||
|
|
a50f99634e | ||
|
|
822a6ff7a1 | ||
|
|
110da023b1 | ||
|
|
03fcf31e97 | ||
|
|
96e990ad3e | ||
|
|
6709beee6c | ||
|
|
644856890b | ||
|
|
208ebe92a8 | ||
|
|
752648d604 | ||
|
|
8f5e73321f | ||
|
|
5c83a98cb3 | ||
|
|
8711c64ff6 | ||
|
|
b6477e8b84 | ||
|
|
6f24ad440c | ||
|
|
640d24ea66 | ||
|
|
60b06dd739 | ||
|
|
501966b150 | ||
|
|
32e6e38103 | ||
|
|
adce72980b | ||
|
|
695351633d | ||
|
|
a2b4aedce5 | ||
|
|
37dd1361b0 | ||
|
|
68042169ff | ||
|
|
f110bdbe68 | ||
|
|
923e714017 | ||
|
|
81dd8f8afa | ||
|
|
73d855e682 | ||
|
|
a5606ed518 | ||
|
|
ca2a495790 | ||
|
|
695b7374bc | ||
|
|
f9df86feec | ||
|
|
8686249557 | ||
|
|
a8d529f9ea | ||
|
|
4715de6308 | ||
|
|
b41ec4ff65 | ||
|
|
b3de88d2c4 | ||
|
|
063314c91d | ||
|
|
e72b600326 | ||
|
|
594b13f5f9 | ||
|
|
fdb1dbbba0 | ||
|
|
d89055f64b | ||
|
|
13ffeac51b | ||
|
|
d94c6e9995 | ||
|
|
639694c0fb | ||
|
|
6f629b7393 | ||
|
|
d4af4ca030 | ||
|
|
237cead03b | ||
|
|
d440af07b1 | ||
|
|
a09346bfc0 | ||
|
|
c9f90a6cf5 | ||
|
|
e0d07b5205 | ||
|
|
1c035c5523 | ||
|
|
38e49fc09f | ||
|
|
1ff2a366fa | ||
|
|
263b785fcb | ||
|
|
c1475dd5f1 | ||
|
|
3411ece8a8 | ||
|
|
5912c00a4b | ||
|
|
e39acfeeae | ||
|
|
b0ddc52e97 | ||
|
|
b7ea6fdfcf | ||
|
|
28fdf33411 | ||
|
|
96b753c367 | ||
|
|
e34ed69b9b | ||
|
|
d75d44795c | ||
|
|
97ce9d60e0 | ||
|
|
391dbe06cc | ||
|
|
81ae6221ac | ||
|
|
a96302230c | ||
|
|
a5b5b160e2 | ||
|
|
21d327d4fe | ||
|
|
2241f360b4 | ||
|
|
3d951f5453 | ||
|
|
9db96d7296 | ||
|
|
7a8b81f261 | ||
|
|
edd2f92dae | ||
|
|
f9fbb07f0a | ||
|
|
29418e36d8 | ||
|
|
2420391455 | ||
|
|
5221858e30 | ||
|
|
1a40a6e747 | ||
|
|
85715416a5 | ||
|
|
2133c53a5c | ||
|
|
f2a5d2987d | ||
|
|
cef675a672 | ||
|
|
78cf48518c | ||
|
|
10d36df0b6 | ||
|
|
b2e5e5ee8d | ||
|
|
14cb91a952 | ||
|
|
aba3bcbe99 | ||
|
|
95691b3de6 | ||
|
|
c6abc34868 | ||
|
|
e9e50f7402 | ||
|
|
ec66d57a7a | ||
|
|
8eb1f7b729 | ||
|
|
4d1fe3c052 | ||
|
|
93a42e1cb9 | ||
|
|
93cffa2d20 | ||
|
|
14a32ff704 | ||
|
|
1d1318dad2 | ||
|
|
cacf1e9610 | ||
|
|
cd80edc69d | ||
|
|
778bd98197 | ||
|
|
2c0e2a559f | ||
|
|
f76e8eb150 | ||
|
|
9084ce08b3 | ||
|
|
eebe898c37 | ||
|
|
ea3b3aec05 | ||
|
|
2a820a9e33 | ||
|
|
f5d77f5b19 | ||
|
|
ea4a0acac7 | ||
|
|
9655bf7740 | ||
|
|
2dce686767 | ||
|
|
6d93558c6e | ||
|
|
363c2c39aa | ||
|
|
a5f7ef04f4 | ||
|
|
7f4eeaeb1a | ||
|
|
a352b4f8fe | ||
|
|
a41e1d7299 | ||
|
|
01ce50ba59 | ||
|
|
b606530f0e | ||
|
|
0cdf15fec5 | ||
|
|
edb05ae692 | ||
|
|
889f2637fc | ||
|
|
1792c8b615 | ||
|
|
24173b4beb | ||
|
|
f59bed5f48 | ||
|
|
3a1915a027 | ||
|
|
67d8787dfa | ||
|
|
8eb41f7b94 | ||
|
|
3725fdf26a | ||
|
|
9aa65e3489 | ||
|
|
c945d0d4a6 | ||
|
|
63c8f8af95 | ||
|
|
18acbe65c4 | ||
|
|
af48c7c682 | ||
|
|
d961a590b4 | ||
|
|
e7426d5e71 | ||
|
|
e485a0514e | ||
|
|
05448a3cae | ||
|
|
be22778704 | ||
|
|
89cfa4dc0d | ||
|
|
1a69381038 | ||
|
|
0f6108a0c0 | ||
|
|
2dc1e6044a | ||
|
|
2234822346 | ||
|
|
0739cef329 | ||
|
|
572b370aec | ||
|
|
0fc7964afa | ||
|
|
10f287a885 | ||
|
|
f47a2c3ef3 | ||
|
|
bb9d1621a5 | ||
|
|
be88de9f0e | ||
|
|
d752daecbe | ||
|
|
f8482fd2ca | ||
|
|
6150acc420 | ||
|
|
b11e959fe7 | ||
|
|
76c8fbbfbc | ||
|
|
81f0e8d255 | ||
|
|
8b3ede859b | ||
|
|
82b8245f6a | ||
|
|
ba6a218a09 | ||
|
|
7db489d987 | ||
|
|
b718d566d7 | ||
|
|
c6808a3524 | ||
|
|
74b9435ba4 | ||
|
|
1e81fee38a | ||
|
|
330f8b6e71 | ||
|
|
3fbc1ea845 | ||
|
|
fdc4a07242 | ||
|
|
fc7595c072 | ||
|
|
36e7d3d221 | ||
|
|
ff11531d8c | ||
|
|
5f967edb5b | ||
|
|
22daedac3c | ||
|
|
7a1760a20f | ||
|
|
472bd4c27c | ||
|
|
b37ea343f1 | ||
|
|
0ea80c5b06 | ||
|
|
ae60472790 | ||
|
|
42f019a136 | ||
|
|
ccd87ca8bc | ||
|
|
23f74d3982 | ||
|
|
9dfbdbbb00 | ||
|
|
b5e1379c8d | ||
|
|
ce48719df9 | ||
|
|
84f2faff38 | ||
|
|
74c1017a0c | ||
|
|
510712bf86 | ||
|
|
7743425e9c | ||
|
|
50984f8f84 | ||
|
|
82fed513a8 | ||
|
|
adfaa19180 | ||
|
|
cf8b29665c | ||
|
|
43bfdc8994 | ||
|
|
b29b3a12e3 | ||
|
|
38d2c7dc25 | ||
|
|
cc3a8f55e6 | ||
|
|
a6616bb17d | ||
|
|
ad06a9f4ea | ||
|
|
d150800f1b | ||
|
|
e8b716b2a1 | ||
|
|
442ce5ce83 | ||
|
|
72f18d7acf | ||
|
|
fa905db20f | ||
|
|
de1745f4ce | ||
|
|
f6697c9003 | ||
|
|
44d9e704b3 | ||
|
|
ed9ec3b702 | ||
|
|
07f10c42dc | ||
|
|
9b45e4c9a1 | ||
|
|
d3d8bd14aa | ||
|
|
4dfe44af20 | ||
|
|
9ae9af2acf | ||
|
|
2d11f25204 | ||
|
|
2cd4776649 | ||
|
|
0aae8679c5 | ||
|
|
3bb34b88a6 | ||
|
|
8efb6e952a | ||
|
|
3ef04dbd25 | ||
|
|
9d4eade8c1 | ||
|
|
9c145bc34b | ||
|
|
2317e6b072 | ||
|
|
f12f17c6c4 | ||
|
|
23358a7f8c | ||
|
|
ef32f8b0f9 | ||
|
|
7e81d58f78 | ||
|
|
213f7850bc | ||
|
|
89a86c3629 | ||
|
|
83f4e57fe2 | ||
|
|
0ffe19196c | ||
|
|
ec9fb0cddc | ||
|
|
c1ffc565e5 | ||
|
|
dca4cd0e63 | ||
|
|
0a00f07d26 | ||
|
|
6b75585b9d | ||
|
|
59583925b5 | ||
|
|
39c594531a | ||
|
|
21d167b543 | ||
|
|
4439dd777a | ||
|
|
1b17f255cd | ||
|
|
bd7ffb6ed0 | ||
|
|
d56bd71f04 | ||
|
|
5dea0ad170 | ||
|
|
caf0bcabf4 | ||
|
|
ad6c736f5c | ||
|
|
4c5443fff8 | ||
|
|
c4c3ce2c76 | ||
|
|
f2e3dd3835 | ||
|
|
3f8a60c2fd | ||
|
|
1d62545b4d | ||
|
|
33b331d724 | ||
|
|
ac51e3b0cd | ||
|
|
6af817414a | ||
|
|
c94f060196 | ||
|
|
302daba0a6 | ||
|
|
0cfd475bc7 | ||
|
|
8bcb3d8d18 | ||
|
|
e70a2d5387 | ||
|
|
1004eab7c3 | ||
|
|
21512b44ff | ||
|
|
121bec3a3b | ||
|
|
6227fca86e | ||
|
|
21d3c577c8 | ||
|
|
286e5ce814 | ||
|
|
077337b0ea | ||
|
|
c08342b404 | ||
|
|
6ab6152d66 | ||
|
|
e3e11645b9 | ||
|
|
71abbd7024 | ||
|
|
239336f39f | ||
|
|
adfda085d7 | ||
|
|
9034a41e93 | ||
|
|
8011700c3a | ||
|
|
a4b6d1c15d | ||
|
|
885ace494e | ||
|
|
139382c930 | ||
|
|
f77697fa15 | ||
|
|
0d230c1d96 | ||
|
|
ed4fdc13c9 | ||
|
|
a729eb4e75 | ||
|
|
f4efc133f9 | ||
|
|
c2aa56adff | ||
|
|
1530b0b9e4 | ||
|
|
c0c8f92d6b | ||
|
|
da99f3b66c | ||
|
|
4ec0b703f4 | ||
|
|
81f48dc776 | ||
|
|
0927fbaf35 | ||
|
|
a61770b99d | ||
|
|
2668e9d634 | ||
|
|
a9e482d9af | ||
|
|
71cdb3e11c | ||
|
|
ecd30ae17d | ||
|
|
a28ff87eca | ||
|
|
117bca46df | ||
|
|
2657260054 | ||
|
|
69c4c6cb31 | ||
|
|
2df5b55ed7 | ||
|
|
ecacb13edf | ||
|
|
3bf7d2557c | ||
|
|
df8d9ff1ef | ||
|
|
10564d779c | ||
|
|
b64f41dc6b | ||
|
|
cddf178691 | ||
|
|
67083c4ab4 | ||
|
|
063a97a7d0 | ||
|
|
3920ab6523 | ||
|
|
406c8ef73c | ||
|
|
8651b12aa6 | ||
|
|
3bc76dc1bb | ||
|
|
71d96711bd | ||
|
|
96966f447c | ||
|
|
4efe0b0e53 | ||
|
|
6f48560b97 | ||
|
|
bdb3d1847e | ||
|
|
f2cb3f4442 | ||
|
|
3df0e75b3f | ||
|
|
0afc1b9dd5 | ||
|
|
8e1a3b1184 | ||
|
|
854c2aa507 | ||
|
|
30282db3d5 | ||
|
|
6c9f034d29 | ||
|
|
d19c85ebde | ||
|
|
dfa0414918 | ||
|
|
30a4b1b745 | ||
|
|
ebbe691ecc | ||
|
|
ec9495cd41 | ||
|
|
c736b6244a | ||
|
|
ec4bd3cd91 | ||
|
|
d685b60f45 | ||
|
|
01f98c52c9 | ||
|
|
89af5bba92 | ||
|
|
f3edc9b7eb | ||
|
|
8ec904fac2 | ||
|
|
1d10770ed5 | ||
|
|
01f738b2b3 | ||
|
|
dc0b80097b | ||
|
|
ee283c2e1b | ||
|
|
d1f4dfbb71 | ||
|
|
28603606d6 | ||
|
|
0e06579c71 | ||
|
|
89afb954da | ||
|
|
01899c924a | ||
|
|
41453f0f97 | ||
|
|
dd12c2574f | ||
|
|
f7087bb8c7 | ||
|
|
16ce80d9ee | ||
|
|
02f85d54d0 | ||
|
|
c80da485c9 | ||
|
|
38e95765a3 | ||
|
|
1141ca1ef9 | ||
|
|
f0b1a32208 | ||
|
|
28dda87cfb | ||
|
|
f5be820ad5 | ||
|
|
8820cbe1b1 | ||
|
|
11293bb304 | ||
|
|
5dcf58e7dd | ||
|
|
91d345c7fb | ||
|
|
dc4c8bafc2 | ||
|
|
98287d382b | ||
|
|
fbaa28712d | ||
|
|
84a5b3f99f | ||
|
|
4ebffa9cfb | ||
|
|
ed33a61be7 | ||
|
|
99eb4bf546 | ||
|
|
0745796112 | ||
|
|
ebcf8b4b61 | ||
|
|
01f11f1ad0 | ||
|
|
df1537cd0c | ||
|
|
b370f1c242 | ||
|
|
c71de4a811 | ||
|
|
30e8ff5884 | ||
|
|
454eba7e5e | ||
|
|
8305d28285 | ||
|
|
cf4731761d | ||
|
|
bd81dfd51b | ||
|
|
e5a41d343b | ||
|
|
97c7eacf69 | ||
|
|
d1ceed52f2 | ||
|
|
6aef44ea9b | ||
|
|
fbf0aa29a3 | ||
|
|
8a9c147952 | ||
|
|
ac30cad2ed | ||
|
|
1ae87be0ac | ||
|
|
b93ebe260b | ||
|
|
7160fadf56 | ||
|
|
f06a0e93b7 | ||
|
|
7a54b81daf | ||
|
|
bd50a960ec | ||
|
|
64d3e07dd2 | ||
|
|
9401cea337 | ||
|
|
99c15dfe30 | ||
|
|
ce43197f45 | ||
|
|
047e533140 | ||
|
|
8c70ba4f00 | ||
|
|
a3760e2082 | ||
|
|
00f9133ae3 | ||
|
|
184dcd5b97 | ||
|
|
66163d3945 | ||
|
|
8bdfd3ea51 | ||
|
|
0689c0f91a | ||
|
|
7baea620ec | ||
|
|
a14dbdfb9c | ||
|
|
7c706a045b | ||
|
|
c346df2802 | ||
|
|
27ccd1582d | ||
|
|
7c3d1f919c | ||
|
|
3f398d1016 | ||
|
|
c6b9c83194 | ||
|
|
16843b0260 | ||
|
|
61cba7f7f7 | ||
|
|
2fb2b24201 | ||
|
|
9c838d993c | ||
|
|
0e1451bcd2 | ||
|
|
0c3299f631 | ||
|
|
c07da46687 | ||
|
|
f81fc0b77b | ||
|
|
ee67f14abd | ||
|
|
e5c76f17f6 | ||
|
|
546b14bed3 | ||
|
|
c4523c6040 | ||
|
|
072d786a14 | ||
|
|
2703fead62 | ||
|
|
c3922b7f3b | ||
|
|
ac1abfa6c3 | ||
|
|
40b8dd2869 | ||
|
|
578a4815ff | ||
|
|
68db860632 | ||
|
|
a804d28cef | ||
|
|
81a0b6345e | ||
|
|
3568f7c38d | ||
|
|
7ba3ca8af4 | ||
|
|
17b4588e03 | ||
|
|
0c7040bab0 | ||
|
|
cab73a2760 | ||
|
|
0b7165a05e | ||
|
|
792981e80f | ||
|
|
d9faf65cb5 | ||
|
|
11b83611ba | ||
|
|
3a2674270b | ||
|
|
a3d9850ae4 | ||
|
|
edb39ef5d8 | ||
|
|
e63d02dbb8 | ||
|
|
81104955be | ||
|
|
8f30e41569 | ||
|
|
1d49d924fe | ||
|
|
b24d674d6a | ||
|
|
5779233ec1 | ||
|
|
8c768bb802 | ||
|
|
bc51e940da | ||
|
|
1793cecba3 | ||
|
|
17dcae26d4 | ||
|
|
1858923fec | ||
|
|
2a392a4b98 | ||
|
|
a6ce979c65 | ||
|
|
ed3659afe6 | ||
|
|
4abb86d20b | ||
|
|
e762a9a87b | ||
|
|
85fe1dbc92 | ||
|
|
8489b6c3b6 | ||
|
|
d7e070db29 | ||
|
|
8bca63207f | ||
|
|
358e5721fe | ||
|
|
807b7ed64d | ||
|
|
89bc51cace | ||
|
|
f3b90dfa4c | ||
|
|
79894a4580 | ||
|
|
2a98ed289a | ||
|
|
e9f64893ac | ||
|
|
caa0653bfe | ||
|
|
bcb5366e68 | ||
|
|
b1158f5f60 | ||
|
|
a400700c49 | ||
|
|
b571fd47c9 | ||
|
|
8b952700ef | ||
|
|
23579fc961 | ||
|
|
76b388bb75 | ||
|
|
0c7d3eaee4 | ||
|
|
3986be824a | ||
|
|
ba7b94d4e5 | ||
|
|
e1520fdd48 | ||
|
|
8d20d4ba45 | ||
|
|
723c52bcf5 | ||
|
|
6e3490b985 | ||
|
|
81bfe4cc1b | ||
|
|
653cd5bb97 | ||
|
|
910c8e61e2 | ||
|
|
72a41b6d14 | ||
|
|
66303b874d | ||
|
|
65d1d7932c | ||
|
|
cfad5f2223 | ||
|
|
b47ff7b8c8 | ||
|
|
e5704ad7f2 | ||
|
|
729eeaba54 | ||
|
|
e5da615f25 | ||
|
|
6c41215c19 | ||
|
|
0b5d47b559 | ||
|
|
7eba12fb54 | ||
|
|
c0495af6e1 | ||
|
|
d04f1930d1 | ||
|
|
852eaf8fc9 | ||
|
|
9ce866a484 | ||
|
|
517e3d9f11 | ||
|
|
8f09187cba | ||
|
|
85c139d7b7 | ||
|
|
2c1aeae4e3 | ||
|
|
9d098e087f | ||
|
|
afb2d7f798 | ||
|
|
cb43510264 | ||
|
|
b78d6684bf | ||
|
|
a83ddcc563 | ||
|
|
c02eff7d9d | ||
|
|
c6c7d1177e | ||
|
|
b6c1bf5568 | ||
|
|
1b8de9ca51 | ||
|
|
c3199c3ea2 | ||
|
|
0e1ac637ac | ||
|
|
0975f022c5 | ||
|
|
93656b57db | ||
|
|
eab01d27dd | ||
|
|
435aafe744 | ||
|
|
b6dc071e35 | ||
|
|
df7872e3f0 | ||
|
|
fcd0e77ba8 | ||
|
|
f2f3f34859 | ||
|
|
69d2a50e2e | ||
|
|
2c51c4e23e | ||
|
|
581f1eb5db | ||
|
|
95bb5a5b48 | ||
|
|
9d56c142ad | ||
|
|
0aec0c5019 | ||
|
|
fae611801e | ||
|
|
7e0e2fcf9f | ||
|
|
955c461e1c | ||
|
|
2c6616ef05 | ||
|
|
3202e0fbba | ||
|
|
84b83560b4 | ||
|
|
7a61ff27bf | ||
|
|
d930fdd86d | ||
|
|
80d7e57441 | ||
|
|
a9fa5d9465 | ||
|
|
e5028b2980 | ||
|
|
f0d7922c40 | ||
|
|
8aeadf5fdc | ||
|
|
680c01b121 | ||
|
|
c08679e6c0 | ||
|
|
955ed436a1 | ||
|
|
157a7d3946 | ||
|
|
a4ad40ab4a | ||
|
|
298045a822 | ||
|
|
853ffee425 | ||
|
|
8e979cacc1 | ||
|
|
3b14454efe | ||
|
|
799050d650 | ||
|
|
7664dc719d | ||
|
|
bcc93577df | ||
|
|
a3cd8b5e03 | ||
|
|
24999bd690 | ||
|
|
b2c3d32b51 | ||
|
|
28280c4faf | ||
|
|
e0a4b0e62a | ||
|
|
033b7b9e33 | ||
|
|
fea3bd90b4 | ||
|
|
d6c6cb791f | ||
|
|
fb6a66096e | ||
|
|
cbb6862e18 | ||
|
|
a38c7d903a | ||
|
|
b6e9f80d2a | ||
|
|
de40c67ff2 | ||
|
|
1da95ba8c2 | ||
|
|
d038e4c845 | ||
|
|
d8c0622287 | ||
|
|
953c01f40f | ||
|
|
97aeb16ee1 | ||
|
|
600419c979 | ||
|
|
01918f89c4 | ||
|
|
9d4985297b | ||
|
|
c2d48fa22d | ||
|
|
5cd4ce1d8d | ||
|
|
043e8a78b5 | ||
|
|
ecf76ddb06 | ||
|
|
d93d8d7d1d | ||
|
|
abed3a87ff | ||
|
|
e7fb499f20 | ||
|
|
69e902f7b9 | ||
|
|
0d5aae21d7 | ||
|
|
87efa30939 | ||
|
|
3807a83701 | ||
|
|
6dbebc8e88 | ||
|
|
178953ef25 | ||
|
|
f772c65219 | ||
|
|
704ddf9311 | ||
|
|
993fedb1b1 | ||
|
|
7168b5f1e0 | ||
|
|
8fb0cbfb9e | ||
|
|
9298fbeb33 | ||
|
|
c708007d0b | ||
|
|
2b88d9775a | ||
|
|
7b056cd783 | ||
|
|
218d613ed1 | ||
|
|
921a116893 | ||
|
|
d982df14eb | ||
|
|
abf5ccfc9e | ||
|
|
d6c2c87675 | ||
|
|
1abf717fc6 | ||
|
|
adb318f735 | ||
|
|
dcf4d539e9 | ||
|
|
f84ba19f44 | ||
|
|
8bde4af2d3 | ||
|
|
ff49277c70 | ||
|
|
d04fbc72d6 | ||
|
|
bff308e8c9 | ||
|
|
6ca6f97237 | ||
|
|
7b8d9cfff9 | ||
|
|
a842ea4105 | ||
|
|
97fea4bad0 | ||
|
|
2b39193d48 | ||
|
|
5bef6dfff6 | ||
|
|
6062346802 | ||
|
|
e0516db95c | ||
|
|
3287ec7c75 | ||
|
|
6359d50427 | ||
|
|
22744c65c5 | ||
|
|
5fb534e31b | ||
|
|
e39e1806ec | ||
|
|
d30c1615ca | ||
|
|
1c752ef851 | ||
|
|
7cbcdbc43c | ||
|
|
0fcd253304 | ||
|
|
ee9528cfa6 | ||
|
|
be03425493 | ||
|
|
60206d37fc | ||
|
|
7a7719d10e | ||
|
|
67e43d1fd7 | ||
|
|
c496d0bc1c | ||
|
|
350a814e95 | ||
|
|
91da2b0c5b | ||
|
|
e7a589a524 | ||
|
|
bd943a5eeb | ||
|
|
dafd42d2e8 | ||
|
|
3e8f59a75c | ||
|
|
a522817e1f | ||
|
|
dc4065b68b | ||
|
|
a51633f9da | ||
|
|
402b17bec2 | ||
|
|
32c232cdbe | ||
|
|
9cf5186546 | ||
|
|
dc9e060ee5 | ||
|
|
0a271e8449 | ||
|
|
b7fc922820 | ||
|
|
413bf32059 | ||
|
|
d5ccc91d7f | ||
|
|
7dab676e68 | ||
|
|
9d9f5980d3 | ||
|
|
e0fb31082b | ||
|
|
d4bae2ec02 | ||
|
|
fdc123c60b | ||
|
|
842d3b416d | ||
|
|
c75d6dfc5b | ||
|
|
a199588e9f | ||
|
|
d34a1e379e | ||
|
|
339a34490b | ||
|
|
b16d125624 | ||
|
|
12b0229129 | ||
|
|
de6c9598ba | ||
|
|
cc94b288d7 | ||
|
|
6795490c6a | ||
|
|
c36f7967ae | ||
|
|
7006566087 | ||
|
|
2870af12ed | ||
|
|
4d2cb43980 | ||
|
|
08397bed23 | ||
|
|
b1a5ff1206 | ||
|
|
129dc2cf22 | ||
|
|
db2176be45 | ||
|
|
176bbf7566 | ||
|
|
13c0240e55 | ||
|
|
1990bb5c87 | ||
|
|
5687972623 | ||
|
|
e43f9a3b87 | ||
|
|
e7b2f63e4d | ||
|
|
c4c94d544b | ||
|
|
b179460524 | ||
|
|
0e3291c267 | ||
|
|
8d901ea47f | ||
|
|
b5579e9e54 | ||
|
|
7b0eceb68a | ||
|
|
e9c4415255 | ||
|
|
64e1cfb9d1 | ||
|
|
0a3fefb3ab | ||
|
|
7de9e6c348 | ||
|
|
3472f88614 | ||
|
|
e58207edf0 | ||
|
|
54402f6602 | ||
|
|
28c2060dd0 | ||
|
|
06ac881ea8 | ||
|
|
4350dad6ca | ||
|
|
c7443c7c2d | ||
|
|
a22898c92b | ||
|
|
39dbb175b9 | ||
|
|
ef22cee7a0 | ||
|
|
27e9f13529 | ||
|
|
158927eb5f | ||
|
|
f6966c07af | ||
|
|
7f9972a43b | ||
|
|
1b10c4e030 | ||
|
|
6c4b157002 | ||
|
|
0230678f60 | ||
|
|
5cf4ea6045 | ||
|
|
13062d1ba0 | ||
|
|
4ce3134b14 | ||
|
|
e18842ac85 | ||
|
|
2a87ab3bf4 | ||
|
|
e0534180ba | ||
|
|
eaaba91dd2 | ||
|
|
15d3510256 | ||
|
|
7847ed2c93 | ||
|
|
aaae999e3e | ||
|
|
77d1d82a89 | ||
|
|
fb324be411 | ||
|
|
d3b5a45c4c | ||
|
|
0d43ed56ba | ||
|
|
391887f09d | ||
|
|
630e2131b8 | ||
|
|
a73368eb2c | ||
|
|
920a7d0346 | ||
|
|
8ff5a2870f | ||
|
|
cf306ffaeb | ||
|
|
9702bdf7e5 | ||
|
|
7f4e2c0675 | ||
|
|
9a3777dde9 | ||
|
|
964cff4e75 | ||
|
|
97398cb1f6 | ||
|
|
c1d6a3f19e | ||
|
|
cd507fc16d | ||
|
|
b07f22de1f | ||
|
|
b12efc747b | ||
|
|
505c95f23b | ||
|
|
ff2f9a084e | ||
|
|
272bdc559c | ||
|
|
995764bd31 | ||
|
|
7b483aa6e5 | ||
|
|
8b3267a444 | ||
|
|
262e344ac3 | ||
|
|
3676754e61 | ||
|
|
e8800e61b8 | ||
|
|
b58d43d19a | ||
|
|
dc6f85134d | ||
|
|
10a022c0ae | ||
|
|
f8c2a15174 | ||
|
|
5384408a63 |
213
bbf/Makefile
213
bbf/Makefile
@@ -1,213 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2022 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libbbfdm
|
||||
PKG_VERSION:=6.8.49
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
|
||||
PKG_SOURCE_VERSION:=87ae46df8b4e221b8894fd861d2eb785ae1f3bf3
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/libbbf_api
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=BBF datamodel library, provides API to extend datamodel using DotSO plugins
|
||||
ABI_VERSION:=1.0
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=Library for broadband forum data model support
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libcurl +libbbf_api \
|
||||
+BBF_TR471:obudpst
|
||||
endef
|
||||
|
||||
define Package/libbbfdm
|
||||
$(Package/libbbfdm/default)
|
||||
TITLE += (internal)
|
||||
VARIANT:=internal
|
||||
endef
|
||||
|
||||
define Package/libbbfdm-mbedtls
|
||||
$(Package/libbbfdm/default)
|
||||
TITLE += (mbedtls)
|
||||
DEPENDS += +PACKAGE_libbbfdm-mbedtls:libmbedtls
|
||||
VARIANT:=mbedtls
|
||||
DEFAULT_VARIANT:=1
|
||||
endef
|
||||
|
||||
define Package/libbbfdm-openssl
|
||||
$(Package/libbbfdm/default)
|
||||
TITLE += (openssl)
|
||||
DEPENDS += +PACKAGE_libbbfdm-openssl:libopenssl
|
||||
CONFLICTS := libbbfdm-mbedtls
|
||||
VARIANT:=openssl
|
||||
endef
|
||||
|
||||
define Package/libbbfdm-wolfssl
|
||||
$(Package/libbbfdm/default)
|
||||
TITLE += (wolfssl)
|
||||
DEPENDS += +PACKAGE_libbbfdm-wolfssl:libwolfssl
|
||||
CONFLICTS := libbbfdm-mbedtls libbbfdm-openssl
|
||||
VARIANT:=wolfssl
|
||||
endef
|
||||
|
||||
define Package/userinterface
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=Package to add Device.UserInterface. datamodel support
|
||||
endef
|
||||
|
||||
define Package/userinterface/description
|
||||
Package to add Device.UserInterface. datamodel support using libbbf JSON Plugin
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/config
|
||||
source "$(SOURCE)/Config_bbfdm.in"
|
||||
endef
|
||||
|
||||
define Package/libbbf_api/description
|
||||
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/description
|
||||
Library contains the data model tree. It includes TR181, TR104 and TR143 data models
|
||||
endef
|
||||
|
||||
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
|
||||
ifneq ($(USE_LOCAL),)
|
||||
define Build/Prepare
|
||||
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR181=ON
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR104),y)
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR104=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR143),y)
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR143=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR471),y)
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR471=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_VENDOR_EXTENSION),y)
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_VENDOR_EXTENSION=ON
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_VENDOR_LIST:String="$(CONFIG_BBF_VENDOR_LIST)" \
|
||||
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
|
||||
-DBBF_MAX_OBJECT_INSTANCES:Integer=$(CONFIG_BBF_MAX_OBJECT_INSTANCES)
|
||||
|
||||
endif ##CONFIG_BBF_VENDOR_EXTENSION
|
||||
|
||||
ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y)
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_JSON_PLUGIN=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y)
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_DOTSO_PLUGIN=ON
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),openssl)
|
||||
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),wolfssl)
|
||||
CMAKE_OPTIONS += -DWITH_WOLFSSL=ON
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),mbedtls)
|
||||
CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
|
||||
endif
|
||||
|
||||
define Package/libbbf_api/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/default/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json
|
||||
$(INSTALL_DIR) $(1)/usr/share/bbfdm
|
||||
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
|
||||
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
|
||||
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
||||
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/lib/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/* $(1)/usr/share/bbfdm
|
||||
$(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
|
||||
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/bbf $(1)/lib/upgrade/keep.d/bbf
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/default/prerm
|
||||
#!/bin/sh
|
||||
rm -rf /etc/bbfdm/dmmap/*
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/userinterface/install
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DATA) ./files/etc/bbfdm/json/UserInterface.json $(1)/etc/bbfdm/json/
|
||||
$(INSTALL_DATA) ./files/etc/config/userinterface $(1)/etc/config/userinterface
|
||||
$(INSTALL_BIN) ./files/etc/init.d/userinterface $(1)/etc/init.d/userinterface
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/93-userinterface-firewall $(1)/etc/uci-defaults/93-userinterface-firewall
|
||||
$(INSTALL_BIN) ./files/etc/firewall.userinterface $(1)/etc/firewall.userinterface
|
||||
endef
|
||||
|
||||
Package/libbbfdm-openssl/prerm = $(Package/libbbfdm/default/prerm)
|
||||
Package/libbbfdm-wolfssl/prerm = $(Package/libbbfdm/default/prerm)
|
||||
Package/libbbfdm-mbedtls/prerm = $(Package/libbbfdm/default/prerm)
|
||||
|
||||
Package/libbbfdm-openssl/install = $(Package/libbbfdm/default/install)
|
||||
Package/libbbfdm-wolfssl/install = $(Package/libbbfdm/default/install)
|
||||
Package/libbbfdm-mbedtls/install = $(Package/libbbfdm/default/install)
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/include/libbbfdm
|
||||
$(INSTALL_DIR) $(1)/usr/include/libbbf_api
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libbbfdm/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbf_api/*.h $(1)/usr/include/libbbf_api/
|
||||
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,userinterface))
|
||||
$(eval $(call BuildPackage,libbbf_api))
|
||||
$(eval $(call BuildPackage,libbbfdm))
|
||||
$(eval $(call BuildPackage,libbbfdm-openssl))
|
||||
$(eval $(call BuildPackage,libbbfdm-wolfssl))
|
||||
$(eval $(call BuildPackage,libbbfdm-mbedtls))
|
||||
@@ -1,117 +0,0 @@
|
||||
{
|
||||
"Device.UserInterface.": {
|
||||
"type": "object",
|
||||
"version": "2.0",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": false,
|
||||
"array": false,
|
||||
"Device.UserInterface.RemoteAccess.": {
|
||||
"type": "object",
|
||||
"version": "2.0",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": false,
|
||||
"array": false,
|
||||
"Enable": {
|
||||
"type": "boolean",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"version": "2.0",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "userinterface",
|
||||
"section": {
|
||||
"name": "remote_access"
|
||||
},
|
||||
"option": {
|
||||
"name": "enable"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Port": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"version": "2.0",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"range": [
|
||||
{
|
||||
"max": 65535
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "userinterface",
|
||||
"section": {
|
||||
"name": "remote_access"
|
||||
},
|
||||
"option": {
|
||||
"name": "port"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"SupportedProtocols": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"version": "2.0",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"list": {
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"HTTP",
|
||||
"HTTPS"
|
||||
]
|
||||
},
|
||||
"default": "HTTP"
|
||||
},
|
||||
"Protocol": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"version": "2.0",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "userinterface",
|
||||
"section": {
|
||||
"name": "remote_access"
|
||||
},
|
||||
"option": {
|
||||
"name": "protocol"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
config userinterface 'remote_access'
|
||||
option enable '0'
|
||||
option interface 'wan'
|
||||
option port '80'
|
||||
option protocol 'HTTP'
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
IDENTIFIER="REMOTE-ACCESS-WAN"
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t firewall.userinterface -p info
|
||||
}
|
||||
|
||||
if [ ! -f "/etc/config/userinterface" ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
exec_cmd() {
|
||||
if ! "$@"; then
|
||||
log "Failed to run [$*]"
|
||||
fi
|
||||
}
|
||||
|
||||
configure_firewall_rule() {
|
||||
local enable port protocol gui_port
|
||||
local zone interface
|
||||
|
||||
config_load userinterface
|
||||
config_get_bool enable remote_access enable 1
|
||||
config_get port remote_access port
|
||||
config_get interface remote_access interface
|
||||
|
||||
if [ "${enable}" -eq "0" ] || [ -z "${port}" ] || [ -z "${interface}" ]; then
|
||||
return 0;
|
||||
fi
|
||||
|
||||
zone="zone_${interface}_input"
|
||||
iptables -w 1 -t filter -nL "${zone}" 2>/dev/null 1>&2
|
||||
if [ "$?" -eq 0 ]; then
|
||||
iptables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate NEW,ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
|
||||
fi
|
||||
|
||||
zone="zone_${interface}_output"
|
||||
iptables -w 1 -t filter -nL "${zone}" 2>/dev/null 1>&2
|
||||
if [ "$?" -eq 0 ]; then
|
||||
iptables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
|
||||
fi
|
||||
}
|
||||
|
||||
delete_firewall_rule() {
|
||||
local zone interface
|
||||
local CMD
|
||||
|
||||
config_load userinterface
|
||||
config_get interface remote_access interface
|
||||
|
||||
# Clean remote interface rules
|
||||
if [ -z "${interface}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
zone="zone_${interface}_input"
|
||||
CMD="iptables -w 1 -t filter -nL ${zone} --line-numbers"
|
||||
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
|
||||
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
|
||||
if [ -n "${rule_num}" ]; then
|
||||
exec_cmd iptables -w 1 -t filter -D "${zone}" "${rule_num}";
|
||||
fi
|
||||
done
|
||||
|
||||
zone="zone_${interface}_output"
|
||||
CMD="iptables -w 1 -t filter -nL ${zone} --line-numbers"
|
||||
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
|
||||
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
|
||||
if [ -n "${rule_num}" ]; then
|
||||
exec_cmd iptables -w 1 -t filter -D "${zone}" "${rule_num}";
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Delete existing remote access rules
|
||||
delete_firewall_rule
|
||||
|
||||
# Configure the User Interface rule
|
||||
configure_firewall_rule
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=01
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
local enable
|
||||
|
||||
procd_open_instance usp
|
||||
|
||||
config_load userinterface
|
||||
config_get_bool enable global enable 1
|
||||
|
||||
# Inject firewall rules
|
||||
if [ "${enable}" -eq "1" ]; then
|
||||
/etc/firewall.userinterface
|
||||
fi
|
||||
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "userinterface"
|
||||
}
|
||||
@@ -1,7 +1,3 @@
|
||||
config BBF_VENDOR_EXTENSION
|
||||
bool "Enable Vendor Extension"
|
||||
default y
|
||||
|
||||
config BBF_VENDOR_LIST
|
||||
string "Vendor List"
|
||||
default "iopsys"
|
||||
@@ -10,10 +6,6 @@ config BBF_VENDOR_PREFIX
|
||||
string "Vendor Prefix"
|
||||
default "X_IOPSYS_EU_"
|
||||
|
||||
config BBF_TR104
|
||||
bool "Enable TR-104 Data Model Support"
|
||||
default y
|
||||
|
||||
config BBF_TR143
|
||||
bool "Enable TR-143 Data Model Support"
|
||||
default y
|
||||
@@ -22,14 +14,6 @@ config BBF_TR471
|
||||
bool "Enable TR-471 Data Model Support"
|
||||
default y
|
||||
|
||||
config BBFDM_ENABLE_JSON_PLUGIN
|
||||
bool "Enable json plugin to extend datamodel"
|
||||
default y
|
||||
|
||||
config BBFDM_ENABLE_DOTSO_PLUGIN
|
||||
bool "Enable shared library plugin to extend datamodel"
|
||||
default y
|
||||
|
||||
config BBF_MAX_OBJECT_INSTANCES
|
||||
int "Maximum number of instances per object"
|
||||
default 255
|
||||
155
bbfdm/Makefile
Normal file
155
bbfdm/Makefile
Normal file
@@ -0,0 +1,155 @@
|
||||
#
|
||||
# Copyright (C) 2023 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bbfdm
|
||||
PKG_VERSION:=1.7.17
|
||||
|
||||
USE_LOCAL:=0
|
||||
ifneq ($(USE_LOCAL),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
|
||||
PKG_SOURCE_VERSION:=8c998e886ce5345cfead5092ccf5447b8a8f7ee7
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
include bbfdm.mk
|
||||
|
||||
define Package/libbbfdm-api
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=BBF datamodel library, provides API to extend datamodel using DotSO plugins
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libcurl
|
||||
ABI_VERSION:=1.0
|
||||
endef
|
||||
|
||||
define Package/libbbfdm
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=Library for broadband forum data model support
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api \
|
||||
+BBF_TR471:obudpst +libopenssl
|
||||
endef
|
||||
|
||||
define Package/bbfdmd
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=Datamodel ubus backend
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api +libbbfdm
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/config
|
||||
source "$(SOURCE)/Config_bbfdm.in"
|
||||
endef
|
||||
|
||||
define Package/libbbfdm-api/description
|
||||
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/description
|
||||
Library contains the data model tree. It includes TR181, TR143 data models
|
||||
endef
|
||||
|
||||
ifeq ($(USE_LOCAL),1)
|
||||
define Build/Prepare
|
||||
$(CP) ~/git/bbfdm/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR181=ON
|
||||
-DBBF_WIFI_DATAELEMENTS=ON
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR143),y)
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR143=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR471),y)
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR471=ON
|
||||
endif
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_VENDOR_LIST:String="$(CONFIG_BBF_VENDOR_LIST)" \
|
||||
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
|
||||
-DBBF_MAX_OBJECT_INSTANCES:Integer=$(CONFIG_BBF_MAX_OBJECT_INSTANCES)
|
||||
|
||||
ifeq ($(CONFIG_PACKAGE_bbfdmd),y)
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBFDMD_MAX_MSG_LEN:Integer=10485760
|
||||
endif
|
||||
|
||||
define Package/libbbfdm-api/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/libbbfdm-api.so $(1)/lib/
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
||||
$(CP) $(PKG_BUILD_DIR)/libbbfdm/libbbfdm.so $(1)/lib/
|
||||
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/bbf $(1)/lib/upgrade/keep.d/bbf
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/95-portmap-firewall $(1)/etc/uci-defaults/95-portmap-firewall
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/97-firewall-service $(1)/etc/uci-defaults/97-firewall-service
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/99-link-core-plugins $(1)/etc/uci-defaults/99-link-core-plugins
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/90-remove-nonexisting-microservices $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/91-fix-bbfdmd-enabled-option $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/firewall.portmap $(1)/etc/firewall.portmap
|
||||
$(INSTALL_BIN) ./files/etc/firewall.service $(1)/etc/firewall.service
|
||||
ifeq ($(findstring iopsys,$(CONFIG_BBF_VENDOR_LIST)),iopsys)
|
||||
$(call BbfdmInstallPlugin,$(1),$(PKG_BUILD_DIR)/libbbfdm/dmtree/vendor/iopsys/libbbfdm_iopsys_ext.so)
|
||||
endif
|
||||
ifeq ($(CONFIG_BBF_TR143),y)
|
||||
$(INSTALL_DIR) $(1)/usr/share/bbfdm
|
||||
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
|
||||
$(CP) $(PKG_BUILD_DIR)/libbbfdm/scripts/* $(1)/usr/share/bbfdm
|
||||
$(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/prerm
|
||||
#!/bin/sh
|
||||
rm -rf /etc/bbfdm/dmmap/*
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/bbfdmd/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbfdmd/ubus/bbfdmd $(1)/usr/sbin/
|
||||
$(INSTALL_DATA) ./files/etc/bbfdm/input.json $(1)/etc/bbfdm/
|
||||
$(INSTALL_BIN) ./files/etc/init.d/bbfdmd $(1)/etc/init.d/bbfdmd
|
||||
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
|
||||
$(INSTALL_BIN) ./files/etc/bbfdm/bbfdm_services.sh $(1)/etc/bbfdm/
|
||||
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-bbfdm-sysctl $(1)/etc/hotplug.d/iface/85-bbfdm-sysctl
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/include/libbbfdm-api
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/*.h $(1)/usr/include/libbbfdm-api/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/include/*.h $(1)/usr/include/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libbbfdm-api))
|
||||
$(eval $(call BuildPackage,libbbfdm))
|
||||
$(eval $(call BuildPackage,bbfdmd))
|
||||
92
bbfdm/README.md
Normal file
92
bbfdm/README.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# BBFDM configuration options and utilities
|
||||
|
||||
bbfdm provides few compile time configuration options and compile time help utility called [bbfdm.mk](./bbfdm.mk), this document aimed to explain the available usages and best practices.
|
||||
|
||||
## Compilation options
|
||||
|
||||
| Configuration option | Default Value | Description |
|
||||
| ----------------------- | ------------- | ----------- |
|
||||
| CONFIG_BBF_VENDOR_LIST | iopsys | List of vendor extension directories |
|
||||
| CONFIG_BBF_VENDOR_PREFIX | X_IOPSYS_EU_ | Prefix for Vendor extension datamodel objects/parameters |
|
||||
| CONFIG_BBF_TR143 | y | Enable/Add TR-143 Data Model Support |
|
||||
| CONFIG_BBF_TR471 | y | Enable/Add TR-471 Data Model Support |
|
||||
| CONFIG_BBF_MAX_OBJECT_INSTANCES | 255 | Maximum number of instances per object |
|
||||
|
||||
## Helper utility (bbfdm.mk)
|
||||
|
||||
bbfdm provides a helper utility [bbfdm.mk](./bbfdm.mk) to install datamodel plugins in bbfdm core or in microservice directory.
|
||||
|
||||
### Install datamodel DotSO/JSON plugin in bbfdm core
|
||||
|
||||
Utility to install the DotSO/JSON plugin in bbfdm core plugin path
|
||||
|
||||
```bash
|
||||
# inputs:
|
||||
# $1 => package install directory
|
||||
# $2 => Plugin artifact
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```make
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(call BbfdmInstallPlugin,$(1),./files/etc/bbfdm/json/CWMPManagementServer.json)
|
||||
endef
|
||||
```
|
||||
|
||||
### Install datamodel DotSO/JSON plugin in bbfdm core with priority
|
||||
|
||||
Its now possible to overwrite/remove core datamodel with plugin, so, if some datamodel objects/parameters are present in more than one plugin, order in which they loaded into memory becomes crucial, this Utility help to configure a priority order in which they gets loaded in memory.
|
||||
|
||||
```bash
|
||||
# inputs:
|
||||
# $1 => package install directory
|
||||
# $2 => Priority of the installed plugin
|
||||
# $3 => Plugin artifact
|
||||
```
|
||||
|
||||
Example:
|
||||
```make
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(call BbfdmInstallPluginWithPriority,$(1),01,$(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json)
|
||||
endef
|
||||
```
|
||||
|
||||
> Note: Last loaded plugin gets the highest priority
|
||||
|
||||
### Install plugin into micro-service directory
|
||||
|
||||
Utility to install the plugin in datamodel microservice directory, ex. user wants to run a datamodel micro-service, it required to install the DotSO/JSON plugin into a non bbf core directory, this utility helps in installing the DotSO/JSON plugin in mentioned directory.
|
||||
|
||||
```bash
|
||||
# inputs:
|
||||
# $1 => package install directory with micro-service directory
|
||||
# $2 => Plugin artifact
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```make
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/bulkdata,$(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json)
|
||||
endef
|
||||
```
|
||||
|
||||
### Install datamodel micro-service input file
|
||||
|
||||
Utility to install the datamodel plugin input file into the bbfdm micro-service directory, so that bbfdm auto start the datamodel micro-service before main bbfdm process.
|
||||
|
||||
```bash
|
||||
# inputs:
|
||||
# $1 => package install directory
|
||||
# $2 => Microservice input.json path
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```make
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/bulkdata/input.json)
|
||||
endef
|
||||
```
|
||||
|
||||
57
bbfdm/bbfdm.mk
Normal file
57
bbfdm/bbfdm.mk
Normal file
@@ -0,0 +1,57 @@
|
||||
#
|
||||
# Copyright (C) 2023 IOPSYS
|
||||
#
|
||||
|
||||
# Utility to install the plugin in bbfdm core path
|
||||
# inputs:
|
||||
# $1 => package install directory
|
||||
# $2 => Plugin artifact
|
||||
#
|
||||
# Example:
|
||||
# $(call BbfdmInstallPlugin,$(1),./files/etc/bbfdm/json/CWMPManagementServer.json)
|
||||
#
|
||||
define BbfdmInstallPlugin
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/plugins
|
||||
$(INSTALL_DATA) $(2) $(1)/etc/bbfdm/plugins/
|
||||
endef
|
||||
|
||||
# Utility to install the plugin in bbfdm core path with priority
|
||||
# inputs:
|
||||
# $1 => package install directory
|
||||
# $2 => Priority of the installed plugin
|
||||
# $3 => Plugin artifact
|
||||
#
|
||||
# Example:
|
||||
# $(call BbfdmInstallPluginWithPriority,$(1),01,$(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json)
|
||||
#
|
||||
define BbfdmInstallPluginWithPriority
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/plugins
|
||||
$(INSTALL_DATA) $(3) $(1)/etc/bbfdm/plugins/$(2)_$(shell basename ${3})
|
||||
endef
|
||||
|
||||
# Utility to install the plugin in datamodel microservice directory
|
||||
# inputs:
|
||||
# $1 => package install directory with micro-service directory
|
||||
# $2 => Plugin artifact
|
||||
#
|
||||
# Example:
|
||||
# $(call BbfdmInstallPluginInMicroservice,$(1)/etc/bulkdata,$(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json)
|
||||
#
|
||||
define BbfdmInstallPluginInMicroservice
|
||||
$(INSTALL_DIR) $(1)
|
||||
$(INSTALL_DATA) $(2) $(1)/
|
||||
endef
|
||||
|
||||
# Utility to install the datamodel plugin input file
|
||||
# inputs:
|
||||
# $1 => package install directory
|
||||
# $2 => Microservice input.json path
|
||||
#
|
||||
# Example:
|
||||
# $(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/bulkdata/input.json)
|
||||
#
|
||||
define BbfdmInstallMicroServiceInputFile
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/micro_services
|
||||
$(INSTALL_DATA) $(2) $(1)/etc/bbfdm/micro_services/$(PKG_NAME).json
|
||||
endef
|
||||
|
||||
48
bbfdm/files/etc/bbfdm/bbfdm_services.sh
Executable file
48
bbfdm/files/etc/bbfdm/bbfdm_services.sh
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
|
||||
BBFDMD="/usr/sbin/bbfdmd"
|
||||
|
||||
bbfdm_add_service()
|
||||
{
|
||||
local name path
|
||||
|
||||
name="${1}"
|
||||
path="${2}"
|
||||
|
||||
if [ -z "${name}" -o -z "$path" ]; then
|
||||
return 0;
|
||||
fi
|
||||
|
||||
ubus call service add "{'name':'bbfdm.services','instances':{'$name':{'command':['$BBFDMD','-m','$path']}}}"
|
||||
echo "Use of bbfdm_add_service deprecated, please use bbfdm micro_service uci"
|
||||
}
|
||||
|
||||
bbfdm_stop_service()
|
||||
{
|
||||
local name
|
||||
|
||||
name="${1}"
|
||||
if [ -z "${name}" ]; then
|
||||
return 0;
|
||||
fi
|
||||
|
||||
if ubus call service list '{"name":"bbfdm.services"}' |grep -q "bbfdm.$name"; then
|
||||
ubus call service delete "{'name':'bbfdm.services','instance':'bbfdm.$name'}"
|
||||
fi
|
||||
}
|
||||
|
||||
usages()
|
||||
{
|
||||
echo "Usages $0: <OPTIONS>..."
|
||||
echo
|
||||
echo " -h show help"
|
||||
echo " -k micro-service name to stop"
|
||||
echo
|
||||
}
|
||||
|
||||
while getopts "s:k:h" opts; do
|
||||
case "$opts" in
|
||||
h) usages; exit 0;;
|
||||
k) bbfdm_stop_service "${OPTARG}";;
|
||||
esac
|
||||
done
|
||||
28
bbfdm/files/etc/bbfdm/input.json
Normal file
28
bbfdm/files/etc/bbfdm/input.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"daemon": {
|
||||
"config": {
|
||||
},
|
||||
"input": {
|
||||
"type": "DotSo",
|
||||
"name": "/lib/libbbfdm.so",
|
||||
"plugin_dir": "/etc/bbfdm/plugins"
|
||||
},
|
||||
"output": {
|
||||
"type": "UBUS",
|
||||
"name": "bbfdm"
|
||||
}
|
||||
},
|
||||
"cli": {
|
||||
"config": {
|
||||
"proto": "both",
|
||||
"instance_mode": 0
|
||||
},
|
||||
"input": {
|
||||
"type": "UBUS",
|
||||
"name": "bbfdm"
|
||||
},
|
||||
"output": {
|
||||
"type": "CLI"
|
||||
}
|
||||
}
|
||||
}
|
||||
6
bbfdm/files/etc/config/bbfdm
Normal file
6
bbfdm/files/etc/config/bbfdm
Normal file
@@ -0,0 +1,6 @@
|
||||
config bbfdmd 'bbfdmd'
|
||||
option enable '1'
|
||||
option loglevel '1'
|
||||
option refresh_time '300'
|
||||
option transaction_timeout '30'
|
||||
option subprocess_level '2'
|
||||
74
bbfdm/files/etc/firewall.portmap
Executable file
74
bbfdm/files/etc/firewall.portmap
Executable file
@@ -0,0 +1,74 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t firewall.dnat -p info
|
||||
}
|
||||
|
||||
exec_cmd() {
|
||||
if ! eval "$*"; then
|
||||
log "Failed to run [$*]"
|
||||
fi
|
||||
}
|
||||
|
||||
reorder_dnat_rules() {
|
||||
nat_chains=$(iptables -t nat -S | grep -E "^-N zone[a-zA-Z0-9_]+prerouting$" | cut -d' ' -f 2)
|
||||
|
||||
for chain in ${nat_chains}; do
|
||||
# Collect empty remote host & empty dport rules
|
||||
EMPTY_HOST_PORT=$(iptables -t nat -S ${chain} | grep -E "REDIRECT|DNAT" | grep -v "\-\-dport" | grep -v "\-s ")
|
||||
if [ -n "${EMPTY_HOST_PORT}" ]; then
|
||||
echo "${EMPTY_HOST_PORT}" | while read cmd; do
|
||||
cmd1="iptables -t nat $(echo $cmd | sed 's/-A /-D /g')"
|
||||
exec_cmd $cmd1
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect empty remote host but non empty dport rules
|
||||
EMPTY_HOST=$(iptables -t nat -S ${chain} | grep -E "REDIRECT|DNAT" | grep "\-\-dport" | grep -v "\-s ")
|
||||
if [ -n "${EMPTY_HOST}" ]; then
|
||||
echo "${EMPTY_HOST}" | while read cmd; do
|
||||
cmd1="iptables -t nat $(echo $cmd | sed 's/-A /-D /g')"
|
||||
exec_cmd $cmd1
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect non empty remote host but empty dport rules
|
||||
EMPTY_PORT=$(iptables -t nat -S ${chain} | grep -E "REDIRECT|DNAT" | grep -v "\-\-dport" | grep "\-s ")
|
||||
if [ -n "${EMPTY_PORT}" ]; then
|
||||
echo "${EMPTY_PORT}" | while read cmd; do
|
||||
cmd1="iptables -t nat $(echo $cmd | sed 's/-A /-D /g')"
|
||||
exec_cmd $cmd1
|
||||
done
|
||||
fi
|
||||
|
||||
# Now add rules as per datamodel precedence shown below
|
||||
## Non empty remote host, empty dport
|
||||
## empty remote host, non empty dport
|
||||
## empty remote host, empty dport
|
||||
if [ -n "${EMPTY_PORT}" ]; then
|
||||
echo "${EMPTY_PORT}" | while read cmd; do
|
||||
cmd1="iptables -t nat $(echo $cmd)"
|
||||
exec_cmd $cmd1
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -n "${EMPTY_HOST}" ]; then
|
||||
echo "${EMPTY_HOST}" | while read cmd; do
|
||||
cmd1="iptables -t nat $(echo $cmd)"
|
||||
exec_cmd $cmd1
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -n "${EMPTY_HOST_PORT}" ]; then
|
||||
echo "${EMPTY_HOST_PORT}" | while read cmd; do
|
||||
cmd1="iptables -t nat $(echo $cmd)"
|
||||
exec_cmd $cmd1
|
||||
done
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Re-order portmapping rules according to precedence hierarchy
|
||||
reorder_dnat_rules
|
||||
163
bbfdm/files/etc/firewall.service
Executable file
163
bbfdm/files/etc/firewall.service
Executable file
@@ -0,0 +1,163 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t firewall.service -p info
|
||||
}
|
||||
|
||||
exec_cmd() {
|
||||
if ! eval "$*"; then
|
||||
log "Failed to run [$*]"
|
||||
echo "-1"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "0"
|
||||
return 0
|
||||
}
|
||||
|
||||
add_iptable_rule() {
|
||||
chain_name=$1
|
||||
protocol=$2
|
||||
dest_port=$3
|
||||
icmp_type=$4
|
||||
family=$5
|
||||
src_prefix=$6
|
||||
action=$7
|
||||
res=-1
|
||||
|
||||
cmd="-I ${chain_name}"
|
||||
|
||||
if [ -n "${protocol}" ]; then
|
||||
cmd="${cmd} -p $protocol"
|
||||
|
||||
if [ "${protocol}" -eq 41 ] || [ "${protocol}" -eq 43 ] || [ "${protocol}" -eq 44 ] ||
|
||||
[ "${protocol}" -eq 58 ] || [ "${protocol}" -eq 59 ] || [ "${protocol}" -eq 60 ]; then
|
||||
# Explicit v6 protocols
|
||||
if [ "${family}" = "ipv4" ]; then
|
||||
echo $res
|
||||
return 0
|
||||
else
|
||||
family="ipv6"
|
||||
fi
|
||||
elif [ "${protocol}" -eq 1 ]; then
|
||||
# Explicit v4 protocols
|
||||
if [ "${family}" = "ipv6" ]; then
|
||||
echo $res
|
||||
return 0
|
||||
else
|
||||
family="ipv4"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Limitation:: iptables do not accept dport without specific protocol
|
||||
count=$(echo "${dest_port}" | sed -n "/-1/p" | wc -l)
|
||||
|
||||
if [ "${count}" -eq 0 ]; then
|
||||
# dest_port not contains -1 so need to have this match criteria
|
||||
count=$(echo "${dest_port}" | wc -w)
|
||||
if [ "${count}" -gt 1 ]; then
|
||||
# multiple ports present
|
||||
port=$(echo "${dest_port}" | sed "s/ /,/g")
|
||||
cmd="${cmd} -m multiport --dports ${port}"
|
||||
else
|
||||
cmd="${cmd} --dport ${dest_port}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${family}" = "ipv4" ] || [ "${family}" = "-1" ]; then
|
||||
if [ "${protocol}" -eq 1 ] && [ "${icmp_type}" -ge 0 ]; then
|
||||
cmd="${cmd} --icmp-type ${icmp_type}"
|
||||
fi
|
||||
|
||||
if [ -z "${src_prefix}" ]; then
|
||||
res=$(exec_cmd "iptables ${cmd} -m comment --comment IPtables_service_rule -j ${action}")
|
||||
else
|
||||
#Add ipv4 sources if any
|
||||
src_list=""
|
||||
for src in $src_prefix; do
|
||||
ret=$(echo $src | grep ":" | wc -l)
|
||||
if [ "${ret}" -eq 0 ]; then
|
||||
src_list="$src,$src_list"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$src_list" ]; then
|
||||
src_list=$(echo "${src_list}" | sed "s/,$//")
|
||||
res=$(exec_cmd "iptables -s $src_list ${cmd} -m comment --comment IPtables_service_rule -j ${action}")
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${family}" = "ipv6" ] || [ "${family}" = "-1" ]; then
|
||||
if [ "${protocol}" -eq 58 ] && [ "${icmp_type}" -ge 0 ]; then
|
||||
cmd="${cmd} --icmpv6-type ${icmp_type}"
|
||||
fi
|
||||
|
||||
if [ -z "${src_prefix}" ]; then
|
||||
res=$(exec_cmd "ip6tables ${cmd} -m comment --comment IP6tables_service_rule -j ${action}")
|
||||
else
|
||||
#Add ipv6 sources if any
|
||||
src_list=""
|
||||
for src in $src_prefix; do
|
||||
ret=$(echo $src | grep ":" | wc -l)
|
||||
if [ "${ret}" -eq 1 ]; then
|
||||
src_list="$src,$src_list"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$src_list" ]; then
|
||||
src_list=$(echo "${src_list}" | sed "s/,$//")
|
||||
res=$(exec_cmd "ip6tables -s $src_list ${cmd} -m comment --comment IP6tables_service_rule -j ${action}")
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo $res
|
||||
}
|
||||
|
||||
add_service() {
|
||||
local enable proto family dest_port interface target icmp_type
|
||||
|
||||
config_get enable "$1" enable "0"
|
||||
config_get icmp_type "$1" icmp_type "-1"
|
||||
config_get target "$1" target "Accept"
|
||||
config_get interface "$1" interface ""
|
||||
config_get family "$1" family "-1"
|
||||
config_get dest_port "$1" dest_port "-1"
|
||||
config_get proto "$1" proto "-1"
|
||||
config_get src_prefix "$1" src_prefix ""
|
||||
|
||||
if [ "${enable}" -eq 0 ] || [ -z "${interface}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
action=$(echo "${target}" | tr a-z A-Z)
|
||||
chain_name="zone_${interface}_input"
|
||||
res=0
|
||||
|
||||
count=$(echo "${proto}" | sed -n "/-1/p" | wc -l)
|
||||
|
||||
if [ "${count}" -eq 0 ]; then
|
||||
# proto not contains -1 so need to have this match criteria
|
||||
for protocol in $proto; do
|
||||
res=$(add_iptable_rule "$chain_name" "$protocol" "$dest_port" "$icmp_type" "$family" "$src_prefix" "$action")
|
||||
done
|
||||
else
|
||||
# proto contains -1 so no need to have this match criteria
|
||||
res=$(add_iptable_rule "$chain_name" "" "$dest_port" "$icmp_type" "$family" "$src_prefix" "$action")
|
||||
fi
|
||||
|
||||
if [ "${res}" -ne 0 ]; then
|
||||
uci -q set firewall."${1}".status="Error"
|
||||
else
|
||||
uci -q set firewall."${1}".status=""
|
||||
fi
|
||||
|
||||
uci commit firewall
|
||||
}
|
||||
|
||||
config_load firewall
|
||||
config_foreach add_service "service"
|
||||
17
bbfdm/files/etc/hotplug.d/iface/85-bbfdm-sysctl
Normal file
17
bbfdm/files/etc/hotplug.d/iface/85-bbfdm-sysctl
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$ACTION" = "ifup" ] || exit 0
|
||||
|
||||
apply_sysctl_configuration() {
|
||||
local sysctl_conf
|
||||
|
||||
sysctl_conf="/etc/bbfdm/sysctl.conf"
|
||||
|
||||
[ -f "${sysctl_conf}" ] || touch "${sysctl_conf}"
|
||||
|
||||
sysctl -e -p "${sysctl_conf}" >&-
|
||||
}
|
||||
|
||||
|
||||
ubus -t 10 wait_for network.device
|
||||
apply_sysctl_configuration
|
||||
117
bbfdm/files/etc/init.d/bbfdmd
Normal file
117
bbfdm/files/etc/init.d/bbfdmd
Normal file
@@ -0,0 +1,117 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=65
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/bbfdmd
|
||||
|
||||
BBFDM_JSON_INPUT="/etc/bbfdm/input.json"
|
||||
BBFDM_MICROSERVICE_DIR="/etc/bbfdm/micro_services"
|
||||
BBFDM_TEMP_DIR="/tmp/bbfdm"
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t bbfdmd.init -p info
|
||||
}
|
||||
|
||||
validate_bbfdm_bbfdmd_section()
|
||||
{
|
||||
uci_validate_section bbfdm bbfdmd "bbfdmd" \
|
||||
'enable:bool:true' \
|
||||
'sock:string' \
|
||||
'debug:bool:false' \
|
||||
'loglevel:uinteger:1' \
|
||||
'refresh_time:uinteger:0' \
|
||||
'transaction_timeout:uinteger:30' \
|
||||
'subprocess_level:uinteger'
|
||||
}
|
||||
|
||||
bbfdm_add_micro_service()
|
||||
{
|
||||
local name path
|
||||
|
||||
path="${1}"
|
||||
name="$(basename ${path})"
|
||||
name="${name//.json}"
|
||||
|
||||
ubus call service add "{'name':'bbfdm.services','instances':{'$name':{'command':['${PROG}','-m','$path']}}}"
|
||||
}
|
||||
|
||||
_add_microservice()
|
||||
{
|
||||
local enable loglevel input_json name
|
||||
|
||||
name="${1}"
|
||||
input_json="$(jq -r '.daemon.input.name' ${name})"
|
||||
|
||||
if [ -f "${input_json}" ]; then
|
||||
bbfdm_add_micro_service "${name}"
|
||||
else
|
||||
log "Input json [${input_json}] does not defined/present"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
configure_bbfdm_micro_services()
|
||||
{
|
||||
if [ -d "${BBFDM_MICROSERVICE_DIR}" ]; then
|
||||
FILES="$(ls -1 ${BBFDM_MICROSERVICE_DIR}/*.json)"
|
||||
|
||||
for service in $FILES;
|
||||
do
|
||||
[ -e "$service" ] || continue
|
||||
_add_microservice $service
|
||||
done
|
||||
fi
|
||||
ubus call service state '{"name":"bbfdm.services", "spawn":true}'
|
||||
}
|
||||
|
||||
configure_bbfdmd()
|
||||
{
|
||||
local enable debug sock
|
||||
local jlog jrefresh jtimeout jlevel
|
||||
|
||||
config_load bbfdm
|
||||
validate_bbfdm_bbfdmd_section || {
|
||||
log "Validation of bbfdmd section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
[ "${enable}" -eq 0 ] && return 0
|
||||
|
||||
if [ -f "${BBFDM_JSON_INPUT}" ]; then
|
||||
echo "$(jq --arg log ${loglevel} --arg tran ${transaction_timeout} --arg refresh ${refresh_time} --arg level ${subprocess_level} '.daemon.config += {"loglevel": $log, "refresh_time": $refresh, "transaction_timeout": $tran, "subprocess_level": $level}' ${BBFDM_JSON_INPUT})" > "${BBFDM_TEMP_DIR}/input.json"
|
||||
fi
|
||||
|
||||
procd_set_param command ${PROG}
|
||||
if [ "${debug}" -eq 1 ]; then
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
fi
|
||||
|
||||
if [ -f "${sock}" ]; then
|
||||
procd_append_param command -s "${sock}"
|
||||
fi
|
||||
}
|
||||
|
||||
start_service()
|
||||
{
|
||||
mkdir -p ${BBFDM_TEMP_DIR}
|
||||
|
||||
configure_bbfdm_micro_services
|
||||
|
||||
procd_open_instance "bbfdm"
|
||||
configure_bbfdmd
|
||||
procd_set_param respawn
|
||||
procd_close_instance "bbfdm"
|
||||
}
|
||||
|
||||
stop_service()
|
||||
{
|
||||
ubus call service state '{"name":"bbfdm.services", "spawn":false}'
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "bbfdm"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
|
||||
remove_nonexisting_microservice() {
|
||||
local input_json
|
||||
|
||||
config_get input_json "$1" input_json ""
|
||||
|
||||
if [ -z "${input_json}" ]; then
|
||||
uci_remove bbfdm "${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
config_load bbfdm
|
||||
config_foreach remove_nonexisting_microservice "micro_service"
|
||||
|
||||
exit 0
|
||||
|
||||
11
bbfdm/files/etc/uci-defaults/91-fix-bbfdmd-enabled-option
Normal file
11
bbfdm/files/etc/uci-defaults/91-fix-bbfdmd-enabled-option
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# rename bbfdmd enabled option to enable
|
||||
val="$(uci -q get bbfdm.bbfdmd.enabled)"
|
||||
if [ -n "${val}" ]; then
|
||||
uci -q set bbfdm.bbfdmd.enabled=""
|
||||
uci -q set bbfdm.bbfdmd.enable="${val}"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
12
bbfdm/files/etc/uci-defaults/95-portmap-firewall
Normal file
12
bbfdm/files/etc/uci-defaults/95-portmap-firewall
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOT
|
||||
delete firewall.port_hook
|
||||
set firewall.port_hook=include
|
||||
set firewall.port_hook.path=/etc/firewall.portmap
|
||||
set firewall.port_hook.reload=1
|
||||
commit firewall
|
||||
EOT
|
||||
|
||||
exit 0
|
||||
|
||||
62
bbfdm/files/etc/uci-defaults/96-sysctl-translation
Executable file
62
bbfdm/files/etc/uci-defaults/96-sysctl-translation
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
bbfdm_sysctl_conf="/etc/bbfdm/sysctl.conf"
|
||||
|
||||
update_device_section() {
|
||||
local section="${1}"
|
||||
local dev_name="${2}"
|
||||
local ipv6="${3}"
|
||||
local name
|
||||
|
||||
# Get name value
|
||||
config_get name "${section}" name
|
||||
|
||||
# Retrun if the name value is different to the dev_name value
|
||||
[ "${name}" != "${dev_name}" ] && return
|
||||
|
||||
if [ "${ipv6}" = "0" ]; then
|
||||
ipv6="1"
|
||||
else
|
||||
ipv6="0"
|
||||
fi
|
||||
|
||||
# Add ipv6 option
|
||||
uci -q set network.${section}.ipv6="${ipv6}"
|
||||
}
|
||||
|
||||
parse_bbfdm_sysctl_conf_file() {
|
||||
# Check if the file exists
|
||||
[ -f "${bbfdm_sysctl_conf}" ] || return
|
||||
|
||||
# Create a temporary file
|
||||
tmpfile=$(mktemp)
|
||||
|
||||
# Load network config
|
||||
config_load network
|
||||
|
||||
# Read each line of the file
|
||||
while read -r line; do
|
||||
if echo "$line" | grep -Eq '^net\.ipv6\.conf\.(.+)\.disable_ipv6=([0-1])$'; then
|
||||
name=$(echo "$line" | sed -n 's/^net\.ipv6\.conf\.\(.*\)\.disable_ipv6=[0-1]$/\1/p')
|
||||
value=$(echo "$line" | sed -n 's/^net\.ipv6\.conf\.\(.*\)\.disable_ipv6=\([0-1]\)$/\2/p')
|
||||
|
||||
config_foreach update_device_section device "${name}" "${value}"
|
||||
else
|
||||
# If the line doesn't match, preserve it in the temporary file
|
||||
echo "$line" >> "$tmpfile"
|
||||
fi
|
||||
done < "${bbfdm_sysctl_conf}"
|
||||
|
||||
# Replace the original file with the modified content
|
||||
mv "$tmpfile" "${bbfdm_sysctl_conf}"
|
||||
|
||||
# Apply the changes
|
||||
uci commit network
|
||||
sysctl -e -p "${bbfdm_sysctl_conf}" >&-
|
||||
}
|
||||
|
||||
parse_bbfdm_sysctl_conf_file
|
||||
|
||||
exit 0
|
||||
12
bbfdm/files/etc/uci-defaults/97-firewall-service
Normal file
12
bbfdm/files/etc/uci-defaults/97-firewall-service
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOT
|
||||
delete firewall.service_hook
|
||||
set firewall.service_hook=include
|
||||
set firewall.service_hook.path=/etc/firewall.service
|
||||
set firewall.service_hook.reload=1
|
||||
commit firewall
|
||||
EOT
|
||||
|
||||
exit 0
|
||||
|
||||
18
bbfdm/files/etc/uci-defaults/99-link-core-plugins
Normal file
18
bbfdm/files/etc/uci-defaults/99-link-core-plugins
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
UNIFIED_PATH="/etc/bbfdm/plugins/"
|
||||
|
||||
# Link JSON plugins
|
||||
for f in `ls -1 /etc/bbfdm/json/*.json`; do
|
||||
echo "# BBFDM JSON plugin ${f} not aligned #"
|
||||
ln -s ${f} "${UNIFIED_PATH}"
|
||||
done
|
||||
|
||||
# Link DotSo plugins
|
||||
for f in `ls -1 /usr/lib/bbfdm/*.so`; do
|
||||
echo "# BBFDM DotSO plugin ${f} not aligned #"
|
||||
ln -s ${f} "${UNIFIED_PATH}"
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,31 +1,28 @@
|
||||
#
|
||||
# Copyright (C) 2022 iopsys Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bulkdata
|
||||
PKG_VERSION:=2.0.10
|
||||
PKG_VERSION:=2.1.8
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bulkdata.git
|
||||
PKG_SOURCE_VERSION:=6e85d2032e66df581fae7c72cd83cc89367b8fc8
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bulkdata.git
|
||||
PKG_SOURCE_VERSION:=e472e90feec31d9f318ea8c732ab564002e25db1
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
@@ -47,10 +44,16 @@ endif
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/bulkdata
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbf_plugin/*.json $(1)/etc/bbfdm/json
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DATA) ./files/etc/config/bulkdata $(1)/etc/config/
|
||||
$(INSTALL_DATA) ./files/etc/init.d/bulkdatad $(1)/etc/init.d/
|
||||
$(INSTALL_DATA) ./files/etc/uci-defaults/95-bulkdata-translation-options $(1)/etc/uci-defaults/
|
||||
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/bulkdata,$(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json)
|
||||
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/bulkdata/input.json)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
17
bulkdata/files/etc/bulkdata/input.json
Executable file
17
bulkdata/files/etc/bulkdata/input.json
Executable file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"daemon": {
|
||||
"config": {
|
||||
"loglevel": "1"
|
||||
},
|
||||
"input": {
|
||||
"type": "JSON",
|
||||
"name": "/etc/bulkdata/bulkdata.json"
|
||||
},
|
||||
"output": {
|
||||
"type": "UBUS",
|
||||
"parent_dm": "Device.",
|
||||
"object": "BulkData",
|
||||
"root_obj": "bbfdm"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
START=60
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
@@ -12,12 +12,12 @@ start_service() {
|
||||
config_load bulkdata
|
||||
config_get_bool enable bulkdata enable 1
|
||||
|
||||
procd_open_instance bulkdata
|
||||
[ "$enable" -eq "1" ] && {
|
||||
procd_open_instance "bulkdata"
|
||||
procd_set_param command "$PROG"
|
||||
procd_set_param respawn "3" "7" "0"
|
||||
procd_set_param respawn
|
||||
procd_close_instance "bulkdata"
|
||||
}
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#
|
||||
# Copyright (C) 2021 IOPSYS
|
||||
# Copyright (C) 2021-2023 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wfa-capi
|
||||
PKG_VERSION:=2.0.1
|
||||
PKG_NAME:=capiagent
|
||||
PKG_VERSION:=2.1.1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=3e671db8f567b19c109fc13b25bc571c4c73a962
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfa-capi.git
|
||||
PKG_SOURCE_VERSION:=136cab3a9f1eec0132db9fa3f7bb1c8748ce1449
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/capiagent.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -24,18 +24,18 @@ PKG_LICENSE_FILES:=LICENSE
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
||||
#define Package/wfa-capi/config
|
||||
#define Package/capiagent/config
|
||||
# source "$(SOURCE)/Config.in"
|
||||
#endef
|
||||
|
||||
define Package/wfa-capi
|
||||
TITLE+= wfa-capi (agent daemon for Wi-Fi Alliance's CAPI commands)
|
||||
define Package/capiagent
|
||||
TITLE+= capiagent (daemon implementing Wi-Fi Alliance's CAPI commands)
|
||||
DEPENDS= +libubox +libuci +libubus +libnl-genl +libeasy +libwifi \
|
||||
+libjson-c +libblobmsg-json +ubus +libieee1905
|
||||
+libjson-c +libblobmsg-json +ubus +libieee1905 +libwifiutils
|
||||
endef
|
||||
|
||||
define Package/wfa-capi/description
|
||||
This package provides agent for WiFi Alliance's CAPI specification.
|
||||
define Package/capiagent/description
|
||||
This package provides agent for the WiFi Alliance's CAPI specification.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
@@ -46,7 +46,7 @@ TARGET_CFLAGS += \
|
||||
MAKE_PATH:=src
|
||||
|
||||
|
||||
define Package/wfa-capi/install
|
||||
define Package/capiagent/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/lib/wifi/capi
|
||||
@@ -54,4 +54,4 @@ define Package/wfa-capi/install
|
||||
$(CP) $(PKG_BUILD_DIR)/src/scripts/* $(1)/lib/wifi/capi
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,wfa-capi))
|
||||
$(eval $(call BuildPackage,capiagent))
|
||||
35
capiagent/files/etc/init.d/capiagent
Executable file
35
capiagent/files/etc/init.d/capiagent
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=98
|
||||
STOP=20
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
if [ -e "/etc/config/mapagent" -o -e "/etc/config/mapcontroller" ]; then
|
||||
config_load mapagent
|
||||
config_get_bool agent_enabled agent enabled 1
|
||||
config_load mapcontroller
|
||||
config_get_bool controller_enabled controller enabled 1
|
||||
|
||||
if [ $agent_enabled -eq 1 -o $controller_enabled -eq 1 ]; then
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/capiagent" "-p 9000"
|
||||
procd_set_param limits core="unlimited"
|
||||
#procd_set_param respawn
|
||||
#procd_set_param stdout 1
|
||||
#procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "capiagent"
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
64
csmngr/Makefile
Normal file
64
csmngr/Makefile
Normal file
@@ -0,0 +1,64 @@
|
||||
#
|
||||
# Copyright (C) 2020-2024 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=csmngr
|
||||
PKG_VERSION:=0.0.5
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=dcdaba75b85bf8758c34d3ae4a1be0ba09359331
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/csmngr.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_CONFIG_DEPENDS := \
|
||||
CONFIG_PACKAGE_libwifiutils \
|
||||
CONFIG_PACKAGE_libwifi
|
||||
|
||||
PKG_BUILD_DEPENDS := libwifi
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
define Package/csmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=WiFi channel selection manager
|
||||
DEPENDS:=+libwifiutils +libwifi +libuci +libubox +ubus +libnl-genl
|
||||
endef
|
||||
|
||||
define Package/csmngr/description
|
||||
WiFi Auto Channel Selection manager.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -r --exclude=.* ~/git/csmngr/ $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/csmngr/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/csmngr $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,csmngr))
|
||||
21
csmngr/files/etc/init.d/csmngr
Executable file
21
csmngr/files/etc/init.d/csmngr
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=95
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/csmngr
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
# procd_set_param stderr 1 #for debugging only
|
||||
# procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
16
ddnsmngr/Config.in
Normal file
16
ddnsmngr/Config.in
Normal file
@@ -0,0 +1,16 @@
|
||||
if PACKAGE_ddnsmngr
|
||||
choice
|
||||
prompt "Select backend for dynamic DNS management"
|
||||
default DDNSMNGR_BACKEND_DDNSSCRIPT
|
||||
depends on PACKAGE_ddnsmngr
|
||||
help
|
||||
Select which package to use for dynamic DNS support
|
||||
|
||||
config DDNSMNGR_BACKEND_DDNSSCRIPT
|
||||
bool "Use ddns_script"
|
||||
|
||||
config DDNSMNGR_BACKEND_INADYN
|
||||
bool "Use inadyn"
|
||||
|
||||
endchoice
|
||||
endif
|
||||
80
ddnsmngr/Makefile
Normal file
80
ddnsmngr/Makefile
Normal file
@@ -0,0 +1,80 @@
|
||||
#
|
||||
# Copyright (C) 2024 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ddnsmngr
|
||||
PKG_VERSION:=1.0.3
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ddnsmngr.git
|
||||
PKG_SOURCE_VERSION:=d0d37df44644ef2c1a0b11d3a4f92dc694ae1010
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_DDNSMNGR_BACKEND_DDNSSCRIPT CONFIG_DDNSMNGR_BACKEND_INADYN
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=Dynamic DNS manager
|
||||
DEPENDS:=+libbbfdm-api +DDNSMNGR_BACKEND_DDNSSCRIPT:ddns-scripts +DDNSMNGR_BACKEND_INADYN:inadyn
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Manage dynamic DNS updation and provides Device.DynamicDNS. datamodel object based on TR181-2.16
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/ddnsmngr/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc/ddnsmngr
|
||||
$(INSTALL_DIR) $(1)/etc/ddnsmngr/ddns
|
||||
$(INSTALL_DIR) $(1)/etc/ddnsmngr/servers
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ddnsmngr
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
|
||||
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/ddnsmngr,$(PKG_BUILD_DIR)/src/libddnsmngr.so)
|
||||
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/ddnsmngr/input.json)
|
||||
$(INSTALL_DATA) ./files/etc/config/ddnsmngr $(1)/etc/config/ddnsmngr
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/01-ddns-config-migrate $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/init.d/ddnsmngr $(1)/etc/init.d/ddnsmngr
|
||||
ifeq ($(CONFIG_DDNSMNGR_BACKEND_DDNSSCRIPT),y)
|
||||
$(INSTALL_BIN) ./files/usr/lib/ddns_script/ddnsmngr_service.sh $(1)/usr/lib/ddnsmngr/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns-script/usr/lib/ddnsmngr/ddnsmngr_updater.sh $(1)/usr/lib/ddnsmngr/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/files/ddns-script/server/* $(1)/etc/ddnsmngr/servers
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/ddns-script/usr/libexec/rpcd/ddnsmngr $(1)/usr/libexec/rpcd/ddnsmngr
|
||||
endif
|
||||
ifeq ($(CONFIG_DDNSMNGR_BACKEND_INADYN),y)
|
||||
$(INSTALL_BIN) ./files/usr/lib/inadyn/ddnsmngr_service.sh $(1)/usr/lib/ddnsmngr/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/files/inadyn/server/* $(1)/etc/ddnsmngr/servers
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/inadyn/usr/libexec/rpcd/ddnsmngr $(1)/usr/libexec/rpcd/ddnsmngr
|
||||
endif
|
||||
endef
|
||||
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
23
ddnsmngr/files/etc/config/ddnsmngr
Normal file
23
ddnsmngr/files/etc/config/ddnsmngr
Normal file
@@ -0,0 +1,23 @@
|
||||
config ddnsmngr 'global'
|
||||
option configfile '/var/run/ddnsmngr/ddnsmngr.json'
|
||||
option ddns_dateformat '%F %R'
|
||||
option ddns_rundir '/var/run/ddnsmngr'
|
||||
option ddns_logdir '/var/log/ddnsmngr'
|
||||
option ddns_loglines '250'
|
||||
option upd_privateip '0'
|
||||
option use_curl '1'
|
||||
|
||||
config server 'ddns_server_1'
|
||||
option enabled '1'
|
||||
option service 'dynu.com'
|
||||
option name 'dynu.com'
|
||||
|
||||
config server 'ddns_server_2'
|
||||
option enabled '1'
|
||||
option service 'dyndns.org'
|
||||
option name 'dyndns.org'
|
||||
|
||||
config server 'ddns_server_3'
|
||||
option enabled '1'
|
||||
option service 'zoneedit.com'
|
||||
option name 'zoneedit.com'
|
||||
17
ddnsmngr/files/etc/ddnsmngr/input.json
Normal file
17
ddnsmngr/files/etc/ddnsmngr/input.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"daemon": {
|
||||
"config": {
|
||||
"loglevel": "1"
|
||||
},
|
||||
"input": {
|
||||
"type": "DotSo",
|
||||
"name": "/etc/ddnsmngr/libddnsmngr.so"
|
||||
},
|
||||
"output": {
|
||||
"type": "UBUS",
|
||||
"parent_dm": "Device.",
|
||||
"object": "DynamicDNS",
|
||||
"root_obj": "bbfdm"
|
||||
}
|
||||
}
|
||||
}
|
||||
26
ddnsmngr/files/etc/init.d/ddnsmngr
Normal file
26
ddnsmngr/files/etc/init.d/ddnsmngr
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=80
|
||||
STOP=10
|
||||
USE_PROCD=1
|
||||
|
||||
. /usr/lib/ddnsmngr/ddnsmngr_service.sh
|
||||
|
||||
start_service() {
|
||||
start_ddnsmngr_service
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
stop_ddnsmngr_service
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger ddnsmngr
|
||||
add_ddnsmngr_triggers
|
||||
}
|
||||
170
ddnsmngr/files/etc/uci-defaults/01-ddns-config-migrate
Normal file
170
ddnsmngr/files/etc/uci-defaults/01-ddns-config-migrate
Normal file
@@ -0,0 +1,170 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
cl_id=1
|
||||
srv_id=1
|
||||
|
||||
function get_ddns_config_option() {
|
||||
local val
|
||||
|
||||
val="$(uci -q get ddns.${1}.${2})"
|
||||
|
||||
if [ -z "${val}" ] && [ -n "${3}" ]; then
|
||||
val="${3}"
|
||||
fi
|
||||
|
||||
echo "${val}"
|
||||
}
|
||||
|
||||
function config_supported_service() {
|
||||
if ! uci -q get ddnsmngr.global >/dev/null 2>&1; then
|
||||
uci -q set ddnsmngr.global="ddnsmngr"
|
||||
fi
|
||||
|
||||
servers=""
|
||||
|
||||
for i in $(find /etc/ddnsmngr/servers/ -name '*.json' | cut -d'/' -f 5 | sed "s/.json//")
|
||||
do
|
||||
if [ -z "${servers}" ]; then
|
||||
servers="${i}"
|
||||
else
|
||||
servers="${servers},${i}"
|
||||
fi
|
||||
done
|
||||
|
||||
uci -q set ddnsmngr.global.supported_services="${servers}"
|
||||
}
|
||||
|
||||
function migrate_service_section() {
|
||||
client_sec=""
|
||||
enabled="$(get_ddns_config_option ${1} enabled "0")"
|
||||
service_name="$(get_ddns_config_option ${1} service_name)"
|
||||
interface="$(get_ddns_config_option ${1} interface)"
|
||||
ip_network="$(get_ddns_config_option ${1} ip_network)"
|
||||
username="$(get_ddns_config_option ${1} username)"
|
||||
password="$(get_ddns_config_option ${1} password)"
|
||||
lookup_host="$(get_ddns_config_option ${1} lookup_host)"
|
||||
use_ipv6="$(get_ddns_config_option ${1} use_ipv6 "0")"
|
||||
force_ipversion="$(get_ddns_config_option ${1} force_ipversion "0")"
|
||||
use_https="$(get_ddns_config_option ${1} use_https "0")"
|
||||
force_dnstcp="$(get_ddns_config_option ${1} force_dnstcp "0")"
|
||||
|
||||
if [ -z "${service_name}" ]; then
|
||||
uci -q delete ddns."${1}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# check server file is present in device
|
||||
if [ ! -f "/etc/ddnsmngr/servers/${service_name}.json" ]; then
|
||||
uci -q delete ddns."${1}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Check if client section is already added for this service
|
||||
clients=$(uci -q show ddnsmngr | grep "=client")
|
||||
client_count=$(echo "${clients}" | wc -l)
|
||||
|
||||
tmp=0
|
||||
while [ $tmp -lt $client_count ]
|
||||
do
|
||||
mngr_serv="$(uci -q get ddnsmngr.@client[$tmp].service_name)"
|
||||
mngr_intf="$(uci -q get ddnsmngr.@client[$tmp].interface)"
|
||||
mngr_netw="$(uci -q get ddnsmngr.@client[$tmp].ip_network)"
|
||||
mngr_user="$(uci -q get ddnsmngr.@client[$tmp].username)"
|
||||
mngr_ipv6="$(uci -q get ddnsmngr.@client[$tmp].use_ipv6)"
|
||||
mngr_forceip="$(uci -q get ddnsmngr.@client[$tmp].force_ipversion)"
|
||||
mngr_https="$(uci -q get ddnsmngr.@client[$tmp].use_https)"
|
||||
mngr_dnstcp="$(uci -q get ddnsmngr.@client[$tmp].force_dnstcp)"
|
||||
|
||||
[ -z "${mngr_ipv6}" ] && mngr_ipv6="0"
|
||||
[ -z "${mngr_forceip}" ] && mngr_forceip="0"
|
||||
[ -z "${mngr_https}" ] && mngr_https="0"
|
||||
[ -z "${mngr_dnstcp}" ] && mngr_dnstcp="0"
|
||||
|
||||
if [ "${mngr_serv}" == "${service_name}" ] && [ "${mngr_intf}" == "${interface}" ] && \
|
||||
[ "${mngr_netw}" == "${ip_network}" ] && [ "${mngr_user}" == "${username}" ] && \
|
||||
[ "${mngr_ipv6}" == "${use_ipv6}" ] && [ "${mngr_forceip}" == "${force_ipversion}" ] && \
|
||||
[ "${mngr_https}" == "${use_https}" ] && [ "${mngr_dnstcp}" == "${force_dnstcp}" ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
tmp=$(( tmp + 1 ))
|
||||
done
|
||||
|
||||
if [ $tmp -ne $client_count ]; then
|
||||
i=0
|
||||
for client in $clients; do
|
||||
if [ $i -eq $tmp ]; then
|
||||
client_sec="$(echo $client | cut -d'=' -f 1 | cut -d'.' -f 2)"
|
||||
break
|
||||
fi
|
||||
i=$(( i + 1 ))
|
||||
done
|
||||
|
||||
if [ $enabled -eq 1 ]; then
|
||||
uci -q set ddnsmngr."${client_sec}".enabled="1"
|
||||
fi
|
||||
else
|
||||
client_sec=ddns_mig_client_"${cl_id}"
|
||||
|
||||
uci -q set ddnsmngr."${client_sec}"="client"
|
||||
uci -q set ddnsmngr."${client_sec}".enabled="${enabled}"
|
||||
uci -q set ddnsmngr."${client_sec}".service_name="${service_name}"
|
||||
uci -q set ddnsmngr."${client_sec}".interface="${interface}"
|
||||
uci -q set ddnsmngr."${client_sec}".ip_network="${ip_network}"
|
||||
uci -q set ddnsmngr."${client_sec}".username="${username}"
|
||||
uci -q set ddnsmngr."${client_sec}".password="${password}"
|
||||
uci -q set ddnsmngr."${client_sec}".use_ipv6="${use_ipv6}"
|
||||
uci -q set ddnsmngr."${client_sec}".force_ipversion="${force_ipversion}"
|
||||
uci -q set ddnsmngr."${client_sec}".use_https="${use_https}"
|
||||
uci -q set ddnsmngr."${client_sec}".force_dnstcp="${force_dnstcp}"
|
||||
|
||||
cl_id=$(( cl_id + 1 ))
|
||||
|
||||
# add server section if not added
|
||||
servers=$(uci -q show ddnsmngr | grep "service=\'${service_name}\'")
|
||||
if [ -z "${servers}" ]; then
|
||||
server_sec=ddns_mig_server_"${srv_id}"
|
||||
uci -q set ddnsmngr."${server_sec}"="server"
|
||||
uci -q set ddnsmngr."${server_sec}".enabled="1"
|
||||
uci -q set ddnsmngr."${server_sec}".service="${service_name}"
|
||||
uci -q set ddnsmngr."${server_sec}".name="${service_name}"
|
||||
|
||||
srv_id=$(( srv_id + 1 ))
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# if lookup_host is set then add host section
|
||||
if [ -n "${lookup_host}" ] && [ -n "${client_sec}" ]; then
|
||||
# check number of hosts present for this client
|
||||
host_count=$(uci -q show ddnsmngr | grep "dm_parent=\'${client_sec}\'" | wc -l)
|
||||
host_ix=$(( host_count + 1 ))
|
||||
host_sec="${client_sec}"_host_"${host_ix}"
|
||||
|
||||
uci -q set ddnsmngr."${host_sec}"="host"
|
||||
uci -q set ddnsmngr."${host_sec}".enabled="${enabled}"
|
||||
uci -q set ddnsmngr."${host_sec}".lookup_host="${lookup_host}"
|
||||
uci -q set ddnsmngr."${host_sec}".dm_parent="${client_sec}"
|
||||
fi
|
||||
|
||||
uci -q delete ddns."${1}"
|
||||
}
|
||||
|
||||
function migrate_ddns_config() {
|
||||
if [ ! -f "/etc/config/ddnsmngr" ]; then
|
||||
# Create ddnsmngr config file
|
||||
touch /etc/config/ddnsmngr
|
||||
fi
|
||||
|
||||
config_supported_service
|
||||
|
||||
config_load ddns
|
||||
config_foreach migrate_service_section service
|
||||
|
||||
uci -q commit ddns
|
||||
uci -q commit ddnsmngr
|
||||
}
|
||||
|
||||
migrate_ddns_config
|
||||
169
ddnsmngr/files/usr/lib/ddns_script/ddnsmngr_service.sh
Normal file
169
ddnsmngr/files/usr/lib/ddns_script/ddnsmngr_service.sh
Normal file
@@ -0,0 +1,169 @@
|
||||
#! /bin/sh
|
||||
|
||||
RUNDIR="/var/run/ddnsmngr"
|
||||
LOGDIR="/var/log/ddnsmngr"
|
||||
PROG="/usr/lib/ddnsmngr/ddnsmngr_updater.sh"
|
||||
CONFIGFILE="/var/run/ddnsmngr/ddnsmngr.json"
|
||||
CLIENT_INTFS=""
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
log() {
|
||||
echo "$*"|logger -t ddnsmngr.init -p debug
|
||||
}
|
||||
|
||||
validate_host_section() {
|
||||
uci_validate_section ddnsmngr host "${1}" \
|
||||
'enabled:bool:0' \
|
||||
'lookup_host:string' \
|
||||
'dm_parent:string'
|
||||
}
|
||||
|
||||
validate_client_section() {
|
||||
uci_validate_section ddnsmngr client "${1}" \
|
||||
'enabled:bool:0' \
|
||||
'service_name:string' \
|
||||
'interface:string' \
|
||||
'ip_network:string' \
|
||||
'username:string' \
|
||||
'password:string' \
|
||||
'use_https:bool:0' \
|
||||
'force_dnstcp:bool:0' \
|
||||
'use_ipv6:bool:0' \
|
||||
'force_ipversion:bool:0'
|
||||
}
|
||||
|
||||
add_object() {
|
||||
local enabled lookup_host dm_parent use_ipv6 force_ipversion proc_info_file
|
||||
local service_name interface ip_network username password use_https force_dnstcp
|
||||
|
||||
validate_host_section "${1}" || {
|
||||
log "Validation of host section failed"
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ "${enabled}" -ne 1 ] || [ -z "${dm_parent}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
validate_client_section "${dm_parent}" || {
|
||||
log "Validation of client section failed"
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ "${enabled}" -ne 1 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
service_name=$(uci -q get ddnsmngr.${dm_parent}.service_name)
|
||||
if [ -z "${service_name}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
service_section=$(uci -q show ddnsmngr | grep "service=\'${service_name}\'" | cut -d'.' -f 2 | head -1)
|
||||
if [ -z "${service_section}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
service_enabled=$(uci -q get ddnsmngr.${service_section}.enabled)
|
||||
if [ "${service_enabled}" -ne 1 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
json_add_object
|
||||
json_add_string "interface" "${interface}"
|
||||
json_add_string "service_name" "${service_name}"
|
||||
json_add_string "username" "${username}"
|
||||
json_add_string "password" "${password}"
|
||||
json_add_string "lookup_host" "${lookup_host}"
|
||||
json_add_string "ip_network" "${ip_network}"
|
||||
json_add_string "proc_info_file" "${1}"
|
||||
json_add_string "use_ipv6" "${use_ipv6}"
|
||||
json_add_string "force_ipversion" "${force_ipversion}"
|
||||
json_add_string "use_https" "${use_https}"
|
||||
json_add_string "force_dnstcp" "${force_dnstcp}"
|
||||
json_close_object
|
||||
|
||||
if [ -z "${interface}" ]; then
|
||||
if [ "${use_ipv6}" -eq 0 ]; then
|
||||
interface="wan"
|
||||
else
|
||||
interface="wan6"
|
||||
fi
|
||||
fi
|
||||
|
||||
for intf in $CLIENT_INTFS; do
|
||||
if [ "${intf}" == "${interface}" ]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
CLIENT_INTFS="${CLIENT_INTFS} ${interface}"
|
||||
}
|
||||
|
||||
start_ddnsmngr_service() {
|
||||
run_dir=$(uci -q get ddnsmngr.global.ddns_rundir)
|
||||
log_dir=$(uci -q get ddnsmngr.global.ddns_logdir)
|
||||
|
||||
if [ -n "${run_dir}" ]; then
|
||||
RUNDIR="${run_dir}"
|
||||
fi
|
||||
|
||||
if [ -n "${log_dir}" ]; then
|
||||
LOGDIR="${log_dir}"
|
||||
fi
|
||||
|
||||
mkdir -p "${RUNDIR}"
|
||||
mkdir -p "${LOGDIR}"
|
||||
|
||||
conf_file=$(uci -q get ddnsmngr.global.configfile)
|
||||
if [ -n "${conf_file}" ]; then
|
||||
CONFIGFILE="${conf_file}"
|
||||
fi
|
||||
|
||||
touch "${CONFIGFILE}"
|
||||
|
||||
if [ ! -f "${CONFIGFILE}" ]; then
|
||||
log "Can not create ${CONFIGFILE}, exit"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
json_init
|
||||
json_add_array "services"
|
||||
|
||||
config_load ddnsmngr
|
||||
config_foreach add_object host
|
||||
|
||||
json_close_array
|
||||
json_dump > "${CONFIGFILE}"
|
||||
|
||||
procd_open_instance ddnsmngr
|
||||
procd_set_param command "$PROG"
|
||||
procd_append_param command -c "${CONFIGFILE}"
|
||||
procd_append_param command -- start
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_ddnsmngr_service() {
|
||||
conf_file=$(uci -q get ddnsmngr.global.configfile)
|
||||
if [ -n "${conf_file}" ]; then
|
||||
CONFIGFILE="${conf_file}"
|
||||
fi
|
||||
|
||||
if [ ! -f "${CONFIGFILE}" ]; then
|
||||
log "${CONFIGFILE} not found, can't stop services if running any"
|
||||
fi
|
||||
|
||||
"$PROG" -c "${CONFIGFILE}" -- stop
|
||||
return 0
|
||||
}
|
||||
|
||||
add_ddnsmngr_triggers() {
|
||||
procd_open_trigger
|
||||
for intf in $CLIENT_INTFS; do
|
||||
# No need to handle other ifevents like ifupdate etc
|
||||
procd_add_interface_trigger "interface.*.up" $intf /etc/init.d/ddnsmngr restart
|
||||
procd_add_interface_trigger "interface.*.down" $intf /etc/init.d/ddnsmngr restart
|
||||
done
|
||||
procd_close_trigger
|
||||
}
|
||||
311
ddnsmngr/files/usr/lib/inadyn/ddnsmngr_service.sh
Normal file
311
ddnsmngr/files/usr/lib/inadyn/ddnsmngr_service.sh
Normal file
@@ -0,0 +1,311 @@
|
||||
#!/bin/sh
|
||||
|
||||
PROG="/usr/sbin/inadyn"
|
||||
CONFIGPATH="/tmp/inadyn_config"
|
||||
PIDPATH="/etc/inadyn_pid"
|
||||
CLIENT_INTFS=""
|
||||
CONFIG_FILES=""
|
||||
SERVER_PATH="/etc/ddnsmngr/servers"
|
||||
|
||||
FORMAT="custom [SECTION] {\n\tusername\t= [USER]\n\tpassword\t= [PWD]\n\tddns-server\t= [SERV]\n\tddns-path\t= [URI]\n\tssl\t\t= [SSL]\n\thostname\t= [NAME]\n\tcheckip-command\t= [CMD]\n\tddns-response\t= [RESPONSES]\n}"
|
||||
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
log() {
|
||||
echo "$*"|logger -t ddnsmngr.init -p debug
|
||||
}
|
||||
|
||||
get_service_data() {
|
||||
local provider="$1"
|
||||
shift
|
||||
local dir="$1"
|
||||
shift
|
||||
local ipv6="$1"
|
||||
shift
|
||||
|
||||
local name data url answer script
|
||||
|
||||
[ $# -ne 2 ] && {
|
||||
return 1
|
||||
}
|
||||
|
||||
[ -f "${dir}/${provider}.json" ] || {
|
||||
eval "$1=\"\""
|
||||
eval "$2=\"\""
|
||||
return 1
|
||||
}
|
||||
|
||||
json_load_file "${dir}/${provider}.json"
|
||||
json_get_var name "name"
|
||||
if [ "$ipv6" -eq "1" ]; then
|
||||
json_select "ipv6"
|
||||
else
|
||||
json_select "ipv4"
|
||||
fi
|
||||
json_get_var data "url"
|
||||
json_get_var answer "answer"
|
||||
json_select ".."
|
||||
json_cleanup
|
||||
|
||||
response=""
|
||||
if [ -n "${answer}" ]; then
|
||||
answer=$(echo "${answer}" | sed 's/|/ /g')
|
||||
for ans in $answer; do
|
||||
if [ -z "${response}" ]; then
|
||||
response="${ans}"
|
||||
else
|
||||
response="${response}, ${ans}"
|
||||
fi
|
||||
done
|
||||
response="{ ${response} }"
|
||||
fi
|
||||
|
||||
eval "$1=\"$data\""
|
||||
eval "$2=\"$response\""
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
generate_inadyn_config() {
|
||||
json_load "${1}"
|
||||
json_get_var service_name service_name
|
||||
json_get_var use_ipv6 use_ipv6
|
||||
json_get_var interface interface
|
||||
json_get_var username username
|
||||
json_get_var password password
|
||||
json_get_var host lookup_host
|
||||
json_get_var conf_file config_file
|
||||
json_get_var conf_dir config_dir
|
||||
json_get_var server_address server_address
|
||||
json_cleanup
|
||||
|
||||
if [ -z "${service_name}" ] || [ -z "${host}" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${conf_file}" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${conf_dir}" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# First look into custom path to load the url otherwise default path
|
||||
get_service_data "${service_name}" "${SERVER_PATH}" "${use_ipv6}" server_url server_answer
|
||||
|
||||
if [ -z "${server_url}" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Need to pick proto, server address and request uri separately from the url
|
||||
# format http://[server_address]/[update_Request_uri]
|
||||
proto=$(echo $server_url | cut -d':' -f 1)
|
||||
serv=$(echo $server_url | cut -d'/' -f 3 | cut -d'@' -f 2)
|
||||
uri=${server_url#*$serv}
|
||||
|
||||
if [ -z $proto ] || [ -z $serv ] || [ -z $uri ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
path=$(echo "$uri" | sed 's/&/\\&/g')
|
||||
update_uri=$(echo $path | sed -e "s#\[DOMAIN\]#%h#g" -e "s#\[PASSWORD\]#%p#g" \
|
||||
-e "s#\[USERNAME\]#%u#g" -e "s#\[IP\]#%i#g")
|
||||
|
||||
if [ -z "${interface}" ]; then
|
||||
if [ "${use_ipv6}" -eq 0 ]; then
|
||||
interface="wan"
|
||||
else
|
||||
interface="wan6"
|
||||
fi
|
||||
fi
|
||||
|
||||
# now get the physical interface name
|
||||
intf=$(ifstatus "${interface}" | jsonfilter -e '@.device')
|
||||
if [ -z "${intf}" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# command to get ip of the interface
|
||||
if [ "${use_ipv6}" -eq 0 ]; then
|
||||
get_ip="\"ifstatus ${interface} | jsonfilter -e '@[\\\\\"ipv4-address\\\\\"][0].address'\""
|
||||
else
|
||||
get_ip="\"ifstatus ${interface} | jsonfilter -e '@[\\\\\"ipv6-address\\\\\"][0].address'\""
|
||||
fi
|
||||
|
||||
if [ "${proto}" = "http" ]; then
|
||||
ssl="false"
|
||||
else
|
||||
ssl="true"
|
||||
fi
|
||||
|
||||
inadyn_ver=$(inadyn -v)
|
||||
user_agent="inadyn/${inadyn_ver}"
|
||||
|
||||
config_file="${conf_dir}/${conf_file}"
|
||||
touch "${config_file}"
|
||||
|
||||
echo "iface = ${intf}" > "${config_file}"
|
||||
echo "period = 600" >> "${config_file}"
|
||||
echo "user-agent = ${user_agent}" >> "${config_file}"
|
||||
|
||||
if [ "${use_ipv6}" -eq 1 ]; then
|
||||
echo "allow-ipv6 = true" >> "${config_file}"
|
||||
fi
|
||||
|
||||
if [ -z "${password}" ]; then
|
||||
FORMAT=$(echo "${FORMAT}" | sed 's/\\tpassword\\t= \[PWD\]\\n//g')
|
||||
fi
|
||||
|
||||
if [ -z "${server_answer}" ]; then
|
||||
FORMAT=$(echo "${FORMAT}" | sed 's/\\tddns-response\\t= \[RESPONSES\]\\n//g')
|
||||
fi
|
||||
|
||||
config=$(echo $FORMAT | sed -e "s#\[SECTION\]#$conf_file#g" -e "s#\[PWD\]#$password#g" \
|
||||
-e "s#\[USER\]#$username#g" -e "s#\[SERV\]#$serv#g" \
|
||||
-e "s#\[URI\]#\"$update_uri\"#g" -e "s#\[SSL\]#$ssl#g" \
|
||||
-e "s#\[NAME\]#$host#g" -e "s#\[CMD\]#$get_ip#g" \
|
||||
-e "s#\[RESPONSES\]#$server_answer#g")
|
||||
|
||||
echo -e "\n\n${config}" >> "${config_file}"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
validate_host_section() {
|
||||
uci_validate_section ddnsmngr host "${1}" \
|
||||
'enabled:bool:0' \
|
||||
'lookup_host:string' \
|
||||
'dm_parent:string'
|
||||
}
|
||||
|
||||
validate_client_section() {
|
||||
uci_validate_section ddnsmngr client "${1}" \
|
||||
'enabled:bool:0' \
|
||||
'service_name:string' \
|
||||
'interface:string' \
|
||||
'ip_network:string' \
|
||||
'username:string' \
|
||||
'password:string' \
|
||||
'use_https:bool:0' \
|
||||
'force_dnstcp:bool:0' \
|
||||
'use_ipv6:bool:0' \
|
||||
'force_ipversion:bool:0'
|
||||
}
|
||||
|
||||
add_object() {
|
||||
local enabled lookup_host dm_parent use_ipv6 force_ipversion
|
||||
local service_name interface ip_network username password use_https force_dnstcp
|
||||
|
||||
validate_host_section "${1}" || {
|
||||
log "Validation of host section failed"
|
||||
return
|
||||
}
|
||||
|
||||
if [ "${enabled}" -ne 1 ] || [ -z "${dm_parent}" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
validate_client_section "${dm_parent}" || {
|
||||
log "Validation of client section failed"
|
||||
return
|
||||
}
|
||||
|
||||
if [ "${enabled}" -ne 1 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
service_name=$(uci -q get ddnsmngr.${dm_parent}.service_name)
|
||||
if [ -z "${service_name}" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
service_section=$(uci show ddnsmngr | grep "service=\'${service_name}\'" | cut -d'.' -f 2 | head -1)
|
||||
if [ -z "${service_section}" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
service_enabled=$(uci -q get ddnsmngr.${service_section}.enabled)
|
||||
if [ "${service_enabled}" -ne 1 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
json_init
|
||||
json_add_string "interface" "${interface}"
|
||||
json_add_string "service_name" "${service_name}"
|
||||
json_add_string "username" "${username}"
|
||||
json_add_string "password" "${password}"
|
||||
json_add_string "lookup_host" "${lookup_host}"
|
||||
json_add_string "ip_network" "${ip_network}"
|
||||
json_add_string "use_ipv6" "${use_ipv6}"
|
||||
json_add_string "force_ipversion" "${force_ipversion}"
|
||||
json_add_string "use_https" "${use_https}"
|
||||
json_add_string "force_dnstcp" "${force_dnstcp}"
|
||||
json_add_string "config_file" "${1}"
|
||||
json_add_string "config_dir" "${CONFIGPATH}"
|
||||
|
||||
json_str=$(json_dump)
|
||||
json_cleanup
|
||||
|
||||
generate_inadyn_config "${json_str}"
|
||||
|
||||
if [ "$?" -ne 0 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
CONFIG_FILES="${CONFIG_FILES} ${1}"
|
||||
|
||||
if [ -z "${interface}" ]; then
|
||||
if [ "${use_ipv6}" -eq 0 ]; then
|
||||
interface="wan"
|
||||
else
|
||||
interface="wan6"
|
||||
fi
|
||||
fi
|
||||
|
||||
for intf in $CLIENT_INTFS; do
|
||||
if [ "${intf}" == "${interface}" ]; then
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
CLIENT_INTFS="${CLIENT_INTFS} ${interface}"
|
||||
}
|
||||
|
||||
start_ddnsmngr_service() {
|
||||
rm -rf $CONFIGPATH
|
||||
mkdir $CONFIGPATH
|
||||
mkdir -p $PIDPATH
|
||||
|
||||
config_load ddnsmngr
|
||||
config_foreach add_object host
|
||||
|
||||
i=1
|
||||
for conf in $CONFIG_FILES; do
|
||||
instance="ddnsmngr_${i}"
|
||||
i=$(( i + 1 ))
|
||||
|
||||
procd_open_instance $instance
|
||||
procd_set_param command "$PROG"
|
||||
procd_append_param command -f "${CONFIGPATH}/${conf}"
|
||||
procd_append_param command -l debug
|
||||
procd_append_param command -P "${PIDPATH}/${conf}"
|
||||
procd_append_param command -n -C
|
||||
procd_close_instance
|
||||
done
|
||||
}
|
||||
|
||||
stop_ddnsmngr_service() {
|
||||
rm -rf $CONFIGPATH
|
||||
return 0
|
||||
}
|
||||
|
||||
add_ddnsmngr_triggers() {
|
||||
procd_open_trigger
|
||||
for intf in $CLIENT_INTFS; do
|
||||
# No need to handle other ifevents like ifupdate etc
|
||||
procd_add_interface_trigger "interface.*.up" $intf /etc/init.d/ddnsmngr restart
|
||||
done
|
||||
procd_close_trigger
|
||||
}
|
||||
@@ -2,6 +2,6 @@ menu "Configuration"
|
||||
|
||||
config DECOLLECTOR_EASYMESH_VERSION
|
||||
int "Support Easymesh version"
|
||||
default 2
|
||||
default 4
|
||||
|
||||
endmenu
|
||||
@@ -4,38 +4,41 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wfadatad
|
||||
PKG_VERSION:=4.0.1.7
|
||||
PKG_NAME:=decollector
|
||||
PKG_VERSION:=4.2.1.4
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=b165177f12b2cef129f36bff1be077b65fbc86aa
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfadatad.git
|
||||
PKG_SOURCE_VERSION:=c18d0f411eea6974fc99dd9e717269087e75e874
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/wfadatad-collector
|
||||
define Package/decollector
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=WiFi DataElements Collector Proxy
|
||||
DEPENDS:=+libuci +libubox +ubus +libpthread +libnl-genl \
|
||||
+libeasy +libwifiutils +libieee1905 +map-plugin
|
||||
+libeasy +libwifiutils +libieee1905 +ieee1905-map-plugin
|
||||
endef
|
||||
|
||||
define Package/wfadatad-collector/description
|
||||
It implements the WiFi DataElements Collector Proxy component.
|
||||
define Package/decollector/description
|
||||
It implements the WiFi DataElements Agent as defined in the Wi-Fi Alliance's
|
||||
DataElements specification.
|
||||
endef
|
||||
|
||||
|
||||
define Package/wfadatad-collector/config
|
||||
define Package/decollector/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
@@ -54,7 +57,7 @@ TARGET_CFLAGS += \
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -r --exclude=.* ~/git/wfadatad/ $(PKG_BUILD_DIR)/
|
||||
rsync -r --exclude=.* ~/git/decollector/ $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -63,15 +66,15 @@ MAKE_PATH:=src
|
||||
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_DECOLLECTOR_EASYMESH_VERSION)
|
||||
|
||||
EXECS := \
|
||||
$(if $(CONFIG_PACKAGE_wfadatad-collector),decollector)
|
||||
$(if $(CONFIG_PACKAGE_decollector),decollector)
|
||||
|
||||
MAKE_FLAGS += EXECS="$(EXECS)"
|
||||
|
||||
define Package/wfadatad-collector/install
|
||||
define Package/decollector/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) ./files/decollector.init $(1)/etc/init.d/decollector
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/decollector $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,wfadatad-collector))
|
||||
$(eval $(call BuildPackage,decollector))
|
||||
@@ -7,7 +7,7 @@ USE_PROCD=1
|
||||
PROG=/usr/sbin/decollector
|
||||
|
||||
service_running() {
|
||||
ubus -t 2 wait_for ieee1905 ieee1905.map topology
|
||||
ubus -t 2 wait_for ieee1905 ieee1905.map
|
||||
}
|
||||
|
||||
start_service() {
|
||||
@@ -17,10 +17,13 @@ start_service() {
|
||||
|
||||
config_load mapcontroller
|
||||
config_get en controller enabled "0"
|
||||
config_get collect_int controller de_collect_interval
|
||||
|
||||
[ -n "$collect_int" -a $collect_int -lt 30 ] && collect_int=""
|
||||
|
||||
[ $en -gt 0 ] && {
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" "-d"
|
||||
procd_set_param command "$PROG" "-d" "${collect_int:+-t $collect_int}"
|
||||
#procd_set_param stdout 1
|
||||
#procd_set_param stderr 1
|
||||
procd_set_param respawn
|
||||
@@ -1,20 +1,14 @@
|
||||
#
|
||||
# Copyright (C) 2021 IOPSYS Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dectmngr
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=3.5.7
|
||||
PKG_VERSION:=3.6.5
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=83f89a83cf860bbcf2b7f2e030215db315a5bbbf
|
||||
PKG_SOURCE_VERSION:=192e74db2082e3f89f6defe9d752d752b0b09079
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -34,7 +28,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=DECT Manager
|
||||
DEPENDS:= +libubox +ubus +uci +libxml2 +libjson-c
|
||||
DEPENDS:= +libubox +ubus +uci +libxml2 +libjson-c +gpiod-tools
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
|
||||
Binary file not shown.
@@ -6,31 +6,63 @@ START=70
|
||||
STOP=12
|
||||
|
||||
USE_PROCD=1
|
||||
NAME=dectmngr
|
||||
PROG=/usr/sbin/dectmngr
|
||||
LOG_PATH=/var/log/dectmngr
|
||||
DB_PATH=/etc/dect
|
||||
DCX81_UART_DT_ALIAS=/proc/device-tree/aliases/dcx81-uart
|
||||
|
||||
DECT_GPIO=$(db -q get hw.board.dect_gpio)
|
||||
DECT_GPIO="$(gpiofind DCX81_RSTN | cut -d ' ' -f 2 2>/dev/null)"
|
||||
|
||||
# Ask dectmngr to exit nicely and wait for it to clean up, which is a slow process.
|
||||
stop_and_wait_dectmngr() {
|
||||
pidof $NAME && killall -q $NAME
|
||||
dect_pid=$(pidof $PROG)
|
||||
[ -n "$dect_pid" ] && kill $dect_pid
|
||||
|
||||
pidof $NAME && sleep 2 # wait for the process to stop gracefully
|
||||
while pidof $NAME; do
|
||||
killall -q -9 $NAME
|
||||
pidof $PROG > /dev/null 2>&1 && sleep 2 # wait for the process to stop gracefully
|
||||
while pidof $PROG > /dev/null 2>&1; do
|
||||
dect_pid=$(pidof $PROG)
|
||||
[ -n "$dect_pid" ] && kill -9 $dect_pid
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
has_dect() {
|
||||
[ -f "$DCX81_UART_DT_ALIAS" ]
|
||||
}
|
||||
|
||||
get_dcx81_device() {
|
||||
readonly dcx81_uart_dt_node="/proc/device-tree/$(cat "$DCX81_UART_DT_ALIAS" 2>/dev/null)"
|
||||
[ -e "$dcx81_uart_dt_node" ] || return 1
|
||||
for tty_dt_node in /sys/class/tty/*/device/of_node; do
|
||||
if [ "$tty_dt_node" -ef "$dcx81_uart_dt_node" ]; then
|
||||
readonly uevent_file="${tty_dt_node%%/device/of_node}/uevent"
|
||||
local device_name_line
|
||||
device_name_line="$(grep '^DEVNAME=' "$uevent_file")" || return 1
|
||||
readonly device="/dev/${device_name_line##DEVNAME=}"
|
||||
[ -c "$device" ] || return 1
|
||||
printf "%s" "$device"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local opt_ext=
|
||||
local rfpi=
|
||||
local model_id=
|
||||
local rxtun=
|
||||
|
||||
test $(db get hw.board.hasDect) = "0" && return
|
||||
if ! has_dect; then
|
||||
logger -t "$PROG" "Not starting because no DECT hardware is available."
|
||||
return 0
|
||||
fi
|
||||
|
||||
local dcx81_uart_device
|
||||
if ! dcx81_uart_device="$(get_dcx81_device)"; then
|
||||
logger -t "$PROG" -p daemon.warning "Could not determine DCX81 UART device. Falling back to default ttyH0."
|
||||
dcx81_uart_device=/dev/ttyH0
|
||||
fi
|
||||
|
||||
[ -n "$DECT_GPIO" ] && echo 1 > /sys/class/gpio/gpio${DECT_GPIO}/value
|
||||
|
||||
@@ -51,18 +83,25 @@ start_service() {
|
||||
config_get log_dect_cmbs global log_dect_cmbs syslog
|
||||
|
||||
procd_open_instance
|
||||
if [ "$log_dect_cmbs" = "none" ]; then
|
||||
|
||||
# dectmngr takes expects device without /dev
|
||||
readonly dcx81_uart_device_wo_dev="${dcx81_uart_device##/dev/}"
|
||||
case "$log_dect_cmbs" in
|
||||
none)
|
||||
echo "Starting dectmngr with cmbs logging disabled"
|
||||
procd_set_param command $PROG -comname ttyH0 $opt_ext
|
||||
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" $opt_ext
|
||||
rm -f $LOG_PATH/*
|
||||
elif [ "$log_dect_cmbs" = "file" ]; then
|
||||
;;
|
||||
file)
|
||||
echo "Starting dectmngr with cmbs logging enabled to file"
|
||||
procd_set_param command $PROG -comname ttyH0 -log $LOG_PATH/dect-cmbs.log $opt_ext
|
||||
else
|
||||
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" -log $LOG_PATH/dect-cmbs.log $opt_ext
|
||||
;;
|
||||
*)
|
||||
echo "Starting dectmngr with cmbs logging enabled to syslog"
|
||||
procd_set_param command $PROG -comname ttyH0 -syslog $opt_ext
|
||||
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" -syslog $opt_ext
|
||||
rm -f $LOG_PATH/*
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
procd_set_param respawn 6 2 3
|
||||
procd_set_param term_timeout 20
|
||||
@@ -71,7 +110,7 @@ start_service() {
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
test $(db get hw.board.hasDect) = "0" && return
|
||||
has_dect || return 0
|
||||
|
||||
[ -n "$DECT_GPIO" ] && echo 0 > /sys/class/gpio/gpio${DECT_GPIO}/value
|
||||
stop_and_wait_dectmngr
|
||||
@@ -81,8 +120,7 @@ reload_service() {
|
||||
ubus call dect reload
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
service_triggers() {
|
||||
procd_add_config_trigger "config.change" "asterisk" /etc/init.d/dectmngr restart
|
||||
procd_add_config_trigger "config.change" "dect" /etc/init.d/dectmngr reload
|
||||
}
|
||||
@@ -97,4 +135,3 @@ boot() {
|
||||
[ ! -d $DB_PATH ] && mkdir -p $DB_PATH
|
||||
start
|
||||
}
|
||||
|
||||
|
||||
50
dnsmngr/Makefile
Normal file
50
dnsmngr/Makefile
Normal file
@@ -0,0 +1,50 @@
|
||||
#
|
||||
# Copyright (C) 2022-2024 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dnsmngr
|
||||
PKG_VERSION:=1.0.2
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dnsmngr.git
|
||||
PKG_SOURCE_VERSION:=3abb2b026c697b63f574bdc619e912e85ea55115
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../bbfdm/bbfdm.mk
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
define Package/dnsmngr
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +dnsmasq +umdns
|
||||
TITLE:=Package to add Device.DNS. datamodel support
|
||||
endef
|
||||
|
||||
define Package/dnsmngr/description
|
||||
Package to add Device.DNS. datamodel support.
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/dnsmngr/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/dnsmngr/install
|
||||
$(INSTALL_DIR) $(1)/etc/dnsmngr
|
||||
$(CP) $(PKG_BUILD_DIR)/src/libdnsmngr.so $(1)/etc/dnsmngr
|
||||
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/dnsmngr/input.json)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dnsmngr))
|
||||
17
dnsmngr/files/etc/dnsmngr/input.json
Executable file
17
dnsmngr/files/etc/dnsmngr/input.json
Executable file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"daemon": {
|
||||
"config": {
|
||||
"loglevel": "1"
|
||||
},
|
||||
"input": {
|
||||
"type": "DotSo",
|
||||
"name": "/etc/dnsmngr/libdnsmngr.so"
|
||||
},
|
||||
"output": {
|
||||
"type": "UBUS",
|
||||
"parent_dm": "Device.",
|
||||
"object": "DNS",
|
||||
"root_obj": "bbfdm"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2018 iopsys Software Solutions AB
|
||||
# Copyright (C) 2018-2024 iopsys Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@@ -8,14 +8,15 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dslmngr
|
||||
PKG_VERSION:=1.2.0
|
||||
PKG_VERSION:=1.2.3
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=bb754ae620a9fc66fd6fc0745f0fead0708c7a17
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dslmngr.git
|
||||
PKG_SOURCE_VERSION:=6009d4cdabc2fb6827a1dd6096a96e720e97750b
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/dslmngr.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -25,6 +26,7 @@ PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../bbfdm/bbfdm.mk
|
||||
|
||||
ifeq ($(CONFIG_TARGET_brcmbca),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
@@ -38,7 +40,7 @@ define Package/dslmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=XDSL status and configration utility
|
||||
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +libeasy
|
||||
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +libeasy +libbbfdm-api
|
||||
endef
|
||||
|
||||
define Package/dslmngr/description
|
||||
@@ -59,7 +61,7 @@ MAKE_FLAGS += \
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -r --exclude=.* ~/git/dslmngr/ $(PKG_BUILD_DIR)/
|
||||
rsync -r --exclude=.* ./dslmngr/ $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -68,12 +70,14 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/dslmngr/install
|
||||
$(INSTALL_DIR) $(1)/etc/dsl
|
||||
$(CP) ./files/common/* $(1)/
|
||||
ifeq ($(CONFIG_TARGET_brcmbca),y)
|
||||
$(CP) ./files/broadcom/* $(1)/
|
||||
endif
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dslmngr $(1)/sbin/
|
||||
$(CP) $(PKG_BUILD_DIR)/libbbfdsl.so $(1)/etc/dsl/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dslmngr))
|
||||
|
||||
@@ -302,6 +302,8 @@ xdsl_stop() {
|
||||
}
|
||||
|
||||
xdsl_init() {
|
||||
[ -d /sys/class/net/dsl0/ ] || exit
|
||||
|
||||
prioritize_arp
|
||||
|
||||
echo "Starting DSL"
|
||||
|
||||
17
dslmngr/files/common/etc/bbfdm/micro_services/dsl.json
Normal file
17
dslmngr/files/common/etc/bbfdm/micro_services/dsl.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"daemon": {
|
||||
"config": {
|
||||
"loglevel": "1"
|
||||
},
|
||||
"input": {
|
||||
"type": "DotSo",
|
||||
"name": "/etc/dsl/libbbfdsl.so"
|
||||
},
|
||||
"output": {
|
||||
"type": "UBUS",
|
||||
"parent_dm": "Device.",
|
||||
"root_obj": "bbfdm",
|
||||
"multiple_objects": ["DSL","PTM","ATM","FAST"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,17 +21,11 @@ start_service() {
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
[ -n "$DSLMNGR" ] && service_stop $DSLMNGR
|
||||
|
||||
xtm_remove_devices
|
||||
xdsl_stop
|
||||
}
|
||||
|
||||
boot() {
|
||||
local HASADSL="$(db -q get hw.board.hasAdsl)"
|
||||
local HASVDSL="$(db -q get hw.board.hasVdsl)"
|
||||
[ "$HASADSL" == "1" -o "$HASVDSL" == "1" ] || return
|
||||
|
||||
xdsl_init
|
||||
|
||||
start
|
||||
@@ -45,4 +39,3 @@ reload_service() {
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger dsl
|
||||
}
|
||||
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2020 iopsys Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=easy-soc-libs
|
||||
PKG_VERSION:=7.2.26
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=350793b45873480d8981dac540c4145705a7b7ba
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/easy-soc-libs
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=IOPSYS Easy SoC libraries
|
||||
SUBMENU:=IOPSYS Easy SoC libraries
|
||||
DEPENDS:=+libopenssl
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_brcmbca),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
TARGET_WIFI_TYPE=BROADCOM
|
||||
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
|
||||
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
|
||||
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
|
||||
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_x86),y)
|
||||
TARGET_PLATFORM=TEST
|
||||
TARGET_WIFI_TYPE=TEST
|
||||
TARGET_CFLAGS +=-DIOPSYS_TEST
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_armvirt),y)
|
||||
TARGET_PLATFORM=TEST
|
||||
TARGET_WIFI_TYPE=TEST
|
||||
TARGET_CFLAGS +=-DIOPSYS_TEST
|
||||
else ifeq ($(CONFIG_TARGET_airoha),y)
|
||||
TARGET_PLATFORM=ECONET
|
||||
TARGET_WIFI_TYPE=MEDIATEK MAC80211
|
||||
TARGET_CFLAGS +=-DIOPSYS_ECONET
|
||||
else ifeq ($(CONFIG_TARGET_ipq95xx),y)
|
||||
TARGET_PLATFORM=IPQ95XX
|
||||
TARGET_WIFI_TYPE=MAC80211
|
||||
TARGET_CFLAGS +=-DIPQ95XX
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_mediatek),y)
|
||||
TARGET_PLATFORM=LINUX
|
||||
TARGET_WIFI_TYPE=MAC80211
|
||||
TARGET_CFLAGS +=-DIOPSYS_LINUX
|
||||
else
|
||||
$(info Unexpected CONFIG_TARGET, use default MAC80211)
|
||||
TARGET_PLATFORM=MAC80211
|
||||
TARGET_WIFI_TYPE=MAC80211
|
||||
TARGET_CFLAGS +=-DIOPSYS_MAC80211
|
||||
endif
|
||||
|
||||
subdirs := \
|
||||
$(if $(CONFIG_PACKAGE_libeasy),libeasy) \
|
||||
$(if $(CONFIG_PACKAGE_libwifiutils),libwifi) \
|
||||
$(if $(CONFIG_PACKAGE_libwifi),libwifi) \
|
||||
$(if $(CONFIG_PACKAGE_libdsl),libdsl) \
|
||||
$(if $(CONFIG_PACKAGE_libethernet),libethernet) \
|
||||
$(if $(CONFIG_PACKAGE_libqos),libqos)
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_libwifi),)
|
||||
TARGET_CFLAGS +=-DHAS_WIFI
|
||||
endif
|
||||
|
||||
esl-pkgs := \
|
||||
$(if $(CONFIG_PACKAGE_libeasy),libeasy) \
|
||||
$(if $(CONFIG_PACKAGE_libwifiutils),libwifiutils) \
|
||||
$(if $(CONFIG_PACKAGE_libwifi),libwifi) \
|
||||
$(if $(CONFIG_PACKAGE_libdsl),libdsl) \
|
||||
$(if $(CONFIG_PACKAGE_libethernet),libethernet) \
|
||||
$(if $(CONFIG_PACKAGE_libqos),libqos)
|
||||
|
||||
esl-pkgs-all := \
|
||||
libeasy \
|
||||
libwifiutils \
|
||||
libwifi \
|
||||
libdsl \
|
||||
libethernet \
|
||||
libqos
|
||||
|
||||
ifeq ($(CONFIG_LIBWIFI_USE_CTRL_IFACE),y)
|
||||
TARGET_CFLAGS +=-DLIBWIFI_USE_CTRL_IFACE
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/openssl \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3
|
||||
|
||||
MAKE_FLAGS += \
|
||||
CFLAGS="$(TARGET_CFLAGS) -Wall -I./" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
FPIC="$(FPIC)" \
|
||||
PLATFORM="$(TARGET_PLATFORM)" \
|
||||
WIFI_TYPE="$(TARGET_WIFI_TYPE)" \
|
||||
subdirs="$(subdirs)"
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -r --exclude=.* ~/git/easy-soc-libs/ $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
include easy.mk
|
||||
include wifi.mk
|
||||
include dsl.mk
|
||||
include ethernet.mk
|
||||
include qos.mk
|
||||
|
||||
ifneq ($(wildcard $(PKG_BUILD_DIR)/.config_*),\
|
||||
$(PKG_BUILD_DIR)/.config_$(patsubst "%",%,$(CONFIG_TARGET_PROFILE)))
|
||||
define Build/Compile/rebuild
|
||||
$(FIND) $(PKG_BUILD_DIR) -name \*.o -or -name \*.so\* | $(XARGS) rm -f;
|
||||
$(if $(wildcard $(PKG_BUILD_DIR)/config_*), \
|
||||
rm -f $(PKG_BUILD_DIR)/.config_*)
|
||||
endef
|
||||
endif
|
||||
|
||||
STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell echo $(TARGET_CFLAGS) | mkhash md5)
|
||||
|
||||
define Build/Compile
|
||||
$(Build/Compile/rebuild)
|
||||
touch $(PKG_BUILD_DIR)/.config_$(CONFIG_TARGET_PROFILE)
|
||||
$(call Build/Compile/Default)
|
||||
$(foreach dir,$(esl-pkgs),$(call Build/Compile/$(dir)))
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(foreach dir,$(esl-pkgs),$(call Build/InstallDev/$(dir),$(1),$(2));)
|
||||
endef
|
||||
|
||||
define Package/easy-soc-libs/install
|
||||
:
|
||||
endef
|
||||
|
||||
$(eval $(foreach e,$(esl-pkgs-all),$(call BuildPackage,$(e))))
|
||||
@@ -1,44 +0,0 @@
|
||||
|
||||
define Package/libdsl
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= xDSL library (libdsl)
|
||||
endef
|
||||
|
||||
define Package/libdsl/config
|
||||
if PACKAGE_libdsl
|
||||
config LIBDSL_DEBUG
|
||||
depends on PACKAGE_libdsl
|
||||
bool "Enable dsl debugging"
|
||||
default n
|
||||
|
||||
config LIBDSL_TEST
|
||||
depends on PACKAGE_libdsl
|
||||
bool "Enable dsl test program"
|
||||
default n
|
||||
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libdsl
|
||||
$(INSTALL_DIR) $(1)/usr/include/xdsl
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/xdsl.h $(1)/usr/include/xdsl
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/xtm.h $(1)/usr/include/xdsl
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/common.h $(1)/usr/include/xdsl
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/libdsl.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_LIBDSL_TEST),y)
|
||||
define Build/Compile/libdsl
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)/libdsl/test" $(MAKE_FLAGS)
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/libdsl/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/libdsl.so* $(1)/usr/lib/
|
||||
ifeq ($(CONFIG_LIBDSL_TEST),y)
|
||||
$(CP) $(PKG_BUILD_DIR)/libdsl/test/libdsl_test $(1)/usr/bin/
|
||||
endif
|
||||
endef
|
||||
@@ -1,25 +0,0 @@
|
||||
|
||||
|
||||
define Package/libeasy
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= Common helper functions library (libeasy)
|
||||
DEPENDS+=+libnl +libnl-route
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libeasy
|
||||
$(INSTALL_DIR) $(1)/usr/include/easy
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/easy.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/event.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/utils.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/if_utils.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/debug.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/hlist.h $(1)/usr/include/easy/
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/libeasy*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libeasy/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libeasy/libeasy*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
|
||||
define Package/libethernet
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= Ethernet library (libethernet)
|
||||
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_airoha:ecnt_api
|
||||
endef
|
||||
|
||||
define Package/libethernet/config
|
||||
config LIBETHERNET_DEBUG
|
||||
depends on PACKAGE_libethernet
|
||||
bool "Enable ethernet debugging"
|
||||
default n
|
||||
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libethernet
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libethernet/ethernet.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/libethernet/libethernet.so $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libethernet/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libethernet/libethernet.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
|
||||
define Package/libqos
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= QoS library (libqos)
|
||||
DEPENDS+=+libnl +libnl-route +libeasy
|
||||
endef
|
||||
|
||||
define Package/libqos/config
|
||||
config LIBQOS_DEBUG
|
||||
depends on PACKAGE_libqos
|
||||
bool "Enable qos debugging"
|
||||
default n
|
||||
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libqos
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libqos/include/qos.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/libqos/libqos.so $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libqos/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libqos/libqos*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
|
||||
define Package/libwifiutils
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= WiFi utility library (libwifiutils.so)
|
||||
DEPENDS+=+libnl +libnl-route +libeasy
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libwifiutils
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/wifidefs.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/wifiutils.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifiutils*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libwifiutils/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifiutils*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
|
||||
define Package/libwifi
|
||||
$(call Package/easy-soc-libs)
|
||||
TITLE:= WiFi library (libwifi)
|
||||
DEPENDS+=+libnl +libnl-route +libeasy +libwifiutils +TARGET_brcmbca:bcmkernel
|
||||
endef
|
||||
|
||||
define Package/libwifi/config
|
||||
if PACKAGE_libwifi
|
||||
config LIBWIFI_DEBUG
|
||||
depends on PACKAGE_libwifi
|
||||
bool "Enable debugging in libwifi"
|
||||
default n
|
||||
|
||||
config LIBWIFI_USE_CTRL_IFACE
|
||||
bool "Create UNIX sockets to interface with hostapd/wpa_supplicant"
|
||||
default n
|
||||
endif
|
||||
endef
|
||||
|
||||
|
||||
define Build/InstallDev/libwifi
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/wifiops.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/wifi.h $(1)/usr/include/
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi-7*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libwifi/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi-7*.so* $(1)/usr/lib/
|
||||
endef
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
config ENDPT_OPEN
|
||||
bool "Use pre-compiled version for Open SDK"
|
||||
default n
|
||||
@@ -1,68 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2018 IOPSYS Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=endptmngr
|
||||
PKG_VERSION:=0.6
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
|
||||
PKG_SOURCE_VERSION:=fb85081443c19b5062bede49c80b1802c0f05d34
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
export BUILD_DIR
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
# All config variable that are passed to the make invocation, directly or
|
||||
# indirectly. This ensures that the package is rebuilt on config-changes.
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
|
||||
|
||||
export CONFIG_BCM_CHIP_ID
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/endptmngr/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/endptmngr
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Broadcom Voice Endpoint Manager
|
||||
URL:=
|
||||
DEPENDS:= +libubox +ubus +libpicoevent +uci +bcmkernel @TARGET_HAS_VOICE @BCM_VOICE
|
||||
endef
|
||||
|
||||
define Package/endptmngr/description
|
||||
endptmngr
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -av --exclude=.* ~/git/endptmngr/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-Wall \
|
||||
-Werror
|
||||
|
||||
define Package/endptmngr/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/endptmngr $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,endptmngr))
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=68
|
||||
STOP=12
|
||||
|
||||
USE_PROCD=1
|
||||
NAME=endptmngr
|
||||
|
||||
start_service() {
|
||||
[ "$(db -q get hw.board.hasVoice)" = "1" ] || return
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param env hw_board_hasDect=$(db get hw.board.hasDect)
|
||||
procd_set_param command $NAME
|
||||
procd_set_param respawn "5" "0" "3"
|
||||
procd_set_param nice -12
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger asterisk
|
||||
}
|
||||
9
ethmngr/Config.in
Normal file
9
ethmngr/Config.in
Normal file
@@ -0,0 +1,9 @@
|
||||
if (PACKAGE_ethmngr)
|
||||
|
||||
menu "Configurations"
|
||||
|
||||
config TR181_VENDOR_EXTENSIONS_MACVLAN
|
||||
bool "Use TR181 vendor extension MACVLAN"
|
||||
default y
|
||||
endmenu
|
||||
endif
|
||||
@@ -1,29 +1,33 @@
|
||||
#
|
||||
# Copyright (C) 2020 Iopsys
|
||||
# Copyright (C) 2020-2024 Iopsys
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ethmngr
|
||||
PKG_VERSION:=2.1.0
|
||||
PKG_VERSION:=2.1.4
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=5a0ff3bc7c49dcb05129f423ef8e0c4929f6aa03
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ethmngr.git
|
||||
|
||||
PKG_SOURCE_VERSION:=a64e2775a3931f4e4624c9314658132ae9b7c5e3
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/ethmngr.git
|
||||
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../bbfdm/bbfdm.mk
|
||||
|
||||
define Package/ethmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Ethernet status and configration utility
|
||||
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_iopsys_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl
|
||||
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_ipq53xx||TARGET_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl +libeasy +libbbfdm-api
|
||||
endef
|
||||
|
||||
define Package/ethmngr/description
|
||||
@@ -32,29 +36,42 @@ define Package/ethmngr/description
|
||||
It uses APIs from the libethernet.so library.
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ./ethmngr/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-D_GNU_SOURCE
|
||||
-D_GNU_SOURCE \
|
||||
-DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
|
||||
|
||||
ifeq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_iopsys_mediatek),)
|
||||
ifeq ($(CONFIG_TR181_VENDOR_EXTENSIONS_MACVLAN),y)
|
||||
TARGET_CFLAGS += -DTR181_VENDOR_EXTENSIONS_MACVLAN
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_ipq53xx)$(CONFIG_TARGET_mediatek),)
|
||||
define Build/Compile
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/ethmngr/install
|
||||
$(CP) ./files/common/* $(1)/
|
||||
ifneq ($(CONFIG_TARGET_brcmbca),)
|
||||
$(CP) ./files/broadcom/* $(1)/
|
||||
else ifneq ($(CONFIG_TARGET_airoha),)
|
||||
$(CP) ./files/airoha/* $(1)/
|
||||
else
|
||||
$(CP) ./files/linux/* $(1)/
|
||||
endif
|
||||
ifneq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_iopsys_mediatek),)
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/etc/ethmngr
|
||||
$(INSTALL_DIR) $(1)/etc/ethmngr/plugins
|
||||
ifneq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_ipq53xx)$(CONFIG_TARGET_mediatek),)
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethmngr $(1)/usr/sbin/
|
||||
endif
|
||||
$(CP) $(PKG_BUILD_DIR)/libbbfethernet.so $(1)/etc/ethmngr
|
||||
$(CP) $(PKG_BUILD_DIR)/libbbfethernetmacvlan.so $(1)/etc/ethmngr/plugins
|
||||
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/bbfdm/micro_services/ethernet.json)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ethmngr))
|
||||
|
||||
@@ -1,208 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
unset -f switchmgr
|
||||
# alias for switchmgr
|
||||
switchmgr() {
|
||||
"/userfs/bin/switchmgr" "$@"
|
||||
}
|
||||
|
||||
unset -f tc3162_get_lan_port
|
||||
# get lan port port by ifname
|
||||
# arg1: port ifname, ex: eth0.1
|
||||
tc3162_get_lan_port() {
|
||||
[[ -z "$1" ]] && return 255
|
||||
|
||||
local ifname="$1"
|
||||
local if_idx=255
|
||||
|
||||
# only for tc3162 eth switch ports (eth0.x, 0 < x < 7)
|
||||
case "${ifname}" in
|
||||
eth0.*)
|
||||
;;
|
||||
*)
|
||||
logger -t "port-management" \
|
||||
"unsupported - ${ifname} is not tc3162 switch port"
|
||||
return 255
|
||||
;;
|
||||
esac
|
||||
|
||||
let "if_idx=$(echo "${ifname}" | cut -f2 -d'.')"
|
||||
[[ -z "${if_idx}" ]] && return 255
|
||||
[[ ${if_idx} -lt 1 || ${if_idx} -gt 6 ]] && {
|
||||
logger -t "port-management" \
|
||||
"incorrect tc3162 lan port index ${if_idx} picked from ifname ${ifname}"
|
||||
return 255
|
||||
}
|
||||
let "if_idx=${if_idx}-1"
|
||||
return ${if_idx}
|
||||
}
|
||||
|
||||
|
||||
unset -f tc3162_get_mapped_port
|
||||
# get mapped switch port by ifname
|
||||
# arg1: port ifname, ex: eth0.1
|
||||
tc3162_get_mapped_port() {
|
||||
[[ -z "$1" ]] && return 255
|
||||
|
||||
local ifname="$1"
|
||||
local if_idx=255
|
||||
local prtmap_procfile="/proc/tc3162/eth_portmap"
|
||||
local lan_prt=255
|
||||
local port=255
|
||||
local prtmap_out_line_num=4
|
||||
local prtmap_out_line=""
|
||||
|
||||
# check "lan port map" marker in portmap output string
|
||||
prtmap_out_line="$(sed -n "${prtmap_out_line_num}p" ${prtmap_procfile})"
|
||||
[[ ${prtmap_out_line} != "lan_port_map" ]] && return 255
|
||||
|
||||
tc3162_get_lan_port "${ifname}"
|
||||
let "if_idx=$?"
|
||||
[[ -z "${if_idx}" || ${if_idx} -eq 255 ]] && return
|
||||
|
||||
# get lan portmapping string "lan_port mapped_port" for ifname by it's index
|
||||
let "prtmap_out_line_num=${prtmap_out_line_num}+1+${if_idx}"
|
||||
prtmap_out_line="$(sed -n "${prtmap_out_line_num}p" ${prtmap_procfile})"
|
||||
|
||||
# get and check lan port index from lan portmapping string
|
||||
lan_prt=$(echo "${prtmap_out_line}" | cut -f 1 -d' ')
|
||||
[[ -z "${lan_prt}" || "${if_idx}" != "${lan_prt}" ]] && return 255
|
||||
|
||||
# get and check mapped port from lan portmapping string
|
||||
let "port=$(echo "${prtmap_out_line}" | cut -f 2 -d' ')"
|
||||
[[ ${port} -lt 0 || ${port} -gt 255 ]] && return 255
|
||||
|
||||
return ${port}
|
||||
}
|
||||
|
||||
unset -f get_max_port_speed
|
||||
# arg1: port ifname, ex: eth0.1
|
||||
get_max_port_speed() {
|
||||
[[ -z "$1" ]] && { echo 0; return; }
|
||||
|
||||
local ifname="$1"
|
||||
local port=255
|
||||
local speed=0
|
||||
|
||||
[[ -d "/sys/class/net/${ifname}" ]] || {
|
||||
logger -t "port-management" "interface ${ifname} is not found"
|
||||
return
|
||||
}
|
||||
|
||||
tc3162_get_lan_port "${ifname}"
|
||||
let "port=$?"
|
||||
[[ -z "${port}" || ${port} -eq 255 ]] && return
|
||||
|
||||
# tc3162 capability for all ports is 1Gbps
|
||||
speed=1000
|
||||
|
||||
echo $speed
|
||||
}
|
||||
|
||||
unset -f power_updown
|
||||
# arg1: port ifname, ex: eth0.1
|
||||
# arg2: port enabled, ex: 0/1/off/on/..
|
||||
power_updown() {
|
||||
[[ -z "$1" ]] && return
|
||||
[[ -z "$2" ]] && return
|
||||
|
||||
local ifname="$1"
|
||||
local enabled="$2"
|
||||
local port=255
|
||||
|
||||
[[ -d "/sys/class/net/${ifname}" ]] || {
|
||||
logger -t "port-management" "interface ${ifname} is not found"
|
||||
return
|
||||
}
|
||||
|
||||
let "enabled=$(get_bool "${enabled}" "-1")"
|
||||
[[ ${enabled} -eq -1 ]] && return
|
||||
|
||||
tc3162_get_lan_port "${ifname}"
|
||||
let "port=$?"
|
||||
[[ -z "${port}" || ${port} -eq 255 ]] && return
|
||||
|
||||
switchmgr phy admin "${port}" "${enabled}"
|
||||
}
|
||||
|
||||
unset -f set_port_settings
|
||||
# arg1: port ifname, ex: eth0.1
|
||||
# arg2: port enabled, ex: 0/1/off/on/..
|
||||
# arg3: port speed, ex: 1000
|
||||
# arg4: port duplex, ex: full
|
||||
# arg5: port autoneg, ex: 0/1/off/on/..
|
||||
# arg6: port eee, ex: 0/1/off/on/..
|
||||
# arg7: port pause, ex: 0/1/off/on/..
|
||||
set_port_settings() {
|
||||
[[ -z "$1" ]] && return
|
||||
[[ -z "$2" ]] && return
|
||||
[[ -z "$3" ]] && return
|
||||
[[ -z "$4" ]] && return
|
||||
[[ -z "$5" ]] && return
|
||||
[[ -z "$6" ]] && return
|
||||
[[ -z "$7" ]] && return
|
||||
|
||||
local ifname="$1"
|
||||
local enabled="$2"
|
||||
local speed="$3"
|
||||
local duplex="$4"
|
||||
local autoneg=$5
|
||||
local eee="$6"
|
||||
local pause="$7"
|
||||
local port=255
|
||||
local speedmode=1
|
||||
local last_speed=0
|
||||
|
||||
[[ -d "/sys/class/net/${ifname}" ]] || {
|
||||
logger -t "port-management" "interface ${ifname} is not found"
|
||||
return
|
||||
}
|
||||
|
||||
let "enabled=$(get_bool "${enabled}" "-1")"
|
||||
[[ ${enabled} -eq -1 ]] && return
|
||||
|
||||
let "autoneg=$(get_bool "${autoneg}" "-1")"
|
||||
[[ ${autoneg} -eq -1 ]] && return
|
||||
|
||||
let "eee=$(get_bool "${eee}" "-1")"
|
||||
[[ ${eee} -eq -1 ]] && return
|
||||
|
||||
let "pause=$(get_bool "${pause}" "-1")"
|
||||
[[ ${pause} -eq -1 ]] && return
|
||||
|
||||
duplex="$(echo "${duplex}" | awk '{print tolower($0)}')"
|
||||
[[ "${duplex}" != "half" && "${duplex}" != "full" ]] && return
|
||||
|
||||
tc3162_get_lan_port "${ifname}"
|
||||
let "port=$?"
|
||||
[[ -z "${port}" || ${port} -eq 255 ]] && return
|
||||
|
||||
last_speed="$(switchmgr phy maxspeed "${port}" | cut -f2 -d':')"
|
||||
[[ -z "${last_speed}" || "${last_speed}" == "*Down*" ]] \
|
||||
&& last_speed=${speed}
|
||||
|
||||
switchmgr phy pause "${port}" "${pause}"
|
||||
|
||||
# set speedmode: speed+duplex+autoneg
|
||||
# FIXME: switchmgr has no separate setting for 1Gbps speed - use autoneg instead
|
||||
if [[ ${autoneg} -eq 1 || ${speed} -gt 100 ]]; then
|
||||
switchmgr phy speedmode ${port} "1"
|
||||
else
|
||||
[[ ${speed} -gt 10 ]] && let "speedmode=2" || let "speedmode=4"
|
||||
[[ "${duplex}" == "half" ]] && let "speedmode=${speedmode}+1"
|
||||
switchmgr phy speedmode "${port}" "${speedmode}"
|
||||
fi
|
||||
|
||||
# TODO: implement MAC control register manipulations (mapped ports used) for
|
||||
# eee settings change
|
||||
# separate (tx/rx) pause (flow control) settings change
|
||||
# set speed to 1Gbps separately from autoneg mode
|
||||
|
||||
# FIXME: workaround for duplex/pause settings being not applied if speed is unchanged
|
||||
[[ ${last_speed} -eq ${speed} ]] && power_updown "${ifname}" 0
|
||||
|
||||
power_updown "${ifname}" ${enabled}
|
||||
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
# arg1: port ifname, ex: eth0
|
||||
get_max_port_speed() {
|
||||
if [ -z "$1" ]; then
|
||||
echo 0
|
||||
return
|
||||
fi
|
||||
|
||||
local ifname="$1"
|
||||
local phycap="$(ethctl $ifname media-type 2>/dev/null | grep 'PHY Capabilities' | awk '{print$NF}' | cut -d'|' -f1)"
|
||||
local speed=1000
|
||||
|
||||
case "$phycap" in
|
||||
10GFD) speed=10000 ;;
|
||||
5GFD) speed=5000 ;;
|
||||
2.5GFD) speed=2500 ;;
|
||||
1GFD|1GHD) speed=1000 ;;
|
||||
100MFD|100MHD) speed=100 ;;
|
||||
10MFD|10MHD) speed=10 ;;
|
||||
esac
|
||||
|
||||
echo $speed
|
||||
}
|
||||
|
||||
# arg1: port name, ex: eth0
|
||||
get_port_number() {
|
||||
[ -z "$1" ] && return
|
||||
local ports="0 1 2 3 4 5 6 7 8"
|
||||
local units="0 1"
|
||||
local port="$1"
|
||||
local ifname
|
||||
|
||||
for unit in $units; do
|
||||
for prt in $ports; do
|
||||
ifname="$(ethswctl getifname $unit $prt 2>/dev/null | awk '{print$NF}')"
|
||||
if [ "$ifname" == "$port" ]; then
|
||||
echo "$unit $prt"
|
||||
return
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# arg1: port ifname, ex: eth0
|
||||
# arg2: port enabled, ex: 1
|
||||
power_updown() {
|
||||
local ifname="$1"
|
||||
local enabled=$2
|
||||
|
||||
local updown="up"
|
||||
[ $enabled -eq 0 ] && updown="down"
|
||||
ethctl $ifname phy-power $updown >/dev/null
|
||||
}
|
||||
|
||||
# arg1: port ifname, ex: eth0
|
||||
# arg2: port enabled, ex: 1
|
||||
# arg3: port speed, ex: 1000
|
||||
# arg4: port duplex, ex: full
|
||||
# arg5: port autoneg, ex: on
|
||||
# arg6: port eee, ex: 0
|
||||
# arg7: port pause, ex: 0
|
||||
set_port_settings() {
|
||||
local ifname="$1"
|
||||
local enabled=$2
|
||||
local speed="$3"
|
||||
local duplex=$4
|
||||
local autoneg=$5
|
||||
local eee=$6
|
||||
local pause=$7
|
||||
|
||||
[ -d /sys/class/net/$ifname ] || return
|
||||
|
||||
local unitport="$(get_port_number $ifname)"
|
||||
local unit=$(echo $unitport | cut -d ' ' -f 1)
|
||||
local port=$(echo $unitport | cut -d ' ' -f 2)
|
||||
|
||||
[ $autoneg -eq 1 ] && autoneg="on" || autoneg="off"
|
||||
[ "$duplex" == "half" ] && duplex=0 || duplex=1
|
||||
[ "$duplex" == 0 ] && dplx="HD" || dplx="FD"
|
||||
[ "$autoneg" == "on" ] && media_type="auto" || media_type="$speed$dplx"
|
||||
|
||||
phycrossbar="$(ethctl $ifname phy-crossbar | head -1)"
|
||||
crossbartype="$(echo $phycrossbar | awk '{print$2$3}')"
|
||||
# Take only the last PHY Endpoint (non-Serdes) into account as Serdes port number precedes
|
||||
[ "$crossbartype" == "oncrossbar" ] && pyhendpoint="$(echo $phycrossbar | awk '{print$NF}')"
|
||||
|
||||
phycaps="$(ethctl $ifname media-type ${pyhendpoint:+ port $pyhendpoint} | awk -F'PHY Capabilities: ' '{print$2}')"
|
||||
numofcaps="$(echo $phycaps | tr '|' ' ' | wc -w)"
|
||||
|
||||
if [ "$numofcaps" == "1" ]; then
|
||||
logger -t "port-management" "$ifname is capable of $phycaps only; not setting speed/duplex"
|
||||
else
|
||||
logger -t "port-management" "$ifname is capable of $phycaps; setting speed/duplex to $media_type"
|
||||
ethctl $ifname media-type $media_type ${pyhendpoint:+ port $pyhendpoint} &>/dev/null
|
||||
fi
|
||||
|
||||
[ $eee -eq 1 ] && eee="on" || eee="off"
|
||||
ethtool --set-eee $ifname eee $eee 2>/dev/null
|
||||
|
||||
case $pause in
|
||||
off|0)
|
||||
pause=0x0
|
||||
auto=off
|
||||
rx=off
|
||||
tx=off
|
||||
;;
|
||||
on|1)
|
||||
pause=0x2
|
||||
auto=off
|
||||
rx=on
|
||||
tx=on
|
||||
;;
|
||||
auto)
|
||||
pause=0x1
|
||||
auto=on
|
||||
rx=on
|
||||
tx=on
|
||||
;;
|
||||
tx)
|
||||
pause=0x3
|
||||
auto=off
|
||||
rx=off
|
||||
tx=on
|
||||
;;
|
||||
rx)
|
||||
pause=0x4
|
||||
auto=off
|
||||
rx=on
|
||||
tx=off
|
||||
;;
|
||||
esac
|
||||
if [ "$auto" == "on" ]; then
|
||||
# Use ethswctl utility to set pause autoneg
|
||||
# as ethtool is not setting it properly
|
||||
ethswctl -c pause -n $unit -p $port -v $pause 2>&1 >/dev/null
|
||||
else
|
||||
ethtool --pause $ifname autoneg $auto rx $rx tx $tx 2>/dev/null
|
||||
fi
|
||||
|
||||
power_updown $ifname $enabled
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=15
|
||||
STOP=90
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/ethmngr
|
||||
|
||||
. /lib/functions.sh
|
||||
include /lib/ethernet
|
||||
|
||||
configure_ethernet_port(){
|
||||
local cfg=$1
|
||||
local ifname enabled speed duplex autoneg eee pause
|
||||
|
||||
config_get ifname $cfg ifname
|
||||
[ -d /sys/class/net/$ifname ] || return
|
||||
|
||||
config_get enabled $cfg enabled 1
|
||||
config_get speed $cfg speed 1000
|
||||
config_get duplex $cfg duplex "full"
|
||||
config_get autoneg $cfg autoneg 1
|
||||
config_get eee $cfg eee 0
|
||||
config_get pause $cfg pause 0
|
||||
|
||||
set_port_settings $ifname $enabled $speed $duplex $autoneg $eee $pause
|
||||
}
|
||||
|
||||
start_service() {
|
||||
if [ -s /etc/config/ports ]; then
|
||||
config_load ports
|
||||
config_foreach configure_ethernet_port ethport
|
||||
fi
|
||||
|
||||
if [ -f $PROG ]; then
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
fi
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger ports
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
populate_config_from_db() {
|
||||
. /lib/functions.sh
|
||||
. /lib/network/utils.sh
|
||||
include /lib/ethernet
|
||||
|
||||
portorder="$(db -q get hw.board.ethernetPortOrder)"
|
||||
for port in $portorder; do
|
||||
speed="$(get_max_port_speed $port 2>/dev/null)"
|
||||
speed="${speed:-1000}"
|
||||
|
||||
uci add ports ethport
|
||||
uci rename ports.@ethport[-1]="$(get_port_name $port)"
|
||||
uci set ports.@ethport[-1].enabled=1
|
||||
uci set ports.@ethport[-1].name="$(get_port_name $port)"
|
||||
uci set ports.@ethport[-1].ifname="$port"
|
||||
uci set ports.@ethport[-1].speed="$speed"
|
||||
uci set ports.@ethport[-1].duplex="full"
|
||||
uci set ports.@ethport[-1].autoneg=1
|
||||
uci set ports.@ethport[-1].eee=0
|
||||
if [ "$(db -q get hw.board.ethernetWanPort)" = "$port" ]; then
|
||||
uci set ports.@ethport[-1].pause=1
|
||||
uci set ports.@ethport[-1].uplink=1
|
||||
else
|
||||
uci set ports.@ethport[-1].pause=0
|
||||
fi
|
||||
done
|
||||
|
||||
uci commit ports
|
||||
}
|
||||
|
||||
populate_config_from_device_tree() {
|
||||
for path in $(find /proc/device-tree/ -name "port@*"); do
|
||||
port="$(cat $path/label)"
|
||||
[ -n "$port" ] || continue
|
||||
[ "$port" = "cpu" ] && continue
|
||||
speed=1000
|
||||
if [ -e "$path/phy-mode" ]; then
|
||||
phymode="$(cat $path/phy-mode)"
|
||||
case "$phymode" in
|
||||
10000*) speed=10000 ;;
|
||||
2500*) speed=2500 ;;
|
||||
esac
|
||||
fi
|
||||
PORT="$(echo $port | tr '[a-z]' '[A-Z]')"
|
||||
uci add ports ethport
|
||||
uci rename ports.@ethport[-1]="$PORT"
|
||||
uci set ports.@ethport[-1].enabled=1
|
||||
uci set ports.@ethport[-1].name="$PORT"
|
||||
uci set ports.@ethport[-1].ifname="$port"
|
||||
uci set ports.@ethport[-1].speed="$speed"
|
||||
uci set ports.@ethport[-1].duplex="full"
|
||||
uci set ports.@ethport[-1].autoneg=1
|
||||
uci set ports.@ethport[-1].eee=0
|
||||
if [ "$port" = "wan" ]; then
|
||||
uci set ports.@ethport[-1].pause=1
|
||||
uci set ports.@ethport[-1].uplink=1
|
||||
else
|
||||
uci set ports.@ethport[-1].pause=0
|
||||
fi
|
||||
done
|
||||
uci commit ports
|
||||
}
|
||||
|
||||
if [ -s "/etc/config/ports" ]; then
|
||||
if uci -q get ports.@ethport[0] >/dev/null; then
|
||||
# exit if there is any valid content
|
||||
exit 0
|
||||
else
|
||||
rm -f /etc/config/ports
|
||||
fi
|
||||
fi
|
||||
|
||||
touch /etc/config/ports
|
||||
|
||||
if [ -f /sbin/db -a -n "$(db get hw.board.ethernetPortOrder 2>/dev/null)" ]; then
|
||||
populate_config_from_db
|
||||
elif [ -d /proc/device-tree/ ]; then
|
||||
populate_config_from_device_tree
|
||||
fi
|
||||
18
ethmngr/files/etc/bbfdm/micro_services/ethernet.json
Normal file
18
ethmngr/files/etc/bbfdm/micro_services/ethernet.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"daemon": {
|
||||
"config": {
|
||||
"loglevel": "1"
|
||||
},
|
||||
"input": {
|
||||
"type": "DotSo",
|
||||
"name": "/etc/ethmngr/libbbfethernet.so",
|
||||
"plugin_dir": "/etc/ethmngr/plugins"
|
||||
},
|
||||
"output": {
|
||||
"type": "UBUS",
|
||||
"parent_dm": "Device.",
|
||||
"object": "Ethernet",
|
||||
"root_obj": "bbfdm"
|
||||
}
|
||||
}
|
||||
}
|
||||
28
ethmngr/files/etc/init.d/ethmngr
Executable file
28
ethmngr/files/etc/init.d/ethmngr
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=15
|
||||
STOP=90
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/ethmngr
|
||||
|
||||
. /lib/functions.sh
|
||||
include /lib/ethernet
|
||||
|
||||
start_service() {
|
||||
if [ -f $PROG ]; then
|
||||
procd_open_instance
|
||||
procd_set_param command ${PROG}
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
fi
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger network
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
# arg1: port ifname, ex: eth0
|
||||
get_max_port_speed() {
|
||||
if [ -z "$1" ]; then
|
||||
echo 0
|
||||
return
|
||||
fi
|
||||
|
||||
local ifname="$1"
|
||||
local phycap="$(ethtool $ifname | grep -A 10 "Supported link modes" | grep 000 | tail -n 1 | awk '{print$NF}')"
|
||||
local speed=1000
|
||||
|
||||
case "$phycap" in
|
||||
10000*) speed=10000 ;;
|
||||
5000*) speed=5000 ;;
|
||||
2500*) speed=2500 ;;
|
||||
1000*) speed=1000 ;;
|
||||
100*) speed=100 ;;
|
||||
10*) speed=10 ;;
|
||||
esac
|
||||
|
||||
echo $speed
|
||||
}
|
||||
|
||||
# arg1: port ifname, ex: eth0
|
||||
# arg2: port enabled, ex: 1
|
||||
power_updown() {
|
||||
local ifname="$1"
|
||||
local enabled=$2
|
||||
|
||||
local updown="up"
|
||||
[ $enabled -eq 0 ] && updown="down"
|
||||
ip link set dev $ifname $updown
|
||||
}
|
||||
|
||||
# arg1: port ifname, ex: eth0
|
||||
# arg2: port enabled, ex: 1
|
||||
# arg3: port speed, ex: 1000
|
||||
# arg4: port duplex, ex: full
|
||||
# arg5: port autoneg, ex: on
|
||||
# arg6: port eee, ex: 0
|
||||
# arg7: port pause, ex: 0
|
||||
set_port_settings() {
|
||||
local ifname="$1"
|
||||
local enabled=$2
|
||||
local speed="$3"
|
||||
local duplex=$4
|
||||
local autoneg=$5
|
||||
local eee=$6
|
||||
local pause=$7
|
||||
|
||||
[ -d /sys/class/net/$ifname ] || return
|
||||
|
||||
[ $autoneg -eq 1 ] && autoneg="on" || autoneg="off"
|
||||
ethtool --change $ifname speed $speed duplex $duplex autoneg $autoneg
|
||||
|
||||
[ $eee -eq 1 ] && eee="on" || eee="off"
|
||||
ethtool --set-eee $ifname eee $eee 2>/dev/null
|
||||
|
||||
case $pause in
|
||||
off|0)
|
||||
pause=0x0
|
||||
auto=off
|
||||
rx=off
|
||||
tx=off
|
||||
;;
|
||||
on|1)
|
||||
pause=0x2
|
||||
auto=off
|
||||
rx=on
|
||||
tx=on
|
||||
;;
|
||||
auto)
|
||||
pause=0x1
|
||||
auto=on
|
||||
rx=on
|
||||
tx=on
|
||||
;;
|
||||
tx)
|
||||
pause=0x3
|
||||
auto=off
|
||||
rx=off
|
||||
tx=on
|
||||
;;
|
||||
rx)
|
||||
pause=0x4
|
||||
auto=off
|
||||
rx=on
|
||||
tx=off
|
||||
;;
|
||||
esac
|
||||
|
||||
ethtool --pause $ifname autoneg $auto rx $rx tx $tx 2>/dev/null
|
||||
|
||||
power_updown $ifname $enabled
|
||||
}
|
||||
106
evoice/Makefile
106
evoice/Makefile
@@ -1,106 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2022 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=evoice
|
||||
PKG_VERSION:=0.2.39
|
||||
|
||||
LOCAL_DEV=0
|
||||
LOCAL_DEV_EVOICE_DIR=~/voip/evoice
|
||||
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/evoice.git
|
||||
PKG_SOURCE_VERSION:=30d65330de0368f73ecf4a2e804c39a2ee280454
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
# All config variable that are passed to the make invocation, directly or
|
||||
# indirectly. This ensures that the package is rebuilt on config-changes.
|
||||
#PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Telephony
|
||||
TITLE:=Ensemble Voice
|
||||
URL:=
|
||||
DEPENDS:= +libubox +libubus +libpicoevent +libuci +libstdcpp +libopenssl +libjson-c +libblobmsg-json\
|
||||
+TARGET_brcmbca:bcmkernel\
|
||||
+TARGET_airoha:kmod-voip_driver\
|
||||
+TARGET_airoha:voip_app +libbbf_api
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Ensemble Voice. A stand alone SIP VoIP application.
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
# If you want to build the code from your own local repositiory enable
|
||||
# LOCAL_DEV and set LOCAL_DEV_EVOICE_DIR to your own git repository.
|
||||
define Build/Prepare
|
||||
@echo "======================================================="
|
||||
@echo "DEVELOPMENT BUILD! rsync $(LOCAL_DEV_EVOICE_DIR) to $(PKG_BUILD_DIR)"
|
||||
@echo "======================================================="
|
||||
rsync -a $(LOCAL_DEV_EVOICE_DIR)/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
IDIR = $(STAGING_DIR)/usr/include
|
||||
TONES_INI_REQUIRED=
|
||||
|
||||
ifeq ($(CONFIG_TARGET_brcmbca),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
BDIR = bcm963xx/userspace/private/apps/voice
|
||||
CC_FLAGS = -I$(IDIR) -I$(IDIR)/$(BDIR)/inc\
|
||||
-I$(IDIR)/bcm963xx/xchg/bos/publicInc\
|
||||
-I$(IDIR)/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
|
||||
TRG=SVrgBcmFxs
|
||||
JSONFILE=codecs_brcm.json
|
||||
else ifeq ($(CONFIG_TARGET_airoha),y)
|
||||
TARGET_PLATFORM=ECONET
|
||||
TONES_INI_REQUIRED=y
|
||||
TRG=SVrgMtekOwrt
|
||||
JSONFILE=codecs_airoha.json
|
||||
endif
|
||||
|
||||
# disable temporarily some not important warnings, force PIC
|
||||
CC_FLAGS_VS=$(CC_FLAGS) -Wno-unused-parameter -Wno-unused-function -fPIC
|
||||
|
||||
export TARGET_PLATFORM
|
||||
|
||||
#used and altered by BIDE makefiles
|
||||
export _XFLAGS
|
||||
|
||||
BIDE_MAKE_OPTS = -r -R -C $(PKG_BUILD_DIR) -f _bld/src/cdabs.mk\
|
||||
SWB=b_gxxqca6 HWA=a_openwrt HWC=c_hosted OSP=p_posix LIF=cerder DBG=dbg
|
||||
|
||||
define Build/Compile
|
||||
@echo "TARGET_PLATFORM=${TARGET_PLATFORM}"
|
||||
+$(MAKE) $(BIDE_MAKE_OPTS) CC_FLAGS="$(CC_FLAGS)" TRG=$(TRG)
|
||||
|
||||
@echo "clean libvoiceservice before building shared lib!"
|
||||
+$(MAKE) $(BIDE_MAKE_OPTS) CC_FLAGS="$(CC_FLAGS_VS)" TRG=libvoiceservice cleanall
|
||||
+$(MAKE) $(BIDE_MAKE_OPTS) CC_FLAGS="$(CC_FLAGS_VS)" TRG=libvoiceservice
|
||||
endef
|
||||
|
||||
define Package/evoice/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(if $(TONES_INI_REQUIRED),,$(RM) $(1)/etc/evoice/tones.ini)
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(1)/lib/voice/$(JSONFILE) $(1)/lib/voice/codecs_evoice.json
|
||||
$(RM) $(1)/lib/voice/codecs_brcm.json
|
||||
$(RM) $(1)/lib/voice/codecs_airoha.json
|
||||
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/_bin/a_openwrt/evoice $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/_bin/a_openwrt/libvoiceservice.so $(1)/usr/lib/bbfdm/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,evoice))
|
||||
@@ -1,334 +0,0 @@
|
||||
|
||||
config SIPClient 'Client1'
|
||||
option Enable '1'
|
||||
option RegisterMode 'RFC3261'
|
||||
option AuthUserName '51234'
|
||||
option AuthPassword '51234'
|
||||
option Network 'Network1'
|
||||
option MaxSessions '5'
|
||||
option RegisiterURI '51234@sip-proxy.iopsys.eu'
|
||||
option E164Format '1'
|
||||
|
||||
config SIPClient 'Client2'
|
||||
option Enable '1'
|
||||
option RegisterMode 'RFC3261'
|
||||
option AuthUserName '51235'
|
||||
option AuthPassword '51235'
|
||||
option Network 'Network1'
|
||||
option MaxSessions '5'
|
||||
option RegisiterURI '51235@sip-proxy.iopsys.eu'
|
||||
option E164Format '1'
|
||||
|
||||
config SIPNetwork 'Network1'
|
||||
option Enable '1'
|
||||
option ProxyServer 'sip-proxy.iopsys.eu'
|
||||
option AcceptFromProxyOnly '0'
|
||||
option ProxyServerPort '5060'
|
||||
option ProxyServerTransport 'UDP'
|
||||
option RegistrarServer 'sip-proxy.iopsys.eu'
|
||||
option RegistrarServerPort '5060'
|
||||
option RegistrarServerTransport 'UDP'
|
||||
option RegistrationPeriod '3240'
|
||||
option RegisterExpires '3600'
|
||||
option UserAgentDomain ' '
|
||||
option TimerRegistrationFailed '120'
|
||||
option TimerT1 '500'
|
||||
option VoIPProfile 'VoIPProfile1'
|
||||
option SIPSessionTimerEnable '0'
|
||||
option SIPSessionExpireInterval '1800'
|
||||
option SIPSessionMinimumTimer '90'
|
||||
option SIPSessionRefresher 'NONE'
|
||||
option SIPSessionTimerMode 'REQUEST'
|
||||
option SIPSessionRefreshRequest 'UPDATE'
|
||||
list CodecList '1CodecProfile1'
|
||||
list CodecList '1CodecProfile2'
|
||||
list CodecList '1CodecProfile3'
|
||||
list CodecList '1CodecProfile5'
|
||||
list CodecList '1CodecProfile4'
|
||||
|
||||
config CodecProfile '1CodecProfile1'
|
||||
option Enable '1'
|
||||
option Codec 'G.711ALaw'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '1'
|
||||
|
||||
config CodecProfile '1CodecProfile2'
|
||||
option Enable '1'
|
||||
option Codec 'G.711MuLaw'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '1'
|
||||
|
||||
config CodecProfile '1CodecProfile3'
|
||||
option Enable '1'
|
||||
option Codec 'G.726'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '0'
|
||||
|
||||
config CodecProfile '1CodecProfile4'
|
||||
option Enable '1'
|
||||
option Codec 'G.722'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '0'
|
||||
|
||||
config CodecProfile '1CodecProfile5'
|
||||
option Enable '1'
|
||||
option Codec 'G.729'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '0'
|
||||
|
||||
config VoIPProfile 'VoIPProfile1'
|
||||
option Enable '1'
|
||||
option DTMFMethod 'RFC4733'
|
||||
option RTP '1RTP'
|
||||
|
||||
config RTP '1RTP'
|
||||
option LocalPortMin '10020'
|
||||
option LocalPortMax '10039'
|
||||
option JitterBufferType 'Static'
|
||||
|
||||
config FXXPorts 'POTS'
|
||||
option Region 'US'
|
||||
|
||||
config FXSPorts 'FXS1'
|
||||
option Enable '1'
|
||||
option DialType 'Tone'
|
||||
option TransmitGain '0'
|
||||
option ReceiveGain '0'
|
||||
option EchoCancellationEnable '1'
|
||||
|
||||
config FXSPorts 'FXS2'
|
||||
option Enable '1'
|
||||
option DialType 'Tone'
|
||||
option TransmitGain '0'
|
||||
option ReceiveGain '0'
|
||||
option EchoCancellationEnable '1'
|
||||
|
||||
config Extension 'Extension1'
|
||||
option Enable '1'
|
||||
option ExtensionNumber '10#'
|
||||
option Provider 'FXS1'
|
||||
option CallingFeatures 'Set1'
|
||||
option Name 'Phone 1'
|
||||
|
||||
config Extension 'Extension2'
|
||||
option Enable '1'
|
||||
option ExtensionNumber '11#'
|
||||
option Provider 'FXS2'
|
||||
option CallingFeatures 'Set1'
|
||||
option Name 'Phone 2'
|
||||
|
||||
config Line 'Line1'
|
||||
option Enable '1'
|
||||
option Provider 'Client1'
|
||||
option CallingFeatures 'Set1'
|
||||
|
||||
config Line 'Line2'
|
||||
option Enable '1'
|
||||
option Provider 'Client2'
|
||||
option CallingFeatures 'Set2'
|
||||
|
||||
config IncomingMap 'IncomingMap1'
|
||||
option Enable '1'
|
||||
option Extension 'Extension1'
|
||||
option Line 'Line1'
|
||||
|
||||
config IncomingMap 'IncomingMap2'
|
||||
option Enable '1'
|
||||
option Extension 'Extension2'
|
||||
option Line 'Line2'
|
||||
|
||||
config IncomingMap 'IncomingMap3'
|
||||
option Enable '0'
|
||||
option Extension 'Extension2'
|
||||
option Line 'Line1'
|
||||
|
||||
config OutgoingMap 'OutgoingMap1'
|
||||
option Enable '1'
|
||||
option Extension 'Extension1'
|
||||
option Line 'Line1'
|
||||
|
||||
config OutgoingMap 'OutgoingMap2'
|
||||
option Enable '1'
|
||||
option Extension 'Extension2'
|
||||
option Line 'Line2'
|
||||
|
||||
config CallingFeatures 'Set1'
|
||||
option CallerIDEnable '1'
|
||||
option CallerIDNameEnable '1'
|
||||
option CallForwardUnconditionalEnable '0'
|
||||
option CallForwardUnconditionalNumber ' '
|
||||
option CallForwardOnBusyEnable '0'
|
||||
option CallForwardOnBusyNumber ' '
|
||||
option CallForwardOnNoAnswerEnable '0'
|
||||
option CallForwardOnNoAnswerRingTimeout '24'
|
||||
option CallForwardOnNoAnswerNumber ' '
|
||||
option CallTransferEnable '1'
|
||||
option MWIEnable '1'
|
||||
option VMWIEnable '1'
|
||||
option LineMessagesWaiting '0'
|
||||
option AnonymousCallRejectionEnable '0'
|
||||
option AnonymousCallEnable '1'
|
||||
option DoNotDisturbEnable '1'
|
||||
option RepeatDialEnable '1'
|
||||
option VoiceMailEnable '1'
|
||||
option CallPickUpEnable '1'
|
||||
option CCBSEnable '1'
|
||||
option CallWaitingEnable '0'
|
||||
|
||||
config CallingFeatures 'Set2'
|
||||
option CallerIDEnable '1'
|
||||
option CallerIDNameEnable '1'
|
||||
option CallForwardUnconditionalEnable '0'
|
||||
option CallForwardUnconditionalNumber ' '
|
||||
option CallForwardOnBusyEnable '0'
|
||||
option CallForwardOnBusyNumber ' '
|
||||
option CallForwardOnNoAnswerEnable '0'
|
||||
option CallForwardOnNoAnswerRingTimeout '24'
|
||||
option CallForwardOnNoAnswerNumber ' '
|
||||
option CallTransferEnable '1'
|
||||
option MWIEnable '1'
|
||||
option VMWIEnable '1'
|
||||
option LineMessagesWaiting '0'
|
||||
option AnonymousCallRejectionEnable '0'
|
||||
option AnonymousCallEnable '1'
|
||||
option DoNotDisturbEnable '1'
|
||||
option RepeatDialEnable '1'
|
||||
option VoiceMailEnable '1'
|
||||
option CallPickUpEnable '1'
|
||||
option CCBSEnable '1'
|
||||
option CallWaitingEnable '1'
|
||||
|
||||
config NumberingPlan 'NumberingPlan1'
|
||||
option MinimumNumberOfDigits '1'
|
||||
option MaximumNumberOfDigits '15'
|
||||
option InterDigitTimerStd '2000'
|
||||
option InterDigitTimerOpen '2000'
|
||||
option TerminationDigit '#'
|
||||
|
||||
config NumberingPlan 'NumberingPlan2'
|
||||
option MinimumNumberOfDigits '5'
|
||||
option MaximumNumberOfDigits '15'
|
||||
option InterDigitTimerStd '2000'
|
||||
option InterDigitTimerOpen '2000'
|
||||
option TerminationDigit ' '
|
||||
list PrefixList '2PrefixInfo1'
|
||||
list PrefixList '2PrefixInfo2'
|
||||
list PrefixList '2PrefixInfo3'
|
||||
list PrefixList '2PrefixInfo4'
|
||||
list PrefixList '2PrefixInfo5'
|
||||
list PrefixList '2PrefixInfo6'
|
||||
list PrefixList '2PrefixInfo7'
|
||||
list PrefixList '2PrefixInfo8'
|
||||
list PrefixList '2PrefixInfo9'
|
||||
|
||||
config NumberingPlan 'NumberingPlan3'
|
||||
option MinimumNumberOfDigits '5'
|
||||
option MaximumNumberOfDigits '15'
|
||||
option InterDigitTimerStd '2000'
|
||||
option InterDigitTimerOpen '2000'
|
||||
option TerminationDigit '#'
|
||||
list PrefixList '3PrefixInfo1'
|
||||
|
||||
config PrefixInfo '2PrefixInfo1'
|
||||
option Enable '1'
|
||||
option PrefixRange '*43#'
|
||||
option PrefixMinNumberOfDigits '4'
|
||||
option PrefixMaxNumberOfDigits '4'
|
||||
option NumberOfDigitsToRemove '0'
|
||||
option PosOfDigitsToRemove '0'
|
||||
option FacilityAction 'CW_ACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '2PrefixInfo2'
|
||||
option Enable '1'
|
||||
option PrefixRange '#43#'
|
||||
option PrefixMinNumberOfDigits '4'
|
||||
option PrefixMaxNumberOfDigits '4'
|
||||
option NumberOfDigitsToRemove '0'
|
||||
option PosOfDigitsToRemove '0'
|
||||
option FacilityAction 'CW_DEACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '2PrefixInfo3'
|
||||
option Enable '1'
|
||||
option PrefixRange '*21*(X+)#'
|
||||
option PrefixMinNumberOfDigits '9'
|
||||
option PrefixMaxNumberOfDigits '9'
|
||||
option NumberOfDigitsToRemove '0'
|
||||
option PosOfDigitsToRemove '0'
|
||||
option FacilityAction 'CFU_ACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '2PrefixInfo4'
|
||||
option Enable '1'
|
||||
option PrefixRange '#21#'
|
||||
option PrefixMinNumberOfDigits '4'
|
||||
option PrefixMaxNumberOfDigits '4'
|
||||
option NumberOfDigitsToRemove '0'
|
||||
option PosOfDigitsToRemove '0'
|
||||
option FacilityAction 'CFU_DEACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '2PrefixInfo5'
|
||||
option Enable '1'
|
||||
option PrefixRange '*67*(X+)#'
|
||||
option PrefixMinNumberOfDigits '9'
|
||||
option PrefixMaxNumberOfDigits '9'
|
||||
option NumberOfDigitsToRemove '0'
|
||||
option PosOfDigitsToRemove '0'
|
||||
option FacilityAction 'CFB_ACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '2PrefixInfo6'
|
||||
option Enable '1'
|
||||
option PrefixRange '#67#'
|
||||
option PrefixMinNumberOfDigits '4'
|
||||
option PrefixMaxNumberOfDigits '4'
|
||||
option NumberOfDigitsToRemove '0'
|
||||
option PosOfDigitsToRemove '0'
|
||||
option FacilityAction 'CFB_DEACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '2PrefixInfo7'
|
||||
option Enable '1'
|
||||
option PrefixRange '*61*(X+(*X+)?)#'
|
||||
option PrefixMinNumberOfDigits '15'
|
||||
option PrefixMaxNumberOfDigits '15'
|
||||
option NumberOfDigitsToRemove '0'
|
||||
option PosOfDigitsToRemove '0'
|
||||
option FacilityAction 'CFNR_ACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '2PrefixInfo8'
|
||||
option Enable '1'
|
||||
option PrefixRange '#61#'
|
||||
option PrefixMinNumberOfDigits '4'
|
||||
option PrefixMaxNumberOfDigits '4'
|
||||
option NumberOfDigitsToRemove '0'
|
||||
option PosOfDigitsToRemove '0'
|
||||
option FacilityAction 'CFNR_DEACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '2PrefixInfo9'
|
||||
option Enable '1'
|
||||
option PrefixRange '*31*'
|
||||
option PrefixMinNumberOfDigits '4'
|
||||
option PrefixMaxNumberOfDigits '4'
|
||||
option NumberOfDigitsToRemove '0'
|
||||
option PosOfDigitsToRemove '0'
|
||||
option FacilityAction 'CA_ACTIVATE'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config PrefixInfo '3PrefixInfo1'
|
||||
option Enable '1'
|
||||
option PrefixRange '110|112'
|
||||
option PrefixMinNumberOfDigits '7'
|
||||
option PrefixMaxNumberOfDigits '7'
|
||||
option NumberOfDigitsToRemove '0'
|
||||
option PosOfDigitsToRemove '0'
|
||||
option FacilityAction 'X_IOPSYS_EU_EMERGENCY'
|
||||
option FacilityActionArgument ' '
|
||||
|
||||
config DialPlan 'X_IOPSYS_EU_InternalNumber1'
|
||||
option RegExp '1X#'
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,181 +0,0 @@
|
||||
# RO (Main)
|
||||
config account 'map_board'
|
||||
option HW_Has_Voice 'hw.board.hasVoice'
|
||||
option HW_Has_DECT 'hw.board.hasDect'
|
||||
option HW_Nr_Of_POTS_Ports 'hw.board.VoicePorts'
|
||||
option HW_VoiceDSP 'hw.board.VoiceDSP'
|
||||
option ProductID 'device.deviceinfo.ModelName'
|
||||
option I3_VERSION 'device.deviceinfo.SoftwareVersion'
|
||||
option SerialNumber 'device.deviceinfo.SerialNumber'
|
||||
|
||||
config account 'map_pots'
|
||||
option Country 'voice.POTS.Region'
|
||||
|
||||
# Voice Service navigation paths
|
||||
# Not used to initialize internal configuration
|
||||
config navigation 'map_vs'
|
||||
option Account 'voice.Client@.'
|
||||
option Network 'voice.Client@.Network'
|
||||
option VoIPProfile 'voice.Network@.VoIPProfile'
|
||||
option CfAccount 'voice.Line@.CallingFeatures'
|
||||
option CfPhone 'voice.Extension@.CallingFeatures'
|
||||
option CodecList 'voice.Network@.CodecList'
|
||||
option Codec 'voice.Codec@.Codec'
|
||||
option OutgoingMapEnabled 'voice.OutgoingMap@.Enable'
|
||||
option From_Phone 'voice.OutgoingMap@.Extension'
|
||||
option Extension 'voice.Extension@.Provider'
|
||||
option To_Account 'voice.OutgoingMap@.Line'
|
||||
option Line 'voice.Line@.Provider'
|
||||
option LineEnable 'voice.Line@.Enable'
|
||||
option LineProvider 'voice.Line@.Provider'
|
||||
option IncomingMapEnabled 'voice.IncomingMap@.Enable'
|
||||
option From_Account 'voice.IncomingMap@.Line'
|
||||
option To_Phone 'voice.IncomingMap@.Extension'
|
||||
option ExtensionEnable 'voice.Extension@.Enable'
|
||||
option ExtensionProvider 'voice.Extension@.Provider'
|
||||
|
||||
# Registration for account A-Z is associate with SIP.Clienti.Enable
|
||||
# All parameters in this table are written to internal configuration
|
||||
config account 'map_account'
|
||||
option Registration 'voice.Client@.Enable'
|
||||
option Display_Name ''
|
||||
option PhoneNumber 'voice.Client@.RegisiterURI'
|
||||
option Username 'voice.Client@.AuthUserName'
|
||||
option Password 'voice.Client@.AuthPassword'
|
||||
option SIP_Telephone_Syntax 'voice.Client@.E164Format'
|
||||
option Device_Description 'voice.Client@.UserAgent'
|
||||
|
||||
# Network stuff associated with an account.
|
||||
# All parameters in this table are written to internal configuration
|
||||
config network 'map_net'
|
||||
option Enable 'voice.Network@.Enable'
|
||||
option Registration_Server 'voice.Network@.RegistrarServer'
|
||||
option Outbound_Proxy 'voice.Network@.ProxyServer'
|
||||
option Accept_From_Registered 'voice.Network@.AcceptFromProxyOnly'
|
||||
option SIP_Port 'voice.Network@.RegistrarServerPort'
|
||||
option SIP_Transport 'voice.Network@.RegistrarServerTransport'
|
||||
option RegistrationPeriod 'voice.Network@.RegistrationPeriod'
|
||||
option Registration_Interval 'voice.Network@.RegisterExpires'
|
||||
option Reg_Failure_Interval 'voice.Network@.TimerRegistrationFailed'
|
||||
option T1 'voice.Network@.TimerT1'
|
||||
option UserAgentDomain 'voice.Network@.UserAgentDomain'
|
||||
option SIP_SessTmrEnable 'voice.Network@.SIPSessionTimerEnable'
|
||||
option SIP_SessTmrMode 'voice.Network@.SIPSessionTimerMode'
|
||||
option SIP_SessTmrMsg 'voice.Network@.SIPSessionRefreshRequest'
|
||||
option SIP_SessTmrRefresher 'voice.Network@.SIPSessionRefresher'
|
||||
option SIP_MinSE 'voice.Network@.SIPSessionMinimumTimer'
|
||||
option SIP_SessInterval 'voice.Network@.SIPSessionExpireInterval'
|
||||
|
||||
config VoIPProfile 'map_voip'
|
||||
option Enable 'voice.VoIPProfile@.Enable'
|
||||
option DTMF_Method 'voice.VoIPProfile@.DTMFMethod'
|
||||
option RTP 'voice.VoIPProfile@.RTP'
|
||||
|
||||
config RTP 'map_rtp'
|
||||
option RTP_Port_Base 'voice.@RTP@.LocalPortMin'
|
||||
option RTP_Port_End 'voice.@RTP@.LocalPortMax'
|
||||
|
||||
config codecs 'map_codec'
|
||||
option Codec 'voice.CodecProfile@.Codec'
|
||||
option enable 'voice.CodecProfile@.Enable'
|
||||
option ptime 'voice.CodecProfile@.PacketizationPeriod'
|
||||
option dtx 'voice.CodecProfile@.SilenceSupression'
|
||||
|
||||
config fxsinfo 'map_fxs'
|
||||
option Enable 'voice.FXS@.Enable'
|
||||
option DialType 'voice.FXS@.DialType'
|
||||
option TransmitGain 'voice.FXS@.TransmitGain'
|
||||
option ReceiveGain 'voice.FXS@.ReceiveGain'
|
||||
option EchoCancellationEnable 'voice.FXS@.EchoCancellationEnable'
|
||||
|
||||
config extensioninfo 'map_ext'
|
||||
option Enable 'voice.Extension@.Enable'
|
||||
option Internal_Number_Phone 'voice.Extension@.ExtensionNumber'
|
||||
option Display_Name_Phone 'voice.Extension@.Name'
|
||||
|
||||
config capabilities 'map_capa'
|
||||
option Call_Waiting_Enable 'voice.Capabilities@FacilityActions'
|
||||
option Enable_Call_Diversion 'voice.Capabilities@FacilityActions'
|
||||
|
||||
config cs_account 'map_set'
|
||||
option BusyCallWait 'voice.Set@.CallWaitingEnable'
|
||||
option AlwaysDivert 'voice.Set@.CallForwardUnconditionalEnable'
|
||||
option CFU_Number 'voice.Set@.CallForwardUnconditionalNumber'
|
||||
option BusyDivert 'voice.Set@.CallForwardOnBusyEnable'
|
||||
option CFB_Number 'voice.Set@.CallForwardOnBusyNumber'
|
||||
option NoAnswDivert 'voice.Set@.CallForwardOnNoAnswerEnable'
|
||||
option CFNR_Number 'voice.Set@.CallForwardOnNoAnswerNumber'
|
||||
option CFNR_Timeout 'voice.Set@.CallForwardOnNoAnswerRingTimeout'
|
||||
option Enable_Call_Transfer 'voice.Set@.CallTransferEnable'
|
||||
option AnonymousReject 'voice.Set@.AnonymousCallRejectionEnable'
|
||||
option AllowAnonymousConf 'voice.Set@.AnonymousCallEnable'
|
||||
option CallerIDEnable 'voice.Set@.CallerIDEnable'
|
||||
|
||||
config cs_xvendor 'map_np_cs'
|
||||
option np_sc_actCW 'voice.X_IOPSYS_EU_NpSc@.CW_ACT'
|
||||
option np_sc_actCW_output 'voice.X_IOPSYS_EU_NpSc@.CW_OUT'
|
||||
option np_sc_deactCW 'voice.X_IOPSYS_EU_NpSc@.CW_DEACT'
|
||||
option np_sc_isactCW 'voice.X_IOPSYS_EU_NpSc@.CW_ISACT'
|
||||
option np_sc_actCFU 'voice.X_IOPSYS_EU_NpSc@.CFU_ACT'
|
||||
option np_sc_actCFU_output 'voice.X_IOPSYS_EU_NpSc@.CFU_OUT'
|
||||
option np_sc_deactCFU 'voice.X_IOPSYS_EU_NpSc@.CFU_DEACT'
|
||||
option np_sc_actCFB 'voice.X_IOPSYS_EU_NpSc@.CFB_ACT'
|
||||
option np_sc_actCFB_output 'voice.X_IOPSYS_EU_NpSc@.CFB_OUT'
|
||||
option np_sc_deactCFB 'voice.X_IOPSYS_EU_NpSc@.CFB_DEACT'
|
||||
option np_sc_actCFNR 'voice.X_IOPSYS_EU_NpSc@.CFNR_ACT'
|
||||
option np_sc_actCFNR_output 'voice.X_IOPSYS_EU_NpSc@.CFNR_OUT'
|
||||
option np_sc_deactCFNR 'voice.X_IOPSYS_EU_NpSc@.CFNR_DEACT'
|
||||
option np_sc_actRA 'voice.X_IOPSYS_EU_NpSc@.RA_ACT'
|
||||
option np_sc_deactRA 'voice.X_IOPSYS_EU_NpSc@.RA_DEACT'
|
||||
option np_sc_actAC 'voice.X_IOPSYS_EU_NpSc@.AC_ACT'
|
||||
option np_sc_deactAC 'voice.X_IOPSYS_EU_NpSc@.AC_DEACT'
|
||||
option np_sc_actAA 'voice.X_IOPSYS_EU_NpSc@.AA_ACT'
|
||||
option np_sc_deactAA 'voice.X_IOPSYS_EU_NpSc@.AA_DEACT'
|
||||
option np_sc_actAD 'voice.X_IOPSYS_EU_NpSc@.AD_ACT'
|
||||
option np_sc_actAD_output 'voice.X_IOPSYS_EU_NpSc@.AD_OUT'
|
||||
option np_sc_deactAD 'voice.X_IOPSYS_EU_NpSc@.AD_DEACT'
|
||||
option np_sc_actMWSplash 'voice.X_IOPSYS_EU_NpSc@.MWI_SPLASH_ACT'
|
||||
option np_sc_deactMWSplash 'voice.X_IOPSYS_EU_NpSc@.MWI_SPLASH_DEACT'
|
||||
option np_sc_actMWTone 'voice.X_IOPSYS_EU_NpSc@.MWI_TONE_ACT'
|
||||
option np_sc_deactMWTone 'voice.X_IOPSYS_EU_NpSc@.MWI_TONE_DEACT'
|
||||
option np_sc_redial 'voice.X_IOPSYS_EU_NpSc@.REDIAL'
|
||||
option np_sc_setMiscConf 'voice.X_IOPSYS_EU_NpSc@.SET_MISC'
|
||||
|
||||
config cc_xvendor 'map_np_in'
|
||||
option np_in_limitExp 'voice.X_IOPSYS_EU_InternalNumber@.RegExp'
|
||||
|
||||
config cc_xvendor 'map_np_sh'
|
||||
option sh_no_str 'voice.X_IOPSYS_EU_ShortNumber@.RegExp'
|
||||
|
||||
config cc_xvendor 'map_np_eme'
|
||||
option np_eme 'voice.X_IOPSYS_EU_EmergencyNumber@.RegExp'
|
||||
option np_eme_out 'voice.X_IOPSYS_EU_EmergencyNumber@.OutStr'
|
||||
|
||||
config cc_xvendor 'map_np_rn'
|
||||
option np_rn 'voice.X_IOPSYS_EU_RegularNumber@.RegExp'
|
||||
option np_rn_out 'voice.X_IOPSYS_EU_RegularNumber@.OutStr'
|
||||
option np_rn_account 'voice.X_IOPSYS_EU_RegularNumber@.AccStr'
|
||||
|
||||
config cc_xvendor 'map_np_bn'
|
||||
option np_bn 'voice.X_IOPSYS_EU_BarredNumber@.RegExp'
|
||||
option np_bn_out 'voice.X_IOPSYS_EU_BarredNumber@.OutStr'
|
||||
|
||||
config TR104NumberingPlan 'map_np_tr'
|
||||
option min_digits 'voice.NumberingPlan@.MinimumNumberOfDigits'
|
||||
option max_digits 'voice.NumberingPlan@.MaximumNumberOfDigits'
|
||||
option tmo_std 'voice.NumberingPlan@.InterDigitTimerStd'
|
||||
option tmo_open 'voice.NumberingPlan@.InterDigitTimerOpen'
|
||||
option term_digit 'voice.NumberingPlan@.TerminationDigit'
|
||||
option prefix_list 'voice.NumberingPlan@.PrefixList'
|
||||
|
||||
config TR104NumberingPlanPrefix 'map_np_pf'
|
||||
option enable 'voice.@PrefixInfo@.Enable'
|
||||
option range 'voice.@PrefixInfo@.PrefixRange'
|
||||
option prefix_min_digits 'voice.@PrefixInfo@.PrefixMinNumberOfDigits'
|
||||
option prefix_max_digits 'voice.@PrefixInfo@.PrefixMaxNumberOfDigits'
|
||||
option remove_digits 'voice.@PrefixInfo@.NumberOfDigitsToRemove'
|
||||
option remove_pos 'voice.@PrefixInfo@.NumberOfDigitsToRemove'
|
||||
option facility_act 'voice.@PrefixInfo@.FacilityAction'
|
||||
option facility_arg 'voice.@PrefixInfo@.FacilityActionArgument'
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
config static_prm 'defaults'
|
||||
option Print_Control '4'
|
||||
option Print_UDP_Addr '192.168.1.3'
|
||||
option Print_UDP_Port '60000'
|
||||
option Verbosity 'On'
|
||||
option Failure_Log 'On'
|
||||
option Message_Log 'On'
|
||||
option Method_Trace 'Off'
|
||||
option Dial_Cache_Size '0'
|
||||
option Reverse_Fax_Detection '0'
|
||||
option DSP_24 '0'
|
||||
option DSP_36 '0'
|
||||
option DSP_43 '0'
|
||||
option Swap_Name_Nr_CID '0'
|
||||
option R_Button_Lower_Lim '100'
|
||||
option R_Button_Upper_Lim '800'
|
||||
option HookOn_Delay '0'
|
||||
option SupportLDD '0'
|
||||
option LDD_Min_Break_Time '41'
|
||||
option LDD_Max_Break_Time '94'
|
||||
option LDD_Percent_Break '55'
|
||||
option Tone_On_Hangup '1'
|
||||
option BusyTone_On_Hangup '1'
|
||||
option Enable_Analouge_Conf '0'
|
||||
option PrackUsage '1'
|
||||
option SIP_SupportedPath '0'
|
||||
option IMS_Access_Network_Info ' '
|
||||
option SIP_Reason_Protocol '0'
|
||||
option SIP_Body_QOST '0'
|
||||
option SIP_HistoryInfo '0'
|
||||
option Customer_Spec2 '1'
|
||||
option UTF8_Enable '0'
|
||||
option RFC3325 '0'
|
||||
option Accept_From_Registered '0'
|
||||
option Polarity_Reversal '0'
|
||||
option Closed_Dial_Plan '0'
|
||||
option Netw_Dial '0'
|
||||
option No_Answer_Tmo '180'
|
||||
option UPnP_Enabled '0'
|
||||
option NAT_Address ' '
|
||||
option NAT_Address_From_SIP '0'
|
||||
option HookOn_Transfer '0'
|
||||
option Enable_Call_Transfer '1'
|
||||
option CallerIDEnable '1'
|
||||
option Multiparty_Transp '0'
|
||||
option Presence_Indication '0'
|
||||
option Login_Note ' '
|
||||
option Login_Description ' '
|
||||
option Logout_Note ' '
|
||||
option Logout_Description ' '
|
||||
option Resolve_Every_Transaction '2'
|
||||
option Translate_Plus '1'
|
||||
option Mid_Call_Services '0'
|
||||
option Account_Restriction '0'
|
||||
option Answering_Machine_Enable '0'
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=68
|
||||
STOP=12
|
||||
|
||||
USE_PROCD=1
|
||||
NAME=evoice
|
||||
VOICE_UCI_CONFIG=voice
|
||||
|
||||
start_service() {
|
||||
[ "$(db -q get hw.board.hasVoice)" = "1" ] || return
|
||||
|
||||
|
||||
which endptmngr >/dev/null 2>&1 && {
|
||||
echo "evoice can't be started since endptmngr is installed. Please remove endptmngr and retry"
|
||||
return
|
||||
}
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $NAME
|
||||
procd_set_param respawn "5" "0" "3"
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger $VOICE_UCI_CONFIG
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
"G.711ALaw": [
|
||||
{
|
||||
"BitRate": 64000,
|
||||
"PacketizationPeriod": "20",
|
||||
"SilenceSuppression": false
|
||||
}
|
||||
],
|
||||
"G.711MuLaw": [
|
||||
{
|
||||
"BitRate": 64000,
|
||||
"PacketizationPeriod": "20",
|
||||
"SilenceSuppression": false
|
||||
}
|
||||
],
|
||||
"G.722": [
|
||||
{
|
||||
"BitRate": 64000,
|
||||
"PacketizationPeriod": "20",
|
||||
"SilenceSuppression": false
|
||||
}
|
||||
],
|
||||
"G.726": [
|
||||
{
|
||||
"BitRate": 32000,
|
||||
"PacketizationPeriod": "20",
|
||||
"SilenceSuppression": false
|
||||
},
|
||||
{
|
||||
"BitRate": 24000,
|
||||
"PacketizationPeriod": "20",
|
||||
"SilenceSuppression": false
|
||||
}
|
||||
],
|
||||
"G.729": [
|
||||
{
|
||||
"BitRate": 8000,
|
||||
"PacketizationPeriod": "20",
|
||||
"SilenceSuppression": false
|
||||
}
|
||||
],
|
||||
"AMR": [
|
||||
{
|
||||
"BitRate": 7400,
|
||||
"PacketizationPeriod": "20",
|
||||
"SilenceSuppression": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
{
|
||||
"G.711MuLaw": [
|
||||
{
|
||||
"BitRate": 64000,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
}
|
||||
],
|
||||
"G.711ALaw": [
|
||||
{
|
||||
"BitRate": 64000,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
}
|
||||
],
|
||||
"G.726": [
|
||||
{
|
||||
"BitRate": 16000,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
},
|
||||
{
|
||||
"BitRate": 24000,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
},
|
||||
{
|
||||
"BitRate": 32000,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
},
|
||||
{
|
||||
"BitRate": 40000,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
}
|
||||
],
|
||||
"G.723.1": [
|
||||
{
|
||||
"BitRate": 5300,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
},
|
||||
{
|
||||
"BitRate": 6300,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
}
|
||||
],
|
||||
"G.729": [
|
||||
{
|
||||
"BitRate": 8000,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
}
|
||||
],
|
||||
"iLBC": [
|
||||
{
|
||||
"BitRate": 15200,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
},
|
||||
{
|
||||
"BitRate": 13300,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
}
|
||||
],
|
||||
"G.722": [
|
||||
{
|
||||
"BitRate": 64000,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
}
|
||||
],
|
||||
"AMR": [
|
||||
{
|
||||
"BitRate": 12200,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
},
|
||||
{
|
||||
"BitRate": 10200,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
},
|
||||
{
|
||||
"BitRate": 7950,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
},
|
||||
{
|
||||
"BitRate": 7400,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
},
|
||||
{
|
||||
"BitRate": 6700,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
},
|
||||
{
|
||||
"BitRate": 5900,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
},
|
||||
{
|
||||
"BitRate": 5150,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
},
|
||||
{
|
||||
"BitRate": 4750,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
}
|
||||
],
|
||||
"GSM-EFR": [
|
||||
{
|
||||
"BitRate": 12200,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
}
|
||||
],
|
||||
"GSM-FR": [
|
||||
{
|
||||
"BitRate": 13200,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
}
|
||||
],
|
||||
"GSM-HR": [
|
||||
{
|
||||
"BitRate": 5600,
|
||||
"PacketizationPeriod": "10-30",
|
||||
"SilenceSuppression": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
59
firewallmngr/Makefile
Normal file
59
firewallmngr/Makefile
Normal file
@@ -0,0 +1,59 @@
|
||||
#
|
||||
# Copyright (C) 2022-2024 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=firewallmngr
|
||||
PKG_VERSION:=1.0.0
|
||||
|
||||
#LOCAL_DEV:=1
|
||||
#ifneq ($(LOCAL_DEV),1)
|
||||
#PKG_SOURCE_PROTO:=git
|
||||
#PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/firewallmngr.git
|
||||
#PKG_SOURCE_VERSION:=4f429e25c6e7a69c5171186731bc560befa5a660
|
||||
#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
#PKG_MIRROR_HASH:=skip
|
||||
#endif
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../bbfdm/bbfdm.mk
|
||||
|
||||
#MAKE_PATH:=src
|
||||
|
||||
define Package/firewallmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +firewall
|
||||
TITLE:=Package to add Device.Firewall data model support.
|
||||
endef
|
||||
|
||||
define Package/firewallmngr/description
|
||||
Package to add Device.Firewall data model support.
|
||||
endef
|
||||
|
||||
#ifeq ($(LOCAL_DEV),0)
|
||||
#define Build/Prepare
|
||||
# $(CP) -rf ./src/* $(PKG_BUILD_DIR)/
|
||||
#endef
|
||||
#endif
|
||||
|
||||
define Package/firewallmngr/install
|
||||
$(INSTALL_DIR) $(1)/etc/firewallmngr
|
||||
$(INSTALL_DIR) $(1)/etc/firewallmngr/plugins
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/lib/fwmngr
|
||||
$(INSTALL_DATA) ./files/etc/config/firewallmngr $(1)/etc/config/
|
||||
$(INSTALL_DATA) ./files/etc/init.d/firewallmngr $(1)/etc/init.d/
|
||||
$(INSTALL_DATA) ./files/lib/fwmngr/fwmngr.sh $(1)/lib/fwmngr/
|
||||
$(call BbfdmInstallPluginInMicroservice, $(1)/etc/firewallmngr,./files/etc/firewallmngr/nat.json)
|
||||
$(call BbfdmInstallPluginInMicroservice, $(1)/etc/firewallmngr/plugins,$(PKG_BUILD_DIR)/libfirewallmngr.so)
|
||||
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/bbfdm/micro_services/firewallmngr.json)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,firewallmngr))
|
||||
18
firewallmngr/files/etc/bbfdm/micro_services/firewallmngr.json
Executable file
18
firewallmngr/files/etc/bbfdm/micro_services/firewallmngr.json
Executable file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"daemon": {
|
||||
"config": {
|
||||
"loglevel": "4"
|
||||
},
|
||||
"input": {
|
||||
"type": "JSON",
|
||||
"name": "/etc/firewallmngr/nat.json",
|
||||
"plugin_dir": "/etc/firewallmngr/plugins"
|
||||
},
|
||||
"output": {
|
||||
"type": "UBUS",
|
||||
"parent_dm": "Device.",
|
||||
"root_obj": "bbfdm",
|
||||
"multiple_objects": ["NAT","Firewall"]
|
||||
}
|
||||
}
|
||||
}
|
||||
133
firewallmngr/files/etc/config/firewallmngr
Normal file
133
firewallmngr/files/etc/config/firewallmngr
Normal file
@@ -0,0 +1,133 @@
|
||||
config firewall 'firewall'
|
||||
option config 'Advanced'
|
||||
option Advanced_level 'level1'
|
||||
|
||||
config level 'level1'
|
||||
option name 'level1'
|
||||
option chain 'chain1'
|
||||
option port_mapping_enabled '1'
|
||||
option default_policy 'reject'
|
||||
option default_log_policy '0'
|
||||
option enable '1'
|
||||
|
||||
config chain 'chain1'
|
||||
option enable '1'
|
||||
option name 'chain1'
|
||||
|
||||
config rule 'rule1'
|
||||
option chain 'chain1'
|
||||
option enable '1'
|
||||
option order '1'
|
||||
option target 'accept'
|
||||
option source_interface 'lan'
|
||||
|
||||
config rule 'rule2'
|
||||
option chain 'chain1'
|
||||
option enable '1'
|
||||
option order '2'
|
||||
option description 'Allow-DHCP-Renew'
|
||||
option target 'accept'
|
||||
option source_interface 'wan'
|
||||
option ip_version '4'
|
||||
option protocol '17'
|
||||
option dest_port '68'
|
||||
|
||||
config rule 'rule3'
|
||||
option chain 'chain1'
|
||||
option enable '1'
|
||||
option order '3'
|
||||
option description 'Allow-Ping'
|
||||
option target 'accept'
|
||||
option source_interface 'wan'
|
||||
option ip_version '4'
|
||||
option protocol '1'
|
||||
|
||||
config rule 'rule4'
|
||||
option chain 'chain1'
|
||||
option enable '1'
|
||||
option order '4'
|
||||
option description 'Allow-IGMP'
|
||||
option target 'accept'
|
||||
option source_interface 'wan'
|
||||
option ip_version '4'
|
||||
option protocol '2'
|
||||
|
||||
config rule 'rule5'
|
||||
option chain 'chain1'
|
||||
option enable '1'
|
||||
option order '5'
|
||||
option description 'Allow-DHCPv6'
|
||||
option target 'accept'
|
||||
option source_interface 'wan'
|
||||
option ip_version '6'
|
||||
option protocol '17'
|
||||
option dest_port '546'
|
||||
|
||||
config rule 'rule6'
|
||||
option chain 'chain1'
|
||||
option enable '1'
|
||||
option order '6'
|
||||
option description 'Allow-MLD'
|
||||
option target 'accept'
|
||||
option source_interface 'wan'
|
||||
option ip_version '6'
|
||||
option source_ip 'fe80::'
|
||||
option source_mask 'fe80::/10'
|
||||
option protocol '1'
|
||||
|
||||
config rule 'rule7'
|
||||
option chain 'chain1'
|
||||
option enable '1'
|
||||
option order '7'
|
||||
option description 'Allow-ICMPv6-Input'
|
||||
option target 'accept'
|
||||
option source_interface 'wan'
|
||||
option ip_version '6'
|
||||
option protocol '1'
|
||||
|
||||
config rule 'rule8'
|
||||
option chain 'chain1'
|
||||
option enable '1'
|
||||
option order '8'
|
||||
option description 'Allow-ICMPv6-Forward'
|
||||
option target 'accept'
|
||||
option source_interface 'wan'
|
||||
option dest_all_interface '1'
|
||||
option ip_version '6'
|
||||
option protocol '1'
|
||||
|
||||
config rule 'rule9'
|
||||
option chain 'chain1'
|
||||
option enable '1'
|
||||
option order '9'
|
||||
option description 'Allow-IPSec-ESP'
|
||||
option target 'accept'
|
||||
option source_interface 'wan'
|
||||
option dest_interface 'lan'
|
||||
option protocol '50'
|
||||
|
||||
config rule 'rule10'
|
||||
option chain 'chain1'
|
||||
option enable '1'
|
||||
option order '10'
|
||||
option description 'Allow-ISAKMP'
|
||||
option target 'accept'
|
||||
option source_interface 'wan'
|
||||
option dest_interface 'lan'
|
||||
option protocol '17'
|
||||
option dest_port '500'
|
||||
|
||||
config rule 'rule11'
|
||||
option chain 'chain1'
|
||||
option enable '1'
|
||||
option order '11'
|
||||
option description 'Support-UDP-Traceroute'
|
||||
option target 'reject'
|
||||
option source_interface 'wan'
|
||||
option ip_version '4'
|
||||
option protocol '17'
|
||||
option dest_port '33434'
|
||||
option dest_port_range_max '33689'
|
||||
|
||||
|
||||
|
||||
566
firewallmngr/files/etc/firewallmngr/nat.json
Executable file
566
firewallmngr/files/etc/firewallmngr/nat.json
Executable file
@@ -0,0 +1,566 @@
|
||||
{
|
||||
"json_plugin_version": 2,
|
||||
"Device.NAT.": {
|
||||
"type": "object",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": false,
|
||||
"array": false,
|
||||
"InterfaceSettingNumberOfEntries": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "unsignedInt",
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"object": "firewallmngr",
|
||||
"section": {
|
||||
"type": "nat_interface_setting"
|
||||
},
|
||||
"option": {
|
||||
"name": "@Count"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"PortMappingNumberOfEntries": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "unsignedInt",
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"object": "firewallmngr",
|
||||
"section": {
|
||||
"type": "nat_portmapping"
|
||||
},
|
||||
"option": {
|
||||
"name": "@Count"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"MaxNumberOfPortMappings": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "unsignedInt",
|
||||
"default": "32"
|
||||
},
|
||||
"Device.NAT.InterfaceSetting.{i}.": {
|
||||
"type": "object",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"uniqueKeys": [
|
||||
"Alias",
|
||||
"Interface"
|
||||
],
|
||||
"access": true,
|
||||
"array": true,
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "firewallmngr",
|
||||
"section": {
|
||||
"type": "nat_interface_setting"
|
||||
},
|
||||
"dmmapfile": "dmmap_nat"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Enable": {
|
||||
"type": "boolean",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "false",
|
||||
"datatype": "boolean",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "enable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Status": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "Disabled",
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"Disabled",
|
||||
"Enabled",
|
||||
"Enabled_NATForcedDisabled",
|
||||
"Enabled_PortMappingDisabled",
|
||||
"Error_Misconfigured",
|
||||
"Error"
|
||||
]
|
||||
},
|
||||
"Alias": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "Alias",
|
||||
"range": [
|
||||
{
|
||||
"max": 64
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "alias"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"Interface": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 256
|
||||
}
|
||||
],
|
||||
"flags": [
|
||||
"Reference"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "interface",
|
||||
"linker_obj": "Device.IP.Interface.[Name==@key]."
|
||||
}
|
||||
]
|
||||
},
|
||||
"SourceNetwork": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"list": {
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 256
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"TCPTranslationTimeout": {
|
||||
"type": "int",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "300",
|
||||
"datatype": "int",
|
||||
"range": [
|
||||
{
|
||||
"min": -1
|
||||
}
|
||||
],
|
||||
"unit": "seconds"
|
||||
},
|
||||
"UDPTranslationTimeout": {
|
||||
"type": "int",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "30",
|
||||
"datatype": "int",
|
||||
"range": [
|
||||
{
|
||||
"min": -1
|
||||
}
|
||||
],
|
||||
"unit": "seconds"
|
||||
}
|
||||
},
|
||||
"Device.NAT.PortMapping.{i}.": {
|
||||
"type": "object",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"uniqueKeys": [
|
||||
"Alias",
|
||||
"RemoteHost",
|
||||
"ExternalPort",
|
||||
"Protocol"
|
||||
],
|
||||
"access": true,
|
||||
"array": true,
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "firewallmngr",
|
||||
"section": {
|
||||
"type": "nat_portmapping"
|
||||
},
|
||||
"dmmapfile": "dmmap_nat"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Enable": {
|
||||
"type": "boolean",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "false",
|
||||
"datatype": "boolean",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "enable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Status": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "Disabled",
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"Disabled",
|
||||
"Enabled",
|
||||
"Error_Misconfigured",
|
||||
"Error"
|
||||
]
|
||||
},
|
||||
"Origin": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "Controller",
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"User",
|
||||
"System",
|
||||
"UPnP",
|
||||
"Controller"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "origin"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"Alias": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "Alias",
|
||||
"range": [
|
||||
{
|
||||
"max": 64
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "alias"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"Interface": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 256
|
||||
}
|
||||
],
|
||||
"flags": [
|
||||
"Reference"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "interface",
|
||||
"linker_obj": "Device.IP.Interface.*.Name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"AllInterfaces": {
|
||||
"type": "boolean",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "false",
|
||||
"datatype": "boolean",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "all_interfaces"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"LeaseDuration": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "unsignedInt",
|
||||
"unit": "seconds",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "lease_duration"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"RemoteHost": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "remote_host"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"ExternalPort": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "unsignedInt",
|
||||
"range": [
|
||||
{
|
||||
"min": 0,
|
||||
"max": 65535
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "external_port"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"ExternalPortEndRange": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "0",
|
||||
"datatype": "unsignedInt",
|
||||
"range": [
|
||||
{
|
||||
"min": 0,
|
||||
"max": 65535
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "external_port_end"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"InternalPort": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "unsignedInt",
|
||||
"range": [
|
||||
{
|
||||
"min": 0,
|
||||
"max": 65535
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "internal_port"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"Protocol": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"TCP",
|
||||
"UDP"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "protocol"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"InternalClient": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 256
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "internal_client"
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
"Description": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 256
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "description"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
16
firewallmngr/files/etc/init.d/firewallmngr
Executable file
16
firewallmngr/files/etc/init.d/firewallmngr
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=18
|
||||
USE_PROCD=1
|
||||
|
||||
. /lib/fwmngr/fwmngr.sh
|
||||
. /etc/bbfdm/bbfdm_services.sh
|
||||
|
||||
|
||||
start_service() {
|
||||
configure_firewall
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger firewallmngr
|
||||
}
|
||||
300
firewallmngr/files/lib/fwmngr/fwmngr.sh
Normal file
300
firewallmngr/files/lib/fwmngr/fwmngr.sh
Normal file
@@ -0,0 +1,300 @@
|
||||
#!/bin/sh
|
||||
#set -x
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
TEMP_UCI_PATH="/tmp/firewall"
|
||||
|
||||
INPUT="REJECT"
|
||||
OUTPUT="ACCEPT"
|
||||
FORWARD="REJECT"
|
||||
|
||||
zone_list=""
|
||||
|
||||
get_rule_ip_family() {
|
||||
if [ "$1" == "4" ]; then
|
||||
echo "ipv4"
|
||||
elif [ "$1" == "6" ]; then
|
||||
echo "ipv6"
|
||||
else
|
||||
echo "-1"
|
||||
fi
|
||||
}
|
||||
|
||||
set_rule_target() {
|
||||
local rule_sec="$1"
|
||||
local target="$2"
|
||||
local targetchain="$3"
|
||||
if [ "$target" == "Accept" ] || [ "$target" == "accept" ] || [ "$target" == "Reject" ] || [ "$target" == "reject" ] || [ "$target" == "Drop" ] || [ "$target" == "drop" ]; then
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.target="$(echo $target | awk '{ print toupper($target) }')"
|
||||
elif [ "$target" == "Retrun" ]; then
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.target="MARK"
|
||||
elif [ "$target" == "TargetChain" ]; then
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.target="$targetchain"
|
||||
else
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.target="DROP"
|
||||
fi
|
||||
}
|
||||
|
||||
set_rule_protocol() {
|
||||
local rule_sec="$1"
|
||||
local protocol="$protocol"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.proto="$protocol"
|
||||
#TODO implementaton to configure icmpType
|
||||
}
|
||||
|
||||
create_firewall_zone_config() {
|
||||
local intf="$1"
|
||||
local masq="$2"
|
||||
local zone_exist="false"
|
||||
local is_bridge="false"
|
||||
local intf_dev=""
|
||||
local dev=""
|
||||
local zn=""
|
||||
|
||||
is_device_type_bridge() {
|
||||
config_get dev $1 "name"
|
||||
config_get dev_type $1 "type"
|
||||
if [ "$dev" == "$intf_dev" ] && [ "$dev_type" == "bridge" ]; then
|
||||
is_bridge="true"
|
||||
fi
|
||||
}
|
||||
|
||||
for zn in $zone_list; do
|
||||
if [ "$zn" == "$intf" ]; then
|
||||
zone_exist="true"
|
||||
fi
|
||||
done
|
||||
if [ "$zone_exist" == "false" ]; then
|
||||
zone_list="$zone_list $intf"
|
||||
|
||||
#default masq is set to 1 for zone wan
|
||||
if [ "$intf" == "wan" ]; then
|
||||
masq="1"
|
||||
fi
|
||||
|
||||
zone_sec=$(uci -p "$TEMP_UCI_PATH" add "firewall" "zone")
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$zone_sec.enabled="1"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$zone_sec.name="$intf"
|
||||
|
||||
intf_dev=$(uci -q get network.$intf.device)
|
||||
config_load network
|
||||
config_foreach is_device_type_bridge device
|
||||
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$zone_sec.output="$OUTPUT"
|
||||
if [ "$is_bridge" == "true" ]; then
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$zone_sec.input="ACCEPT"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$zone_sec.forward="ACCEPT"
|
||||
else
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$zone_sec.input="REJECT"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$zone_sec.forward="REJECT"
|
||||
fi
|
||||
uci -p "$TEMP_UCI_PATH" add_list firewall.$zone_sec.network="$intf"
|
||||
[ "$masq" == "1" ] && uci -p "$TEMP_UCI_PATH" set firewall.$zone_sec.masq="1"
|
||||
uci -p "$TEMP_UCI_PATH" rename firewall.$zone_sec="$intf"
|
||||
else
|
||||
[ "$masq" == "1" ] && uci -p "$TEMP_UCI_PATH" add_list firewall.${intf}.masq="1"
|
||||
fi
|
||||
}
|
||||
|
||||
#create_redirect_config() {
|
||||
|
||||
#}
|
||||
|
||||
handle_firewall_rule() {
|
||||
local rule="$1"
|
||||
local chain_name="$2"
|
||||
local chain=""
|
||||
local is_enable=""
|
||||
local src_intf=""
|
||||
local ip_version=""
|
||||
local ip_famiexitproto=""
|
||||
local protocol=""
|
||||
local dest_intf=""
|
||||
local target=""
|
||||
local targetchain=""
|
||||
local desc=""
|
||||
local dest_port=""
|
||||
local src_port=""
|
||||
local src_port_range_max=""
|
||||
local dest_port_range_max=""
|
||||
local src_ip=""
|
||||
local dest_ip=""
|
||||
|
||||
config_get is_enable "$rule" "enable" 0
|
||||
[ "$is_enable" == "1" ] || return
|
||||
|
||||
config_get chain "$rule" "chain"
|
||||
[ "$chain" == "$chain_name" ] || return
|
||||
|
||||
config_get src_intf "$rule" "source_interface"
|
||||
config_get dest_intf "$rule" "dest_interface"
|
||||
|
||||
if [ -n "$src_intf" ]; then
|
||||
create_firewall_zone_config "$src_intf" "0"
|
||||
fi
|
||||
|
||||
if [ -n "$dest_intf" ]; then
|
||||
create_firewall_zone_config "$dest_intf" "0"
|
||||
fi
|
||||
|
||||
config_get ip_version "$rule" "ip_version"
|
||||
ip_family="$(get_rule_ip_family $ip_version)"
|
||||
config_get protocol "$rule" "protocol"
|
||||
config_get src_port "$rule" "src_port"
|
||||
config_get dest_port "$rule" "dest_port"
|
||||
config_get src_ip "$rule" "src_ip"
|
||||
config_get dest_ip "$rule" "dest_ip"
|
||||
config_get dest_port_range_max "$rule" "dest_port_range_max"
|
||||
config_get src_port_range_max "$rule" "src_port_range_max"
|
||||
config_get target "$rule" "target"
|
||||
config_get targetchain "$rule" "targetchain"
|
||||
config_get desc "$rule" "description"
|
||||
|
||||
rule_sec=$(uci -p "$TEMP_UCI_PATH" add firewall rule)
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.enabled="1"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.name="$desc"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.src="$src_intf"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.dst="$dst_intf"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.family="$ip_family"
|
||||
set_rule_target "$rule_sec" "$target" "$tagetchain"
|
||||
set_rule_protocol "$rule_sec" "$protocol"
|
||||
if [ -z "$dest_port_range_max" ]; then
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.dest_port="$dest_port"
|
||||
else
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.dest_port="$dest_port:$dest_port_range_max"
|
||||
fi
|
||||
|
||||
if [ -z "$src_port_range_max" ]; then
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.src_port="$src_port"
|
||||
else
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.src_port="$src_port:$src_port_range_max"
|
||||
fi
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.src_ip="$src_ip"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$rule_sec.dest_ip="$dest_ip"
|
||||
uci -p "$TEMP_UCI_PATH" rename firewall.$rule_sec="$rule"
|
||||
}
|
||||
|
||||
handle_nat_interface_setting() {
|
||||
local nat_intf_cfg="$1"
|
||||
local interface=""
|
||||
local enable=""
|
||||
|
||||
config_get enable $nat_intf_cfg "enable"
|
||||
[ -z "$enable" ] && return
|
||||
config_get interface $nat_intf_cfg "interface"
|
||||
if [ "$enable" == "1" ] && [ -n "$interface" ]; then
|
||||
create_firewall_zone_config "$interface" "1"
|
||||
fi
|
||||
}
|
||||
|
||||
handle_nat_port_mapping() {
|
||||
local nat_port_cfg="$1"
|
||||
local enable=""
|
||||
local interface=""
|
||||
local all_interface=""
|
||||
local lease_duration=""
|
||||
local remote_host=""
|
||||
local external_port=""
|
||||
local external_port_end=""
|
||||
local internal_port=""
|
||||
local protocol=""
|
||||
local internal_client=""
|
||||
local description=""
|
||||
local redirect_sec=""
|
||||
local epoch_sec=""
|
||||
local stop_epoch=""
|
||||
local stop_ymd=""
|
||||
local stop_hms=""
|
||||
|
||||
config_get enable $nat_port_cfg "enable"
|
||||
masq=$(uci -q get firewall.$interface.masq)
|
||||
if [ -z "$enable" ] && ! [ "$masq" == "1" ]; then
|
||||
return
|
||||
fi
|
||||
config_get interface $nat_port_cfg "interface"
|
||||
config_get internal_client $nat_port_cfg "internal_client"
|
||||
if [ -z "$interface" ] || [ -z "$internal_client" ]; then
|
||||
return
|
||||
fi
|
||||
config_get all_interface $nat_port_cfg "all_interface"
|
||||
config_get lease_duration $nat_port_cfg "lease_duration"
|
||||
config_get remote_host $nat_port_cfg "remote_host"
|
||||
config_get external_port $nat_port_cfg "external_port" "0"
|
||||
config_get external_port_end $nat_port_cfg "external_port_end" "0"
|
||||
config_get internal_port $nat_port_cfg "internal_port"
|
||||
config_get protocol $nat_port_cfg "protocol"
|
||||
protocol=$(echo $protocol | awk '{print tolower($0)}')
|
||||
config_get description $nat_port_cfg "description"
|
||||
|
||||
redirect_sec=$(uci -p "$TEMP_UCI_PATH" add firewall redirect)
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$redirect_sec.src="$interface"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$redirect_sec.enabled="1"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$redirect_sec.dest_ip="$internal_client"
|
||||
[ -z "$protocol" ] || uci -p "$TEMP_UCI_PATH" set firewall.$redirect_sec.protocol="$protocol"
|
||||
[ -z "$remote_host" ] || uci -p "$TEMP_UCI_PATH" set firewall.$redirect_sec.src_ip="$remote_host"
|
||||
if [ -n "$lease_duration" ] && ! [ "$lease_duration" == "0" ]; then
|
||||
epoch_sec=$(date +%s)
|
||||
stop_epoch=$(( epoch_sec + lease_duration ))
|
||||
stop_ymd=$(date -d @${stop_epoch} +%Y-%m-%d)
|
||||
stop_hms=$(date -d @${stop_epoch} +%H:%M:%S)
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$redirect_sec.stop_date="$stop_ymd"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$redirect_sec.stop_time="$stop_hms"
|
||||
fi
|
||||
if [ "$external_port_end" == "0" ]; then
|
||||
if ! [ "$external_port" == "0" ]; then
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$redirect_sec.src_dport="$external_port"
|
||||
fi
|
||||
else
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$redirect_sec.src_dport="$external_port-$external_port_end"
|
||||
fi
|
||||
[ -z "$internal_port" ] || uci -p "$TEMP_UCI_PATH" set firewall.$redirect_sec.dest_port="$internal_port"
|
||||
[ -z "$description" ] || uci -p "$TEMP_UCI_PATH" set firewall.$redirect_sec.description="$description"
|
||||
|
||||
uci -p "$TEMP_UCI_PATH" rename firewall.$redirect_sec="$nat_port_cfg"
|
||||
}
|
||||
|
||||
configure_firewall() {
|
||||
rm -rf "$TEMP_UCI_PATH"/firewall 2>/dev/null
|
||||
mkdir -p "$TEMP_UCI_PATH"
|
||||
touch "$TEMP_UCI_PATH"/firewall
|
||||
zone_list=""
|
||||
|
||||
config_load firewallmngr
|
||||
fw_config="$(uci -q get firewallmngr.firewall.config)"
|
||||
[ -z "$fw_config" ] && return
|
||||
[ "$fw_config" == "Advanced" ] || return
|
||||
|
||||
fw_level="$(uci -q get firewallmngr.firewall.${fw_config}_level)"
|
||||
[ -z "$fw_level" ] && return
|
||||
enabled="$(uci -q get firewallmngr.${fw_level}.enable)"
|
||||
|
||||
[ "$enabled" == "1" ] || exit
|
||||
|
||||
chain="$(uci -q get firewallmngr.${fw_level}.chain)"
|
||||
[ -z "$chain" ] && exit
|
||||
|
||||
enabled="$(uci -q get firewallmngr.${chain}.enable)"
|
||||
chain_name="$(uci -q get firewallmngr.${chain}.name)"
|
||||
|
||||
#configure firewall global config
|
||||
global_sec=$(uci -p "$TEMP_UCI_PATH" add firewall globals)
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$global_sec.enabled="1"
|
||||
uci -p "$TEMP_UCI_PATH" rename firewall.$global_sec="globals"
|
||||
|
||||
#configure firewall default config
|
||||
default_sec=$(uci -p "$TEMP_UCI_PATH" add firewall default)
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$default_sec.syn_flood="1"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$default_sec.input="$INPUT"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$default_sec.output="$OUTPUT"
|
||||
uci -p "$TEMP_UCI_PATH" set firewall.$default_sec.forward="$FORWARD"
|
||||
|
||||
config_foreach handle_firewall_rule rule "$chain_name"
|
||||
|
||||
config_load firewallmngr
|
||||
config_foreach handle_nat_interface_setting nat_interface_setting
|
||||
config_foreach handle_nat_port_mapping nat_portmapping
|
||||
|
||||
uci -c "$TEMP_UCI_PATH" commit firewall
|
||||
cp "$TEMP_UCI_PATH"/firewall /etc/config/
|
||||
}
|
||||
17
firewallmngr/src/Makefile
Normal file
17
firewallmngr/src/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
LIB = libfirewallmngr.so
|
||||
|
||||
LIB_OBJS = firewallmngr.o
|
||||
|
||||
PROG_CFLAGS = $(CFLAGS) -Wall -Werror -fPIC
|
||||
LIB_LDFLAGS = $(LDFLAGS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(PROG_CFLAGS) -c -o $@ $<
|
||||
|
||||
all: $(LIB)
|
||||
|
||||
$(LIB): $(LIB_OBJS)
|
||||
$(CC) $(PROG_CFLAGS) -shared -o $@ $^ $(LIB_LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f *.o $(LIB)
|
||||
12
firewallmngr/src/common.c
Normal file
12
firewallmngr/src/common.c
Normal file
@@ -0,0 +1,12 @@
|
||||
char *Config[] = {"High", "Low", "Off", "Advanced", "Policy", NULL};
|
||||
char *DefaultPolicy[] = {"Drop", "Accept", "Reject", NULL};
|
||||
char *TargetChain[] = {"Drop", "Accept", "Reject", "Chain", NULL};
|
||||
char *ReverseTargetChain[] = {"Drop", "Accept", "Reject", "Chain", NULL};
|
||||
char *Target[] = {"Drop", "Accept", "Reject", "Return", "TargetChain", NULL};
|
||||
char *ConnectionState[] = {"INVALID", "NEW", "RELATED", "ESTABLISHED", NULL};
|
||||
char *MACAddress[] = {"^$", "^([0-9A-Fa-f][0-9A-Fa-f]:){5}([0-9A-Fa-f][0-9A-Fa-f])$", NULL};
|
||||
char *MACAddress[] = {"^$", "^([0-9A-Fa-f][0-9A-Fa-f]:){5}([0-9A-Fa-f][0-9A-Fa-f])$", NULL};
|
||||
char *Origin[] = {"User", "System", "Controller", NULL};
|
||||
char *IPv4Address[] = {"^$", "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$", NULL};
|
||||
char *IPv4Prefix[] = {"^$", "^/(3[0-2]|[012]?[0-9])$", "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])/(3[0-2]|[012]?[0-9])$", NULL};
|
||||
char *Action[] = {"Drop", "Accept", "Reject", NULL};
|
||||
2677
firewallmngr/src/firewallmngr.c
Normal file
2677
firewallmngr/src/firewallmngr.c
Normal file
File diff suppressed because it is too large
Load Diff
26
firewallmngr/src/firewallmngr.h
Normal file
26
firewallmngr/src/firewallmngr.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) 2024 iopsys Software Solutions AB
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 2.1
|
||||
* as published by the Free Software Foundation
|
||||
*
|
||||
* Author: Husaam Mehdi <husaam.mehdi@iopsys.eu>
|
||||
*/
|
||||
|
||||
#ifndef __FIREWALLMNGR_H
|
||||
#define __FIREWALLMNGR_H
|
||||
|
||||
#include <libbbfdm-api/dmcommon.h>
|
||||
#include <libbbfdm_api.h>
|
||||
|
||||
extern DMOBJ tFirewallObj[];
|
||||
extern DMLEAF tFirewallParams[];
|
||||
extern DMLEAF tFirewallLevelParams[];
|
||||
extern DMOBJ tFirewallChainObj[];
|
||||
extern DMLEAF tFirewallChainParams[];
|
||||
extern DMLEAF tFirewallChainRuleParams[];
|
||||
extern DMLEAF tFirewallDMZParams[];
|
||||
extern DMLEAF tFirewallServiceParams[];
|
||||
|
||||
#endif //__FIREWALLMNGR_H
|
||||
42
fscryptctl/Makefile
Normal file
42
fscryptctl/Makefile
Normal file
@@ -0,0 +1,42 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fscryptctl
|
||||
PKG_VERSION:=1.1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/google/fscryptctl.git
|
||||
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Encryption
|
||||
TITLE:=Fscryptctl
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
fscryptctl is a low-level tool written in C that handles raw keys and manages policies for Linux filesystem encryption,
|
||||
specifically the "fscrypt" kernel interface which is supported by the ext4, f2fs, and UBIFS filesystems
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CC="$(TARGET_CC)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
fscryptctl
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fscryptctl $(1)/usr/bin/fscryptctl
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
@@ -41,32 +41,8 @@ EXTRA_KCONFIG:= CONFIG_RGB_LED=m
|
||||
|
||||
MODULE_INCLUDE=-I$(PKG_BUILD_DIR)
|
||||
|
||||
|
||||
ifeq ($(CONFIG_TARGET_brcmbca),y)
|
||||
LINUX_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.19
|
||||
# This assumes that the MODULES_SUBDIR set by OpenWrt is of the form
|
||||
# lib/modules/4.19.235-abcdef where 4.19.235 is the version of our fake bcmlinux kernel
|
||||
# and abcdef the git-commit.
|
||||
# The kernel compiled by the Broadcom SDK has a uname -r of 4.19.235, i.e. without the git-commit.
|
||||
# The assignment below removes the part after the - which puts modules in the right directory as
|
||||
# long as the bcmlinux version matches the kernel version in the BCM SDK.
|
||||
# So, this will only stop working in the time window where the BCM SDK has been updated
|
||||
# but bcmlinux has not yet been updated.
|
||||
MODULES_SUBDIR:=$(firstword $(subst -, ,$(MODULES_SUBDIR)))
|
||||
TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_ARM_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_ARM_TOOLCHAIN_PREFIX)-
|
||||
|
||||
ifeq ($(CONFIG_BCM_CHIP_ID),$(filter $(CONFIG_BCM_CHIP_ID),"63158" "6856" "6858"))
|
||||
# These targets use a 64-bit kernel
|
||||
LINUX_KARCH:=arm64
|
||||
TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_AARCH64_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_AARCH64_TOOLCHAIN_PREFIX)-
|
||||
else ifeq ($(CONFIG_BCM_CHIP_ID),$(filter $(CONFIG_BCM_CHIP_ID),"6855" "6756" "47622" "63148" "63178"))
|
||||
# These targets use a 32-bit arm-sfp kernel
|
||||
LINUX_KARCH:=arm
|
||||
TARGET_CROSS:=$(CONFIG_BRCM_ALT_TOOLCHAIN_BASE)/$(CONFIG_BRCM_ALT_ARMSFP_TOOLCHAIN_TOPDIR)/bin/$(CONFIG_BRCM_ALT_ARMSFP_TOOLCHAIN_PREFIX)-
|
||||
endif
|
||||
# For some reason, Broadcom's kernel does not set the include paths correctly when compiling out-of-tree modules
|
||||
EXTRA_KCPPFLAGS:="-I $(LINUX_DIR)/../bcmkernel/include -I $(LINUX_DIR)/arch/arm/mach-bcm963xx/include"
|
||||
endif
|
||||
# support compilation against BCM SDK kernel
|
||||
include ../../broadcom/bcmkernel/bcm-kernel-toolchain.mk
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)/kdevlinks/
|
||||
|
||||
15
hostmngr/Config.in
Normal file
15
hostmngr/Config.in
Normal file
@@ -0,0 +1,15 @@
|
||||
if (PACKAGE_hostmngr)
|
||||
|
||||
menu "Configuration"
|
||||
|
||||
config HOSTMNGR_HOSTS_HISTORY
|
||||
bool "Keep history of hosts"
|
||||
default y
|
||||
|
||||
config HOSTMNGR_PLATFORM_HAS_WIFI
|
||||
bool "Platform has WiFi"
|
||||
default y if PACKAGE_libwifi
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
76
hostmngr/Makefile
Normal file
76
hostmngr/Makefile
Normal file
@@ -0,0 +1,76 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostmngr
|
||||
PKG_VERSION:=1.2.3
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=b4990b384461f2d1ff75a122a7fa5d9276f211bb
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/hostmngr.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
||||
define Package/hostmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Show and manage hosts in the network
|
||||
DEPENDS= +libubox +libuci +libubus +ubus +libeasy +libnl-genl \
|
||||
+libjson-c +libblobmsg-json +libnfnetlink +libmnl \
|
||||
+libnetfilter-conntrack \
|
||||
+HOSTMNGR_PLATFORM_HAS_WIFI:libwifi +libbbfdm-api \
|
||||
+libwifiutils
|
||||
|
||||
endef
|
||||
|
||||
define Package/hostmngr/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/hostmngr/description
|
||||
This package provides hostmngr that can detect and show host devices
|
||||
present in the network.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-I$(STAGING_DIR)/usr/include/libnetfilter_conntrack \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
ifeq ($(CONFIG_HOSTMNGR_PLATFORM_HAS_WIFI),y)
|
||||
TARGET_CFLAGS += -DHAS_WIFI
|
||||
endif
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
define Package/hostmngr/install
|
||||
$(CP) ./files/etc $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/hostmngr/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/hostmngr $(1)/usr/sbin/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostmngr.so $(1)/etc/hostmngr/
|
||||
$(INSTALL_DIR) $(1)/usr/share/hostmngr
|
||||
$(INSTALL_DATA) ./files/scripts/hosts_acl.sh $(1)/usr/share/hostmngr/
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -r --exclude=.* ~/git/hostmngr/ $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
$(eval $(call BuildPackage,hostmngr))
|
||||
18
hostmngr/files/etc/bbfdm/micro_services/hostmngr.json
Normal file
18
hostmngr/files/etc/bbfdm/micro_services/hostmngr.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"daemon": {
|
||||
"config": {
|
||||
"loglevel": "1"
|
||||
},
|
||||
"input": {
|
||||
"type": "DotSo",
|
||||
"name": "/etc/hostmngr/libhostmngr.so"
|
||||
},
|
||||
"output": {
|
||||
"type": "UBUS",
|
||||
"parent_dm": "Device.",
|
||||
"object": "Hosts",
|
||||
"root_obj": "bbfdm"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
9
hostmngr/files/etc/config/hosts
Normal file
9
hostmngr/files/etc/config/hosts
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
config global 'global'
|
||||
option enabled '1'
|
||||
option history '1'
|
||||
option history_file '/etc/hosts_history.json'
|
||||
option history_timeout '86400'
|
||||
|
||||
config interface
|
||||
list ifname 'br-lan'
|
||||
3
hostmngr/files/etc/firewall.hosts
Normal file
3
hostmngr/files/etc/firewall.hosts
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
sh /usr/share/hostmngr/hosts_acl.sh
|
||||
@@ -1,23 +1,25 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=98
|
||||
START=65
|
||||
STOP=20
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/capiagent" "-p 9000"
|
||||
procd_set_param limits core="unlimited"
|
||||
procd_set_param command "/usr/sbin/hostmngr" "--config hosts" "-o" "/tmp/hostmngr.log" "-f"
|
||||
# procd_set_param respawn
|
||||
procd_set_param limits core="unlimited"
|
||||
# procd_set_param stdout 1
|
||||
# procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
|
||||
sh /usr/share/hostmngr/hosts_acl.sh
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "capiagent"
|
||||
procd_add_reload_trigger "hosts"
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user