mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-20 01:20:35 +08:00
Compare commits
518 Commits
00b990d961
...
ne_882fe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7bf4735a98 | ||
|
|
99938c756f | ||
|
|
333b686806 | ||
|
|
a548e32160 | ||
|
|
5d042a9c8b | ||
|
|
82f150ea58 | ||
|
|
8a5d257a1a | ||
|
|
6957a1563d | ||
|
|
da050a7be8 | ||
|
|
17aba40f4b | ||
|
|
6d9ba66acb | ||
|
|
9a91c62bdb | ||
|
|
99dca87b35 | ||
|
|
c8163c5883 | ||
|
|
0cd398c1b7 | ||
|
|
32ed73d1ec | ||
|
|
10960502bc | ||
|
|
0537bd92fb | ||
|
|
a95f485447 | ||
|
|
d68592f24e | ||
|
|
02800eac8a | ||
|
|
8fc0f4d52a | ||
|
|
f6bad19bbc | ||
|
|
27adda5eec | ||
|
|
dc8526c40a | ||
|
|
ceb25a46a7 | ||
|
|
d715cfff40 | ||
|
|
e417e5bd3c | ||
|
|
7a5f25c60b | ||
|
|
7f237dd5c1 | ||
|
|
0a104811cc | ||
|
|
8687492bc9 | ||
|
|
b13df199eb | ||
|
|
963fe0b277 | ||
|
|
3f9598b816 | ||
|
|
ab548fca8e | ||
|
|
6f8f7933e8 | ||
|
|
7cb2008549 | ||
|
|
58dc0045de | ||
|
|
8fd3a93874 | ||
|
|
6904c169c5 | ||
|
|
52f6c72128 | ||
|
|
d3474707e7 | ||
|
|
8a2ff8f7cf | ||
|
|
4ec57ab51a | ||
|
|
c0c180ac96 | ||
|
|
40a189ed96 | ||
|
|
953dea8b87 | ||
|
|
b7597b920d | ||
|
|
749678804a | ||
|
|
d6d623e761 | ||
|
|
2264847f69 | ||
|
|
4e773fb976 | ||
|
|
68f5ac2402 | ||
|
|
5cb9293bd9 | ||
|
|
6fb739d980 | ||
|
|
19d34e3417 | ||
|
|
2bf41d47b0 | ||
|
|
fb4abd07eb | ||
|
|
cedcb18ce9 | ||
|
|
41c4512235 | ||
|
|
fc87cf8197 | ||
|
|
9a119ba0dd | ||
|
|
5fe134d348 | ||
|
|
de057f0d58 | ||
|
|
ffc0f1cad1 | ||
|
|
379f1bc95a | ||
|
|
ec7a8d0244 | ||
|
|
ffa7f9bbc6 | ||
|
|
0d3da06f85 | ||
|
|
55cc54e7f7 | ||
|
|
b5f38bf1f5 | ||
|
|
e43631ecaa | ||
|
|
ddf478f77a | ||
|
|
38d9ef7526 | ||
|
|
6b8ee5491a | ||
|
|
38b64c584e | ||
|
|
492cc5c029 | ||
|
|
f030674f68 | ||
|
|
32a13d12f0 | ||
|
|
3dbe7f7f3e | ||
|
|
f1b3ec5a7d | ||
|
|
b839ad3a35 | ||
|
|
50d8f9536c | ||
|
|
1829f69726 | ||
|
|
d228445386 | ||
|
|
80dbe5da48 | ||
|
|
11540c919a | ||
|
|
1278e4d936 | ||
|
|
402ac6f5b2 | ||
|
|
5097780ae3 | ||
|
|
16d0184b73 | ||
|
|
282026b14d | ||
|
|
faf81bbe2b | ||
|
|
cfce60fd58 | ||
|
|
486b6c4b1f | ||
|
|
e180e17bfe | ||
|
|
14b3cf4657 | ||
|
|
77d641c688 | ||
|
|
5cfc71114c | ||
|
|
9fdc3d6126 | ||
|
|
316e6d080a | ||
|
|
652e6335e5 | ||
|
|
82a68b2f27 | ||
|
|
2d638220b2 | ||
|
|
0811488af9 | ||
|
|
18eb5d7f58 | ||
|
|
14d2d0934f | ||
|
|
3fd9ca090d | ||
|
|
8ea89f2b98 | ||
|
|
39f8886e25 | ||
|
|
22d496ac67 | ||
|
|
cc7ad3a31c | ||
|
|
29e9923bf7 | ||
|
|
9fa6c02fa7 | ||
|
|
35396ea204 | ||
|
|
7f108c27ee | ||
|
|
9d3db6e1a0 | ||
|
|
767aff87b8 | ||
|
|
65cf5ba958 | ||
|
|
c8cfbc194d | ||
|
|
364b6223fa | ||
|
|
64fb2de39a | ||
|
|
98ea0bbf05 | ||
|
|
901666827e | ||
|
|
08a9824d5e | ||
|
|
330ce960fc | ||
|
|
ea8a6fd790 | ||
|
|
531b441f80 | ||
|
|
471c8d8e5e | ||
|
|
5981e5b563 | ||
|
|
90ca84517c | ||
|
|
0fe517315e | ||
|
|
21f18cfd34 | ||
|
|
ad39e7603b | ||
|
|
be0595cb13 | ||
|
|
1b9c7328a3 | ||
|
|
3aa9e7fbe2 | ||
|
|
6c1a16b3b4 | ||
|
|
860c9ce9e9 | ||
|
|
c5de1a939f | ||
|
|
7ccd66f2e0 | ||
|
|
886bc94363 | ||
|
|
03bd91650b | ||
|
|
b6d834467d | ||
|
|
a69268966c | ||
|
|
35c02b68d3 | ||
|
|
8605c1e455 | ||
|
|
76457bc80a | ||
|
|
0a17b21d66 | ||
|
|
579e188bc8 | ||
|
|
42c3fd9ce4 | ||
|
|
d3d638dd6f | ||
|
|
3c9aabbc1b | ||
|
|
ccb83f2c91 | ||
|
|
6d9b07317b | ||
|
|
69cca97ff6 | ||
|
|
fdf4abda52 | ||
|
|
cbbdbca752 | ||
|
|
1bb1733238 | ||
|
|
6b44d95bd5 | ||
|
|
8289dce603 | ||
|
|
d0ca976d71 | ||
|
|
2bb5272e3d | ||
|
|
7bc170188b | ||
|
|
6bd264e6d5 | ||
|
|
d0e229743c | ||
|
|
79edd055bf | ||
|
|
2408f215ac | ||
|
|
d66e7fab9b | ||
|
|
b96ebeb84c | ||
|
|
2a7ba5608f | ||
|
|
ec61d302c5 | ||
|
|
186e8a960d | ||
|
|
1692ed2afe | ||
|
|
404ae888a8 | ||
|
|
bbe4473f40 | ||
|
|
51707f0272 | ||
|
|
c598a47281 | ||
|
|
63c5275f42 | ||
|
|
8875203b9b | ||
|
|
1d9e70a1d2 | ||
|
|
c8042b2b6c | ||
|
|
a316b74555 | ||
|
|
91a81169bc | ||
|
|
d12aff727c | ||
|
|
0daddcd84f | ||
|
|
7a684f0a40 | ||
|
|
bc8bc4bd48 | ||
|
|
5316eb2cca | ||
|
|
37621309e8 | ||
|
|
ac7abe0536 | ||
|
|
242fc21967 | ||
|
|
8d4453b107 | ||
|
|
5213d64579 | ||
|
|
3e872da3ce | ||
|
|
c35824f5ec | ||
|
|
bf6e0244f4 | ||
|
|
dc20fe3654 | ||
|
|
c3b0ecb042 | ||
|
|
38c0a6b60f | ||
|
|
fc475de4da | ||
|
|
74f4716ccd | ||
|
|
24f125ff94 | ||
|
|
caccbdfdf0 | ||
|
|
ce124fc5da | ||
|
|
8abc606452 | ||
|
|
6417542d62 | ||
|
|
98ef763849 | ||
|
|
e0f501a75f | ||
|
|
a9850c25cb | ||
|
|
91509243e5 | ||
|
|
3b8c236546 | ||
|
|
c2ccb89855 | ||
|
|
1994c26d23 | ||
|
|
6ece55c134 | ||
|
|
ed58db0758 | ||
|
|
d2f317c20c | ||
|
|
efb4429e76 | ||
|
|
e3836e6dff | ||
|
|
cb9ddf3b59 | ||
|
|
956ae7d35e | ||
|
|
b7767e0333 | ||
|
|
255aab4ef2 | ||
|
|
827d19e557 | ||
|
|
096310eca3 | ||
|
|
4afc0d6b10 | ||
|
|
01b12e0f59 | ||
|
|
f164d0f23f | ||
|
|
bb8e213cdd | ||
|
|
3998edded4 | ||
|
|
478e87d472 | ||
|
|
05829038fa | ||
|
|
5cffc3cae3 | ||
|
|
904f18411d | ||
|
|
f8ba7f0dcf | ||
|
|
5cb8608927 | ||
|
|
9acead4347 | ||
|
|
42bec0b4c8 | ||
|
|
f038e661b6 | ||
|
|
84f93c585d | ||
|
|
f609fe8845 | ||
|
|
f254adbfb2 | ||
|
|
a41fa2790e | ||
|
|
6c16e88598 | ||
|
|
3c581fca1a | ||
|
|
035263a450 | ||
|
|
11287b6faa | ||
|
|
b6371cba1a | ||
|
|
c5097fc375 | ||
|
|
ebaab686ed | ||
|
|
c758ec49fe | ||
|
|
84a52004bb | ||
|
|
85df013680 | ||
|
|
5c491c84dd | ||
|
|
ef34422a54 | ||
|
|
50949e63b0 | ||
|
|
38a07a87a0 | ||
|
|
eb0cf4f1fa | ||
|
|
1a15a4c42d | ||
|
|
cd262d78b6 | ||
|
|
654c047df7 | ||
|
|
28cf302e58 | ||
|
|
972eb125f0 | ||
|
|
d429fd24ee | ||
|
|
6dda009eb5 | ||
|
|
84754a2704 | ||
|
|
4a0a34cc19 | ||
|
|
4c0aac777e | ||
|
|
0c14c69c2c | ||
|
|
f44fdd8db1 | ||
|
|
1d849bd57a | ||
|
|
d906c17eb0 | ||
|
|
dffe253f12 | ||
|
|
b26ddb4edb | ||
|
|
eff6d9b96b | ||
|
|
2e852c5a99 | ||
|
|
3ee627c4ce | ||
|
|
726982c3e6 | ||
|
|
ab6c67f643 | ||
|
|
06f7f65b4d | ||
|
|
77f7315b53 | ||
|
|
47f8651078 | ||
|
|
b903a4f332 | ||
|
|
b627749ae6 | ||
|
|
62120c6769 | ||
|
|
13bf602a93 | ||
|
|
be36ca0ab0 | ||
|
|
3bf9566a62 | ||
|
|
3a6295d370 | ||
|
|
7418afc3e1 | ||
|
|
026814da18 | ||
|
|
a11c28214c | ||
|
|
9af889d28e | ||
|
|
70294978f5 | ||
|
|
be01ee85f6 | ||
|
|
72e5126a0f | ||
|
|
038f5af58f | ||
|
|
9d6d189707 | ||
|
|
3f1aae0d5a | ||
|
|
e15dd68933 | ||
|
|
5cd72947e9 | ||
|
|
24cb62f6e3 | ||
|
|
9910cde335 | ||
|
|
63cfcd9968 | ||
|
|
cf91dc7a2a | ||
|
|
122b14c8b0 | ||
|
|
7eb490ce87 | ||
|
|
38cb923a38 | ||
|
|
5b8dca53e9 | ||
|
|
4799456b48 | ||
|
|
50492f67c3 | ||
|
|
717b83f0e4 | ||
|
|
d7da9d900c | ||
|
|
ebf076b539 | ||
|
|
4a843187c8 | ||
|
|
94aa904234 | ||
|
|
ebc7ab4334 | ||
|
|
f30abfe5bd | ||
|
|
61882e980a | ||
|
|
739faa80fe | ||
|
|
3ccc122539 | ||
|
|
eac510d7ea | ||
|
|
1d34ac77e5 | ||
|
|
e79f917e7e | ||
|
|
bf59291610 | ||
|
|
17b223d35f | ||
|
|
755efd42ae | ||
|
|
46b8d717d5 | ||
|
|
9be656695c | ||
|
|
8c242bbdad | ||
|
|
d36da9d94b | ||
|
|
ec4ac5a195 | ||
|
|
238f8bf928 | ||
|
|
787abf300f | ||
|
|
a96c18eb17 | ||
|
|
f3d05939c8 | ||
|
|
d438d4d269 | ||
|
|
b4985825c6 | ||
|
|
9fa8f7c8a6 | ||
|
|
5195434ee0 | ||
|
|
1c4fee3b2d | ||
|
|
4d609b0d4c | ||
|
|
9f2e663c66 | ||
|
|
02de70ad19 | ||
|
|
15dd3f227c | ||
|
|
2dab01fcf7 | ||
|
|
f1f31b1373 | ||
|
|
c405f8d9aa | ||
|
|
2a3128f08c | ||
|
|
3d4aac4cef | ||
|
|
0f7d11e247 | ||
|
|
10407ee99a | ||
|
|
9ee39a451f | ||
|
|
141fd56567 | ||
|
|
2f91df7419 | ||
|
|
5e4a805880 | ||
|
|
11f5012b63 | ||
|
|
4776861483 | ||
|
|
40f255189f | ||
|
|
b71991ac56 | ||
|
|
5c9d1f09a6 | ||
|
|
c3ba98f2f3 | ||
|
|
307b828994 | ||
|
|
1dbacbb880 | ||
|
|
387be147e6 | ||
|
|
75988519f5 | ||
|
|
f46f994ce2 | ||
|
|
40a43b643c | ||
|
|
80fe362716 | ||
|
|
72b385e50f | ||
|
|
853f895c6d | ||
|
|
03b1576b8d | ||
|
|
6e738b7fcb | ||
|
|
5b3e5d157d | ||
|
|
018a530f35 | ||
|
|
12d3905280 | ||
|
|
47b176a94c | ||
|
|
12ff0f953d | ||
|
|
47a250754f | ||
|
|
5b0e926cd9 | ||
|
|
18453ce68e | ||
|
|
12645e7525 | ||
|
|
73e354c8cc | ||
|
|
abdd812601 | ||
|
|
e56c279786 | ||
|
|
e01fbf3fad | ||
|
|
22b37efad9 | ||
|
|
5628a1bee6 | ||
|
|
6d9c8d1090 | ||
|
|
dee5ea0da3 | ||
|
|
0c6dad2c58 | ||
|
|
f9cd9c627e | ||
|
|
31f03a7b47 | ||
|
|
50d2408ddb | ||
|
|
79f5bbd0cf | ||
|
|
58fdac62b0 | ||
|
|
32192f5423 | ||
|
|
35bb02b726 | ||
|
|
77536709f0 | ||
|
|
e67a5e505f | ||
|
|
cd7826de33 | ||
|
|
c09a4a0ca5 | ||
|
|
49e7f2e349 | ||
|
|
44e614d8e2 | ||
|
|
dba358a542 | ||
|
|
6688812576 | ||
|
|
9b14d0574f | ||
|
|
82bf3bbba4 | ||
|
|
311273865d | ||
|
|
e64714e538 | ||
|
|
f29ade1e60 | ||
|
|
ddf6d7ba32 | ||
|
|
803be5fcad | ||
|
|
08abbdfe5b | ||
|
|
3ad949442c | ||
|
|
6b37f2fccb | ||
|
|
8d3aa2aa60 | ||
|
|
9f5d5eb347 | ||
|
|
2d9a47073b | ||
|
|
dc0ab5dbd3 | ||
|
|
f513b5ba46 | ||
|
|
aa5e98a35c | ||
|
|
051c6f2cc1 | ||
|
|
aa2a78e211 | ||
|
|
063d20932a | ||
|
|
59752df3d4 | ||
|
|
66f28e376d | ||
|
|
fbb6a84da8 | ||
|
|
bcd8b4f010 | ||
|
|
e98ef22bc5 | ||
|
|
c45938f5ad | ||
|
|
05b24396af | ||
|
|
ba0e9e25ba | ||
|
|
a6005cb439 | ||
|
|
3ebb026453 | ||
|
|
921b0fc335 | ||
|
|
10eeef5a32 | ||
|
|
a55c39c32e | ||
|
|
70422f048b | ||
|
|
8670fb8e7d | ||
|
|
54ddfb5b2d | ||
|
|
e8cdea9a79 | ||
|
|
7613b55f49 | ||
|
|
ecc65760b7 | ||
|
|
053c36c1c7 | ||
|
|
7d9325abff | ||
|
|
baee22e19f | ||
|
|
cc765c2704 | ||
|
|
2ae8cd2987 | ||
|
|
1ce681afac | ||
|
|
b66629350d | ||
|
|
3a6dce64de | ||
|
|
fbf4c2d7ed | ||
|
|
57386b0e87 | ||
|
|
37505a1c24 | ||
|
|
4b28a1cd4a | ||
|
|
26fff3a9ac | ||
|
|
fe3592b382 | ||
|
|
78cc239b3d | ||
|
|
714c822e7d | ||
|
|
d5d8cbff6e | ||
|
|
66f5f5315a | ||
|
|
96a8f4f8fa | ||
|
|
80b71b4a9c | ||
|
|
cb86ec3c50 | ||
|
|
6451da621d | ||
|
|
8596640c59 | ||
|
|
e61adabad1 | ||
|
|
2e30eb75b5 | ||
|
|
b00dbbfc16 | ||
|
|
7acb31977c | ||
|
|
8f075c2dde | ||
|
|
15ab530afb | ||
|
|
d7d28d4d53 | ||
|
|
ac05fc5e09 | ||
|
|
affd3a59ee | ||
|
|
702558940f | ||
|
|
96af293828 | ||
|
|
9220eaab7f | ||
|
|
d2e6343808 | ||
|
|
8b71e43391 | ||
|
|
b12b3dcf79 | ||
|
|
2af76e93d6 | ||
|
|
8eff3b57e7 | ||
|
|
24470ed5f8 | ||
|
|
aba55434de | ||
|
|
49a4936cc0 | ||
|
|
1d63ac6583 | ||
|
|
bb9f180b77 | ||
|
|
64c624c281 | ||
|
|
d7946e13f1 | ||
|
|
baa19aad3f | ||
|
|
48c0d51e0e | ||
|
|
f0301c8a45 | ||
|
|
458a57bbb7 | ||
|
|
ebcee30bce | ||
|
|
34f90babf5 | ||
|
|
34dc1fed4b | ||
|
|
7633ca403c | ||
|
|
ec392c923c | ||
|
|
24205bf73f | ||
|
|
76b1e43b6f | ||
|
|
4672afb6de | ||
|
|
d2ff5738cd | ||
|
|
43246014e1 | ||
|
|
115b752ade | ||
|
|
26b06548f6 | ||
|
|
6c99b9fc72 | ||
|
|
135ebebd44 | ||
|
|
2d188b5c37 | ||
|
|
14ce1429a4 | ||
|
|
a6b585cccf | ||
|
|
6db304b6ff | ||
|
|
817a7e8301 | ||
|
|
e8790801d0 | ||
|
|
a6790ac523 | ||
|
|
76656bb043 |
@@ -25,3 +25,7 @@ config BBFDM_ENABLE_JSON_PLUGIN
|
||||
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
|
||||
|
||||
58
bbf/Makefile
58
bbf/Makefile
@@ -5,11 +5,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libbbfdm
|
||||
PKG_VERSION:=6.6.36
|
||||
PKG_VERSION:=6.8.9.43
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
|
||||
PKG_SOURCE_VERSION:=180119192418dbac64713c3e5efe761a1f8e871e
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
|
||||
PKG_SOURCE_VERSION:=0f5ef9c5f62ba49420ad0ecef5268c8fd7b44aef
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
@@ -18,8 +18,8 @@ PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/libbbf_api
|
||||
SECTION:=utils
|
||||
@@ -85,56 +85,50 @@ define Build/Prepare
|
||||
endef
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE \
|
||||
-Wall -Werror \
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr181
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR181=ON
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR104),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr104
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR104=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR143),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr143
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_TR143=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_VENDOR_EXTENSION),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-vendor-extension
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_VENDOR_EXTENSION=ON
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
BBF_VENDOR_LIST="$(CONFIG_BBF_VENDOR_LIST)" \
|
||||
BBF_VENDOR_PREFIX="$(CONFIG_BBF_VENDOR_PREFIX)"
|
||||
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)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-json-plugin
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_JSON_PLUGIN=ON
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-shared-library
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_DOTSO_PLUGIN=ON
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),openssl)
|
||||
CONFIGURE_ARGS += --enable-libopenssl
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
|
||||
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),wolfssl)
|
||||
CONFIGURE_ARGS += --enable-libwolfssl
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
|
||||
CMAKE_OPTIONS += -DWITH_WOLFSSL=ON
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),mbedtls)
|
||||
CONFIGURE_ARGS += --enable-libmbedtls
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
|
||||
CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
|
||||
endif
|
||||
|
||||
define Package/libbbf_api/install
|
||||
@@ -148,8 +142,10 @@ define Package/libbbfdm/default/install
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json
|
||||
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.so* $(1)/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
|
||||
$(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
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/default/prerm
|
||||
@@ -174,7 +170,7 @@ define Build/InstallDev
|
||||
$(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)/bin/.libs/libbbfdm.{a,so*} $(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/usr/lib/
|
||||
touch $(1)/usr/lib/libbbf_api.so
|
||||
endef
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bulkdata
|
||||
PKG_VERSION:=2.0.3
|
||||
PKG_VERSION:=2.0.3.1
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bulkdata.git
|
||||
PKG_SOURCE_VERSION:=85d7486a21a9eb0e0f345b587b3ac506edcb72fe
|
||||
PKG_SOURCE_VERSION:=33a6648de9ee0af33c44518656b56b0a30b6c1ab
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dectmngr
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=3.5.1
|
||||
PKG_VERSION:=3.5.20
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=8c94908eb230dc453dd2f5575be6c06b086b2e7d
|
||||
PKG_SOURCE_VERSION:=0863ab223679fe81da132829429b94f07a688953
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
|
||||
Binary file not shown.
BIN
dectmngr/files/etc/dspg/04130013.bin
Normal file
BIN
dectmngr/files/etc/dspg/04130013.bin
Normal file
Binary file not shown.
@@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=easy-soc-libs
|
||||
PKG_VERSION:=6.4.44
|
||||
PKG_VERSION:=6.5.61
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=e4f811b7cd2836cdcce5ea0f97f515a317da5bc3
|
||||
PKG_SOURCE_VERSION:=1f365cc51b784c8f580bcda2b31cd70be9efaf41
|
||||
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
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=endptmngr
|
||||
PKG_VERSION:=0.6
|
||||
PKG_VERSION:=0.13
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
|
||||
PKG_SOURCE_VERSION:=2390a3503990e04e33e8e448ad9dccc00f206908
|
||||
PKG_SOURCE_VERSION:=20e36fe5ae56122ffedace9497751a7d88bb53e9
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2022 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=evoice
|
||||
PKG_VERSION:=0.2.1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/evoice.git
|
||||
PKG_SOURCE_VERSION:=f2477946f9e142d01820b38e32ce98a781e0310e
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
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 +TARGET_iopsys_brcm63xx_arm:bcmkernel +TARGET_iopsys_econet:kmod-voip_driver
|
||||
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 change the path below to your own git repository.
|
||||
define Build/Prepare
|
||||
rsync -av /swdev/bide/evoice_clean/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
export IDIR = $(STAGING_DIR)/usr/include
|
||||
export BDIR = bcm963xx/userspace/private/apps/voice
|
||||
export _XFLAGS = -I$(IDIR) -I$(IDIR)/$(BDIR)/inc -I$(IDIR)/bcm963xx/xchg/bos/publicInc -I$(IDIR)/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_econet),y)
|
||||
TARGET_PLATFORM=ECONET
|
||||
endif
|
||||
|
||||
export TARGET_PLATFORM
|
||||
|
||||
|
||||
define Build/Compile
|
||||
@echo "TARGET_PLATFORM=${TARGET_PLATFORM}"
|
||||
+$(MAKE) -r -R -C $(PKG_BUILD_DIR) -f _bld/src/cdabs.mk SWB=b_gxxqca6 HWA=a_openwrt HWC=c_hosted OSP=p_posix TRG=SVrgBcmFxs LIF=cerder DBG=dbg
|
||||
+$(MAKE) -r -R -C $(PKG_BUILD_DIR) -f _bld/src/cdabs.mk SWB=b_gxxqca6 HWA=a_openwrt HWC=c_hosted OSP=p_posix TRG=libvoiceservice LIF=cerder DBG=dbg
|
||||
endef
|
||||
|
||||
define Package/evoice/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(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,345 +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 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'
|
||||
list CodecList '1CodecProfile1'
|
||||
list CodecList '1CodecProfile2'
|
||||
list CodecList '1CodecProfile3'
|
||||
list CodecList '1CodecProfile5'
|
||||
list CodecList '1CodecProfile4'
|
||||
|
||||
config Capabilities 'Capabilities'
|
||||
option FacilityActions 'CW_ACTIVE,CFU_ACTIVE'
|
||||
|
||||
config CapabilitiesCodec 'Codec1'
|
||||
option Codec 'G.711ALaw'
|
||||
|
||||
config CapabilitiesCodec 'Codec2'
|
||||
option Codec 'G.711MuLaw'
|
||||
|
||||
config CapabilitiesCodec 'Codec3'
|
||||
option Codec 'G.726'
|
||||
|
||||
config CapabilitiesCodec 'Codec4'
|
||||
option Codec 'G.722'
|
||||
|
||||
config CapabilitiesCodec 'Codec5'
|
||||
option Codec 'G.729'
|
||||
|
||||
config CodecProfile '1CodecProfile1'
|
||||
option Enable '1'
|
||||
option Codec 'Codec1'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '1'
|
||||
|
||||
config CodecProfile '1CodecProfile2'
|
||||
option Enable '1'
|
||||
option Codec 'Codec2'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '1'
|
||||
|
||||
config CodecProfile '1CodecProfile3'
|
||||
option Enable '1'
|
||||
option Codec 'Codec3'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '0'
|
||||
|
||||
config CodecProfile '1CodecProfile4'
|
||||
option Enable '1'
|
||||
option Codec 'Codec4'
|
||||
option PacketizationPeriod '20'
|
||||
option SilenceSupression '0'
|
||||
|
||||
config CodecProfile '1CodecProfile5'
|
||||
option Enable '1'
|
||||
option Codec 'Codec5'
|
||||
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 '1'
|
||||
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 '3PrefixInfo1'
|
||||
list PrefixList '3PrefixInfo2'
|
||||
list PrefixList '3PrefixInfo3'
|
||||
list PrefixList '3PrefixInfo4'
|
||||
list PrefixList '3PrefixInfo5'
|
||||
list PrefixList '3PrefixInfo6'
|
||||
list PrefixList '3PrefixInfo7'
|
||||
list PrefixList '3PrefixInfo8'
|
||||
list PrefixList '3PrefixInfo9'
|
||||
|
||||
config NumberingPlan 'NumberingPlan3'
|
||||
option MinimumNumberOfDigits '5'
|
||||
option MaximumNumberOfDigits '15'
|
||||
option InterDigitTimerStd '2000'
|
||||
option InterDigitTimerOpen '2000'
|
||||
option TerminationDigit '#'
|
||||
list PrefixList '4PrefixInfo1'
|
||||
|
||||
config PrefixInfo '3PrefixInfo1'
|
||||
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 '3PrefixInfo2'
|
||||
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 '3PrefixInfo3'
|
||||
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 '3PrefixInfo4'
|
||||
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 '3PrefixInfo5'
|
||||
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 '3PrefixInfo6'
|
||||
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 '3PrefixInfo7'
|
||||
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 '3PrefixInfo8'
|
||||
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 '3PrefixInfo9'
|
||||
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 '4PrefixInfo1'
|
||||
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#'
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
# Capabilties are platform dependent. Keep these separated from customer configuration
|
||||
|
||||
config capabilities_prm 'limits'
|
||||
option MaxCallLogCount '100'
|
||||
|
||||
config capabilities_prm 'features'
|
||||
option QIModelsSupported 'G.107'
|
||||
|
||||
config CapabilitiesCodec 'Codec1'
|
||||
option Codec 'G.711ALaw'
|
||||
option BitRate '64000'
|
||||
option PacketizationPeriod '20,30'
|
||||
option SilenceSupression '1'
|
||||
|
||||
config CapabilitiesCodec 'Codec2'
|
||||
option Codec 'G.711MuLaw'
|
||||
option BitRate '64000'
|
||||
option PacketizationPeriod '20,30'
|
||||
option SilenceSupression '1'
|
||||
|
||||
config CapabilitiesCodec 'Codec3'
|
||||
option Codec 'G.726'
|
||||
option BitRate '32000'
|
||||
option PacketizationPeriod '20,30'
|
||||
option SilenceSupression '0'
|
||||
|
||||
config CapabilitiesCodec 'Codec4'
|
||||
option Codec 'G.722'
|
||||
option BitRate '64000'
|
||||
option PacketizationPeriod '20,30'
|
||||
option SilenceSupression '0'
|
||||
|
||||
config CapabilitiesCodec 'Codec4'
|
||||
option Codec 'G.729'
|
||||
option BitRate '8000'
|
||||
option PacketizationPeriod '20,30'
|
||||
option SilenceSupression '0'
|
||||
|
||||
@@ -1,166 +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 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 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'
|
||||
|
||||
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 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,57 +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 SIP_SessTmrEnable '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'
|
||||
|
||||
@@ -12,19 +12,3 @@ config CWMP_ACS_MULTI
|
||||
config CWMP_ACS_HDM
|
||||
bool "Select HDM as ACS server"
|
||||
endchoice
|
||||
|
||||
config CWMP_DEBUG
|
||||
bool "Compile with debug options"
|
||||
depends on PACKAGE_icwmp || \
|
||||
PACKAGE_icwmp-openssl || \
|
||||
PACKAGE_icwmp-wolfssl || \
|
||||
PACKAGE_icwmp-mbedtls
|
||||
default y
|
||||
|
||||
config CWMP_DEVEL_DEBUG
|
||||
bool "Compile with development debug options (deprecated)"
|
||||
depends on PACKAGE_icwmp || \
|
||||
PACKAGE_icwmp-openssl || \
|
||||
PACKAGE_icwmp-wolfssl || \
|
||||
PACKAGE_icwmp-mbedtls
|
||||
default n
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=8.4.8
|
||||
PKG_VERSION:=8.4.26.10
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
|
||||
PKG_SOURCE_VERSION:=00d037ce851495aca6365f2189849c6030f305df
|
||||
PKG_SOURCE_VERSION:=ac7410a726a7269dcaef4c80061cab7a4447f6d1
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
@@ -22,11 +22,6 @@ PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_CWMP_ACS_MULTI \
|
||||
CONFIG_CWMP_ACS_HDM \
|
||||
CONFIG_CWMP_DEBUG \
|
||||
CONFIG_CWMP_DEVEL_DEBUG
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -38,20 +33,10 @@ define Package/icwmp/default
|
||||
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml
|
||||
endef
|
||||
|
||||
define Package/icwmp/config
|
||||
source "$(SOURCE)/Config_cwmp.in"
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE \
|
||||
-D_GNU_SOURCE -g \
|
||||
"-DCWMP_REVISION=\\\"$(PKG_SOURCE_VERSION)\\\""
|
||||
|
||||
define Package/icwmp
|
||||
$(Package/icwmp/default)
|
||||
TITLE += (internal)
|
||||
VARIANT:=internal
|
||||
endef
|
||||
|
||||
define Package/icwmp-openssl
|
||||
$(Package/icwmp/default)
|
||||
TITLE += (openssl)
|
||||
@@ -78,40 +63,14 @@ endef
|
||||
|
||||
ifeq ($(BUILD_VARIANT),openssl)
|
||||
CONFIGURE_ARGS += --enable-libopenssl
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
|
||||
TARGET_LDFLAGS += "-lssl"
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),wolfssl)
|
||||
CONFIGURE_ARGS += --enable-libwolfssl
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
|
||||
TARGET_LDFLAGS += "-lwolfssl"
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),mbedtls)
|
||||
CONFIGURE_ARGS += --enable-libmbedtls
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
|
||||
TARGET_LDFLAGS += "-lmbedtls"
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CWMP_ACS_MULTI),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-acs=multi
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CWMP_ACS_HDM),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-acs=hdm
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CWMP_DEBUG),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-debug
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CWMP_DEVEL_DEBUG),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-devel
|
||||
endif
|
||||
|
||||
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
|
||||
@@ -128,22 +87,25 @@ define Package/icwmp/default/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json/
|
||||
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/icwmpd $(1)/usr/sbin/icwmpd
|
||||
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
|
||||
$(INSTALL_BIN) ./files/etc/firewall.cwmp $(1)/etc/firewall.cwmp
|
||||
$(INSTALL_BIN) ./files/etc/init.d/icwmpd $(1)/etc/init.d/icwmpd
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/85-cwmp-set-userid $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/95-icwmp-generate-ssl $(1)/etc/uci-defaults/
|
||||
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
|
||||
$(INSTALL_BIN) ./files/etc/icwmpd/update.sh $(1)/etc/icwmpd/update.sh
|
||||
$(INSTALL_DATA) ./files/etc/bbfdm/json/CWMPManagementServer.json $(1)/etc/bbfdm/json/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
|
||||
endef
|
||||
|
||||
Package/icwmp-openssl/install = $(Package/icwmp/default/install)
|
||||
Package/icwmp-wolfssl/install = $(Package/icwmp/default/install)
|
||||
Package/icwmp-mbedtls/install = $(Package/icwmp/default/install)
|
||||
|
||||
$(eval $(call BuildPackage,icwmp))
|
||||
$(eval $(call BuildPackage,icwmp-openssl))
|
||||
$(eval $(call BuildPackage,icwmp-wolfssl))
|
||||
$(eval $(call BuildPackage,icwmp-mbedtls))
|
||||
|
||||
36
icwmp/files/etc/bbfdm/json/CWMPManagementServer.json
Normal file
36
icwmp/files/etc/bbfdm/json/CWMPManagementServer.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"json_plugin_version": 1,
|
||||
"Device.CWMPManagementServer.": {
|
||||
"type": "object",
|
||||
"version": "2.15",
|
||||
"protocols": [
|
||||
"usp"
|
||||
],
|
||||
"access": false,
|
||||
"array": false,
|
||||
"dependency": "file:/etc/config/cwmp",
|
||||
"EnableCWMP": {
|
||||
"type": "boolean",
|
||||
"version": "2.15",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"usp"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "cwmp",
|
||||
"section": {
|
||||
"name": "cpe"
|
||||
},
|
||||
"option": {
|
||||
"name": "enable"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,9 @@ config acs 'acs'
|
||||
option ip_version '4'
|
||||
|
||||
config cpe 'cpe'
|
||||
option enable '1'
|
||||
option default_wan_interface 'wan'
|
||||
option default_lan_interface 'lan'
|
||||
option log_to_console 'disable'
|
||||
option log_to_file 'disable'
|
||||
# log_severity: INFO (Default)
|
||||
|
||||
@@ -1,98 +1,27 @@
|
||||
#!/bin/sh
|
||||
. /lib/functions.sh
|
||||
|
||||
log() {
|
||||
echo "$@" |logger -t cwmp.update -p info
|
||||
}
|
||||
|
||||
handle_icwmp_update() {
|
||||
local defwan vendorspecinf update
|
||||
local fallback_restart
|
||||
local cwmp_enable
|
||||
config_load cwmp
|
||||
|
||||
fallback_restart="${1:-0}"
|
||||
update="0"
|
||||
defwan="$(uci -q get cwmp.cpe.default_wan_interface)"
|
||||
vendorspecinf="$(ifstatus "${defwan}" | jsonfilter -e "@.data.vendorspecinf")"
|
||||
config_get_bool cwmp_enable cpe enable 1
|
||||
if [ "$cwmp_enable" = "0" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
log "Handling dhcp option value [${vendorspecinf}]"
|
||||
[ -n "$vendorspecinf" ] && {
|
||||
local url old_url
|
||||
local prov_code old_prov_code
|
||||
local min_wait_interval old_min_wait_interval
|
||||
local retry_interval_multiplier old_retry_interval_multiplier
|
||||
|
||||
old_url="$(uci -q get cwmp.acs.dhcp_url)"
|
||||
old_prov_code="$(uci -q get cwmp.cpe.dhcp_provisioning_code)"
|
||||
old_min_wait_interval="$(uci -q get cwmp.acs.dhcp_retry_min_wait_interval)"
|
||||
old_retry_interval_multiplier="$(uci -q get cwmp.acs.dhcp_retry_interval_multiplier)"
|
||||
|
||||
case $vendorspecinf in
|
||||
http://*|https://*)
|
||||
url="${vendorspecinf}"
|
||||
;;
|
||||
*)
|
||||
for optval in $vendorspecinf; do
|
||||
case $optval in
|
||||
1=*)
|
||||
url="$(echo "$optval" | cut -d"=" -f2-)"
|
||||
;;
|
||||
2=*)
|
||||
prov_code="$(echo "$optval" | cut -d"=" -f2-)"
|
||||
;;
|
||||
3=*)
|
||||
min_wait_interval="$(echo "$optval" | cut -d"=" -f2-)"
|
||||
;;
|
||||
4=*)
|
||||
retry_interval_multiplier="$(echo "$optval" | cut -d"=" -f2-)"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$url" ]; then
|
||||
if [ "${url}" != "${old_url}" ]; then
|
||||
log "## icwmp url[${old_url}] changed to [${url}]"
|
||||
uci -q set cwmp.acs.dhcp_url="$url"
|
||||
update=1
|
||||
fi
|
||||
fi
|
||||
if [ -n "$prov_code" ]; then
|
||||
if [ "${prov_code}" != "${old_prov_code}" ]; then
|
||||
log "## icwmp prov_code[${old_prov_code}] changed to [${prov_code}]"
|
||||
uci -q set cwmp.cpe.dhcp_provisioning_code="$prov_code"
|
||||
update=1
|
||||
fi
|
||||
fi
|
||||
if [ -n "$min_wait_interval" ]; then
|
||||
if [ "${min_wait_interval}" != "${old_min_wait_interval}" ]; then
|
||||
log "## icwmp min_wait_interval[${old_min_wait_interval}] changed to [${min_wait_interval}]"
|
||||
uci -q set cwmp.acs.dhcp_retry_min_wait_interval="$min_wait_interval"
|
||||
update=1
|
||||
fi
|
||||
fi
|
||||
if [ -n "$retry_interval_multiplier" ]; then
|
||||
if [ "${retry_interval_multiplier}" != "${old_retry_interval_multiplier}" ]; then
|
||||
log "## icwmp retry_interval_multiplier[${old_retry_interval_multiplier}] changed to [${retry_interval_multiplier}]"
|
||||
uci -q set cwmp.acs.dhcp_retry_interval_multiplier="$retry_interval_multiplier"
|
||||
update=1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# In case of update restart icwmp
|
||||
if [ "${update}" -eq "1" ]; then
|
||||
log "CWMP uci changes, reload cwmp with uci commit"
|
||||
ubus call uci commit '{"config":"cwmp"}'
|
||||
else
|
||||
status="$(ubus call tr069 status |jsonfilter -qe '@.last_session.status')"
|
||||
if [ "$status" = "failure" ]; then
|
||||
log "Trigger out of bound inform, since last inform status was failure"
|
||||
ubus -t 10 call tr069 inform >/dev/null 2>&1
|
||||
# Handle timeout
|
||||
if [ "$?" -eq 7 ]; then
|
||||
log "Restarting icwmp tr069 object"
|
||||
/etc/init.d/icwmpd restart
|
||||
fi
|
||||
status="$(ubus call tr069 status |jsonfilter -qe '@.last_session.status')"
|
||||
if [ "$status" != "running" ]; then
|
||||
log "Trigger out of bound inform, since last inform status was failure"
|
||||
ubus -t 10 call tr069 inform >/dev/null 2>&1
|
||||
# Handle timeout or tr069 object not found
|
||||
if [ "$?" -eq 7 ] || [ "$?" -eq 4 ]; then
|
||||
log "Restarting icwmp tr069 object"
|
||||
/etc/init.d/icwmpd restart
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -15,6 +15,34 @@ log() {
|
||||
echo "${@}"|logger -t cwmp.init -p info
|
||||
}
|
||||
|
||||
regenerate_ssl_link()
|
||||
{
|
||||
local cert_dir all_file rehash
|
||||
|
||||
cert_dir="${1}"
|
||||
[ ! -d "${cert_dir}" ] && return 0;
|
||||
|
||||
### Generate all ssl link for pem certicates ###
|
||||
all_file=$(ls $cert_dir/*.pem 2>/dev/null)
|
||||
if [ -n "${all_file}" ]; then
|
||||
for cfile in $all_file; do
|
||||
rehash="$(openssl x509 -hash -noout -in $cfile)"
|
||||
[ -f ${cert_dir}/${rehash}.0 ] || \
|
||||
ln -s $cfile $cert_dir/${rehash}.0
|
||||
done
|
||||
fi
|
||||
|
||||
### Generate all ssl link for crt certicates ###
|
||||
all_file=$(ls $cert_dir/*.crt 2>/dev/null)
|
||||
if [ -n "${all_file}" ]; then
|
||||
for cfile in $all_file; do
|
||||
rehash="$(openssl x509 -hash -noout -in $cfile)"
|
||||
[ -f ${cert_dir}/${rehash}.0 ] || \
|
||||
ln -s $cfile $cert_dir/${rehash}.0
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
enable_dhcp_option43() {
|
||||
local wan="${1}"
|
||||
|
||||
@@ -36,13 +64,192 @@ enable_dhcp_option43() {
|
||||
fi
|
||||
|
||||
newreqopts="$reqopts 43"
|
||||
if [ "${proto}" == "dhcp" ]; then
|
||||
if [ "${proto}" = "dhcp" ]; then
|
||||
uci -q set network.$wan.reqopts="$newreqopts"
|
||||
uci commit network
|
||||
ubus call network reload
|
||||
fi
|
||||
}
|
||||
|
||||
convert_to_hex() {
|
||||
local val=""
|
||||
local optval="${1}"
|
||||
OPTIND=1
|
||||
while getopts ":" opt "-$optval"
|
||||
do
|
||||
temp=$(printf "%02X" "'${OPTARG:-:}")
|
||||
val="${val}:${temp}"
|
||||
done
|
||||
|
||||
echo "${val}"
|
||||
}
|
||||
|
||||
configure_send_op125() {
|
||||
local sendopt="${1}"
|
||||
local intf="${2}"
|
||||
local uci="${3}"
|
||||
local hex_oui=""
|
||||
local hex_serial=""
|
||||
local hex_class=""
|
||||
local oui_len=0
|
||||
local serial_len=0
|
||||
local class_len=0
|
||||
|
||||
if [ "${uci}" = "network" ]; then
|
||||
local opt125="125:00:00:0D:E9"
|
||||
else
|
||||
local opt125="125,00:00:0D:E9"
|
||||
fi
|
||||
|
||||
config_get oui cpe manufacturer_oui ""
|
||||
if [ -z "${oui}" ]; then
|
||||
oui=$(db -q get device.deviceinfo.ManufacturerOUI)
|
||||
fi
|
||||
|
||||
oui=$(echo "${oui}" | tr 'a-f' 'A-F')
|
||||
|
||||
config_get serial cpe serial_number ""
|
||||
if [ -z "${serial}" ]; then
|
||||
serial=$(db -q get device.deviceinfo.SerialNumber)
|
||||
fi
|
||||
|
||||
config_get class cpe product_class ""
|
||||
if [ -z "${class}" ]; then
|
||||
class=$(db -q get device.deviceinfo.ProductClass)
|
||||
fi
|
||||
|
||||
oui_len=$(echo -n "${oui}" | wc -m)
|
||||
serial_len=$(echo -n "${serial}" | wc -m)
|
||||
class_len=$(echo -n "${class}" | wc -m)
|
||||
|
||||
if [ ${oui_len} -eq 0 ] || [ ${serial_len} -eq 0 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
opt125_len=$((oui_len + serial_len + class_len))
|
||||
if [ ${class_len} -gt 0 ]; then
|
||||
opt125_len=$((opt125_len + 6))
|
||||
else
|
||||
opt125_len=$((opt125_len + 4))
|
||||
fi
|
||||
|
||||
hex_opt125_len=$(printf "%02X" "${opt125_len}")
|
||||
opt125="${opt125}:${hex_opt125_len}"
|
||||
hex_oui=$(convert_to_hex "${oui}")
|
||||
if [ -z "${hex_oui}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
hex_oui_len=$(printf "%02X" "${oui_len}")
|
||||
if [ "${uci}" = "network" ]; then
|
||||
opt125="${opt125}:01:${hex_oui_len}${hex_oui}"
|
||||
else
|
||||
opt125="${opt125}:04:${hex_oui_len}${hex_oui}"
|
||||
fi
|
||||
|
||||
hex_serial=$(convert_to_hex "${serial}")
|
||||
if [ -z "${hex_serial}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
hex_serial_len=$(printf "%02X" "${serial_len}")
|
||||
if [ "${uci}" = "network" ]; then
|
||||
opt125="${opt125}:02:${hex_serial_len}${hex_serial}"
|
||||
else
|
||||
opt125="${opt125}:05:${hex_serial_len}${hex_serial}"
|
||||
fi
|
||||
|
||||
if [ ${class_len} -gt 0 ]; then
|
||||
hex_class=$(convert_to_hex "${class}")
|
||||
if [ -z "${hex_class}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
hex_class_len=$(printf "%02X" "${class_len}")
|
||||
if [ "${uci}" = "network" ]; then
|
||||
opt125="${opt125}:03:${hex_class_len}${hex_class}"
|
||||
else
|
||||
opt125="${opt125}:06:${hex_class_len}${hex_class}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ "${uci}" = "network" ]; then
|
||||
new_send_opt="$sendopt $opt125"
|
||||
uci -q set network.$intf.sendopts="$new_send_opt"
|
||||
else
|
||||
uci -q add_list dhcp.$intf.dhcp_option="$opt125"
|
||||
fi
|
||||
}
|
||||
|
||||
enable_dnsmasq_option125() {
|
||||
local lan="${1}"
|
||||
local send125_present=0
|
||||
local opt125="125,"
|
||||
|
||||
local proto="$(uci -q get dhcp.$lan.dhcpv4)"
|
||||
if [ "${proto}" = "server" ]; then
|
||||
opt_list="$(uci -q get dhcp.$lan.dhcp_option)"
|
||||
|
||||
for sopt in $opt_list; do
|
||||
if [[ "$sopt" == "$opt125"* ]]; then
|
||||
send125_present=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${send125_present} -eq 0 ]; then
|
||||
configure_send_op125 "" "${lan}" "dhcp"
|
||||
ubus call uci commit '{"config":"dhcp"}'
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
enable_dhcp_option125() {
|
||||
local wan="${1}"
|
||||
local reqopts="$(uci -q get network.$wan.reqopts)"
|
||||
local sendopts="$(uci -q get network.$wan.sendopts)"
|
||||
local proto="$(uci -q get network.$wan.proto)"
|
||||
local newreqopts=""
|
||||
local newsendopts=""
|
||||
local req125_present=0
|
||||
local send125_present=0
|
||||
local network_uci_update=0
|
||||
local opt125="125:"
|
||||
|
||||
for ropt in $reqopts; do
|
||||
case $ropt in
|
||||
125) req125_present=1 ;;
|
||||
*) ;;
|
||||
esac
|
||||
done
|
||||
|
||||
for sopt in $sendopts; do
|
||||
if [[ "$sopt" == "$opt125"* ]]; then
|
||||
send125_present=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "${proto}" = "dhcp" ]; then
|
||||
if [ ${req125_present} -eq 0 ]; then
|
||||
newreqopts="$reqopts 125"
|
||||
uci -q set network."${wan}".reqopts="$newreqopts"
|
||||
network_uci_update=1
|
||||
fi
|
||||
|
||||
if [ ${send125_present} -eq 0 ]; then
|
||||
configure_send_op125 "${sendopts}" "${wan}" "network"
|
||||
network_uci_update=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${network_uci_update} -eq 1 ]; then
|
||||
uci commit network
|
||||
ubus call network reload
|
||||
fi
|
||||
}
|
||||
|
||||
wait_for_resolvfile() {
|
||||
local time=$1
|
||||
local tm=1
|
||||
@@ -60,12 +267,6 @@ wait_for_resolvfile() {
|
||||
copy_cwmp_etc_files_to_varstate() {
|
||||
mkdir -p /var/run/icwmpd
|
||||
|
||||
if [ -f /etc/icwmpd/cwmp ]; then
|
||||
uci -q -c /etc/icwmpd delete cwmp.acs
|
||||
uci -q -c /etc/icwmpd commit cwmp
|
||||
cp -f /etc/icwmpd/cwmp /var/state/cwmp
|
||||
fi
|
||||
|
||||
if [ -f /etc/icwmpd/icwmpd_backup_session.xml ]; then
|
||||
cp -f /etc/icwmpd/icwmpd_backup_session.xml /var/run/icwmpd/ 2>/dev/null
|
||||
fi
|
||||
@@ -73,6 +274,7 @@ copy_cwmp_etc_files_to_varstate() {
|
||||
if [ -f /etc/icwmpd/dm_enabled_notify.xml ]; then
|
||||
cp -f /etc/icwmpd/dm_enabled_notify /var/run/icwmpd/ 2>/dev/null
|
||||
fi
|
||||
touch /var/run/icwmpd/cwmp
|
||||
}
|
||||
|
||||
copy_cwmp_varstate_files_to_etc() {
|
||||
@@ -84,10 +286,6 @@ copy_cwmp_varstate_files_to_etc() {
|
||||
cp -f /var/run/icwmpd/dm_enabled_notify /etc/icwmpd/ 2>/dev/null
|
||||
fi
|
||||
|
||||
if [ -f /var/state/cwmp ]; then
|
||||
cp -f /var/state/cwmp /etc/icwmpd/
|
||||
fi
|
||||
|
||||
# move the successful custom notify import marker to persistent storage
|
||||
if [ -f /var/run/icwmpd/icwmpd_notify_import_marker ]; then
|
||||
cp -f /var/run/icwmpd/icwmpd_notify_import_marker /etc/icwmpd/
|
||||
@@ -145,18 +343,16 @@ validate_defaults() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
ssl_capath="${ssl_capath%/}"
|
||||
# Put the cert pem file in keep list
|
||||
if [ -d "${ssl_capath}" ]; then
|
||||
if ! grep "${ssl_capath}" /lib/upgrade/keep.d/icwmp; then
|
||||
if ! grep "*.pem\|*.crt" /lib/upgrade/keep.d/icwmp; then
|
||||
echo "${ssl_capath}"'/*.pem' >> /lib/upgrade/keep.d/icwmp
|
||||
echo "${ssl_capath}"'/*.crt' >> /lib/upgrade/keep.d/icwmp
|
||||
echo "${ssl_capath}"'/*.0' >> /lib/upgrade/keep.d/icwmp
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -z "${url}" ] && [ -z "${dhcp_url}" ] && {
|
||||
log "ACS url is empty can't start"
|
||||
return 1;
|
||||
}
|
||||
|
||||
validate_cpe_section || {
|
||||
log "Validation of cpe section failed"
|
||||
return 1;
|
||||
@@ -165,47 +361,85 @@ validate_defaults() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
set_vendor_id() {
|
||||
local wan="${1}"
|
||||
local proto="$(uci -q get network.$wan.proto)"
|
||||
|
||||
if [ "${proto}" == "dhcp" ]; then
|
||||
vendorid="$(uci -q get network.$wan.vendorid)"
|
||||
if [ -z "${vendorid}" ]; then
|
||||
uci -q set network.$wan.vendorid="dslforum.org"
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
elif [[ $vendorid != *"dslforum.org"* ]]; then
|
||||
uci -q set network.$wan.vendorid="${vendorid},dslforum.org"
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
boot() {
|
||||
local enable_cwmp="0"
|
||||
|
||||
local dhcp_discovery="0"
|
||||
|
||||
config_load cwmp
|
||||
|
||||
config_get_bool enable_cwmp cpe enable 1
|
||||
if [ "$enable_cwmp" = "0" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
config_get dhcp_discovery acs dhcp_discovery "0"
|
||||
|
||||
config_get wan_interface cpe default_wan_interface "wan"
|
||||
|
||||
if [ "${dhcp_discovery}" == "enable" ] || [ "${dhcp_discovery}" == "1" ]; then
|
||||
# Set dhcp option 43 if not already configured
|
||||
enable_dhcp_option43 "${wan_interface}"
|
||||
# Set dhcp option 60
|
||||
set_vendor_id "${wan_interface}"
|
||||
fi
|
||||
|
||||
config_get lan_interface cpe default_lan_interface ""
|
||||
if [ -n "${lan_interface}" ]; then
|
||||
# Set dhcp_option 125 if not already configured
|
||||
enable_dhcp_option125 "${wan_interface}"
|
||||
enable_dnsmasq_option125 "${lan_interface}"
|
||||
fi
|
||||
|
||||
config_get ssl_capath acs ssl_capath
|
||||
|
||||
if [ -n "${ssl_capath}" ]; then
|
||||
regenerate_ssl_link "${ssl_capath}"
|
||||
fi
|
||||
|
||||
# Copy backup data so that if it restart latter on it gets the info
|
||||
copy_cwmp_etc_files_to_varstate
|
||||
touch /etc/icwmpd/cwmp_notifications
|
||||
|
||||
start
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local enable_cwmp
|
||||
local wan_interface
|
||||
local dhcp_discovery
|
||||
local dhcp_url
|
||||
|
||||
config_load cwmp
|
||||
config_get_bool enable_cwmp cpe enable 1
|
||||
config_get dhcp_discovery acs dhcp_discovery "0"
|
||||
config_get dhcp_url acs dhcp_url ''
|
||||
config_get wan_interface cpe default_wan_interface "wan"
|
||||
|
||||
if [ "$enable_cwmp" = "0" ] || [ "$enable_cwmp" = "false" ]; then
|
||||
log "CWMP is not enabled"
|
||||
if [ "$enable_cwmp" = "0" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Set dhcp option 43 if dhcp discovery enabled
|
||||
if [ "${dhcp_discovery}" == "enable" ] || [ "${dhcp_discovery}" == "1" ]; then
|
||||
enable_dhcp_option43 "${wan_interface}"
|
||||
fi
|
||||
|
||||
[ -f /sbin/netifd ] && log "Waiting for Network to be started ..." && ubus -t 5 wait_for network.interface
|
||||
[ -f /usr/sbin/dnsmasq ] && log "Waiting for DNS Proxy to be started ..." && ubus -t 5 wait_for dnsmasq
|
||||
[ -f /etc/config/dhcp ] && log "Waiting for DNS Server(s) ..." && wait_for_resolvfile 20
|
||||
|
||||
if [ "${dhcp_discovery}" == "enable" ] || [ "${dhcp_discovery}" == "1" ]; then
|
||||
if [ -z "${dhcp_url}" ]; then
|
||||
log "Empty dhcp url, running update script"
|
||||
/etc/icwmpd/update.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
validate_defaults || {
|
||||
log "Validation of defaults failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Copy backup data so that if it restart latter on it gets the info
|
||||
copy_cwmp_etc_files_to_varstate
|
||||
|
||||
procd_open_instance icwmp
|
||||
procd_set_param command "$PROG"
|
||||
procd_append_param command -b
|
||||
@@ -217,15 +451,32 @@ start_service() {
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_stopped()
|
||||
stop_service()
|
||||
{
|
||||
copy_cwmp_varstate_files_to_etc
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
log "Reloading CWMP client"
|
||||
ubus -t 1 call tr069 command '{"command":"reload"}'
|
||||
if [ "$?" -ne "0" ]; then
|
||||
local ret
|
||||
|
||||
config_load cwmp
|
||||
config_get_bool enable_cwmp cpe enable 1
|
||||
|
||||
ret="0"
|
||||
if [ "$enable_cwmp" = "0" ]; then
|
||||
stop
|
||||
start
|
||||
return 0
|
||||
fi
|
||||
|
||||
status="$(ubus -t 1 call tr069 status |jsonfilter -qe '@.cwmp.status')"
|
||||
ret="$?"
|
||||
if [ "$status" = "up" ]; then
|
||||
ubus -t 1 call tr069 command '{"command":"reload"}'
|
||||
ret="$?"
|
||||
fi
|
||||
|
||||
if [ "$status" = "init" ] || [ "$ret" -ne "0" ]; then
|
||||
log "Restarting CWMP client"
|
||||
stop
|
||||
start
|
||||
@@ -242,7 +493,6 @@ service_triggers() {
|
||||
json_add_array
|
||||
json_add_string "" "run_script"
|
||||
json_add_string "" "/etc/icwmpd/update.sh"
|
||||
json_add_string "" "1"
|
||||
json_close_array
|
||||
json_close_array
|
||||
json_add_int "" "2000"
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
# Copy defaults by the factory to the cwmp UCI user section.
|
||||
config_load cwmp
|
||||
|
||||
# Get Manufacturer OUI.
|
||||
oui=$(uci -q get cwmp.cpe.manufacturer_oui)
|
||||
config_get oui cpe manufacturer_oui ""
|
||||
if [ -z "${oui}" ]; then
|
||||
oui=$(db -q get device.deviceinfo.ManufacturerOUI)
|
||||
fi
|
||||
@@ -9,24 +13,29 @@ fi
|
||||
oui=$(echo "${oui}" | tr 'a-f' 'A-F')
|
||||
|
||||
# Get system serial number.
|
||||
serial=$(uci -q get cwmp.cpe.serial_number)
|
||||
config_get serial cpe serial_number ""
|
||||
if [ -z "${serial}" ]; then
|
||||
serial=$(db -q get device.deviceinfo.SerialNumber)
|
||||
fi
|
||||
|
||||
# Get userid values
|
||||
acs_userid=$(uci -q get cwmp.acs.userid)
|
||||
cpe_userid=$(uci -q get cwmp.cpe.userid)
|
||||
config_get acs_userid acs userid ""
|
||||
config_get cpe_userid cpe userid ""
|
||||
|
||||
# Only set if they are empty
|
||||
if [ -z "$acs_userid" ]
|
||||
then
|
||||
if [ -z "${acs_userid}" ]; then
|
||||
uci -q set cwmp.acs.userid="${oui}-${serial}"
|
||||
fi
|
||||
|
||||
if [ -z "$cpe_userid" ]
|
||||
then
|
||||
if [ -z "${cpe_userid}" ]; then
|
||||
uci -q set cwmp.cpe.userid="${oui}-${serial}"
|
||||
fi
|
||||
|
||||
# Fix the cwmp.cpe.enable parameter
|
||||
# set default to 1 if not defined
|
||||
config_get enable_cwmp cpe enable ""
|
||||
if [ -z "${enable_cwmp}" ]; then
|
||||
uci -q set cwmp.cpe.enable="1"
|
||||
fi
|
||||
|
||||
# No need for commit here, it is done by uci_apply_defaults().
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
regenerate_ssl_link_path()
|
||||
{
|
||||
local cert_dir all_file rehash
|
||||
|
||||
cert_dir="${1}"
|
||||
|
||||
all_file=$(ls $cert_dir/*.pem 2>/dev/null)
|
||||
|
||||
[ ! -d "${cert_dir}" ] && return 0;
|
||||
[ ! -f "${all_file}" ] && return 0;
|
||||
|
||||
for cfile in $all_file
|
||||
do
|
||||
rehash="$(openssl x509 -hash -noout -in $cfile)"
|
||||
[ -f ${cert_dir}/${rehash}.0 ] || \
|
||||
ln -s $cfile $cert_dir/${rehash}.0
|
||||
done
|
||||
}
|
||||
|
||||
regenerate_ssl_link()
|
||||
{
|
||||
local cwmp_ca_path
|
||||
|
||||
regenerate_ssl_link_path "/etc/ssl/certs"
|
||||
|
||||
cwmp_ca_path=$(uci -q get cwmp.acs.ssl_capath)
|
||||
if [[ "${cwmp_ca_path}" != "/etc/ssl/certs"* ]]; then
|
||||
if [ -n "${cwmp_ca_path}" ]; then
|
||||
regenerate_ssl_link_path "${cwmp_ca_path}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
regenerate_ssl_link
|
||||
@@ -1 +1,2 @@
|
||||
/var/run/icwmpd/icwmpd_backup_session.xml
|
||||
/etc/icwmpd/cwmp_notifications
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#
|
||||
# Copyright (C) 2021 IOPSYS
|
||||
# Copyright (C) 2021-2022 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ieee1905
|
||||
PKG_VERSION:=4.9.0
|
||||
PKG_VERSION:=4.10.42
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=69b27e3e1509b9192c529fbba6a329cc0532cfbb
|
||||
PKG_SOURCE_VERSION:=d3db999d63f05e42305759c7b6ca0bc4fccf65bf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
@@ -44,7 +44,8 @@ validate_ap_section() {
|
||||
uci_validate_section ieee1905 $section "${1}" \
|
||||
'band:or("2", "5", "60")' \
|
||||
'ssid:string' \
|
||||
'encryption:or("psk2", "sae-mixed", "sae", string)' \
|
||||
'encryption:or("psk2", "sae-mixed", "sae",
|
||||
"psk", "psk-mixed", "none", string)' \
|
||||
'key:string' \
|
||||
'uuid:string' \
|
||||
'manufacturer:string' \
|
||||
|
||||
22
ieee1905/files/etc/uci-defaults/30-set-ieee1905-al-macaddr
Normal file
22
ieee1905/files/etc/uci-defaults/30-set-ieee1905-al-macaddr
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
BMAC=$(db -q get hw.board.basemac)
|
||||
BMAC=${BMAC//:/}
|
||||
BMAC=${BMAC// /}
|
||||
BMAC=$(printf "%12.12X" $((0x$BMAC)))
|
||||
|
||||
[ "$BMAC" == "" ] && exit 1
|
||||
|
||||
LMAC=$((0x$BMAC & 0xfeffffffffff))
|
||||
LMAC=$(($LMAC | 0x020000000000))
|
||||
LMAC=$(printf "%12.12X" $LMAC)
|
||||
LMAC=$(echo $LMAC | sed -e 's/[0-9A-F]\{2\}/&:/g' -e 's/:$//')
|
||||
|
||||
mac=$(uci -q get ieee1905.ieee1905.macaddress)
|
||||
|
||||
[ "$mac" != "" ] && exit 0
|
||||
|
||||
uci set ieee1905.ieee1905.macaddress="$LMAC"
|
||||
uci commit ieee1905
|
||||
|
||||
17
ieee1905/files/etc/uci-defaults/31-ifname-list-to-option
Normal file
17
ieee1905/files/etc/uci-defaults/31-ifname-list-to-option
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
config_load ieee1905
|
||||
|
||||
list_to_ifname() {
|
||||
local section=$1
|
||||
|
||||
config_get ifname $section ifname # get list as space separated values
|
||||
|
||||
uci del ieee1905.${section}.ifname # delete entry
|
||||
uci set ieee1905.${section}.ifname="$ifname" # writeback entry as option
|
||||
}
|
||||
|
||||
config_foreach list_to_ifname al-iface
|
||||
|
||||
@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=inbd
|
||||
PKG_VERSION:=1.2.2
|
||||
PKG_VERSION:=1.2.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=10f765f3d0fcc226b6ecf0c481598c9e7f76315e
|
||||
PKG_SOURCE_VERSION:=d4e910a31039e0c0b7a539311eafcd716c36be77
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
@@ -133,6 +133,7 @@ CONFIG_LIBCURL_CRYPTO_AUTH=y
|
||||
# CONFIG_LIBCURL_MBEDTLS is not set
|
||||
CONFIG_LIBCURL_OPENSSL=y
|
||||
CONFIG_PACKAGE_ethtool=y
|
||||
CONFIG_PACKAGE_ip-bridge=y
|
||||
CONFIG_PACKAGE_ip-full=y
|
||||
CONFIG_PACKAGE_iperf3=y
|
||||
CONFIG_PACKAGE_ipset=y
|
||||
|
||||
@@ -254,11 +254,22 @@ function genconfig {
|
||||
setup_dirs()
|
||||
{
|
||||
git remote -v | grep -q http || {
|
||||
CUSTBRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||
if git ls-remote $CUSTREPO -q 2>/dev/null; then
|
||||
if [ ! -d "$CUSTPATH" ]; then
|
||||
git clone "$CUSTREPO" "$CUSTPATH"
|
||||
echo "Cloning $CUSTBRANCH branch of $CUSTREPO"
|
||||
git clone -b "$CUSTBRANCH" "$CUSTREPO" "$CUSTPATH" 2>/dev/null || {
|
||||
DEFBRANCH="$(git remote show $CUSTREPO | grep 'HEAD branch' | cut -d' ' -f5)"
|
||||
echo "$CUSTBRANCH branch is not found, cloning $DEFBRANCH branch of $CUSTREPO"
|
||||
git clone "$CUSTREPO" "$CUSTPATH"
|
||||
}
|
||||
elif [ $IMPORT -eq 1 ]; then
|
||||
cd $CUSTPATH
|
||||
echo "Checking out $CUSTBRANCH branch in $CUSTPATH"
|
||||
git checkout "$CUSTBRANCH" 2>/dev/null || {
|
||||
DEFBRANCH="$(git symbolic-ref refs/remotes/origin/HEAD | cut -d '/' -f4)"
|
||||
echo "Checking out $CUSTBRANCH branch has failed, using $DEFBRANCH branch in $CUSTPATH"
|
||||
}
|
||||
v "git pull"
|
||||
git pull
|
||||
cd - >/dev/null #go back
|
||||
|
||||
@@ -170,12 +170,6 @@ function genconfig_min {
|
||||
|
||||
git remote -v | grep -qE '(git@|ssh://)' && {
|
||||
DEVELOPER=1
|
||||
|
||||
bcmAllowed=0
|
||||
endptAllowed=0
|
||||
|
||||
git ls-remote git@dev.iopsys.eu:broadcom/bcmcreator.git -q 2>/dev/null && bcmAllowed=1
|
||||
git ls-remote git@dev.iopsys.eu:iopsys/endptmngr.git -q 2>/dev/null && endptAllowed=1
|
||||
}
|
||||
|
||||
v() {
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2012-2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libmicroxml
|
||||
PKG_VERSION:=2012-06-11
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/mirror/microxml.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=72965423184f24cc0b963d91c2d1863cdb01b6aa
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_LICENSE:=LGPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libmicroxml
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=XML library
|
||||
MAINTAINER:=Luka Perkov <luka@openwrt.org>
|
||||
endef
|
||||
|
||||
define Package/libmicroxml/description
|
||||
A micro sized XML library
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-threads \
|
||||
--enable-static \
|
||||
--enable-shared
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_BUILD_DIR)/microxml.h $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libmicroxml.so* $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_BUILD_DIR)/microxml.pc $(1)/usr/lib/pkgconfig
|
||||
endef
|
||||
|
||||
define Package/libmicroxml/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libmicroxml.so* $(1)/usr/lib
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libmicroxml))
|
||||
@@ -1,130 +0,0 @@
|
||||
diff --git a/mxml-file.c b/mxml-file.c
|
||||
index 02eca9d..f10d202 100644
|
||||
--- a/mxml-file.c
|
||||
+++ b/mxml-file.c
|
||||
@@ -363,9 +363,12 @@ mxmlSaveFile(mxml_node_t *node, /* I - Node to write */
|
||||
* Write the node...
|
||||
*/
|
||||
|
||||
- if ((col = mxml_write_node(node, fp, cb, 0, mxml_file_putc, global)) < 0)
|
||||
+ if ((col = mxml_write_node(node, fp, cb, 0, mxml_file_putc, global)) < 0){
|
||||
+ global_free(global);
|
||||
return (-1);
|
||||
-
|
||||
+ }
|
||||
+
|
||||
+ global_free(global);
|
||||
if (col > 0)
|
||||
if (putc('\n', fp) < 0)
|
||||
return (-1);
|
||||
@@ -1448,6 +1451,7 @@ mxml_load_data(
|
||||
if ((buffer = malloc(64)) == NULL)
|
||||
{
|
||||
mxml_error("Unable to allocate string buffer!");
|
||||
+ global_free(global);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -2083,11 +2087,12 @@ mxml_load_data(
|
||||
node->parent ? node->parent->value.element.name : "(null)");
|
||||
|
||||
mxmlDelete(first);
|
||||
-
|
||||
+ global_free(global);
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
+ global_free(global);
|
||||
if (parent)
|
||||
return (parent);
|
||||
else
|
||||
@@ -2102,7 +2107,7 @@ error:
|
||||
mxmlDelete(first);
|
||||
|
||||
free(buffer);
|
||||
-
|
||||
+ global_free(global);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
diff --git a/mxml-private.c b/mxml-private.c
|
||||
index 4378ca3..ea6e452 100644
|
||||
--- a/mxml-private.c
|
||||
+++ b/mxml-private.c
|
||||
@@ -41,6 +41,32 @@
|
||||
* This code currently supports AIX, HP-UX, Linux, Mac OS X, Solaris, and
|
||||
* Windows. It might work on the BSDs and IRIX, but I haven't tested that.
|
||||
*/
|
||||
+void *global_mem[16] = {0};
|
||||
+
|
||||
+static void *global_calloc(int x, int size)
|
||||
+{
|
||||
+ int i;
|
||||
+ void *m = calloc(x, size);
|
||||
+ for (i = ((sizeof(global_mem)/sizeof(global_mem[0])) - 1); i > 0; i--) {
|
||||
+ global_mem[i] = global_mem[i-1];
|
||||
+ }
|
||||
+ global_mem[0] = m;
|
||||
+ return m;
|
||||
+}
|
||||
+
|
||||
+void global_free(void *m)
|
||||
+{
|
||||
+ int i;
|
||||
+ if (m == NULL)
|
||||
+ return;
|
||||
+ for (i = ((sizeof(global_mem)/sizeof(global_mem[0])) - 1); i >= 0; i--) {
|
||||
+ if (global_mem[i] == m) {
|
||||
+ global_mem[i] = NULL;
|
||||
+ free(m);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
||||
#if defined(__sun) || defined(_AIX)
|
||||
# pragma fini(_mxml_fini)
|
||||
@@ -148,7 +174,6 @@ mxml_real_cb(mxml_node_t *node) /* I - Current node */
|
||||
return (MXML_REAL);
|
||||
}
|
||||
|
||||
-
|
||||
#ifdef HAVE_PTHREAD_H /**** POSIX threading ****/
|
||||
# include <pthread.h>
|
||||
|
||||
@@ -190,7 +215,6 @@ _MXML_FINI(void)
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
/*
|
||||
* '_mxml_global()' - Get global data.
|
||||
*/
|
||||
@@ -205,7 +229,7 @@ _mxml_global(void)
|
||||
|
||||
if ((global = (_mxml_global_t *)pthread_getspecific(_mxml_key)) == NULL)
|
||||
{
|
||||
- global = (_mxml_global_t *)calloc(1, sizeof(_mxml_global_t));
|
||||
+ global = (_mxml_global_t *)global_calloc(1, sizeof(_mxml_global_t));
|
||||
pthread_setspecific(_mxml_key, global);
|
||||
|
||||
global->num_entity_cbs = 1;
|
||||
@@ -288,7 +312,7 @@ _mxml_global(void)
|
||||
|
||||
if ((global = (_mxml_global_t *)TlsGetValue(_mxml_tls_index)) == NULL)
|
||||
{
|
||||
- global = (_mxml_global_t *)calloc(1, sizeof(_mxml_global_t));
|
||||
+ global = (_mxml_global_t *)global_calloc(1, sizeof(_mxml_global_t));
|
||||
|
||||
global->num_entity_cbs = 1;
|
||||
global->entity_cbs[0] = _mxml_entity_cb;
|
||||
diff --git a/mxml-private.h b/mxml-private.h
|
||||
index c591208..72ed338 100644
|
||||
--- a/mxml-private.h
|
||||
+++ b/mxml-private.h
|
||||
@@ -43,3 +43,4 @@ typedef struct _mxml_global_s
|
||||
extern _mxml_global_t *_mxml_global(void);
|
||||
extern int _mxml_entity_cb(const char *name);
|
||||
|
||||
+extern void global_free(void *m);
|
||||
@@ -13,5 +13,22 @@ config AGENT_ISLAND_PREVENTION
|
||||
config AGENT_EASYMESH_R2_CERT
|
||||
bool "Compile for WFA test bed"
|
||||
|
||||
|
||||
config AGENT_EASYMESH_VENDOR_EXT
|
||||
bool "Enable extra features through Easymesh vendor extension"
|
||||
default y
|
||||
|
||||
config AGENT_EASYMESH_VENDOR_EXT_OUI_DEFAULT
|
||||
string
|
||||
default "\\\\x11\\\\x22\\\\x33"
|
||||
|
||||
config AGENT_EASYMESH_VENDOR_EXT_OUI
|
||||
string "Vendor OUI in '\\\\xAB\\\\xCD\\\\xEF' format"
|
||||
default AGENT_EASYMESH_VENDOR_EXT_OUI_DEFAULT
|
||||
help
|
||||
Extra features not covered by the base Easymesh specification can be
|
||||
enabled through AGENT_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
|
||||
through which such features would be exposed.
|
||||
|
||||
endmenu
|
||||
endif
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#
|
||||
# Copyright (C) 2020-21 IOPSYS Software Solutions AB
|
||||
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-agent
|
||||
PKG_VERSION:=7.2.2
|
||||
PKG_VERSION:=2.10.4.10
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=8168d68c118d0dde0ff798fd0c8ed1d6a18bc99d
|
||||
PKG_SOURCE_VERSION:=ca2e5837149234bd5b9b3df9ab1e4e798f1c1843
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
LOCAL_DEV=0
|
||||
@@ -28,7 +28,7 @@ define Package/map-agent
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=WiFi multi-AP Agent (EasyMesh R2)
|
||||
DEPENDS:=+libwifi +libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 \
|
||||
+map-plugin
|
||||
+map-plugin +ip-bridge
|
||||
endef
|
||||
|
||||
|
||||
@@ -70,6 +70,12 @@ ifeq ($(CONFIG_AGENT_EASYMESH_R2_CERT),y)
|
||||
TARGET_CFLAGS += -DEASYMESH_R2_CERT
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AGENT_EASYMESH_VENDOR_EXT),y)
|
||||
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=\\\"$(CONFIG_AGENT_EASYMESH_VENDOR_EXT_OUI)\\\"
|
||||
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT
|
||||
endif
|
||||
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
define Package/map-agent/install
|
||||
|
||||
@@ -6,10 +6,13 @@ config agent 'agent'
|
||||
option netdev 'wlan'
|
||||
option island_prevention '0'
|
||||
option eth_onboards_wifi_bhs '0'
|
||||
option ap_follow_sta_dfs '0'
|
||||
option guest_isolation '0'
|
||||
# option controller_macaddr '0a:1b:2c:3d:4e:50'
|
||||
|
||||
config dynamic_backhaul
|
||||
option missing_bh_timer '60'
|
||||
option missing_bh_reconfig_timer '1800'
|
||||
|
||||
config controller_select
|
||||
option id 'auto'
|
||||
|
||||
@@ -10,54 +10,6 @@ IS_CFG_VALID=1
|
||||
MAP_DEV="map_dev"
|
||||
MAP_IF="map"
|
||||
|
||||
create_map() {
|
||||
ip link add lei type veth peer name lei_map 2>/dev/null
|
||||
ip link add link lei name lei_lan type vlan id 1 2>/dev/null
|
||||
|
||||
uci -q set network.${MAP_DEV}=device
|
||||
uci -q set network.${MAP_DEV}.name=br-map
|
||||
uci -q set network.${MAP_DEV}.type=bridge
|
||||
|
||||
uci -q show network.${MAP_DEV}.ports | grep -q lei_map || {
|
||||
uci -q add_list network.${MAP_DEV}.ports='lei_map'
|
||||
}
|
||||
|
||||
uci -q set network.${MAP_IF}=interface
|
||||
uci -q set network.${MAP_IF}.device=br-map
|
||||
uci -q set network.${MAP_IF}.is_lan=1
|
||||
|
||||
uci -q show network.br_lan.ports | grep -q lei_lan || {
|
||||
uci -q add_list network.br_lan.ports="lei_lan"
|
||||
}
|
||||
|
||||
uci -q set mapagent.agent.al_bridge=br-map
|
||||
|
||||
uci -q commit
|
||||
|
||||
ubus call network reload
|
||||
ubus -t 5 wait_for network.interface.map
|
||||
|
||||
brctl addif br-map lei_map 2>/dev/null
|
||||
brctl addif br-lan lei_lan 2>/dev/null
|
||||
|
||||
ip link set lei up 2>/dev/null
|
||||
ip link set lei_map up 2>/dev/null
|
||||
ip link set lei_lan up 2>/dev/null
|
||||
}
|
||||
|
||||
remove_map() {
|
||||
ip link delete ${MAP_VETH} &>/dev/null
|
||||
|
||||
uci -q delete network.${MAP_DEV}
|
||||
uci -q delete network.${MAP_IF}
|
||||
|
||||
uci -q set mapagent.agent.al_bridge=br-lan
|
||||
|
||||
uci -q commit
|
||||
|
||||
ubus call network reload
|
||||
}
|
||||
|
||||
start_dynbhd_service() {
|
||||
rm -f /tmp/multiap.backhaul
|
||||
procd_open_instance
|
||||
@@ -150,7 +102,11 @@ validate_radio_section() {
|
||||
'include_sta_metric:bool:false' \
|
||||
'rcpi_hysteresis_margin:range(0,255)' \
|
||||
'report_util_threshold:range(0,255)' \
|
||||
'encryption:or("sae", "psk2", "sae-mixed")'
|
||||
'encryption:or("sae", "sae+aes", "psk2",
|
||||
"psk2+aes", "sae-mixed", "sae-mixed+aes",
|
||||
"none", "psk-mixed", "psk-mixed+aes",
|
||||
"wpa", "wpa+aes", "wpa2", "wpa2+aes",
|
||||
"psk", "psk+aes")' \
|
||||
|
||||
[ "$?" -ne 0 ] && {
|
||||
logger -s -t "mapagent" "Validation of radio section failed"
|
||||
@@ -187,6 +143,8 @@ validate_dyn_bh_section() {
|
||||
|
||||
uci_validate_section mapagent $section "${1}" \
|
||||
'missing_bh_timer:range(1,255)'
|
||||
uci_validate_section mapagent $section "${1}" \
|
||||
'missing_bh_reconfig_timer:range(0,65535)'
|
||||
|
||||
[ "$?" -ne 0 ] && {
|
||||
logger -s -t "mapagent" "Validation of dynamic backhaul section failed"
|
||||
@@ -227,10 +185,6 @@ start_service() {
|
||||
config_get_bool enabled agent enabled 1
|
||||
[ "$enabled" -eq 0 ] && return 1
|
||||
|
||||
local ts
|
||||
config_get_bool ts agent vlan_segregation 0
|
||||
[ "$ts" -eq 1 ] && create_map #|| remove_map
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/mapagent" "-d"
|
||||
procd_set_param respawn
|
||||
@@ -239,10 +193,6 @@ start_service() {
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
#stop_service() {
|
||||
# remove_map
|
||||
#}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "mapagent"
|
||||
|
||||
13
map-agent/files/etc/uci-defaults/991-map-agent-unset-pvid
Executable file
13
map-agent/files/etc/uci-defaults/991-map-agent-unset-pvid
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
unset_pvid() {
|
||||
local section=$1
|
||||
|
||||
uci -q set mapagent.${section}.pvid="0"
|
||||
}
|
||||
|
||||
config_load mapagent
|
||||
|
||||
config_foreach unset_pvid policy
|
||||
@@ -356,7 +356,7 @@ write_bsta_config() {
|
||||
|
||||
#echo result diff = $diff > /dev/console
|
||||
[ "$diff" == "1" ] && {
|
||||
config_foreach mapagent_apply_bssid_same_band bsta
|
||||
(config_foreach mapagent_apply_bssid_same_band bsta)
|
||||
#ubus call uci commit '{"config":"wireless"}'
|
||||
#echo reloading wireless > /dev/console
|
||||
}
|
||||
@@ -404,6 +404,7 @@ teardown_iface() {
|
||||
uci -q set mapagent.${section}.enabled="0"
|
||||
uci -q set mapagent.${section}.ssid="DISABLED-SSID"
|
||||
uci -q set mapagent.${section}.key="DISABLED-KEY"
|
||||
#uci -q del mapagent.${section}.vid
|
||||
|
||||
# subshell in hopes to maintain mapagent config loaded
|
||||
(mapagent_teardown_wireless $ifname)
|
||||
@@ -488,10 +489,12 @@ bsta_to_wireless() {
|
||||
|
||||
mapagent_find_other_creds() {
|
||||
#echo "trying to find other creds for $2" > /dev/console
|
||||
local other_section="$2"
|
||||
|
||||
config_get band $1 band
|
||||
config_get onboarded $1 onboarded "0"
|
||||
|
||||
[ "$3" != "$band" -o "$onboarded" = "0" ] && return
|
||||
[ "$4" != "$band" -o "$onboarded" = "0" ] && return
|
||||
|
||||
config_get ssid $1 ssid
|
||||
config_get key $1 key
|
||||
@@ -499,7 +502,12 @@ bsta_to_wireless() {
|
||||
config_get enabled $1 enabled "0"
|
||||
config_get bssid $1 bssid
|
||||
|
||||
(mapagent_apply_wl_bsta $2 "$ssid" "$key" $encryption $4 "$bssid")
|
||||
uci -q set mapagent.${other_section}.ssid="$ssid"
|
||||
uci -q set mapagent.${other_section}.key="$key"
|
||||
uci -q set mapagent.${other_section}.encryption=$encryption
|
||||
uci -q set mapagent.${other_section}.bssid="$bssid"
|
||||
uci commit mapagent
|
||||
(mapagent_apply_wl_bsta "$3" "$ssid" "$key" $encryption "$5" "$bssid")
|
||||
}
|
||||
|
||||
config_get band $1 band
|
||||
@@ -508,7 +516,7 @@ bsta_to_wireless() {
|
||||
config_get enabled $1 enabled "0"
|
||||
|
||||
if [ "$onboarded" = "0" ]; then
|
||||
config_foreach mapagent_find_other_creds bsta $ifname $band $enabled
|
||||
config_foreach mapagent_find_other_creds bsta $1 $ifname $band $enabled
|
||||
else
|
||||
config_get ssid $1 ssid
|
||||
config_get key $1 key
|
||||
@@ -665,7 +673,7 @@ bsta_scan_on_enabled() {
|
||||
|
||||
bsta_enable_all() {
|
||||
mapagent_enable_bk() {
|
||||
config_get ifname $1 ifname "2"
|
||||
config_get ifname $1 ifname
|
||||
uci -q set mapagent.$1.enabled="1"
|
||||
}
|
||||
|
||||
@@ -676,6 +684,68 @@ bsta_enable_all() {
|
||||
bsta_scan_on_enabled
|
||||
}
|
||||
|
||||
# arg = one interface to clear
|
||||
# no arg = clear all interfaces
|
||||
bsta_clear_bssid() {
|
||||
local iface=$1
|
||||
|
||||
mapagent_remove_bssid() {
|
||||
local iface=$2
|
||||
|
||||
config_get ifname $1 ifname
|
||||
|
||||
[ -n "$iface" -a "$iface" != "$ifname" ] && return
|
||||
|
||||
uci -q set mapagent.$1.enabled="1"
|
||||
uci -q del mapagent.$1.bssid
|
||||
}
|
||||
|
||||
wireless_remove_bssid() {
|
||||
local iface=$2
|
||||
|
||||
config_get mode $1 mode
|
||||
config_get ifname $1 ifname
|
||||
|
||||
[ "$mode" != "sta" ] && return
|
||||
|
||||
[ -n "$iface" -a "$iface" != "$ifname" ] && return
|
||||
|
||||
uci -q del wireless.$1.bssid
|
||||
wpa_cli -i "$ifname" bssid 0 00:00:00:00:00:00 > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
|
||||
}
|
||||
|
||||
config_load mapagent
|
||||
config_foreach mapagent_remove_bssid bsta $iface
|
||||
uci commit mapagent
|
||||
|
||||
config_load wireless
|
||||
config_foreach wireless_remove_bssid wifi-iface $iface
|
||||
uci commit wireless
|
||||
}
|
||||
|
||||
# arg1 = ifname arg2 = bssid
|
||||
bsta_blacklist_bssid_set() {
|
||||
local ifname="$1"
|
||||
shift
|
||||
local bssid="$@"
|
||||
|
||||
wpa_cli -i "$ifname" set_network 0 bssid_ignore "$bssid" > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
|
||||
}
|
||||
|
||||
bsta_blacklist_bssid_clear() {
|
||||
mapagent_blacklist_by_band() {
|
||||
config_get ifname $1 ifname
|
||||
|
||||
wpa_cli -i "$ifname" set_network 0 bssid_ignore "" > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
|
||||
}
|
||||
|
||||
config_load mapagent
|
||||
config_foreach mapagent_blacklist_by_band bsta
|
||||
}
|
||||
|
||||
bsta_disable_lower_priority() {
|
||||
config_load mapagent
|
||||
|
||||
@@ -723,6 +793,10 @@ bsta_disable_lower_priority() {
|
||||
|
||||
[ "$ifname" != "$2" -a "$priority" -gt "$3" ] && enabled="0"
|
||||
|
||||
# enable passed ifname explicitly
|
||||
# don't explicitly enable other higher prio interfaces
|
||||
[ "$ifname" != "$2" -a "$enabled" = "1" ] && return
|
||||
|
||||
uci -q set mapagent.$1.enabled="$enabled"
|
||||
|
||||
(mapagent_apply_wl_bsta $ifname $enabled) > /dev/null
|
||||
@@ -759,6 +833,12 @@ bsta_use_link() {
|
||||
local bsta=$1
|
||||
|
||||
config_foreach mapagent_disable_bk bsta $bsta
|
||||
|
||||
noht=$(iw $bsta info | grep "no HT")
|
||||
[ -n "$noht" ] && {
|
||||
logger -t multiap "no HT hit, issue reassoc $bsta"
|
||||
wpa_cli -i $bsta reassoc
|
||||
}
|
||||
}
|
||||
|
||||
bsta_swap_to_link() {
|
||||
@@ -774,11 +854,48 @@ set_uplink_backhaul_info() {
|
||||
local ul_1905id=$1
|
||||
local ul_mac=$2
|
||||
|
||||
json_load "$(cat $MAPFILE)"
|
||||
json_add_string "backhaul_device_id" "$ul_1905id"
|
||||
json_add_string "backhaul_macddr" "$ul_mac"
|
||||
json_dump > "$MAPFILE"
|
||||
json_cleanup
|
||||
(
|
||||
flock -x 200
|
||||
json_load "$(cat $MAPFILE)"
|
||||
json_add_string "backhaul_device_id" "$ul_1905id"
|
||||
json_add_string "backhaul_macddr" "$ul_mac"
|
||||
json_dump > "$MAPFILE"
|
||||
json_cleanup
|
||||
) 200>/var/lock/map.backhaul.lock
|
||||
}
|
||||
|
||||
|
||||
|
||||
update_isolate_ebtables() {
|
||||
parse_fh() {
|
||||
local brcm_setup="$(uci -q get mapagent.agent.brcm_setup)"
|
||||
local guest_isolate="$(uci -q get mapagent.agent.guest_isolation)"
|
||||
local pvid="$(uci -q get mapagent.@policy[0].pvid)"
|
||||
local section=$1
|
||||
local prefix="TODO"
|
||||
local action="del"
|
||||
|
||||
config_get vid $section vid
|
||||
config_get band $section band
|
||||
config_get ifname $section ifname
|
||||
|
||||
[ $vid -gt 4094 -o $vid -lt 1 ] && vid=$pvid
|
||||
[ "$guest_isolate" = "1" -a "$vid" != "$pvid" ] && action="add"
|
||||
if [ "$brcm_setup" = "1" ]; then
|
||||
prefix="wds"
|
||||
else
|
||||
#todo
|
||||
break;
|
||||
fi
|
||||
|
||||
ts_sub "isolate" "$action" "$pvid" "$vid" "$band" "$ifname" "$prefix"
|
||||
|
||||
}
|
||||
config_load mapagent
|
||||
|
||||
|
||||
config_foreach parse_fh ap
|
||||
|
||||
}
|
||||
|
||||
set_uplink() {
|
||||
@@ -792,11 +909,13 @@ set_uplink() {
|
||||
json_add_string "type" "$type"
|
||||
json_add_string "ifname" "$ifname"
|
||||
json_add_string "macaddr" "$hwaddr"
|
||||
json_dump > "$MAPFILE"
|
||||
(
|
||||
flock -x 200
|
||||
json_dump > "$MAPFILE"
|
||||
) 200>/var/lock/map.backhaul.lock
|
||||
json_cleanup
|
||||
|
||||
config_load mapagent
|
||||
|
||||
update_isolate_ebtables
|
||||
island_prevention="$(uci -q get mapagent.agent.island_prevention)"
|
||||
|
||||
if [ "$island_prevention" = "1" -a "$type" = "eth" ]; then
|
||||
@@ -808,15 +927,20 @@ set_uplink() {
|
||||
unset_uplink() {
|
||||
local type=${1:-wifi}
|
||||
|
||||
config_load mapagent
|
||||
|
||||
island_prevention="$(uci -q get mapagent.agent.island_prevention)"
|
||||
|
||||
if [ "$island_prevention" = "1" -a "$type" = "eth" ]; then
|
||||
ubus call map.agent toggle_fh '{"enable":false, "prevent_island":true, "ifname":"all"}'
|
||||
fi
|
||||
|
||||
rm -f "$MAPFILE" > /dev/null 2>&1
|
||||
(
|
||||
flock -x 200
|
||||
json_load "$(cat $MAPFILE)"
|
||||
json_get_var bk_type type
|
||||
json_cleanup
|
||||
|
||||
[ "$type" = "$bk_type" ] && rm -f "$MAPFILE" > /dev/null 2>&1
|
||||
) 200>/var/lock/map.backhaul.lock
|
||||
}
|
||||
|
||||
func=$1
|
||||
@@ -836,6 +960,9 @@ case "$func" in
|
||||
sync_mapcontroller_from_wireless) sync_mapcontroller_from_wireless $@;;
|
||||
ts) ts_sub $@;;
|
||||
bsta_enable_all) bsta_enable_all $@;;
|
||||
bsta_clear_bssid) bsta_clear_bssid $@;;
|
||||
bsta_blacklist_bssid_set) bsta_blacklist_bssid_set $@;;
|
||||
bsta_blacklist_bssid_clear) bsta_blacklist_bssid_clear $@;;
|
||||
bsta_disable_lower_priority) bsta_disable_lower_priority $@;;
|
||||
bsta_scan_on_enabled) bsta_scan_on_enabled $@;;
|
||||
bsta_use_link) bsta_use_link $@;;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,5 +6,21 @@ config CONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG
|
||||
bool "Support Dynamic Controller configuration sync"
|
||||
default y if MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
|
||||
|
||||
config CONTROLLER_EASYMESH_VENDOR_EXT
|
||||
bool "Enable extra features through Easymesh vendor extension"
|
||||
default y
|
||||
|
||||
config CONTROLLER_EASYMESH_VENDOR_EXT_OUI_DEFAULT
|
||||
string
|
||||
default "\\\\x11\\\\x22\\\\x33"
|
||||
|
||||
config CONTROLLER_EASYMESH_VENDOR_EXT_OUI
|
||||
string "Vendor OUI in '\\\\xAB\\\\xCD\\\\xEF' format"
|
||||
default CONTROLLER_EASYMESH_VENDOR_EXT_OUI_DEFAULT
|
||||
help
|
||||
Extra features not covered by the base Easymesh specification can be
|
||||
enabled through CONTROLLER_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
|
||||
through which such features would be exposed.
|
||||
|
||||
endmenu
|
||||
endif
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
#
|
||||
# Copyright (C) 2020 IOPSYS Software Solutions AB
|
||||
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-controller
|
||||
PKG_VERSION:=6.0.21
|
||||
PKG_VERSION:=2.8.0.29
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=a388472887744d404825ee5602ab906bf1fc225c
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_SOURCE_VERSION:=975ec3e88e0e134e29abdb85ec3bd798f13cc3bb
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
@@ -20,6 +17,9 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/map-controller
|
||||
@@ -48,11 +48,18 @@ ifeq ($(CONFIG_CONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG),y)
|
||||
TARGET_CFLAGS += -DCONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CONTROLLER_EASYMESH_VENDOR_EXT),y)
|
||||
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=\\\"$(CONFIG_CONTROLLER_EASYMESH_VENDOR_EXT_OUI)\\\"
|
||||
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT
|
||||
endif
|
||||
|
||||
define Package/map-controller/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mapcontroller $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/mapcontroller
|
||||
$(CP) $(PKG_BUILD_DIR)/src/plugins/steer/rcpi/rcpi.so $(1)/usr/lib/mapcontroller/rcpi.so
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
|
||||
@@ -8,6 +8,7 @@ config controller 'controller'
|
||||
option use_usta_metrics '0'
|
||||
option primary_vid '1'
|
||||
option primary_pcp '0'
|
||||
option enable_ts '0'
|
||||
option allow_bgdfs '0'
|
||||
option channel_plan '0'
|
||||
|
||||
|
||||
@@ -25,7 +25,12 @@ validate_controller_section() {
|
||||
'use_bcn_metrics:bool:false' \
|
||||
'use_usta_metrics:bool:false' \
|
||||
'allow_bgdfs:range(0,2629744)' \
|
||||
'channel_plan:range(0,2629744)'
|
||||
'channel_plan:range(0,2629744)' \
|
||||
'enable_ts:bool:false' \
|
||||
'rcpi_threshold_2g:range(0,220)' \
|
||||
'rcpi_threshold_5g:range(0,220)' \
|
||||
'report_rcpi_threshold_2g:range(0,220)' \
|
||||
'report_rcpi_threshold_5g:range(0,220)'
|
||||
|
||||
[ "$?" -ne 0 ] && {
|
||||
logger -s -t "mapcontroller" "Validation of controller section failed"
|
||||
@@ -42,7 +47,10 @@ validate_ap_section() {
|
||||
'band:or("2", "5")' \
|
||||
'ssid:string' \
|
||||
'encryption:or("sae", "sae+aes", "psk2",
|
||||
"psk2+aes", "sae-mixed", "sae-mixed+aes")' \
|
||||
"psk2+aes", "sae-mixed", "sae-mixed+aes",
|
||||
"none", "psk-mixed", "psk-mixed+aes",
|
||||
"wpa", "wpa+aes", "wpa2", "wpa2+aes",
|
||||
"psk", "psk+aes")' \
|
||||
'key:string' \
|
||||
'vid:range(1,65535):1' \
|
||||
'type:or("backhaul", "fronthaul", "combined")' \
|
||||
|
||||
26
map-topology/Config.in
Normal file
26
map-topology/Config.in
Normal file
@@ -0,0 +1,26 @@
|
||||
if (PACKAGE_map-topology)
|
||||
|
||||
menu "Configurations"
|
||||
|
||||
config TOPOLOGYD_EASYMESH_VENDOR_EXT
|
||||
bool "Enable extra features through Easymesh vendor extension"
|
||||
default y
|
||||
|
||||
config TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI_DEFAULT
|
||||
string
|
||||
default "\\\\x11\\\\x22\\\\x33"
|
||||
|
||||
config TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI
|
||||
string "Vendor OUI in '\\\\xAB\\\\xCD\\\\xEF' format"
|
||||
default TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI_DEFAULT
|
||||
help
|
||||
Extra features not covered by the base Easymesh specification can be
|
||||
enabled through TOPOLOGYD_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
|
||||
through which such features would be exposed.
|
||||
|
||||
config TOPOLOGYD_ACTIVE_CONN_LIBCONNTRACK
|
||||
bool "Support active connection fetch using netlink"
|
||||
default n
|
||||
|
||||
endmenu
|
||||
endif
|
||||
@@ -1,38 +1,44 @@
|
||||
#
|
||||
# Copyright (C) 2020 iopsys
|
||||
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=map-topology
|
||||
PKG_VERSION:=4.0.1
|
||||
PKG_VERSION:=2.5.0.20
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_VERSION:=f0c36d13b19c100639a8f657a6a027bbfd74b802
|
||||
PKG_SOURCE_VERSION:=beebf849bf8553dd20ff898685007b2f0bdd0739
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-topology.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_BUILD_DEPENDS:=ieee1905
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/map-topology
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libubox +ubus +libpthread +libuci +libeasy \
|
||||
+libavahi-nodbus-support
|
||||
+libavahi-nodbus-support +libnetfilter-conntrack +libnfnetlink +libmnl
|
||||
TITLE:=Utility to build topology of a multi-AP network
|
||||
endef
|
||||
|
||||
define Package/map-topology/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-I$(STAGING_DIR)/usr/include/libnetfilter_conntrack \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
define Package/map-topology/description
|
||||
@@ -41,6 +47,15 @@ endef
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
ifeq ($(CONFIG_TOPOLOGYD_ACTIVE_CONN_LIBCONNTRACK),y)
|
||||
TARGET_CFLAGS += -DACTIVE_CONN_LIBCONNTRACK
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TOPOLOGYD_EASYMESH_VENDOR_EXT),y)
|
||||
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=\\\"$(CONFIG_TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI)\\\"
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/map-topology/* $(PKG_BUILD_DIR)/
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
config global 'global'
|
||||
option ageing_timer '1440'
|
||||
option reboot_persistent '0'
|
||||
option ifname 'br-lan'
|
||||
|
||||
@@ -24,7 +24,8 @@ validate_topology_config() {
|
||||
validate_global_section() {
|
||||
uci_validate_section hosts global "global" \
|
||||
'ageing_timer:uinteger' \
|
||||
'reboot_persistent:bool'
|
||||
'reboot_persistent:bool' \
|
||||
'ifname:string'
|
||||
|
||||
[ "$?" -ne 0 ] && {
|
||||
logger -s -t "hosts" "Validation of global section failed"
|
||||
@@ -71,6 +72,9 @@ start_service() {
|
||||
config_load "hosts"
|
||||
validate_hosts_config || return 1;
|
||||
|
||||
if [ -f "/proc/sys/net/netfilter/nf_conntrack_timestamp" ]; then
|
||||
echo 1 >/proc/sys/net/netfilter/nf_conntrack_timestamp
|
||||
fi
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/topologyd"
|
||||
procd_set_param respawn
|
||||
|
||||
45
mosquitto-auth-shadow/Makefile
Normal file
45
mosquitto-auth-shadow/Makefile
Normal file
@@ -0,0 +1,45 @@
|
||||
#
|
||||
# Copyright (c) 2022 Genexis B.V.
|
||||
#
|
||||
# This program and the accompanying materials are made available under the
|
||||
# terms of the Eclipse Public License 2.0 which is available at
|
||||
# https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
# Contributors:
|
||||
# Erik Karlsson - initial implementation
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mosquitto-auth-shadow
|
||||
PKG_VERSION:=1.0.0
|
||||
|
||||
PKG_MAINTAINER:=Erik Karlsson <erik.karlsson@genexis.eu>
|
||||
PKG_LICENSE:=EPL-2.0
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/mosquitto-auth-shadow
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=mosquitto - /etc/shadow authentication plugin
|
||||
DEPENDS:=mosquitto
|
||||
USERID:=mosquitto=200:mosquitto=200 mosquitto=200:shadow=11
|
||||
endef
|
||||
|
||||
define Package/mosquitto-auth-shadow/description
|
||||
Plugin for the mosquitto MQTT message broker that authenticates
|
||||
users using /etc/shadow
|
||||
endef
|
||||
|
||||
define Package/mosquitto-auth-shadow/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mosquitto_auth_shadow.so $(1)/usr/lib/
|
||||
$(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,mosquitto-auth-shadow))
|
||||
@@ -0,0 +1 @@
|
||||
chown root:shadow /etc/shadow && chmod 0640 /etc/shadow
|
||||
25
mosquitto-auth-shadow/src/Makefile
Normal file
25
mosquitto-auth-shadow/src/Makefile
Normal file
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# Copyright (c) 2022 Genexis B.V.
|
||||
#
|
||||
# This program and the accompanying materials are made available under the
|
||||
# terms of the Eclipse Public License 2.0 which is available at
|
||||
# https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
# Contributors:
|
||||
# Erik Karlsson - initial implementation
|
||||
#
|
||||
|
||||
TARGETS = mosquitto_auth_shadow.so
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
%.pic.o: %.c
|
||||
$(CC) $(CFLAGS) -Wall -Werror -fPIC -c -o $@ $<
|
||||
|
||||
mosquitto_auth_shadow.so: mosquitto_auth_shadow.pic.o
|
||||
$(CC) $(LDFLAGS) -shared -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f *.o $(TARGETS)
|
||||
80
mosquitto-auth-shadow/src/mosquitto_auth_shadow.c
Normal file
80
mosquitto-auth-shadow/src/mosquitto_auth_shadow.c
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Genexis B.V.
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License 2.0 which is available at
|
||||
* https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*
|
||||
* Contributors:
|
||||
* Erik Karlsson - initial implementation
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <shadow.h>
|
||||
#include <crypt.h>
|
||||
#include <mosquitto.h>
|
||||
#include <mosquitto_broker.h>
|
||||
#include <mosquitto_plugin.h>
|
||||
|
||||
static int basic_auth_callback(int event, void *event_data, void *userdata)
|
||||
{
|
||||
struct mosquitto_evt_basic_auth *ed = event_data;
|
||||
struct spwd spbuf, *sp = NULL;
|
||||
char buf[256];
|
||||
struct crypt_data data;
|
||||
char *hash;
|
||||
|
||||
/* Let other plugins or broker decide about anonymous login */
|
||||
if (ed->username == NULL)
|
||||
return MOSQ_ERR_PLUGIN_DEFER;
|
||||
|
||||
getspnam_r(ed->username, &spbuf, buf, sizeof(buf), &sp);
|
||||
|
||||
if (sp == NULL || sp->sp_pwdp == NULL)
|
||||
return MOSQ_ERR_AUTH;
|
||||
|
||||
/* Empty string as hash means password is not required */
|
||||
if (sp->sp_pwdp[0] == 0)
|
||||
return MOSQ_ERR_SUCCESS;
|
||||
|
||||
if (ed->password == NULL)
|
||||
return MOSQ_ERR_AUTH;
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
hash = crypt_r(ed->password, sp->sp_pwdp, &data);
|
||||
|
||||
if (hash == NULL)
|
||||
return MOSQ_ERR_AUTH;
|
||||
|
||||
if (strcmp(hash, sp->sp_pwdp) == 0)
|
||||
return MOSQ_ERR_SUCCESS;
|
||||
|
||||
return MOSQ_ERR_AUTH;
|
||||
}
|
||||
|
||||
int mosquitto_plugin_version(int supported_version_count,
|
||||
const int *supported_versions)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
int mosquitto_plugin_init(mosquitto_plugin_id_t *identifier,
|
||||
void **user_data,
|
||||
struct mosquitto_opt *opts, int opt_count)
|
||||
{
|
||||
*user_data = identifier;
|
||||
|
||||
return mosquitto_callback_register(identifier, MOSQ_EVT_BASIC_AUTH,
|
||||
basic_auth_callback, NULL, NULL);
|
||||
}
|
||||
|
||||
int mosquitto_plugin_cleanup(void *user_data,
|
||||
struct mosquitto_opt *opts, int opt_count)
|
||||
{
|
||||
mosquitto_plugin_id_t *identifier = user_data;
|
||||
|
||||
return mosquitto_callback_unregister(identifier, MOSQ_EVT_BASIC_AUTH,
|
||||
basic_auth_callback, NULL);
|
||||
}
|
||||
@@ -21,5 +21,9 @@ config OBUSPA_MTP_ENABLE_STOMP
|
||||
config OBUSPA_MTP_ENABLE_COAP
|
||||
bool "Enable CoAP as mtp protocol"
|
||||
default n
|
||||
|
||||
config OBUSPA_CONTROLLER_MTP_VERIFY
|
||||
bool "Enable verification of MQTT response topic before processing the message"
|
||||
default n
|
||||
endmenu
|
||||
endif
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=obuspa
|
||||
PKG_VERSION:=5.0.0.11
|
||||
PKG_VERSION:=5.0.0.16.7
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=b8bc6a70f07b40c8512e8894461602f47981df97
|
||||
PKG_SOURCE_VERSION:=6477337ec0d5dd6fa5586b42ba6423a892643106
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
|
||||
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
@@ -43,11 +43,14 @@ define Package/obuspa/config
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-D_GNU_SOURCE \
|
||||
-Wall \
|
||||
-Werror
|
||||
|
||||
ifneq ($(CONFIG_OBUSPA_CONTROLLER_MTP_VERIFY),)
|
||||
TARGET_CFLAGS += -DOBUSPA_CONTROLLER_MTP_VERIFY
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_OBUSPA_DB_PATH),)
|
||||
CONFIGURE_ARGS += \
|
||||
--localstatedir="$(CONFIG_OBUSPA_DB_PATH)"
|
||||
@@ -88,6 +91,7 @@ endif
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/obuspa/* $(PKG_BUILD_DIR)/
|
||||
$(Build/Patch)
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -103,6 +107,7 @@ define Package/obuspa/install
|
||||
$(INSTALL_DATA) ./files/etc/obuspa/roles.json $(1)/etc/obuspa/roles.json
|
||||
$(INSTALL_DATA) ./files/etc/obuspa/dmcaching_exclude.json $(1)/etc/obuspa/dmcaching_exclude.json
|
||||
$(INSTALL_DATA) ./files/etc/bbfdm/json/USPAgent.json $(1)/etc/bbfdm/json/USPAgent.json
|
||||
$(INSTALL_DATA) ./files/etc/bbfdm/json/TransferComplete.json $(1)/etc/bbfdm/json/TransferComplete.json
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,obuspa))
|
||||
|
||||
@@ -2,7 +2,7 @@ config obuspa 'global'
|
||||
option enabled '1'
|
||||
option interface 'loopback'
|
||||
#option ifname 'lo'
|
||||
option debug '1'
|
||||
option debug '0'
|
||||
option log_level '1'
|
||||
option prototrace '0'
|
||||
#option db_file '/etc/obuspa/usp.db'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=2
|
||||
STOP=02
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/obuspa
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"dmcaching_exclude": [
|
||||
"Device.DeviceInfo.ProcessStatus.Process.",
|
||||
"Device.InterfaceStack.",
|
||||
"Device.Hosts.Host.",
|
||||
"Device.IEEE1905.",
|
||||
"Device.WiFi.DataElements."
|
||||
]
|
||||
}
|
||||
|
||||
42
obuspa/patches/0002-supress-group-get-error.patch
Normal file
42
obuspa/patches/0002-supress-group-get-error.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
--- a/src/core/cli_server.c
|
||||
+++ b/src/core/cli_server.c
|
||||
@@ -733,10 +733,6 @@ int ExecuteCli_Get(char *arg1, char *arg
|
||||
USP_ASSERT(gge->value != NULL);
|
||||
SendCliResponse("%s => %s\n", gge->path, gge->value);
|
||||
}
|
||||
- else
|
||||
- {
|
||||
- SendCliResponse("ERROR: %d retrieving %s (%s)\n", gge->err_code, gge->path, gge->err_msg);
|
||||
- }
|
||||
}
|
||||
|
||||
GROUP_GET_VECTOR_Destroy(&ggv);
|
||||
--- a/src/core/handle_get.c
|
||||
+++ b/src/core/handle_get.c
|
||||
@@ -252,24 +252,14 @@ void FormPathExprResponse(int get_expr_i
|
||||
return;
|
||||
}
|
||||
|
||||
- // If there was an error in getting any of the parameters associated with the path expression,
|
||||
- // then just add the first error, without any of the parameter values, for this path expression result
|
||||
- for (i=0; i < gi->num_entries; i++)
|
||||
- {
|
||||
- gge = &ggv->vector[gi->index + i];
|
||||
- if (gge->err_code != USP_ERR_OK)
|
||||
- {
|
||||
- (void)AddGetResp_ReqPathRes(resp, path_expr, gge->err_code, gge->err_msg);
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
// If the code gets here, then the value of all parameters were retrieved successfully, so add their values to the result_params
|
||||
req_path_result = AddGetResp_ReqPathRes(resp, path_expr, USP_ERR_OK, "");
|
||||
for (i=0; i < gi->num_entries; i++)
|
||||
{
|
||||
gge = &ggv->vector[gi->index + i];
|
||||
|
||||
+ if (gge->err_code != USP_ERR_OK)
|
||||
+ continue;
|
||||
#ifdef GET_RESPONSE_SIMPLE_FORMAT
|
||||
// Simple format contains a resolved_path_result for every object (and sub object)
|
||||
AddResolvedPathResult(req_path_result, gge->path, gge->value, 0);
|
||||
20
obuspa/patches/0004-suppress-notification-logs.patch
Normal file
20
obuspa/patches/0004-suppress-notification-logs.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
--- a/src/core/data_model.c
|
||||
+++ b/src/core/data_model.c
|
||||
@@ -1239,7 +1239,7 @@ int DATA_MODEL_NotifyInstanceAdded(char
|
||||
// Exit if instance already exists - nothing to do
|
||||
if (exists)
|
||||
{
|
||||
- USP_ERR_SetMessage("%s: Object (%s) already exists in the data model", __FUNCTION__, path);
|
||||
+ // USP_ERR_SetMessage("%s: Object (%s) already exists in the data model", __FUNCTION__, path);
|
||||
return USP_ERR_CREATION_FAILURE;
|
||||
}
|
||||
|
||||
@@ -1324,7 +1324,7 @@ int DATA_MODEL_NotifyInstanceDeleted(cha
|
||||
// Exit if instance does not exist - nothing to do
|
||||
if (exists == false)
|
||||
{
|
||||
- USP_ERR_SetMessage("%s: Object (%s) does not exist in the data model", __FUNCTION__, path);
|
||||
+ // USP_ERR_SetMessage("%s: Object (%s) does not exist in the data model", __FUNCTION__, path);
|
||||
return USP_ERR_OBJECT_DOES_NOT_EXIST;
|
||||
}
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=periodicstats
|
||||
PKG_VERSION:=1.1.2
|
||||
PKG_VERSION:=1.2.0
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=2779815d2b87e5966e27cfafe88070d0a8970a25
|
||||
PKG_SOURCE_VERSION:=6c68428405bc88a9990e855f911aecc86f07f4a8
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/periodicstats.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
@@ -1,22 +1,37 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=19
|
||||
STOP=10
|
||||
STOP=91
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
. /lib/functions.sh
|
||||
include /lib/xpon
|
||||
|
||||
configure_serial_number() {
|
||||
# serial number generation is taken care in the uci defaults, so if
|
||||
# serial number is not found here its a misconfig
|
||||
serial_number="$(uci -q get xpon.ani.serial_number)"
|
||||
if [ ${#serial_number} -eq 12 ]; then
|
||||
vendor_id="${serial_number:0:4}"
|
||||
vssn="${serial_number:4:8}"
|
||||
else
|
||||
logger -s -t "xpon" "Serial number not found in uci, ont will probably not be registered at the olt"
|
||||
logger -s -t "xpon" "Please configure a valid serial number"
|
||||
return
|
||||
fi
|
||||
|
||||
set_serial_number $vendor_id $vssn
|
||||
}
|
||||
|
||||
start_service() {
|
||||
if [ "$(uci -q get xpon.ani.enable)" == "1" ]; then
|
||||
configure_serial_number
|
||||
init_xpon
|
||||
fi
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
# stopping omcid does not bring down the pon link, which should happen
|
||||
# if ANI is disabled or stopped (go to O1)
|
||||
deinit_xpon
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
configure_serial_number() {
|
||||
# check if serial number is present in the production data
|
||||
production_sn="$(fw_printenv -n gponsn)"
|
||||
if [ ${#production_sn} -eq 12 ]; then
|
||||
uci set xpon.ani.serial_number=$production_sn
|
||||
else
|
||||
macaddr="$(fw_printenv -n ethaddr | tr -d ':' | tr 'a-z' 'A-Z')"
|
||||
vendor_id="IOPS"
|
||||
vssn="${macaddr:4:8}"
|
||||
uci set xpon.ani.serial_number=$vendor_id$vssn
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -s "/etc/config/xpon" ]; then
|
||||
if uci -q get xpon.ani >/dev/null; then
|
||||
# return if there is any valid content
|
||||
# generate serial number in case its not present and return
|
||||
serial_number="$(uci -q get xpon.ani.serial_number)"
|
||||
if [ ${#serial_number} -ne 12 ]; then
|
||||
configure_serial_number
|
||||
fi
|
||||
exit
|
||||
else
|
||||
rm -f /etc/config/xpon
|
||||
fi
|
||||
fi
|
||||
touch /etc/config/xpon
|
||||
|
||||
|
||||
|
||||
uci set xpon.ani=ani
|
||||
uci set xpon.ani.enable="1"
|
||||
|
||||
uci commit xpon
|
||||
configure_serial_number
|
||||
|
||||
|
||||
@@ -1,20 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
set_serial_number() {
|
||||
vendor_id=$1
|
||||
vssn=$2
|
||||
|
||||
vendor_id="$(echo $vendor_id | hexdump -e '4/1 "%02X" "\n"')"
|
||||
vendor_id=${vendor_id:0:8}
|
||||
|
||||
bs /b/c gpon onu_sn={vendor_id=$vendor_id,vendor_specific=$vssn}
|
||||
}
|
||||
|
||||
init_xpon() {
|
||||
procd_open_instance pon_msgd
|
||||
procd_set_param command bcm_msgd -c gpon
|
||||
procd_close_instance
|
||||
|
||||
procd_open_instance pon_daemon
|
||||
procd_set_param command omcid start -n
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
}
|
||||
|
||||
deinit_xpon() {
|
||||
# stopping omcid does not bring down the pon link, which should happen
|
||||
# if ANI is disabled or stopped (go to O1)
|
||||
gponctl stop
|
||||
}
|
||||
|
||||
|
||||
@@ -4,22 +4,18 @@
|
||||
|
||||
IP_RULE=""
|
||||
BR_RULE=""
|
||||
BR6_RULE=""
|
||||
|
||||
POLICER_COUNT=0
|
||||
INTF_NAME=""
|
||||
Q_COUNT=0
|
||||
ITER=0
|
||||
PREV_ORDER=""
|
||||
CURR_ORDER=""
|
||||
MAX_ORDER=""
|
||||
|
||||
SP_Q_PRIO=7
|
||||
|
||||
# Function to handle a queue order and
|
||||
# update total number of queues
|
||||
handle_q_order() {
|
||||
qid="$1" #queue section ID
|
||||
local qid="$1" #queue section ID
|
||||
|
||||
config_get is_enable "$qid" "enable"
|
||||
config_get is_enable "$qid" "enable" 1
|
||||
|
||||
# No need to configure disabled queues
|
||||
if [ $is_enable == '0' ]; then
|
||||
@@ -35,7 +31,7 @@ handle_q_order() {
|
||||
# Create precedence file containing queue order per
|
||||
# interface.
|
||||
local precedence_file="/tmp/qos/$ifname/q_order"
|
||||
local q_no=$(cat /tmp/qos/queue_stats/$ifname/q_idx)
|
||||
local q_no=$(cat /tmp/qos/$ifname/q_idx)
|
||||
|
||||
config_get precedence "$qid" "precedence"
|
||||
value=${precedence}_q${q_no}
|
||||
@@ -43,71 +39,32 @@ handle_q_order() {
|
||||
|
||||
# Update the number of queues per interface.
|
||||
q_no=$((q_no + 1))
|
||||
echo $q_no > /tmp/qos/queue_stats/$ifname/q_idx
|
||||
echo $q_no > /tmp/qos/$ifname/q_idx
|
||||
}
|
||||
|
||||
# Function to check if values are greater than (total number
|
||||
# of queue -1) and map them to corresponding value.
|
||||
configure_precedence_to_file() {
|
||||
order="$1"
|
||||
line="$2"
|
||||
order_file="$3"
|
||||
|
||||
if [ $order == "$PREV_ORDER" ]; then
|
||||
queue_id=${line#*_}
|
||||
val=${CURR_ORDER}_${queue_id}
|
||||
echo $val >> $order_file
|
||||
else
|
||||
PREV_ORDER=$order
|
||||
queue_id=${line#*_}
|
||||
val=${MAX_ORDER}_${queue_id}
|
||||
echo $val >> $order_file
|
||||
CURR_ORDER=$MAX_ORDER
|
||||
MAX_ORDER=$((MAX_ORDER - 1))
|
||||
fi
|
||||
}
|
||||
|
||||
# Fucntion to map queue precedence per interface
|
||||
# ranging from 1-X to 0-(no of queues -1)
|
||||
map_queue_precedence() {
|
||||
# Sort queue, lower value in uci means higher precedence, so this
|
||||
# function sorts the precedence in decending order
|
||||
sort_q_by_precedence() {
|
||||
ifname="$1"
|
||||
total_q=$(cat /tmp/qos/queue_stats/$ifname/q_idx)
|
||||
q_no=`expr $total_q - 1`
|
||||
|
||||
MAX_ORDER=$q_no
|
||||
|
||||
local precedence_file="/tmp/qos/$ifname/q_precedence"
|
||||
local order_file="/tmp/qos/$ifname/q_order"
|
||||
local tmp_order_file="/tmp/qos/$ifname/q_order.tmp"
|
||||
|
||||
sort -n -r -k1 $order_file >> $precedence_file
|
||||
rm $order_file
|
||||
|
||||
while read line
|
||||
do
|
||||
order=${line%_*}
|
||||
if [ $order -gt $q_no ]; then
|
||||
ITER=$((ITER + 1))
|
||||
configure_precedence_to_file $order $line $order_file
|
||||
else
|
||||
if [ $ITER == '0' ]; then
|
||||
echo $line >> $order_file
|
||||
else
|
||||
configure_precedence_to_file $order $line $order_file
|
||||
fi
|
||||
fi
|
||||
|
||||
done < $precedence_file
|
||||
sort -n -k1 $order_file > $tmp_order_file
|
||||
cp $tmp_order_file $order_file
|
||||
rm -f $tmp_order_file
|
||||
}
|
||||
|
||||
map_precedence() {
|
||||
sort_by_precedence() {
|
||||
for interf in $(db -q get hw.board.ethernetPortOrder); do
|
||||
map_queue_precedence $interf
|
||||
sort_q_by_precedence $interf
|
||||
done
|
||||
}
|
||||
|
||||
# function to handle a queue section
|
||||
handle_queue() {
|
||||
qid="$1" #queue section ID
|
||||
local qid="$1" #queue section ID
|
||||
local intf_name="$2"
|
||||
|
||||
config_get is_enable "$qid" "enable"
|
||||
|
||||
@@ -123,33 +80,35 @@ handle_queue() {
|
||||
fi
|
||||
|
||||
# This is to get the qid per interface.
|
||||
if [ "$INTF_NAME" == $ifname ]; then
|
||||
Q_COUNT=$((Q_COUNT + 1))
|
||||
else
|
||||
Q_COUNT='0'
|
||||
if [ "$intf_name" != "$ifname" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
INTF_NAME=$ifname
|
||||
local precedence_file="/tmp/qos/$ifname/q_order"
|
||||
|
||||
local total_q=$(cat /tmp/qos/queue_stats/$ifname/q_idx)
|
||||
q_no=`expr $total_q - 1` local
|
||||
precedence_file="/tmp/qos/$ifname/q_order"
|
||||
local temp_order=0
|
||||
while read -r line; do
|
||||
line_qid=${line: -1}
|
||||
if [ "$line_qid" == "$Q_COUNT" ]; then
|
||||
break
|
||||
fi
|
||||
temp_order=$((temp_order + 1))
|
||||
done < "$precedence_file"
|
||||
|
||||
# TR181 suggests lower the precedence value higher the priority
|
||||
# but in the chip its the opposite ie lower the value, lower
|
||||
# the priority of queue on this chip. So we need to reverse the
|
||||
# precedence value.
|
||||
precedence="$(grep -i q${Q_COUNT} $precedence_file)"
|
||||
precedence=${precedence%_*}
|
||||
order=`expr $q_no - $precedence`
|
||||
# for sp queue, no matter what the precedence value is configured in the uci file
|
||||
# broadcom recommends that the highest precedence queue should have priority value
|
||||
#7, the next priority q 6 and so on.
|
||||
# Here, we have the index of the queue when sorted by precedence value in the file
|
||||
# precedence_file so the order is calculated accordingly.
|
||||
local order=`expr $SP_Q_PRIO - $temp_order`
|
||||
|
||||
config_get sc_alg "$qid" "scheduling"
|
||||
config_get wgt "$qid" "weight"
|
||||
config_get wgt "$qid" "weight" 1
|
||||
config_get rate "$qid" "rate"
|
||||
config_get bs "$qid" "burst_size"
|
||||
config_get qsize "$qid" "queue_size" 1024
|
||||
|
||||
salg=1
|
||||
local salg=1
|
||||
|
||||
case "$sc_alg" in
|
||||
"SP") salg=1
|
||||
@@ -162,31 +121,15 @@ handle_queue() {
|
||||
;;
|
||||
esac
|
||||
|
||||
# ignore precedence value in case of WRR
|
||||
# ignore precedence value in case of WRR, broadcom recommends that WRR queue should
|
||||
# always have precedence value set to 0
|
||||
if [ $salg -eq 2 ]; then
|
||||
order=0
|
||||
fi
|
||||
|
||||
# Call tmctl which is a broadcomm command to configure queues on a port.
|
||||
tmctl setqcfg --devtype 0 --if $ifname --qid $Q_COUNT --priority $order --qsize $qsize --weight $wgt --schedmode $salg --shapingrate $rate --burstsize $bs
|
||||
|
||||
# In BCM968 chips, the counters for queues are read, on other model, its read and reset. So, to maintain counter
|
||||
# value and uniform behaviour, we are storing counter value for each queue in files
|
||||
local d_name="/tmp/qos/queue_stats/${ifname}/q_${Q_COUNT}"
|
||||
mkdir $d_name
|
||||
local f_name="$d_name/txPackets"
|
||||
touch $f_name
|
||||
echo 0 > $f_name
|
||||
f_name="$d_name/txBytes"
|
||||
touch $f_name
|
||||
echo 0 > $f_name
|
||||
f_name="$d_name/droppedPackets"
|
||||
touch $f_name
|
||||
echo 0 > $f_name
|
||||
f_name="$d_name/droppedBytes"
|
||||
touch $f_name
|
||||
echo 0 > $f_name
|
||||
|
||||
Q_COUNT=$((Q_COUNT + 1))
|
||||
}
|
||||
|
||||
#function to handle a policer section
|
||||
@@ -291,6 +234,7 @@ flush_chains() {
|
||||
|
||||
init_broute_rule() {
|
||||
BR_RULE=""
|
||||
BR6_RULE=""
|
||||
}
|
||||
|
||||
broute_filter_on_src_if() {
|
||||
@@ -326,6 +270,82 @@ broute_filter_on_ether_type() {
|
||||
BR_RULE="$BR_RULE --proto $1"
|
||||
}
|
||||
|
||||
broute_filter_on_ether_type6() {
|
||||
BR6_RULE="$BR6_RULE --proto IPv6"
|
||||
}
|
||||
|
||||
ebt_match_src_ip() {
|
||||
BR_RULE="$BR_RULE --ip-src $1"
|
||||
}
|
||||
|
||||
ebt_match_dst_ip() {
|
||||
BR_RULE="$BR_RULE --ip-dst $1"
|
||||
}
|
||||
|
||||
ebt_match_ipv6_src_ip() {
|
||||
BR_RULE="$BR_RULE --ip6-src $1"
|
||||
}
|
||||
|
||||
ebt_match_ipv6_dst_ip() {
|
||||
BR_RULE="$BR_RULE --ip6-dst $1"
|
||||
}
|
||||
|
||||
ebt_match_ip_src_port() {
|
||||
BR_RULE="$BR_RULE --ip-source-port $1"
|
||||
}
|
||||
|
||||
ebt_match_ip_dst_port() {
|
||||
BR_RULE="$BR_RULE --ip-destination-port $1"
|
||||
}
|
||||
|
||||
ebt_match_ipv6_src_port() {
|
||||
#when ethertype is not configured by user then both proto rules of ipv4
|
||||
#and ipv6 to be installed so update BR6_RULE string as well otherwise
|
||||
#update BR_RULE only for installation of ipv6 proto rule only.
|
||||
if [ ! -z "$BR6_RULE" ]; then
|
||||
BR6_RULE="$BR6_RULE --ip6-source-port $1"
|
||||
else
|
||||
BR_RULE="$BR_RULE --ip6-source-port $1"
|
||||
fi
|
||||
}
|
||||
|
||||
ebt_match_ipv6_dst_port() {
|
||||
#when ethertype is not configured by user then both proto rules of ipv4
|
||||
#and ipv6 to be installed so update BR6_RULE string as well otherwise
|
||||
#update BR_RULE only for installation of ipv6 proto rule only.
|
||||
if [ ! -z "$BR6_RULE" ]; then
|
||||
BR6_RULE="$BR6_RULE --ip6-destination-port $1"
|
||||
else
|
||||
BR_RULE="$BR_RULE --ip6-destination-port $1"
|
||||
fi
|
||||
}
|
||||
|
||||
ebt_match_ip_protocol() {
|
||||
BR_RULE="$BR_RULE --ip-proto $1"
|
||||
}
|
||||
|
||||
ebt_match_ipv6_protocol() {
|
||||
#when ethertype is not configured by user then both proto rules of ipv4
|
||||
#and ipv6 to be installed so update BR6_RULE string as well otherwise
|
||||
#update BR_RULE only for installation of ipv6 proto rule only.
|
||||
if [ ! -z "$BR6_RULE" ]; then
|
||||
BR6_RULE="$BR6_RULE --ip6-proto $1"
|
||||
else
|
||||
BR_RULE="$BR_RULE --ip6-proto $1"
|
||||
fi
|
||||
}
|
||||
|
||||
ebt_match_ipv6_dscp() {
|
||||
#when ethertype is not configured by user then both proto rules of ipv4
|
||||
#and ipv6 to be installed so update BR6_RULE string as well otherwise
|
||||
#update BR_RULE only for installation of ipv6 proto rule only.
|
||||
if [ ! -z "$BR6_RULE" ]; then
|
||||
BR6_RULE="$BR6_RULE --ip6-tclass $1"
|
||||
else
|
||||
BR_RULE="$BR_RULE --ip6-tclass $1"
|
||||
fi
|
||||
}
|
||||
|
||||
broute_filter_on_dscp() {
|
||||
# The broadcom option --ip-dscp-extend actually accepts tos
|
||||
# and not dscp and that too in hex, hence, perform the conversion
|
||||
@@ -352,11 +372,145 @@ broute_filter_on_vid() {
|
||||
}
|
||||
|
||||
broute_rule_set_traffic_class() {
|
||||
#when ethertype is not configured by user then both proto rules of ipv4
|
||||
#and ipv6 to be installed so update BR6_RULE string as well otherwise
|
||||
#update BR_RULE only for installation of ipv6 proto rule only.
|
||||
BR_RULE="$BR_RULE -j mark --mark-or 0x$1 --mark-target ACCEPT"
|
||||
if [ ! -z "$BR6_RULE" ]; then
|
||||
BR6_RULE="$BR6_RULE -j mark --mark-or 0x$1 --mark-target ACCEPT"
|
||||
fi
|
||||
}
|
||||
|
||||
broute_append_rule() {
|
||||
#when ethertype is not configured by user then both proto rules of ipv4
|
||||
#and ipv6 to be installed otherwise install ipv6 proto rule only.
|
||||
echo "ebtables -t broute -A qos $BR_RULE" >> /tmp/qos/classify.ebtables
|
||||
if [ -n "$BR6_RULE" ]; then
|
||||
echo "ebtables -t broute -A qos $BR6_RULE" >> /tmp/qos/classify.ebtables
|
||||
fi
|
||||
}
|
||||
|
||||
set_ip_addr()
|
||||
{
|
||||
local cid=$1
|
||||
local match_src_ip_func=$2
|
||||
local match_dst_ip_func=$3
|
||||
|
||||
config_get src_ip "$cid" "src_ip"
|
||||
config_get dst_ip "$cid" "dest_ip"
|
||||
|
||||
if [ ! -z "$src_ip" ]; then
|
||||
$match_src_ip_func "$src_ip"
|
||||
fi
|
||||
|
||||
if [ ! -z "$dst_ip" ]; then
|
||||
$match_dst_ip_func "$dst_ip"
|
||||
fi
|
||||
}
|
||||
|
||||
set_ports()
|
||||
{
|
||||
local cid=$1
|
||||
local match_src_port_func=$2
|
||||
local match_dst_port_func=$3
|
||||
local src_port=""
|
||||
local dst_port=""
|
||||
local src_port_range=""
|
||||
local dst_port_range=""
|
||||
|
||||
config_get src_port "$cid" "src_port"
|
||||
config_get dst_port "$cid" "dest_port"
|
||||
config_get src_port_range "$cid" "src_port_range"
|
||||
config_get dst_port_range "$cid" "dest_port_range"
|
||||
|
||||
if ! [ -z $src_port ] && ! [ -z $src_port_range ]; then
|
||||
$match_src_port_func "$src_port:$src_port_range"
|
||||
elif [ ! -z $src_port ]; then
|
||||
$match_src_port_func $src_port
|
||||
fi
|
||||
|
||||
if ! [ -z $dst_port ] && ! [ -z $dst_port_range ]; then
|
||||
$match_dst_port_func "$dst_port:$dst_port_range"
|
||||
elif [ ! -z $dst_port ]; then
|
||||
$match_dst_port_func $dst_port
|
||||
fi
|
||||
}
|
||||
|
||||
protocol_string_to_num()
|
||||
{
|
||||
local value=-1
|
||||
|
||||
case "$1" in
|
||||
*[0-9]*) value="$1"
|
||||
;;
|
||||
TCP|tcp) value=6
|
||||
;;
|
||||
UDP|udp) value=17
|
||||
;;
|
||||
ICMP|icmp) value=1
|
||||
;;
|
||||
ICMPv6|icmpv6) value=58
|
||||
;;
|
||||
IGMP|igmp) value=2
|
||||
;;
|
||||
SCTP|sctp) value=132
|
||||
;;
|
||||
*) value=-1
|
||||
;;
|
||||
esac
|
||||
echo $value
|
||||
}
|
||||
|
||||
broute_ipv4_rule_options()
|
||||
{
|
||||
local cid=$1
|
||||
config_get protocol "$cid" "proto"
|
||||
config_get dscp_filter "$cid" "dscp_filter"
|
||||
|
||||
set_ip_addr $cid ebt_match_src_ip ebt_match_dst_ip
|
||||
|
||||
if [ ! -z $dscp_filter ]; then
|
||||
broute_filter_on_dscp "$dscp_filter"
|
||||
fi
|
||||
|
||||
if [ ! -z $protocol ]; then
|
||||
local proto_num=$(protocol_string_to_num "$protocol")
|
||||
ebt_match_ip_protocol "$proto_num"
|
||||
|
||||
#port installation for protol tcp/udp/sctp
|
||||
if [ $proto_num = "6" ] || [ $proto_num = "17" ] || [ $proto_num = "132" ] ; then
|
||||
set_ports "$cid" ebt_match_ip_src_port ebt_match_ip_dst_port
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
broute_ipv6_rule_options()
|
||||
{
|
||||
local cid=$1
|
||||
|
||||
config_get protocol "$cid" "proto"
|
||||
config_get dscp_filter "$cid" "dscp_filter"
|
||||
|
||||
set_ip_addr $cid ebt_match_ipv6_src_ip ebt_match_ipv6_dst_ip
|
||||
|
||||
if [ ! -z $dscp_filter ]; then
|
||||
local tos_val
|
||||
local tos_hex
|
||||
|
||||
tos_val=$(($dscp_filter<<2))
|
||||
tos_hex=$(printf "%x" $tos_val)
|
||||
ebt_match_ipv6_dscp "$tos_hex"
|
||||
fi
|
||||
|
||||
if [ ! -z $protocol ]; then
|
||||
local proto_num=$(protocol_string_to_num "$protocol")
|
||||
ebt_match_ipv6_protocol "$proto_num"
|
||||
|
||||
#port installation for protol tcp/udp/sctp
|
||||
if [ $proto_num = "6" ] || [ $proto_num = "17" ] || [ $proto_num = "132" ]; then
|
||||
set_ports "$cid" ebt_match_ipv6_src_port ebt_match_ipv6_dst_port
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
handle_ebtables_rules() {
|
||||
@@ -364,6 +518,8 @@ handle_ebtables_rules() {
|
||||
local is_l2_rule=0
|
||||
local src_dhcp_options=""
|
||||
local dst_dhcp_options=""
|
||||
local protocol=""
|
||||
local ip_version=""
|
||||
|
||||
init_broute_rule
|
||||
|
||||
@@ -381,8 +537,9 @@ handle_ebtables_rules() {
|
||||
config_get dst_clid "$sid" "dst_client_id" # dhcp option 61
|
||||
config_get src_ucid "$sid" "src_user_class_id" # dhcp option 77
|
||||
config_get dst_ucid "$sid" "dst_user_class_id" # dhcp option 77
|
||||
|
||||
config_get traffic_class "$sid" "traffic_class"
|
||||
config_get protocol "$sid" "proto"
|
||||
|
||||
|
||||
if [ -n "$src_if" ]; then
|
||||
for interf in $(db -q get hw.board.ethernetPortOrder); do
|
||||
@@ -409,13 +566,6 @@ handle_ebtables_rules() {
|
||||
is_l2_rule=1
|
||||
fi
|
||||
|
||||
if [ -n "$dscp_filter" ]; then
|
||||
# filter on ethertype and proto is same thing
|
||||
broute_filter_on_ether_type IPv4
|
||||
broute_filter_on_dscp $dscp_filter
|
||||
is_l2_rule=1
|
||||
fi
|
||||
|
||||
if [ -n "$eth_type" ]; then
|
||||
broute_filter_on_ether_type $eth_type
|
||||
is_l2_rule=1
|
||||
@@ -426,6 +576,47 @@ handle_ebtables_rules() {
|
||||
is_l2_rule=1
|
||||
fi
|
||||
|
||||
case $eth_type in
|
||||
IPv4|IPV4|0800)
|
||||
ip_version=4
|
||||
;;
|
||||
IPv6|IPV6|86DD)
|
||||
ip_version=6
|
||||
;;
|
||||
*)
|
||||
if [ -z "$eth_type" ]; then
|
||||
case $src_ip$dest_ip in
|
||||
*.*)
|
||||
ip_version=4
|
||||
broute_filter_on_ether_type "IPv4"
|
||||
;;
|
||||
*:*)
|
||||
ip_version=6
|
||||
broute_filter_on_ether_type "IPv6"
|
||||
;;
|
||||
*)
|
||||
if [ -n "$protocol" ] || [ -n "$dscp_filter" ]; then
|
||||
ip_version=1 #neither ether_type nor ip address used
|
||||
#ethertype is not configured by user so install
|
||||
#both proto ipv4 and ipv6 rule
|
||||
BR6_RULE="$BR_RULE"
|
||||
broute_filter_on_ether_type "IPv4"
|
||||
broute_filter_on_ether_type6 "IPv6"
|
||||
fi
|
||||
esac
|
||||
fi
|
||||
esac
|
||||
|
||||
if [ $ip_version = "4" ] || [ $ip_version = "1" ]; then
|
||||
broute_ipv4_rule_options "$sid"
|
||||
is_l2_rule=1
|
||||
fi
|
||||
|
||||
if [ $ip_version = "6" ] || [ $ip_version = "1" ]; then
|
||||
broute_ipv6_rule_options "$sid"
|
||||
is_l2_rule=1
|
||||
fi
|
||||
|
||||
# first process options that will help figure our source mac address
|
||||
# dhcp option for "vendor class id"
|
||||
if [ -n "$src_vcid" ]; then
|
||||
@@ -843,23 +1034,20 @@ configure_classify() {
|
||||
|
||||
pre_configure_queue() {
|
||||
# Delete queues
|
||||
rm -rf /tmp/qos/queue_stats
|
||||
|
||||
for intf in $(db get hw.board.ethernetPortOrder); do
|
||||
rm -rf /tmp/qos/$intf
|
||||
|
||||
mkdir -p /tmp/qos/queue_stats/$intf
|
||||
touch /tmp/qos/queue_stats/$intf/q_idx
|
||||
echo 0 > /tmp/qos/queue_stats/$intf/q_idx
|
||||
mkdir -p /tmp/qos/$intf
|
||||
touch /tmp/qos/$intf/q_order
|
||||
touch /tmp/qos/$intf/q_idx
|
||||
echo 0 > /tmp/qos/$intf/q_idx
|
||||
|
||||
tmctl porttminit --devtype 0 --if $intf --numqueues 8
|
||||
|
||||
i=0
|
||||
for i in 0 1 2 3 4 5 6 7; do
|
||||
tmctl delqcfg --devtype 0 --if $intf --qid $i &>/dev/null
|
||||
done
|
||||
tmctl porttminit --devtype 0 --if $intf --flag 0 --numqueues 8
|
||||
|
||||
mkdir -p /tmp/qos/$intf
|
||||
touch /tmp/qos/$intf/q_order
|
||||
touch /tmp/qos/$intf/q_precedence
|
||||
done
|
||||
}
|
||||
|
||||
@@ -867,8 +1055,15 @@ configure_queue() {
|
||||
# Load UCI file
|
||||
config_load qos
|
||||
config_foreach handle_q_order queue
|
||||
map_precedence
|
||||
config_foreach handle_queue queue
|
||||
sort_by_precedence
|
||||
for interf in $(db -q get hw.board.ethernetPortOrder); do
|
||||
Q_COUNT=0
|
||||
# sp queue have max priority value = no. of queue configured on the port
|
||||
# hence read and update SP_Q_PRIO here
|
||||
local q_no=$(cat /tmp/qos/$interf/q_idx)
|
||||
SP_Q_PRIO=`expr $q_no - 1`
|
||||
config_foreach handle_queue queue $interf
|
||||
done
|
||||
}
|
||||
|
||||
configure_policer() {
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
#
|
||||
# Copyright (C) 2013-2020 iopsys
|
||||
# Copyright (C) 2013-2022 iopsys
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=questd
|
||||
PKG_VERSION:=5.2.3
|
||||
PKG_VERSION:=5.2.4
|
||||
|
||||
PKG_SOURCE_VERSION:=cf54bd65ec821ac67f3aa1caeebcd3ea9aae07ad
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd
|
||||
|
||||
PKG_SOURCE_VERSION:=2ca3ae0c29dcbbf01282f6118eb8d5e5bc9a1c45
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@@ -23,8 +22,6 @@ PKG_LICENSE_FILES:=LICENSE
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
PKG_INSTALL:=
|
||||
|
||||
define Package/questd
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libuci +libubox +ubus +libpthread
|
||||
@@ -36,6 +33,13 @@ define Package/questd/description
|
||||
this information via ubus
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
CMAKE_OPTIONS:=-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/code/questd/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/questd/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
#
|
||||
# Copyright (C) 2018 iopsys
|
||||
# Copyright (C) 2018-2022 iopsys
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rulengd
|
||||
PKG_VERSION:=1.2.6
|
||||
PKG_VERSION:=1.2.7
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/rulengd.git
|
||||
PKG_SOURCE_VERSION:=e323bebe85cd7fb4eeb6cee535188227bc9b81e3
|
||||
PKG_SOURCE_VERSION:=1f247e1afc845f47348febffa55fe40d8b552737
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -35,6 +34,14 @@ define Package/rulengd/description
|
||||
rulengd listens for events and executes speficied methods if the incoming event arguments contain speficied ones.
|
||||
endef
|
||||
|
||||
#CMAKE_OPTIONS:=-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/code/rulengd/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/rulengd/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2012-2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=shflags
|
||||
PKG_VERSION:=2012-06-11
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/kward/shflags.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=c12b30cebb92b49c5edb6df255c0952c65b4ddc6
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
PKG_LICENSE:=LGPL-2.1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/shflags
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=shflags
|
||||
DEPENDS:=+getopt
|
||||
URL:=http://code.google.com/p/shflags/
|
||||
MAINTAINER:=Luka Perkov <luka@openwrt.org>
|
||||
endef
|
||||
|
||||
define Package/shflags/description
|
||||
command-line flags module for Unix shell scripts
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
endef
|
||||
|
||||
define Package/shflags/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/shflags
|
||||
$(CP) $(PKG_BUILD_DIR)/source/1.0/src/shflags $(1)/usr/share/shflags/shflags.sh
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,shflags))
|
||||
@@ -1,763 +0,0 @@
|
||||
--- a/source/1.0/src/shflags
|
||||
+++ b/source/1.0/src/shflags
|
||||
@@ -1,91 +1,10 @@
|
||||
-# $Id$
|
||||
-# vim:et:ft=sh:sts=2:sw=2
|
||||
-#
|
||||
-# Copyright 2008 Kate Ward. All Rights Reserved.
|
||||
-# Released under the LGPL (GNU Lesser General Public License)
|
||||
-#
|
||||
-# shFlags -- Advanced command-line flag library for Unix shell scripts.
|
||||
-# http://code.google.com/p/shflags/
|
||||
-#
|
||||
-# Author: kate.ward@forestent.com (Kate Ward)
|
||||
-#
|
||||
-# This module implements something like the google-gflags library available
|
||||
-# from http://code.google.com/p/google-gflags/.
|
||||
-#
|
||||
-# FLAG TYPES: This is a list of the DEFINE_*'s that you can do. All flags take
|
||||
-# a name, default value, help-string, and optional 'short' name (one-letter
|
||||
-# name). Some flags have other arguments, which are described with the flag.
|
||||
-#
|
||||
-# DEFINE_string: takes any input, and intreprets it as a string.
|
||||
-#
|
||||
-# DEFINE_boolean: typically does not take any argument: say --myflag to set
|
||||
-# FLAGS_myflag to true, or --nomyflag to set FLAGS_myflag to false.
|
||||
-# Alternately, you can say
|
||||
-# --myflag=true or --myflag=t or --myflag=0 or
|
||||
-# --myflag=false or --myflag=f or --myflag=1
|
||||
-# Passing an option has the same affect as passing the option once.
|
||||
-#
|
||||
-# DEFINE_float: takes an input and intreprets it as a floating point number. As
|
||||
-# shell does not support floats per-se, the input is merely validated as
|
||||
-# being a valid floating point value.
|
||||
-#
|
||||
-# DEFINE_integer: takes an input and intreprets it as an integer.
|
||||
-#
|
||||
-# SPECIAL FLAGS: There are a few flags that have special meaning:
|
||||
-# --help (or -?) prints a list of all the flags in a human-readable fashion
|
||||
-# --flagfile=foo read flags from foo. (not implemented yet)
|
||||
-# -- as in getopt(), terminates flag-processing
|
||||
-#
|
||||
-# EXAMPLE USAGE:
|
||||
-#
|
||||
-# -- begin hello.sh --
|
||||
-# #! /bin/sh
|
||||
-# . ./shflags
|
||||
-# DEFINE_string name 'world' "somebody's name" n
|
||||
-# FLAGS "$@" || exit $?
|
||||
-# eval set -- "${FLAGS_ARGV}"
|
||||
-# echo "Hello, ${FLAGS_name}."
|
||||
-# -- end hello.sh --
|
||||
-#
|
||||
-# $ ./hello.sh -n Kate
|
||||
-# Hello, Kate.
|
||||
-#
|
||||
-# NOTE: Not all systems include a getopt version that supports long flags. On
|
||||
-# these systems, only short flags are recognized.
|
||||
-
|
||||
-#==============================================================================
|
||||
-# shFlags
|
||||
-#
|
||||
-# Shared attributes:
|
||||
-# flags_error: last error message
|
||||
-# flags_return: last return value
|
||||
-#
|
||||
-# __flags_longNames: list of long names for all flags
|
||||
-# __flags_shortNames: list of short names for all flags
|
||||
-# __flags_boolNames: list of boolean flag names
|
||||
-#
|
||||
-# __flags_opts: options parsed by getopt
|
||||
-#
|
||||
-# Per-flag attributes:
|
||||
-# FLAGS_<flag_name>: contains value of flag named 'flag_name'
|
||||
-# __flags_<flag_name>_default: the default flag value
|
||||
-# __flags_<flag_name>_help: the flag help string
|
||||
-# __flags_<flag_name>_short: the flag short name
|
||||
-# __flags_<flag_name>_type: the flag type
|
||||
-#
|
||||
-# Notes:
|
||||
-# - lists of strings are space separated, and a null value is the '~' char.
|
||||
-
|
||||
-# return if FLAGS already loaded
|
||||
[ -n "${FLAGS_VERSION:-}" ] && return 0
|
||||
FLAGS_VERSION='1.0.3'
|
||||
|
||||
-# return values
|
||||
FLAGS_TRUE=0
|
||||
FLAGS_FALSE=1
|
||||
FLAGS_ERROR=2
|
||||
|
||||
-# reserved flag names
|
||||
FLAGS_RESERVED='ARGC ARGV ERROR FALSE HELP PARENT RESERVED TRUE VERSION'
|
||||
|
||||
_flags_debug() { echo "flags:DEBUG $@" >&2; }
|
||||
@@ -93,7 +12,6 @@ _flags_warn() { echo "flags:WARN $@" >&2
|
||||
_flags_error() { echo "flags:ERROR $@" >&2; }
|
||||
_flags_fatal() { echo "flags:FATAL $@" >&2; }
|
||||
|
||||
-# specific shell checks
|
||||
if [ -n "${ZSH_VERSION:-}" ]; then
|
||||
setopt |grep "^shwordsplit$" >/dev/null
|
||||
if [ $? -ne ${FLAGS_TRUE} ]; then
|
||||
@@ -107,20 +25,15 @@ if [ -n "${ZSH_VERSION:-}" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
-#
|
||||
-# constants
|
||||
-#
|
||||
|
||||
-# getopt version
|
||||
__FLAGS_GETOPT_VERS_STD=0
|
||||
__FLAGS_GETOPT_VERS_ENH=1
|
||||
__FLAGS_GETOPT_VERS_BSD=2
|
||||
|
||||
getopt >/dev/null 2>&1
|
||||
case $? in
|
||||
- 0) __FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_STD} ;; # bsd getopt
|
||||
+ 0) __FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_STD} ;;
|
||||
2)
|
||||
- # TODO(kward): look into '-T' option to test the internal getopt() version
|
||||
if [ "`getopt --version`" = '-- ' ]; then
|
||||
__FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_STD}
|
||||
else
|
||||
@@ -133,82 +46,49 @@ case $? in
|
||||
;;
|
||||
esac
|
||||
|
||||
-# getopt optstring lengths
|
||||
__FLAGS_OPTSTR_SHORT=0
|
||||
__FLAGS_OPTSTR_LONG=1
|
||||
|
||||
__FLAGS_NULL='~'
|
||||
|
||||
-# flag info strings
|
||||
__FLAGS_INFO_DEFAULT='default'
|
||||
__FLAGS_INFO_HELP='help'
|
||||
__FLAGS_INFO_SHORT='short'
|
||||
__FLAGS_INFO_TYPE='type'
|
||||
|
||||
-# flag lengths
|
||||
__FLAGS_LEN_SHORT=0
|
||||
__FLAGS_LEN_LONG=1
|
||||
|
||||
-# flag types
|
||||
__FLAGS_TYPE_NONE=0
|
||||
__FLAGS_TYPE_BOOLEAN=1
|
||||
__FLAGS_TYPE_FLOAT=2
|
||||
__FLAGS_TYPE_INTEGER=3
|
||||
__FLAGS_TYPE_STRING=4
|
||||
|
||||
-# set the constants readonly
|
||||
__flags_constants=`set |awk -F= '/^FLAGS_/ || /^__FLAGS_/ {print $1}'`
|
||||
for __flags_const in ${__flags_constants}; do
|
||||
- # skip certain flags
|
||||
case ${__flags_const} in
|
||||
FLAGS_HELP) continue ;;
|
||||
FLAGS_PARENT) continue ;;
|
||||
esac
|
||||
- # set flag readonly
|
||||
if [ -z "${ZSH_VERSION:-}" ]; then
|
||||
readonly ${__flags_const}
|
||||
- else # handle zsh
|
||||
+ else
|
||||
case ${ZSH_VERSION} in
|
||||
[123].*) readonly ${__flags_const} ;;
|
||||
- *) readonly -g ${__flags_const} ;; # declare readonly constants globally
|
||||
+ *) readonly -g ${__flags_const} ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
unset __flags_const __flags_constants
|
||||
|
||||
-#
|
||||
-# internal variables
|
||||
-#
|
||||
-
|
||||
-__flags_boolNames=' ' # space separated list of boolean flag names
|
||||
-__flags_longNames=' ' # space separated list of long flag names
|
||||
-__flags_shortNames=' ' # space separated list of short flag names
|
||||
-
|
||||
-__flags_columns='' # screen width in columns
|
||||
-__flags_opts='' # temporary storage for parsed getopt flags
|
||||
-
|
||||
-#------------------------------------------------------------------------------
|
||||
-# private functions
|
||||
-#
|
||||
-
|
||||
-# Define a flag.
|
||||
-#
|
||||
-# Calling this function will define the following info variables for the
|
||||
-# specified flag:
|
||||
-# FLAGS_flagname - the name for this flag (based upon the long flag name)
|
||||
-# __flags_<flag_name>_default - the default value
|
||||
-# __flags_flagname_help - the help string
|
||||
-# __flags_flagname_short - the single letter alias
|
||||
-# __flags_flagname_type - the type of flag (one of __FLAGS_TYPE_*)
|
||||
-#
|
||||
-# Args:
|
||||
-# _flags__type: integer: internal type of flag (__FLAGS_TYPE_*)
|
||||
-# _flags__name: string: long flag name
|
||||
-# _flags__default: default flag value
|
||||
-# _flags__help: string: help string
|
||||
-# _flags__short: string: (optional) short flag name
|
||||
-# Returns:
|
||||
-# integer: success of operation, or error
|
||||
+
|
||||
+__flags_boolNames=' '
|
||||
+__flags_longNames=' '
|
||||
+__flags_shortNames=' '
|
||||
+__flags_columns=''
|
||||
+__flags_opts=''
|
||||
+
|
||||
_flags_define()
|
||||
{
|
||||
if [ $# -lt 4 ]; then
|
||||
@@ -226,16 +106,13 @@ _flags_define()
|
||||
|
||||
_flags_return_=${FLAGS_TRUE}
|
||||
|
||||
- # TODO(kward): check for validity of the flag name (e.g. dashes)
|
||||
|
||||
- # check whether the flag name is reserved
|
||||
echo " ${FLAGS_RESERVED} " |grep " ${_flags_name_} " >/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
flags_error="flag name (${_flags_name_}) is reserved"
|
||||
_flags_return_=${FLAGS_ERROR}
|
||||
fi
|
||||
|
||||
- # require short option for getopt that don't support long options
|
||||
if [ ${_flags_return_} -eq ${FLAGS_TRUE} \
|
||||
-a ${__FLAGS_GETOPT_VERS} -ne ${__FLAGS_GETOPT_VERS_ENH} \
|
||||
-a "${_flags_short_}" = "${__FLAGS_NULL}" ]
|
||||
@@ -244,7 +121,6 @@ _flags_define()
|
||||
_flags_return_=${FLAGS_ERROR}
|
||||
fi
|
||||
|
||||
- # check for existing long name definition
|
||||
if [ ${_flags_return_} -eq ${FLAGS_TRUE} ]; then
|
||||
if _flags_itemInList "${_flags_name_}" \
|
||||
${__flags_longNames} ${__flags_boolNames}
|
||||
@@ -255,7 +131,6 @@ _flags_define()
|
||||
fi
|
||||
fi
|
||||
|
||||
- # check for existing short name definition
|
||||
if [ ${_flags_return_} -eq ${FLAGS_TRUE} \
|
||||
-a "${_flags_short_}" != "${__FLAGS_NULL}" ]
|
||||
then
|
||||
@@ -266,9 +141,6 @@ _flags_define()
|
||||
fi
|
||||
fi
|
||||
|
||||
- # handle default value. note, on several occasions the 'if' portion of an
|
||||
- # if/then/else contains just a ':' which does nothing. a binary reversal via
|
||||
- # '!' is not done because it does not work on all shells.
|
||||
if [ ${_flags_return_} -eq ${FLAGS_TRUE} ]; then
|
||||
case ${_flags_type_} in
|
||||
${__FLAGS_TYPE_BOOLEAN})
|
||||
@@ -301,7 +173,7 @@ _flags_define()
|
||||
fi
|
||||
;;
|
||||
|
||||
- ${__FLAGS_TYPE_STRING}) ;; # everything in shell is a valid string
|
||||
+ ${__FLAGS_TYPE_STRING}) ;;
|
||||
|
||||
*)
|
||||
flags_error="unrecognized flag type '${_flags_type_}'"
|
||||
@@ -311,7 +183,6 @@ _flags_define()
|
||||
fi
|
||||
|
||||
if [ ${_flags_return_} -eq ${FLAGS_TRUE} ]; then
|
||||
- # store flag information
|
||||
eval "FLAGS_${_flags_name_}='${_flags_default_}'"
|
||||
eval "__flags_${_flags_name_}_${__FLAGS_INFO_TYPE}=${_flags_type_}"
|
||||
eval "__flags_${_flags_name_}_${__FLAGS_INFO_DEFAULT}=\
|
||||
@@ -319,7 +190,6 @@ _flags_define()
|
||||
eval "__flags_${_flags_name_}_${__FLAGS_INFO_HELP}=\"${_flags_help_}\""
|
||||
eval "__flags_${_flags_name_}_${__FLAGS_INFO_SHORT}='${_flags_short_}'"
|
||||
|
||||
- # append flag name(s) to list of names
|
||||
__flags_longNames="${__flags_longNames}${_flags_name_} "
|
||||
__flags_shortNames="${__flags_shortNames}${_flags_short_} "
|
||||
[ ${_flags_type_} -eq ${__FLAGS_TYPE_BOOLEAN} ] && \
|
||||
@@ -333,17 +203,6 @@ _flags_define()
|
||||
return ${flags_return}
|
||||
}
|
||||
|
||||
-# Return valid getopt options using currently defined list of long options.
|
||||
-#
|
||||
-# This function builds a proper getopt option string for short (and long)
|
||||
-# options, using the current list of long options for reference.
|
||||
-#
|
||||
-# Args:
|
||||
-# _flags_optStr: integer: option string type (__FLAGS_OPTSTR_*)
|
||||
-# Output:
|
||||
-# string: generated option string for getopt
|
||||
-# Returns:
|
||||
-# boolean: success of operation (always returns True)
|
||||
_flags_genOptStr()
|
||||
{
|
||||
_flags_optStrType_=$1
|
||||
@@ -358,7 +217,6 @@ _flags_genOptStr()
|
||||
${_flags_flag_} ${__FLAGS_INFO_SHORT}`
|
||||
if [ "${_flags_shortName_}" != "${__FLAGS_NULL}" ]; then
|
||||
_flags_opts_="${_flags_opts_}${_flags_shortName_}"
|
||||
- # getopt needs a trailing ':' to indicate a required argument
|
||||
[ ${_flags_type_} -ne ${__FLAGS_TYPE_BOOLEAN} ] && \
|
||||
_flags_opts_="${_flags_opts_}:"
|
||||
fi
|
||||
@@ -366,7 +224,6 @@ _flags_genOptStr()
|
||||
|
||||
${__FLAGS_OPTSTR_LONG})
|
||||
_flags_opts_="${_flags_opts_:+${_flags_opts_},}${_flags_flag_}"
|
||||
- # getopt needs a trailing ':' to indicate a required argument
|
||||
[ ${_flags_type_} -ne ${__FLAGS_TYPE_BOOLEAN} ] && \
|
||||
_flags_opts_="${_flags_opts_}:"
|
||||
;;
|
||||
@@ -379,15 +236,6 @@ _flags_genOptStr()
|
||||
return ${FLAGS_TRUE}
|
||||
}
|
||||
|
||||
-# Returns flag details based on a flag name and flag info.
|
||||
-#
|
||||
-# Args:
|
||||
-# string: long flag name
|
||||
-# string: flag info (see the _flags_define function for valid info types)
|
||||
-# Output:
|
||||
-# string: value of dereferenced flag variable
|
||||
-# Returns:
|
||||
-# integer: one of FLAGS_{TRUE|FALSE|ERROR}
|
||||
_flags_getFlagInfo()
|
||||
{
|
||||
_flags_name_=$1
|
||||
@@ -399,13 +247,6 @@ _flags_getFlagInfo()
|
||||
if [ -n "${_flags_value_}" ]; then
|
||||
flags_return=${FLAGS_TRUE}
|
||||
else
|
||||
- # see if the _flags_name_ variable is a string as strings can be empty...
|
||||
- # note: the DRY principle would say to have this function call itself for
|
||||
- # the next three lines, but doing so results in an infinite loop as an
|
||||
- # invalid _flags_name_ will also not have the associated _type variable.
|
||||
- # Because it doesn't (it will evaluate to an empty string) the logic will
|
||||
- # try to find the _type variable of the _type variable, and so on. Not so
|
||||
- # good ;-)
|
||||
_flags_typeVar_="__flags_${_flags_name_}_${__FLAGS_INFO_TYPE}"
|
||||
_flags_strToEval_="_flags_type_=\"\${${_flags_typeVar_}:-}\""
|
||||
eval "${_flags_strToEval_}"
|
||||
@@ -424,15 +265,6 @@ _flags_getFlagInfo()
|
||||
return ${flags_return}
|
||||
}
|
||||
|
||||
-# check for presense of item in a list. passed a string (e.g. 'abc'), this
|
||||
-# function will determine if the string is present in the list of strings (e.g.
|
||||
-# ' foo bar abc ').
|
||||
-#
|
||||
-# Args:
|
||||
-# _flags__str: string: string to search for in a list of strings
|
||||
-# unnamed: list: list of strings
|
||||
-# Returns:
|
||||
-# boolean: true if item is in the list
|
||||
_flags_itemInList()
|
||||
{
|
||||
_flags_str_=$1
|
||||
@@ -449,34 +281,22 @@ _flags_itemInList()
|
||||
return ${flags_return}
|
||||
}
|
||||
|
||||
-# Returns the width of the current screen.
|
||||
-#
|
||||
-# Output:
|
||||
-# integer: width in columns of the current screen.
|
||||
_flags_columns()
|
||||
{
|
||||
if [ -z "${__flags_columns}" ]; then
|
||||
- # determine the value and store it
|
||||
if eval stty size >/dev/null 2>&1; then
|
||||
- # stty size worked :-)
|
||||
set -- `stty size`
|
||||
__flags_columns=$2
|
||||
elif eval tput cols >/dev/null 2>&1; then
|
||||
set -- `tput cols`
|
||||
__flags_columns=$1
|
||||
else
|
||||
- __flags_columns=80 # default terminal width
|
||||
+ __flags_columns=80
|
||||
fi
|
||||
fi
|
||||
echo ${__flags_columns}
|
||||
}
|
||||
|
||||
-# Validate a boolean.
|
||||
-#
|
||||
-# Args:
|
||||
-# _flags__bool: boolean: value to validate
|
||||
-# Returns:
|
||||
-# bool: true if the value is a valid boolean
|
||||
_flags_validateBoolean()
|
||||
{
|
||||
_flags_bool_=$1
|
||||
@@ -492,12 +312,6 @@ _flags_validateBoolean()
|
||||
return ${flags_return}
|
||||
}
|
||||
|
||||
-# Validate a float.
|
||||
-#
|
||||
-# Args:
|
||||
-# _flags__float: float: value to validate
|
||||
-# Returns:
|
||||
-# bool: true if the value is a valid float
|
||||
_flags_validateFloat()
|
||||
{
|
||||
_flags_float_=$1
|
||||
@@ -507,10 +321,10 @@ _flags_validateFloat()
|
||||
else
|
||||
flags_return=${FLAGS_TRUE}
|
||||
case ${_flags_float_} in
|
||||
- -*) # negative floats
|
||||
+ -*)
|
||||
_flags_test_=`expr "${_flags_float_}" : '\(-[0-9][0-9]*\.[0-9][0-9]*\)'`
|
||||
;;
|
||||
- *) # positive floats
|
||||
+ *)
|
||||
_flags_test_=`expr "${_flags_float_}" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
|
||||
;;
|
||||
esac
|
||||
@@ -521,22 +335,16 @@ _flags_validateFloat()
|
||||
return ${flags_return}
|
||||
}
|
||||
|
||||
-# Validate an integer.
|
||||
-#
|
||||
-# Args:
|
||||
-# _flags__integer: interger: value to validate
|
||||
-# Returns:
|
||||
-# bool: true if the value is a valid integer
|
||||
_flags_validateInteger()
|
||||
{
|
||||
_flags_int_=$1
|
||||
|
||||
flags_return=${FLAGS_TRUE}
|
||||
case ${_flags_int_} in
|
||||
- -*) # negative ints
|
||||
+ -*)
|
||||
_flags_test_=`expr "${_flags_int_}" : '\(-[0-9][0-9]*\)'`
|
||||
;;
|
||||
- *) # positive ints
|
||||
+ *)
|
||||
_flags_test_=`expr "${_flags_int_}" : '\([0-9][0-9]*\)'`
|
||||
;;
|
||||
esac
|
||||
@@ -546,23 +354,12 @@ _flags_validateInteger()
|
||||
return ${flags_return}
|
||||
}
|
||||
|
||||
-# Parse command-line options using the standard getopt.
|
||||
-#
|
||||
-# Note: the flag options are passed around in the global __flags_opts so that
|
||||
-# the formatting is not lost due to shell parsing and such.
|
||||
-#
|
||||
-# Args:
|
||||
-# @: varies: command-line options to parse
|
||||
-# Returns:
|
||||
-# integer: a FLAGS success condition
|
||||
_flags_getoptStandard()
|
||||
{
|
||||
flags_return=${FLAGS_TRUE}
|
||||
_flags_shortOpts_=`_flags_genOptStr ${__FLAGS_OPTSTR_SHORT}`
|
||||
|
||||
- # check for spaces in passed options
|
||||
for _flags_opt_ in "$@"; do
|
||||
- # note: the silliness with the x's is purely for ksh93 on Ubuntu 6.06
|
||||
_flags_match_=`echo "x${_flags_opt_}x" |sed 's/ //g'`
|
||||
if [ "${_flags_match_}" != "x${_flags_opt_}x" ]; then
|
||||
flags_error='the available getopt does not support spaces in options'
|
||||
@@ -585,15 +382,6 @@ _flags_getoptStandard()
|
||||
return ${flags_return}
|
||||
}
|
||||
|
||||
-# Parse command-line options using the enhanced getopt.
|
||||
-#
|
||||
-# Note: the flag options are passed around in the global __flags_opts so that
|
||||
-# the formatting is not lost due to shell parsing and such.
|
||||
-#
|
||||
-# Args:
|
||||
-# @: varies: command-line options to parse
|
||||
-# Returns:
|
||||
-# integer: a FLAGS success condition
|
||||
_flags_getoptEnhanced()
|
||||
{
|
||||
flags_return=${FLAGS_TRUE}
|
||||
@@ -617,17 +405,6 @@ _flags_getoptEnhanced()
|
||||
return ${flags_return}
|
||||
}
|
||||
|
||||
-# Dynamically parse a getopt result and set appropriate variables.
|
||||
-#
|
||||
-# This function does the actual conversion of getopt output and runs it through
|
||||
-# the standard case structure for parsing. The case structure is actually quite
|
||||
-# dynamic to support any number of flags.
|
||||
-#
|
||||
-# Args:
|
||||
-# argc: int: original command-line argument count
|
||||
-# @: varies: output from getopt parsing
|
||||
-# Returns:
|
||||
-# integer: a FLAGS success condition
|
||||
_flags_parseGetopt()
|
||||
{
|
||||
_flags_argc_=$1
|
||||
@@ -638,35 +415,26 @@ _flags_parseGetopt()
|
||||
if [ ${__FLAGS_GETOPT_VERS} -ne ${__FLAGS_GETOPT_VERS_ENH} ]; then
|
||||
set -- $@
|
||||
else
|
||||
- # note the quotes around the `$@' -- they are essential!
|
||||
eval set -- "$@"
|
||||
fi
|
||||
|
||||
- # provide user with number of arguments to shift by later
|
||||
- # NOTE: the FLAGS_ARGC variable is obsolete as of 1.0.3 because it does not
|
||||
- # properly give user access to non-flag arguments mixed in between flag
|
||||
- # arguments. Its usage was replaced by FLAGS_ARGV, and it is being kept only
|
||||
- # for backwards compatibility reasons.
|
||||
FLAGS_ARGC=`expr $# - 1 - ${_flags_argc_}`
|
||||
|
||||
- # handle options. note options with values must do an additional shift
|
||||
while true; do
|
||||
_flags_opt_=$1
|
||||
_flags_arg_=${2:-}
|
||||
_flags_type_=${__FLAGS_TYPE_NONE}
|
||||
_flags_name_=''
|
||||
|
||||
- # determine long flag name
|
||||
case "${_flags_opt_}" in
|
||||
- --) shift; break ;; # discontinue option parsing
|
||||
+ --) shift; break ;;
|
||||
|
||||
- --*) # long option
|
||||
+ --*)
|
||||
_flags_opt_=`expr "${_flags_opt_}" : '--\(.*\)'`
|
||||
_flags_len_=${__FLAGS_LEN_LONG}
|
||||
if _flags_itemInList "${_flags_opt_}" ${__flags_longNames}; then
|
||||
_flags_name_=${_flags_opt_}
|
||||
else
|
||||
- # check for negated long boolean version
|
||||
if _flags_itemInList "${_flags_opt_}" ${__flags_boolNames}; then
|
||||
_flags_name_=`expr "${_flags_opt_}" : 'no\(.*\)'`
|
||||
_flags_type_=${__FLAGS_TYPE_BOOLEAN}
|
||||
@@ -675,12 +443,10 @@ _flags_parseGetopt()
|
||||
fi
|
||||
;;
|
||||
|
||||
- -*) # short option
|
||||
+ -*)
|
||||
_flags_opt_=`expr "${_flags_opt_}" : '-\(.*\)'`
|
||||
_flags_len_=${__FLAGS_LEN_SHORT}
|
||||
if _flags_itemInList "${_flags_opt_}" ${__flags_shortNames}; then
|
||||
- # yes. match short name to long name. note purposeful off-by-one
|
||||
- # (too high) with awk calculations.
|
||||
_flags_pos_=`echo "${__flags_shortNames}" \
|
||||
|awk 'BEGIN{RS=" ";rn=0}$0==e{rn=NR}END{print rn}' \
|
||||
e=${_flags_opt_}`
|
||||
@@ -690,14 +456,12 @@ _flags_parseGetopt()
|
||||
;;
|
||||
esac
|
||||
|
||||
- # die if the flag was unrecognized
|
||||
if [ -z "${_flags_name_}" ]; then
|
||||
flags_error="unrecognized option (${_flags_opt_})"
|
||||
flags_return=${FLAGS_ERROR}
|
||||
break
|
||||
fi
|
||||
|
||||
- # set new flag value
|
||||
[ ${_flags_type_} -eq ${__FLAGS_TYPE_NONE} ] && \
|
||||
_flags_type_=`_flags_getFlagInfo \
|
||||
"${_flags_name_}" ${__FLAGS_INFO_TYPE}`
|
||||
@@ -746,7 +510,6 @@ _flags_parseGetopt()
|
||||
;;
|
||||
esac
|
||||
|
||||
- # handle special case help flag
|
||||
if [ "${_flags_name_}" = 'help' ]; then
|
||||
if [ ${FLAGS_help} -eq ${FLAGS_TRUE} ]; then
|
||||
flags_help
|
||||
@@ -756,12 +519,10 @@ _flags_parseGetopt()
|
||||
fi
|
||||
fi
|
||||
|
||||
- # shift the option and non-boolean arguements out.
|
||||
shift
|
||||
[ ${_flags_type_} != ${__FLAGS_TYPE_BOOLEAN} ] && shift
|
||||
done
|
||||
|
||||
- # give user back non-flag arguments
|
||||
FLAGS_ARGV=''
|
||||
while [ $# -gt 0 ]; do
|
||||
FLAGS_ARGV="${FLAGS_ARGV:+${FLAGS_ARGV} }'$1'"
|
||||
@@ -773,43 +534,18 @@ _flags_parseGetopt()
|
||||
return ${flags_return}
|
||||
}
|
||||
|
||||
-#------------------------------------------------------------------------------
|
||||
-# public functions
|
||||
-#
|
||||
-
|
||||
-# A basic boolean flag. Boolean flags do not take any arguments, and their
|
||||
-# value is either 1 (false) or 0 (true). For long flags, the false value is
|
||||
-# specified on the command line by prepending the word 'no'. With short flags,
|
||||
-# the presense of the flag toggles the current value between true and false.
|
||||
-# Specifying a short boolean flag twice on the command results in returning the
|
||||
-# value back to the default value.
|
||||
-#
|
||||
-# A default value is required for boolean flags.
|
||||
-#
|
||||
-# For example, lets say a Boolean flag was created whose long name was 'update'
|
||||
-# and whose short name was 'x', and the default value was 'false'. This flag
|
||||
-# could be explicitly set to 'true' with '--update' or by '-x', and it could be
|
||||
-# explicitly set to 'false' with '--noupdate'.
|
||||
+
|
||||
DEFINE_boolean() { _flags_define ${__FLAGS_TYPE_BOOLEAN} "$@"; }
|
||||
|
||||
-# Other basic flags.
|
||||
DEFINE_float() { _flags_define ${__FLAGS_TYPE_FLOAT} "$@"; }
|
||||
DEFINE_integer() { _flags_define ${__FLAGS_TYPE_INTEGER} "$@"; }
|
||||
DEFINE_string() { _flags_define ${__FLAGS_TYPE_STRING} "$@"; }
|
||||
|
||||
-# Parse the flags.
|
||||
-#
|
||||
-# Args:
|
||||
-# unnamed: list: command-line flags to parse
|
||||
-# Returns:
|
||||
-# integer: success of operation, or error
|
||||
FLAGS()
|
||||
{
|
||||
- # define a standard 'help' flag if one isn't already defined
|
||||
[ -z "${__flags_help_type:-}" ] && \
|
||||
DEFINE_boolean 'help' false 'show this help' 'h'
|
||||
|
||||
- # parse options
|
||||
if [ $# -gt 0 ]; then
|
||||
if [ ${__FLAGS_GETOPT_VERS} -ne ${__FLAGS_GETOPT_VERS_ENH} ]; then
|
||||
_flags_getoptStandard "$@"
|
||||
@@ -818,7 +554,6 @@ FLAGS()
|
||||
fi
|
||||
flags_return=$?
|
||||
else
|
||||
- # nothing passed; won't bother running getopt
|
||||
__flags_opts='--'
|
||||
flags_return=${FLAGS_TRUE}
|
||||
fi
|
||||
@@ -832,23 +567,11 @@ FLAGS()
|
||||
return ${flags_return}
|
||||
}
|
||||
|
||||
-# This is a helper function for determining the `getopt` version for platforms
|
||||
-# where the detection isn't working. It simply outputs debug information that
|
||||
-# can be included in a bug report.
|
||||
-#
|
||||
-# Args:
|
||||
-# none
|
||||
-# Output:
|
||||
-# debug info that can be included in a bug report
|
||||
-# Returns:
|
||||
-# nothing
|
||||
flags_getoptInfo()
|
||||
{
|
||||
- # platform info
|
||||
_flags_debug "uname -a: `uname -a`"
|
||||
_flags_debug "PATH: ${PATH}"
|
||||
|
||||
- # shell info
|
||||
if [ -n "${BASH_VERSION:-}" ]; then
|
||||
_flags_debug 'shell: bash'
|
||||
_flags_debug "BASH_VERSION: ${BASH_VERSION}"
|
||||
@@ -857,7 +580,6 @@ flags_getoptInfo()
|
||||
_flags_debug "ZSH_VERSION: ${ZSH_VERSION}"
|
||||
fi
|
||||
|
||||
- # getopt info
|
||||
getopt >/dev/null
|
||||
_flags_getoptReturn=$?
|
||||
_flags_debug "getopt return: ${_flags_getoptReturn}"
|
||||
@@ -866,39 +588,16 @@ flags_getoptInfo()
|
||||
unset _flags_getoptReturn
|
||||
}
|
||||
|
||||
-# Returns whether the detected getopt version is the enhanced version.
|
||||
-#
|
||||
-# Args:
|
||||
-# none
|
||||
-# Output:
|
||||
-# none
|
||||
-# Returns:
|
||||
-# bool: true if getopt is the enhanced version
|
||||
flags_getoptIsEnh()
|
||||
{
|
||||
test ${__FLAGS_GETOPT_VERS} -eq ${__FLAGS_GETOPT_VERS_ENH}
|
||||
}
|
||||
|
||||
-# Returns whether the detected getopt version is the standard version.
|
||||
-#
|
||||
-# Args:
|
||||
-# none
|
||||
-# Returns:
|
||||
-# bool: true if getopt is the standard version
|
||||
flags_getoptIsStd()
|
||||
{
|
||||
test ${__FLAGS_GETOPT_VERS} -eq ${__FLAGS_GETOPT_VERS_STD}
|
||||
}
|
||||
|
||||
-# This is effectively a 'usage()' function. It prints usage information and
|
||||
-# exits the program with ${FLAGS_FALSE} if it is ever found in the command line
|
||||
-# arguments. Note this function can be overridden so other apps can define
|
||||
-# their own --help flag, replacing this one, if they want.
|
||||
-#
|
||||
-# Args:
|
||||
-# none
|
||||
-# Returns:
|
||||
-# integer: success of operation (always returns true)
|
||||
flags_help()
|
||||
{
|
||||
if [ -n "${FLAGS_HELP:-}" ]; then
|
||||
@@ -953,19 +652,14 @@ flags_help()
|
||||
echo "${flags_helpStr_}" >&2
|
||||
else
|
||||
echo " ${flags_flagStr_} ${flags_help_}" >&2
|
||||
- # note: the silliness with the x's is purely for ksh93 on Ubuntu 6.06
|
||||
- # because it doesn't like empty strings when used in this manner.
|
||||
flags_emptyStr_="`echo \"x${flags_flagStr_}x\" \
|
||||
|awk '{printf "%"length($0)-2"s", ""}'`"
|
||||
flags_helpStr_=" ${flags_emptyStr_} ${flags_defaultStr_}"
|
||||
flags_helpStrLen_=`expr "${flags_helpStr_}" : '.*'`
|
||||
if [ ${__FLAGS_GETOPT_VERS} -eq ${__FLAGS_GETOPT_VERS_STD} \
|
||||
-o ${flags_helpStrLen_} -lt ${flags_columns_} ]; then
|
||||
- # indented to match help string
|
||||
echo "${flags_helpStr_}" >&2
|
||||
else
|
||||
- # indented four from left to allow for longer defaults as long flag
|
||||
- # names might be used too, making things too long
|
||||
echo " ${flags_defaultStr_}" >&2
|
||||
fi
|
||||
fi
|
||||
@@ -978,12 +672,6 @@ flags_help()
|
||||
return ${FLAGS_TRUE}
|
||||
}
|
||||
|
||||
-# Reset shflags back to an uninitialized state.
|
||||
-#
|
||||
-# Args:
|
||||
-# none
|
||||
-# Returns:
|
||||
-# nothing
|
||||
flags_reset()
|
||||
{
|
||||
for flags_name_ in ${__flags_longNames}; do
|
||||
@@ -1000,7 +688,6 @@ flags_reset()
|
||||
eval ${flags_strToEval_}
|
||||
done
|
||||
|
||||
- # reset internal variables
|
||||
__flags_boolNames=' '
|
||||
__flags_longNames=' '
|
||||
__flags_shortNames=' '
|
||||
56
ssdpd/Makefile
Normal file
56
ssdpd/Makefile
Normal file
@@ -0,0 +1,56 @@
|
||||
#
|
||||
# Copyright (C) 2022 OpenWrt.org
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ssdpd
|
||||
PKG_VERSION:=1.0.4
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/miniupnp/miniupnp.git
|
||||
PKG_SOURCE_VERSION:=207cf440a22c075cb55fb067a850be4f9c204e6e
|
||||
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
|
||||
|
||||
define Package/ssdpd
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+libnfnetlink +libpthread +libubox +libubus +libblobmsg-json +libcurl +mxml
|
||||
TITLE:=MiniSSDPd - SSDP daemon
|
||||
URL:=https://miniupnp.tuxfamily.org/minissdpd.html
|
||||
endef
|
||||
|
||||
MAKE_PATH:=minissdpd
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE \
|
||||
-Wall -Wextra -Werror
|
||||
|
||||
TARGET_LDFLAGS += \
|
||||
-lpthread -lubox -lubus -lblobmsg_json -lcurl -lmxml
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/sspd/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/ssdpd/install
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_CONF) ./files/etc/config/ssdpd $(1)/etc/config/ssdpd
|
||||
$(INSTALL_BIN) ./files/etc/init.d/ssdpd $(1)/etc/init.d/ssdpd
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/minissdpd/minissdpd $(1)/usr/sbin/ssdpd
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ssdpd))
|
||||
9
ssdpd/files/etc/config/ssdpd
Normal file
9
ssdpd/files/etc/config/ssdpd
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
config ssdpd 'ssdp'
|
||||
option enabled '1'
|
||||
option ipv6_enabled '0'
|
||||
option socket_path '/var/run/minissdpd.sock'
|
||||
option ttl '2'
|
||||
option interface 'br-lan'
|
||||
option debug '0'
|
||||
|
||||
76
ssdpd/files/etc/init.d/ssdpd
Executable file
76
ssdpd/files/etc/init.d/ssdpd
Executable file
@@ -0,0 +1,76 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=02
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/ssdpd
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t ssdpd.init -p info
|
||||
}
|
||||
|
||||
validate_ssdpd_ssdp_section()
|
||||
{
|
||||
uci_validate_section ssdpd ssdpd "ssdp" \
|
||||
'enabled:bool:true' \
|
||||
'debug:bool:false' \
|
||||
'ipv6_enabled:bool:false' \
|
||||
'socket_path:string' \
|
||||
'ttl:uinteger' \
|
||||
'interface:string'
|
||||
}
|
||||
|
||||
configure_ssdp()
|
||||
{
|
||||
local enabled ipv6_enabled socket_path ttl interface
|
||||
|
||||
config_load ssdpd
|
||||
|
||||
validate_ssdpd_ssdp_section || {
|
||||
log "Validation of ssdp section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
[ ${enabled} -eq 0 ] && return 0
|
||||
|
||||
mkdir -p /tmp/ssdp/description/
|
||||
|
||||
procd_set_param command ${PROG}
|
||||
|
||||
if [ ${ipv6_enabled} -eq 1 ]; then
|
||||
procd_append_param command -6
|
||||
fi
|
||||
|
||||
if [ ${debug} -eq 1 ]; then
|
||||
procd_append_param command -d
|
||||
fi
|
||||
|
||||
if [ -n "${socket_path}" ]; then
|
||||
procd_append_param command -s ${socket_path}
|
||||
fi
|
||||
|
||||
if [ -n "${ttl}" ]; then
|
||||
procd_append_param command -t ${ttl}
|
||||
fi
|
||||
|
||||
# If no interface is given defaults for br-lan
|
||||
procd_append_param command -i ${interface:-br-lan}
|
||||
}
|
||||
|
||||
start_service() {
|
||||
procd_open_instance ssdp
|
||||
configure_ssdp
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "ssdpd"
|
||||
}
|
||||
20
ssdpd/patches/001-fix-gcc-warnings
Normal file
20
ssdpd/patches/001-fix-gcc-warnings
Normal file
@@ -0,0 +1,20 @@
|
||||
--- a/minissdpd/openssdpsocket.c
|
||||
+++ b/minissdpd/openssdpsocket.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <sys/time.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if.h>
|
||||
--- a/minissdpd/ifacewatch.c
|
||||
+++ b/minissdpd/ifacewatch.c
|
||||
@@ -130,6 +130,7 @@ ProcessInterfaceWatch(int s, int s_ssdp,
|
||||
/* case RTM_DELLINK: */
|
||||
case RTM_DELADDR:
|
||||
is_del = 1;
|
||||
+ // fall through
|
||||
case RTM_NEWADDR:
|
||||
/* http://linux-hacks.blogspot.fr/2009/01/sample-code-to-learn-netlink.html */
|
||||
ifa = (struct ifaddrmsg *)NLMSG_DATA(nlhdr);
|
||||
11
ssdpd/patches/010-add-test-object
Normal file
11
ssdpd/patches/010-add-test-object
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/minissdpd/Makefile
|
||||
+++ b/minissdpd/Makefile
|
||||
@@ -41,7 +41,7 @@ endif
|
||||
EXECUTABLES = minissdpd testminissdpd testcodelength \
|
||||
showminissdpdnotif
|
||||
MINISSDPDOBJS = minissdpd.o openssdpsocket.o daemonize.o upnputils.o \
|
||||
- ifacewatch.o getroute.o getifaddr.o asyncsendto.o
|
||||
+ ifacewatch.o getroute.o getifaddr.o asyncsendto.o ssdpd.o
|
||||
TESTMINISSDPDOBJS = testminissdpd.o printresponse.o
|
||||
SHOWMINISSDPDNOTIFOBJS = showminissdpdnotif.o printresponse.o
|
||||
|
||||
629
ssdpd/patches/011-add-ubus-object
Normal file
629
ssdpd/patches/011-add-ubus-object
Normal file
@@ -0,0 +1,629 @@
|
||||
--- /dev/null
|
||||
+++ b/minissdpd/ssdpd.c
|
||||
@@ -0,0 +1,626 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2022 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: Amin Ben Romdhane <amin.benromdhane@iopsys.eu>
|
||||
+ */
|
||||
+
|
||||
+#include <unistd.h>
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <stdbool.h>
|
||||
+#include <string.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <sys/un.h>
|
||||
+#include <net/if.h>
|
||||
+#include <syslog.h>
|
||||
+
|
||||
+#include <curl/curl.h>
|
||||
+#include <libubox/uloop.h>
|
||||
+#include <libubox/blobmsg_json.h>
|
||||
+#include <libubox/list.h>
|
||||
+#include <libubus.h>
|
||||
+#include <mxml.h>
|
||||
+
|
||||
+#include "codelength.h"
|
||||
+
|
||||
+struct UPNPDev {
|
||||
+ struct list_head list;
|
||||
+ char *descURL;
|
||||
+ char *st;
|
||||
+ char *usn;
|
||||
+};
|
||||
+
|
||||
+struct desc_list_elt {
|
||||
+ struct list_head list;
|
||||
+ char *url;
|
||||
+ char *desc_path;
|
||||
+ bool is_device_desc;
|
||||
+};
|
||||
+
|
||||
+#define UPNP_DESC_PATH "/etc/upnp/description"
|
||||
+#define UPNP_DISCOVER_TIMEOUT (30 * 1000)
|
||||
+
|
||||
+#ifndef MIN
|
||||
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
+#endif /* MIN */
|
||||
+
|
||||
+/* macros used to read from unix socket */
|
||||
+#define READ_BYTE_BUFFER(c) \
|
||||
+ if ((int)bufferindex >= n) { \
|
||||
+ n = read(s, buffer, sizeof(buffer)); \
|
||||
+ if (n <= 0) break; \
|
||||
+ bufferindex = 0; \
|
||||
+ } \
|
||||
+ c = buffer[bufferindex++];
|
||||
+
|
||||
+#define READ_COPY_BUFFER(dst, len) \
|
||||
+ for (l = len, p = (unsigned char *)dst; l > 0; ) { \
|
||||
+ unsigned int lcopy; \
|
||||
+ if ((int)bufferindex >= n) { \
|
||||
+ n = read(s, buffer, sizeof(buffer)); \
|
||||
+ if ( n<= 0) break; \
|
||||
+ bufferindex = 0; \
|
||||
+ } \
|
||||
+ lcopy = MIN(l, (n - bufferindex)); \
|
||||
+ memcpy(p, buffer + bufferindex, lcopy); \
|
||||
+ l -= lcopy; \
|
||||
+ p += lcopy; \
|
||||
+ bufferindex += lcopy; \
|
||||
+ }
|
||||
+
|
||||
+LIST_HEAD(dev_list);
|
||||
+LIST_HEAD(desc_list);
|
||||
+
|
||||
+char *ssdp_sockpath = NULL;
|
||||
+
|
||||
+static void upnp_discover_devices(struct uloop_timeout *timeout);
|
||||
+static struct uloop_timeout upnpdiscover_timer = { .cb = upnp_discover_devices };
|
||||
+
|
||||
+static void add_dev_to_dev_list(char *descURL, char *st, char *usn)
|
||||
+{
|
||||
+ struct UPNPDev *dev = NULL;
|
||||
+
|
||||
+ dev = calloc(1, sizeof(struct UPNPDev));
|
||||
+ list_add_tail(&dev->list, &dev_list);
|
||||
+
|
||||
+ dev->descURL = descURL;
|
||||
+ dev->st = st;
|
||||
+ dev->usn = usn;
|
||||
+}
|
||||
+
|
||||
+void free_all_dev_list(void)
|
||||
+{
|
||||
+ struct UPNPDev *dev = NULL;
|
||||
+
|
||||
+ while (dev_list.next != &dev_list) {
|
||||
+ dev = list_entry(dev_list.next, struct UPNPDev, list);
|
||||
+ free(dev->descURL);
|
||||
+ free(dev->st);
|
||||
+ free(dev->usn);
|
||||
+ free(dev);
|
||||
+ list_del(&dev->list);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int connectToMiniSSDPD(void)
|
||||
+{
|
||||
+ int s = 0;
|
||||
+ struct sockaddr_un addr;
|
||||
+
|
||||
+ s = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
+ if(s < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ char *ssdp_s = ssdp_sockpath ? ssdp_sockpath : "/var/run/minissdpd.sock";
|
||||
+
|
||||
+ memset(&addr, 0, sizeof(addr));
|
||||
+ addr.sun_family = AF_UNIX;
|
||||
+
|
||||
+ strncpy(addr.sun_path, ssdp_s, sizeof(addr.sun_path));
|
||||
+
|
||||
+ if(connect(s, (struct sockaddr *)&addr, sizeof(struct sockaddr_un)) < 0) {
|
||||
+ close(s);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return s;
|
||||
+}
|
||||
+
|
||||
+static int disconnectFromMiniSSDPD(int s)
|
||||
+{
|
||||
+ if (close(s) < 0)
|
||||
+ return -1;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int requestDevicesFromMiniSSDPD(int s)
|
||||
+{
|
||||
+ unsigned char buffer[256];
|
||||
+ unsigned char *p = NULL;
|
||||
+ unsigned int stsize = 0, l = 0;
|
||||
+ char *devtype = "ssdp:all";
|
||||
+
|
||||
+ buffer[0] = 3; /* request type 3 : everything */
|
||||
+ stsize = strlen(devtype);
|
||||
+
|
||||
+ p = buffer + 1;
|
||||
+ l = stsize; CODELENGTH(l, p);
|
||||
+ if (p + stsize > buffer + sizeof(buffer))
|
||||
+ return -1;
|
||||
+
|
||||
+ memcpy(p, devtype, stsize);
|
||||
+ p += stsize;
|
||||
+ if (write(s, buffer, p - buffer) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int receiveDevicesFromMiniSSDPD(int s)
|
||||
+{
|
||||
+ unsigned char buffer[256];
|
||||
+ ssize_t n;
|
||||
+ unsigned char *p;
|
||||
+ unsigned int bufferindex;
|
||||
+ unsigned int i, ndev;
|
||||
+ unsigned int urlsize, stsize, usnsize, l;
|
||||
+ char *url, *st, *usn;
|
||||
+
|
||||
+ n = read(s, buffer, sizeof(buffer));
|
||||
+ if (n <= 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ ndev = buffer[0];
|
||||
+ bufferindex = 1;
|
||||
+ for (i = 0; i < ndev; i++) {
|
||||
+ DECODELENGTH_READ(urlsize, READ_BYTE_BUFFER);
|
||||
+ if (n <= 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ url = (char *)malloc(urlsize);
|
||||
+ if (url == NULL)
|
||||
+ return -1;
|
||||
+
|
||||
+ READ_COPY_BUFFER(url, urlsize);
|
||||
+ if (n <= 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ DECODELENGTH_READ(stsize, READ_BYTE_BUFFER);
|
||||
+ if (n <= 0)
|
||||
+ goto free_url_and_return;
|
||||
+
|
||||
+ st = (char *)malloc(stsize);
|
||||
+ if (st == NULL)
|
||||
+ goto free_url_and_return;
|
||||
+
|
||||
+ READ_COPY_BUFFER(st, stsize);
|
||||
+ if (n <= 0)
|
||||
+ goto free_url_and_st_and_return;
|
||||
+
|
||||
+ DECODELENGTH_READ(usnsize, READ_BYTE_BUFFER);
|
||||
+ if (n <= 0)
|
||||
+ goto free_url_and_st_and_return;
|
||||
+
|
||||
+ usn = (char *)malloc(usnsize);
|
||||
+ if (usn == NULL)
|
||||
+ goto free_url_and_st_and_return;
|
||||
+
|
||||
+ READ_COPY_BUFFER(usn, usnsize);
|
||||
+ if (n <= 0)
|
||||
+ goto free_url_and_st_and_usn_and_return;
|
||||
+
|
||||
+ add_dev_to_dev_list(url, st, usn);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+free_url_and_st_and_usn_and_return:
|
||||
+ free(usn);
|
||||
+free_url_and_st_and_return:
|
||||
+ free(st);
|
||||
+free_url_and_return:
|
||||
+ free(url);
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+static int getDevicesFromMiniSSDPD(void)
|
||||
+{
|
||||
+ int s = 0;
|
||||
+ int res = 0;
|
||||
+
|
||||
+ s = connectToMiniSSDPD();
|
||||
+ if (s < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ res = requestDevicesFromMiniSSDPD(s);
|
||||
+ if (res < 0)
|
||||
+ goto close_socket_and_return;
|
||||
+
|
||||
+ res = receiveDevicesFromMiniSSDPD(s);
|
||||
+
|
||||
+close_socket_and_return:
|
||||
+ disconnectFromMiniSSDPD(s);
|
||||
+
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
+static void download_file(char *file_path, const char *url)
|
||||
+{
|
||||
+ CURL *curl = curl_easy_init();
|
||||
+ if (curl) {
|
||||
+ curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT, 500);
|
||||
+
|
||||
+ FILE *fp = fopen(file_path, "wb");
|
||||
+ if (fp) {
|
||||
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
|
||||
+ curl_easy_perform(curl);
|
||||
+ fclose(fp);
|
||||
+ }
|
||||
+
|
||||
+ curl_easy_cleanup(curl);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static bool is_desc_exist(const char *desc_url)
|
||||
+{
|
||||
+ struct desc_list_elt *desc_elt = NULL;
|
||||
+
|
||||
+ if (!desc_url)
|
||||
+ return false;
|
||||
+
|
||||
+ list_for_each_entry(desc_elt, &desc_list, list) {
|
||||
+ if (strcmp(desc_elt->url, desc_url) == 0)
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+static void get_desc_name(const char *desc_url, char *str, size_t len)
|
||||
+{
|
||||
+ if (!desc_url || !str || len == 0)
|
||||
+ return;
|
||||
+
|
||||
+ char *p = strstr(desc_url, "://");
|
||||
+
|
||||
+ snprintf(str, len, "%s", p ? p + 3 : desc_url);
|
||||
+
|
||||
+ for (int i = 0; str[i]; i++) {
|
||||
+ if (str[i] == '/')
|
||||
+ str[i] = '_';
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void add_desc_to_desc_list(const char *desc_path, const char *url, int is_device_desc)
|
||||
+{
|
||||
+ struct desc_list_elt *desc_elt;
|
||||
+
|
||||
+ desc_elt = calloc(1, sizeof(struct desc_list_elt));
|
||||
+ list_add_tail(&desc_elt->list, &desc_list);
|
||||
+
|
||||
+ desc_elt->desc_path = strdup(desc_path);
|
||||
+ desc_elt->url = strdup(url);
|
||||
+ desc_elt->is_device_desc = is_device_desc;
|
||||
+}
|
||||
+
|
||||
+static void free_all_desc_list(void)
|
||||
+{
|
||||
+ struct desc_list_elt *desc_elt = NULL;
|
||||
+
|
||||
+ while (desc_list.next != &desc_list) {
|
||||
+ desc_elt = list_entry(desc_list.next, struct desc_list_elt, list);
|
||||
+ free(desc_elt->desc_path);
|
||||
+ free(desc_elt->url);
|
||||
+ free(desc_elt);
|
||||
+ list_del(&desc_elt->list);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void __upnp_discover_devices(void)
|
||||
+{
|
||||
+ struct UPNPDev *dev = NULL;
|
||||
+ char desc_name[128] = {0};
|
||||
+ char file_path[256] = {0};
|
||||
+ int res = 0, is_device_desc = 0;
|
||||
+
|
||||
+ /*
|
||||
+ * Discover devices
|
||||
+ */
|
||||
+ if (!list_empty(&dev_list))
|
||||
+ free_all_dev_list();
|
||||
+
|
||||
+ res = getDevicesFromMiniSSDPD();
|
||||
+ if (res)
|
||||
+ goto end;
|
||||
+
|
||||
+ /*
|
||||
+ * Download description files
|
||||
+ */
|
||||
+ list_for_each_entry_reverse(dev, &dev_list, list) {
|
||||
+
|
||||
+ if (is_desc_exist(dev->descURL))
|
||||
+ continue;
|
||||
+
|
||||
+ get_desc_name(dev->descURL, desc_name, sizeof(desc_name));
|
||||
+ snprintf(file_path, sizeof(file_path), "%s/%s", UPNP_DESC_PATH, desc_name);
|
||||
+ is_device_desc = (dev->usn && strstr(dev->usn, ":service:")) ? 0 : 1;
|
||||
+
|
||||
+ // Download Description
|
||||
+ download_file(file_path, dev->descURL);
|
||||
+
|
||||
+ // Add description to descriptions list
|
||||
+ add_desc_to_desc_list(file_path, dev->descURL, is_device_desc);
|
||||
+ }
|
||||
+
|
||||
+end:
|
||||
+ uloop_timeout_set(&upnpdiscover_timer, UPNP_DISCOVER_TIMEOUT);
|
||||
+}
|
||||
+
|
||||
+static int upnp_discovery_res(struct ubus_context *ctx, struct ubus_object *obj __attribute__((unused)),
|
||||
+ struct ubus_request_data *req, const char *method __attribute__((unused)), struct blob_attr *msg __attribute__((unused)))
|
||||
+{
|
||||
+ struct blob_buf bb = {0};
|
||||
+ struct UPNPDev *dev = NULL;
|
||||
+
|
||||
+ memset(&bb,0,sizeof(struct blob_buf));
|
||||
+ blob_buf_init(&bb, 0);
|
||||
+
|
||||
+ void *devices_array = blobmsg_open_array(&bb, "devices");
|
||||
+ list_for_each_entry_reverse(dev, &dev_list, list) {
|
||||
+ // Parse Root device and devices
|
||||
+ if ((dev->st && strstr(dev->st, ":rootdevice") != NULL) || (dev->usn && strstr(dev->usn, ":device:") != NULL)) {
|
||||
+ void *device_obj = blobmsg_open_table(&bb, NULL);
|
||||
+ blobmsg_add_string(&bb, "descurl", dev->descURL);
|
||||
+ blobmsg_add_string(&bb, "st", dev->st);
|
||||
+ blobmsg_add_string(&bb, "usn", dev->usn);
|
||||
+ blobmsg_add_string(&bb, "is_root_device", dev->st && strstr(dev->st, ":rootdevice") ? "1" : "0");
|
||||
+ blobmsg_close_table(&bb, device_obj);
|
||||
+ }
|
||||
+ }
|
||||
+ blobmsg_close_array(&bb, devices_array);
|
||||
+
|
||||
+ void *services_array = blobmsg_open_array(&bb, "services");
|
||||
+ list_for_each_entry_reverse(dev, &dev_list, list) {
|
||||
+ // Parse Services
|
||||
+ if (dev->usn && strstr(dev->usn, ":service:") != NULL) {
|
||||
+ void *service_obj = blobmsg_open_table(&bb, NULL);
|
||||
+ blobmsg_add_string(&bb, "descurl", dev->descURL);
|
||||
+ blobmsg_add_string(&bb, "st", dev->st);
|
||||
+ blobmsg_add_string(&bb, "usn", dev->usn);
|
||||
+ blobmsg_close_table(&bb, service_obj);
|
||||
+ }
|
||||
+ }
|
||||
+ blobmsg_close_array(&bb, services_array);
|
||||
+
|
||||
+ ubus_send_reply(ctx, req, bb.head);
|
||||
+ blob_buf_free(&bb);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void fill_device_instances(struct blob_buf *bb, mxml_node_t *device)
|
||||
+{
|
||||
+ void *device_obj = NULL;
|
||||
+ mxml_node_t *b = device;
|
||||
+ char buf[64] = {0};
|
||||
+ bool new_device_discovery = false;
|
||||
+
|
||||
+ while (b) {
|
||||
+
|
||||
+ if (mxmlGetType(b) != MXML_ELEMENT) {
|
||||
+ b = mxmlWalkNext(b, device, MXML_DESCEND);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ const char *elm_name = mxmlGetElement(b);
|
||||
+ const char *elm_val = mxmlGetOpaque(b);
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "device") == 0) {
|
||||
+
|
||||
+ if (new_device_discovery && device_obj)
|
||||
+ blobmsg_close_table(bb, device_obj);
|
||||
+
|
||||
+ device_obj = blobmsg_open_table(bb, NULL);
|
||||
+ blobmsg_add_string(bb, "parent_dev", buf);
|
||||
+ new_device_discovery = true;
|
||||
+ }
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "deviceType") == 0 && new_device_discovery)
|
||||
+ blobmsg_add_string(bb, "deviceType", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "friendlyName") == 0 && new_device_discovery)
|
||||
+ blobmsg_add_string(bb, "friendlyName", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "manufacturer") == 0 && new_device_discovery)
|
||||
+ blobmsg_add_string(bb, "manufacturer", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "manufacturerURL") == 0 && new_device_discovery)
|
||||
+ blobmsg_add_string(bb, "manufacturerURL", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "modelDescription") == 0 && new_device_discovery)
|
||||
+ blobmsg_add_string(bb, "modelDescription", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "modelName") == 0 && new_device_discovery)
|
||||
+ blobmsg_add_string(bb, "modelName", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "modelNumber") == 0 && new_device_discovery)
|
||||
+ blobmsg_add_string(bb, "modelNumber", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "modelURL") == 0 && new_device_discovery)
|
||||
+ blobmsg_add_string(bb, "modelURL", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "serialNumber") == 0 && new_device_discovery)
|
||||
+ blobmsg_add_string(bb, "serialNumber", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "UDN") == 0 && new_device_discovery) {
|
||||
+ snprintf(buf, sizeof(buf), "%s", elm_val ? elm_val : "");
|
||||
+ blobmsg_add_string(bb, "UDN", buf);
|
||||
+ }
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "UPC") == 0 && new_device_discovery)
|
||||
+ blobmsg_add_string(bb, "UPC", elm_val ? elm_val : "");
|
||||
+
|
||||
+ b = mxmlWalkNext(b, device, MXML_DESCEND);
|
||||
+ }
|
||||
+
|
||||
+ if (new_device_discovery && device_obj)
|
||||
+ blobmsg_close_table(bb, device_obj);
|
||||
+}
|
||||
+
|
||||
+static void fill_service_element(struct blob_buf *bb, mxml_node_t *service)
|
||||
+{
|
||||
+ mxml_node_t *b = service;
|
||||
+ void *service_obj = NULL;
|
||||
+ char buf[64] = {0};
|
||||
+ bool new_srv_discovery = false;
|
||||
+
|
||||
+ while (b) {
|
||||
+
|
||||
+ if (mxmlGetType(b) != MXML_ELEMENT) {
|
||||
+ b = mxmlWalkNext(b, service, MXML_DESCEND);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ const char *elm_name = mxmlGetElement(b);
|
||||
+ const char *elm_val = mxmlGetOpaque(b);
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "UDN") == 0)
|
||||
+ snprintf(buf, sizeof(buf), "%s", elm_val ? elm_val : "");
|
||||
+
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "service") == 0) {
|
||||
+
|
||||
+ if (new_srv_discovery && service_obj)
|
||||
+ blobmsg_close_table(bb, service_obj);
|
||||
+
|
||||
+ service_obj = blobmsg_open_table(bb, NULL);
|
||||
+ blobmsg_add_string(bb, "parent_dev", buf);
|
||||
+ new_srv_discovery = true;
|
||||
+ }
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "serviceType") == 0 && new_srv_discovery)
|
||||
+ blobmsg_add_string(bb, "serviceType", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "serviceId") == 0 && new_srv_discovery)
|
||||
+ blobmsg_add_string(bb, "serviceId", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "SCPDURL") == 0 && new_srv_discovery)
|
||||
+ blobmsg_add_string(bb, "SCPDURL", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "controlURL") == 0 && new_srv_discovery)
|
||||
+ blobmsg_add_string(bb, "controlURL", elm_val ? elm_val : "");
|
||||
+
|
||||
+ if (elm_name && strcmp(elm_name, "eventSubURL") == 0 && new_srv_discovery)
|
||||
+ blobmsg_add_string(bb, "eventSubURL", elm_val ? elm_val : "");
|
||||
+
|
||||
+ b = mxmlWalkNext(b, service, MXML_DESCEND);
|
||||
+ }
|
||||
+
|
||||
+ if (new_srv_discovery && service_obj)
|
||||
+ blobmsg_close_table(bb, service_obj);
|
||||
+}
|
||||
+
|
||||
+static int upnp_description_res(struct ubus_context *ctx, struct ubus_object *obj __attribute__((unused)),
|
||||
+ struct ubus_request_data *req, const char *method __attribute__((unused)), struct blob_attr *msg __attribute__((unused)))
|
||||
+{
|
||||
+ struct desc_list_elt *desc_elt = NULL;
|
||||
+ struct blob_buf bb = {0};
|
||||
+
|
||||
+ memset(&bb,0,sizeof(struct blob_buf));
|
||||
+ blob_buf_init(&bb, 0);
|
||||
+
|
||||
+ void *desc_array = blobmsg_open_array(&bb, "descriptions");
|
||||
+ list_for_each_entry(desc_elt, &desc_list, list) {
|
||||
+ void *device_obj = blobmsg_open_table(&bb, NULL);
|
||||
+ blobmsg_add_string(&bb, "desc_url", desc_elt->url);
|
||||
+ blobmsg_add_u32(&bb, "is_device_desc", desc_elt->is_device_desc);
|
||||
+ blobmsg_close_table(&bb, device_obj);
|
||||
+
|
||||
+ }
|
||||
+ blobmsg_close_array(&bb, desc_array);
|
||||
+
|
||||
+ list_for_each_entry(desc_elt, &desc_list, list) {
|
||||
+
|
||||
+ FILE *fp = fopen(desc_elt->desc_path, "r");
|
||||
+ if (!fp)
|
||||
+ continue;
|
||||
+
|
||||
+ mxml_node_t *tree = mxmlLoadFile(NULL, fp, MXML_OPAQUE_CALLBACK);
|
||||
+ fclose(fp);
|
||||
+
|
||||
+ if (tree) {
|
||||
+ void *devices_array = blobmsg_open_array(&bb, "devices");
|
||||
+ mxml_node_t *device = mxmlFindElement(tree, tree, "device", NULL, NULL, MXML_DESCEND);
|
||||
+ fill_device_instances(&bb, device);
|
||||
+ blobmsg_close_array(&bb, devices_array);
|
||||
+
|
||||
+ void *services_array = blobmsg_open_array(&bb, "services");
|
||||
+ mxml_node_t *service = mxmlFindElement(tree, tree, "device", NULL, NULL, MXML_DESCEND);
|
||||
+ fill_service_element(&bb, service);
|
||||
+ blobmsg_close_array(&bb, services_array);
|
||||
+
|
||||
+ mxmlDelete(tree);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ubus_send_reply(ctx, req, bb.head);
|
||||
+ blob_buf_free(&bb);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct ubus_method upnp_methods[] = {
|
||||
+ UBUS_METHOD_NOARG("discovery", upnp_discovery_res),
|
||||
+ UBUS_METHOD_NOARG("description", upnp_description_res),
|
||||
+};
|
||||
+
|
||||
+static struct ubus_object_type upnp_type = UBUS_OBJECT_TYPE("upnp", upnp_methods);
|
||||
+
|
||||
+static void upnp_discover_devices(struct uloop_timeout *timeout __attribute__((unused)))
|
||||
+{
|
||||
+ __upnp_discover_devices();
|
||||
+}
|
||||
+
|
||||
+static struct ubus_object upnp_object = {
|
||||
+ .name = "upnp",
|
||||
+ .type = &upnp_type,
|
||||
+ .methods = upnp_methods,
|
||||
+ .n_methods = ARRAY_SIZE(upnp_methods),
|
||||
+};
|
||||
+
|
||||
+void upnp_thread_discover_devices(void)
|
||||
+{
|
||||
+ struct ubus_context *ctx = NULL;
|
||||
+ const char *ubus_socket = NULL;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ uloop_init();
|
||||
+
|
||||
+ ctx = ubus_connect(ubus_socket);
|
||||
+ if (!ctx) {
|
||||
+ syslog(LOG_ERR, "Failed to connect to ubus\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ubus_add_uloop(ctx);
|
||||
+
|
||||
+ __upnp_discover_devices();
|
||||
+
|
||||
+ ret = ubus_add_object(ctx, &upnp_object);
|
||||
+ if (ret) {
|
||||
+ syslog(LOG_ERR, "Failed to add 'upnp' ubus object: %s\n", ubus_strerror(ret));
|
||||
+ goto end;
|
||||
+ }
|
||||
+
|
||||
+ uloop_run();
|
||||
+
|
||||
+end:
|
||||
+ free_all_desc_list();
|
||||
+ free_all_dev_list();
|
||||
+ uloop_done();
|
||||
+ ubus_free(ctx);
|
||||
+}
|
||||
420
ssdpd/patches/012-ubus-runner-thread-hook
Normal file
420
ssdpd/patches/012-ubus-runner-thread-hook
Normal file
@@ -0,0 +1,420 @@
|
||||
--- a/minissdpd/minissdpd.c
|
||||
+++ b/minissdpd/minissdpd.c
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#endif
|
||||
+/* for uloop thread */
|
||||
+#include <pthread.h>
|
||||
|
||||
/* LOG_PERROR does not exist on Solaris */
|
||||
#ifndef LOG_PERROR
|
||||
@@ -52,6 +54,10 @@
|
||||
#define MIN(x,y) (((x)<(y))?(x):(y))
|
||||
#endif
|
||||
|
||||
+extern char *ssdp_sockpath;
|
||||
+void upnp_thread_discover_devices(void);
|
||||
+void ssdpd_ubus_stop(void);
|
||||
+
|
||||
/* current request management structure */
|
||||
struct reqelem {
|
||||
int socket;
|
||||
@@ -1220,6 +1226,12 @@ static void ssdpDiscover(int s, int ipv6
|
||||
}
|
||||
}
|
||||
|
||||
+static void *thread_discover_devices(void *args __attribute__((unused)))
|
||||
+{
|
||||
+ upnp_thread_discover_devices();
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
/* main(): program entry point */
|
||||
int main(int argc, char * * argv)
|
||||
{
|
||||
@@ -1264,6 +1276,7 @@ int main(int argc, char * * argv)
|
||||
unsigned char ttl = 2; /* UDA says it should default to 2 */
|
||||
const char * searched_device = NULL; /* if not NULL, search/filter a specific device type */
|
||||
int opt;
|
||||
+ pthread_t upnp_thread;
|
||||
|
||||
LIST_INIT(&reqlisthead);
|
||||
LIST_INIT(&servicelisthead);
|
||||
@@ -1309,6 +1322,7 @@ int main(int argc, char * * argv)
|
||||
break;
|
||||
case 's':
|
||||
sockpath = optarg;
|
||||
+ ssdp_sockpath = optarg;
|
||||
break;
|
||||
#ifndef NO_BACKGROUND_NO_PIDFILE
|
||||
case 'p':
|
||||
@@ -1496,6 +1510,11 @@ int main(int argc, char * * argv)
|
||||
if(s_ssdp6 >= 0)
|
||||
ssdpDiscover(s_ssdp6, 1, searched_device);
|
||||
|
||||
+ int err = pthread_create(&upnp_thread, NULL, &thread_discover_devices, NULL);
|
||||
+ if (err < 0) {
|
||||
+ syslog(LOG_ERR, "Error when creating upnp thread");
|
||||
+ }
|
||||
+
|
||||
/* Main loop */
|
||||
while(!quitting) {
|
||||
/* fill readfds fd_set */
|
||||
@@ -1704,6 +1723,8 @@ quit:
|
||||
if(unlink(pidfilename) < 0)
|
||||
syslog(LOG_ERR, "unlink(%s): %m", pidfilename);
|
||||
#endif
|
||||
+ ssdpd_ubus_stop();
|
||||
+ pthread_join(upnp_thread, NULL);
|
||||
closelog();
|
||||
return ret;
|
||||
}
|
||||
--- a/minissdpd/ssdpd.c
|
||||
+++ b/minissdpd/ssdpd.c
|
||||
@@ -39,10 +39,9 @@ struct desc_list_elt {
|
||||
struct list_head list;
|
||||
char *url;
|
||||
char *desc_path;
|
||||
- bool is_device_desc;
|
||||
};
|
||||
|
||||
-#define UPNP_DESC_PATH "/etc/upnp/description"
|
||||
+#define UPNP_DESC_PATH "/tmp/ssdp/description"
|
||||
#define UPNP_DISCOVER_TIMEOUT (30 * 1000)
|
||||
|
||||
#ifndef MIN
|
||||
@@ -93,17 +92,41 @@ static void add_dev_to_dev_list(char *de
|
||||
dev->usn = usn;
|
||||
}
|
||||
|
||||
-void free_all_dev_list(void)
|
||||
+static void free_all_dev_list(void)
|
||||
{
|
||||
struct UPNPDev *dev = NULL;
|
||||
+ struct UPNPDev *dev_tmp = NULL;
|
||||
|
||||
- while (dev_list.next != &dev_list) {
|
||||
- dev = list_entry(dev_list.next, struct UPNPDev, list);
|
||||
+ list_for_each_entry_safe(dev, dev_tmp, &dev_list, list) {
|
||||
+ list_del(&dev->list);
|
||||
free(dev->descURL);
|
||||
free(dev->st);
|
||||
free(dev->usn);
|
||||
free(dev);
|
||||
- list_del(&dev->list);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void add_desc_to_desc_list(const char *desc_path, const char *url)
|
||||
+{
|
||||
+ struct desc_list_elt *desc_elt;
|
||||
+
|
||||
+ desc_elt = calloc(1, sizeof(struct desc_list_elt));
|
||||
+ list_add_tail(&desc_elt->list, &desc_list);
|
||||
+
|
||||
+ desc_elt->desc_path = strdup(desc_path);
|
||||
+ desc_elt->url = strdup(url);
|
||||
+}
|
||||
+
|
||||
+static void free_all_desc_list(void)
|
||||
+{
|
||||
+ struct desc_list_elt *desc_elt = NULL;
|
||||
+ struct desc_list_elt *desc_elt_tmp = NULL;
|
||||
+
|
||||
+ list_for_each_entry_safe(desc_elt, desc_elt_tmp, &desc_list, list) {
|
||||
+ list_del(&desc_elt->list);
|
||||
+ free(desc_elt->desc_path);
|
||||
+ free(desc_elt->url);
|
||||
+ free(desc_elt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,8 +190,8 @@ static int receiveDevicesFromMiniSSDPD(i
|
||||
ssize_t n;
|
||||
unsigned char *p;
|
||||
unsigned int bufferindex;
|
||||
- unsigned int i, ndev;
|
||||
- unsigned int urlsize, stsize, usnsize, l;
|
||||
+ unsigned int i = 0, ndev = 0;
|
||||
+ unsigned int urlsize = 0, stsize = 0, usnsize = 0, l = 0;
|
||||
char *url, *st, *usn;
|
||||
|
||||
n = read(s, buffer, sizeof(buffer));
|
||||
@@ -182,11 +205,12 @@ static int receiveDevicesFromMiniSSDPD(i
|
||||
if (n <= 0)
|
||||
return -1;
|
||||
|
||||
- url = (char *)malloc(urlsize);
|
||||
+ url = (char *)calloc(urlsize + 1, sizeof(char));
|
||||
if (url == NULL)
|
||||
return -1;
|
||||
|
||||
READ_COPY_BUFFER(url, urlsize);
|
||||
+ url[urlsize] = 0;
|
||||
if (n <= 0)
|
||||
return -1;
|
||||
|
||||
@@ -194,11 +218,12 @@ static int receiveDevicesFromMiniSSDPD(i
|
||||
if (n <= 0)
|
||||
goto free_url_and_return;
|
||||
|
||||
- st = (char *)malloc(stsize);
|
||||
+ st = (char *)calloc(stsize + 1, sizeof(char));
|
||||
if (st == NULL)
|
||||
goto free_url_and_return;
|
||||
|
||||
READ_COPY_BUFFER(st, stsize);
|
||||
+ st[stsize] = 0;
|
||||
if (n <= 0)
|
||||
goto free_url_and_st_and_return;
|
||||
|
||||
@@ -206,11 +231,12 @@ static int receiveDevicesFromMiniSSDPD(i
|
||||
if (n <= 0)
|
||||
goto free_url_and_st_and_return;
|
||||
|
||||
- usn = (char *)malloc(usnsize);
|
||||
+ usn = (char *)calloc(usnsize + 1, sizeof(char));
|
||||
if (usn == NULL)
|
||||
goto free_url_and_st_and_return;
|
||||
|
||||
READ_COPY_BUFFER(usn, usnsize);
|
||||
+ usn[usnsize] = 0;
|
||||
if (n <= 0)
|
||||
goto free_url_and_st_and_usn_and_return;
|
||||
|
||||
@@ -282,6 +308,21 @@ static bool is_desc_exist(const char *de
|
||||
return false;
|
||||
}
|
||||
|
||||
+static bool is_device_exist(const char *dev_url)
|
||||
+{
|
||||
+ struct UPNPDev *dev = NULL;
|
||||
+
|
||||
+ if (!dev_url)
|
||||
+ return false;
|
||||
+
|
||||
+ list_for_each_entry(dev, &dev_list, list) {
|
||||
+ if (strcmp(dev->descURL, dev_url) == 0)
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
static void get_desc_name(const char *desc_url, char *str, size_t len)
|
||||
{
|
||||
if (!desc_url || !str || len == 0)
|
||||
@@ -297,37 +338,14 @@ static void get_desc_name(const char *de
|
||||
}
|
||||
}
|
||||
|
||||
-static void add_desc_to_desc_list(const char *desc_path, const char *url, int is_device_desc)
|
||||
-{
|
||||
- struct desc_list_elt *desc_elt;
|
||||
-
|
||||
- desc_elt = calloc(1, sizeof(struct desc_list_elt));
|
||||
- list_add_tail(&desc_elt->list, &desc_list);
|
||||
-
|
||||
- desc_elt->desc_path = strdup(desc_path);
|
||||
- desc_elt->url = strdup(url);
|
||||
- desc_elt->is_device_desc = is_device_desc;
|
||||
-}
|
||||
-
|
||||
-static void free_all_desc_list(void)
|
||||
-{
|
||||
- struct desc_list_elt *desc_elt = NULL;
|
||||
-
|
||||
- while (desc_list.next != &desc_list) {
|
||||
- desc_elt = list_entry(desc_list.next, struct desc_list_elt, list);
|
||||
- free(desc_elt->desc_path);
|
||||
- free(desc_elt->url);
|
||||
- free(desc_elt);
|
||||
- list_del(&desc_elt->list);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
static void __upnp_discover_devices(void)
|
||||
{
|
||||
+ struct desc_list_elt *desc_elt = NULL;
|
||||
+ struct desc_list_elt *desc_elt_tmp = NULL;
|
||||
struct UPNPDev *dev = NULL;
|
||||
char desc_name[128] = {0};
|
||||
char file_path[256] = {0};
|
||||
- int res = 0, is_device_desc = 0;
|
||||
+ int res = 0;
|
||||
|
||||
/*
|
||||
* Discover devices
|
||||
@@ -349,13 +367,26 @@ static void __upnp_discover_devices(void
|
||||
|
||||
get_desc_name(dev->descURL, desc_name, sizeof(desc_name));
|
||||
snprintf(file_path, sizeof(file_path), "%s/%s", UPNP_DESC_PATH, desc_name);
|
||||
- is_device_desc = (dev->usn && strstr(dev->usn, ":service:")) ? 0 : 1;
|
||||
|
||||
// Download Description
|
||||
download_file(file_path, dev->descURL);
|
||||
|
||||
// Add description to descriptions list
|
||||
- add_desc_to_desc_list(file_path, dev->descURL, is_device_desc);
|
||||
+ add_desc_to_desc_list(file_path, dev->descURL);
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Remove unused descriptions
|
||||
+ */
|
||||
+ list_for_each_entry_safe(desc_elt, desc_elt_tmp, &desc_list, list) {
|
||||
+
|
||||
+ if (is_device_exist(desc_elt->url))
|
||||
+ continue;
|
||||
+
|
||||
+ list_del(&desc_elt->list);
|
||||
+ free(desc_elt->desc_path);
|
||||
+ free(desc_elt->url);
|
||||
+ free(desc_elt);
|
||||
}
|
||||
|
||||
end:
|
||||
@@ -371,15 +402,27 @@ static int upnp_discovery_res(struct ubu
|
||||
memset(&bb,0,sizeof(struct blob_buf));
|
||||
blob_buf_init(&bb, 0);
|
||||
|
||||
+ void *root_devices_array = blobmsg_open_array(&bb, "root_devices");
|
||||
+ list_for_each_entry_reverse(dev, &dev_list, list) {
|
||||
+ // Parse root device
|
||||
+ if (dev->st && strstr(dev->st, ":rootdevice") != NULL) {
|
||||
+ void *device_obj = blobmsg_open_table(&bb, NULL);
|
||||
+ blobmsg_add_string(&bb, "descurl", dev->descURL);
|
||||
+ blobmsg_add_string(&bb, "st", dev->st);
|
||||
+ blobmsg_add_string(&bb, "usn", dev->usn);
|
||||
+ blobmsg_close_table(&bb, device_obj);
|
||||
+ }
|
||||
+ }
|
||||
+ blobmsg_close_array(&bb, root_devices_array);
|
||||
+
|
||||
void *devices_array = blobmsg_open_array(&bb, "devices");
|
||||
list_for_each_entry_reverse(dev, &dev_list, list) {
|
||||
- // Parse Root device and devices
|
||||
- if ((dev->st && strstr(dev->st, ":rootdevice") != NULL) || (dev->usn && strstr(dev->usn, ":device:") != NULL)) {
|
||||
+ // Parse devices
|
||||
+ if (dev->usn && strstr(dev->usn, ":device:") != NULL) {
|
||||
void *device_obj = blobmsg_open_table(&bb, NULL);
|
||||
blobmsg_add_string(&bb, "descurl", dev->descURL);
|
||||
blobmsg_add_string(&bb, "st", dev->st);
|
||||
blobmsg_add_string(&bb, "usn", dev->usn);
|
||||
- blobmsg_add_string(&bb, "is_root_device", dev->st && strstr(dev->st, ":rootdevice") ? "1" : "0");
|
||||
blobmsg_close_table(&bb, device_obj);
|
||||
}
|
||||
}
|
||||
@@ -472,7 +515,7 @@ static void fill_device_instances(struct
|
||||
blobmsg_close_table(bb, device_obj);
|
||||
}
|
||||
|
||||
-static void fill_service_element(struct blob_buf *bb, mxml_node_t *service)
|
||||
+static void fill_service_instances(struct blob_buf *bb, mxml_node_t *service)
|
||||
{
|
||||
mxml_node_t *b = service;
|
||||
void *service_obj = NULL;
|
||||
@@ -525,6 +568,32 @@ static void fill_service_element(struct
|
||||
blobmsg_close_table(bb, service_obj);
|
||||
}
|
||||
|
||||
+static void fill_device_service_instances(struct blob_buf *bb, bool is_device)
|
||||
+{
|
||||
+ struct desc_list_elt *desc_elt = NULL;
|
||||
+
|
||||
+ list_for_each_entry(desc_elt, &desc_list, list) {
|
||||
+
|
||||
+ FILE *fp = fopen(desc_elt->desc_path, "r");
|
||||
+ if (!fp)
|
||||
+ continue;
|
||||
+
|
||||
+ mxml_node_t *tree = mxmlLoadFile(NULL, fp, MXML_OPAQUE_CALLBACK);
|
||||
+ fclose(fp);
|
||||
+
|
||||
+ if (tree) {
|
||||
+ mxml_node_t *node = mxmlFindElement(tree, tree, "device", NULL, NULL, MXML_DESCEND);
|
||||
+
|
||||
+ if (is_device)
|
||||
+ fill_device_instances(bb, node);
|
||||
+ else
|
||||
+ fill_service_instances(bb, node);
|
||||
+
|
||||
+ mxmlDelete(tree);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int upnp_description_res(struct ubus_context *ctx, struct ubus_object *obj __attribute__((unused)),
|
||||
struct ubus_request_data *req, const char *method __attribute__((unused)), struct blob_attr *msg __attribute__((unused)))
|
||||
{
|
||||
@@ -534,39 +603,25 @@ static int upnp_description_res(struct u
|
||||
memset(&bb,0,sizeof(struct blob_buf));
|
||||
blob_buf_init(&bb, 0);
|
||||
|
||||
+ // Descriptions Array
|
||||
void *desc_array = blobmsg_open_array(&bb, "descriptions");
|
||||
list_for_each_entry(desc_elt, &desc_list, list) {
|
||||
void *device_obj = blobmsg_open_table(&bb, NULL);
|
||||
blobmsg_add_string(&bb, "desc_url", desc_elt->url);
|
||||
- blobmsg_add_u32(&bb, "is_device_desc", desc_elt->is_device_desc);
|
||||
blobmsg_close_table(&bb, device_obj);
|
||||
|
||||
}
|
||||
blobmsg_close_array(&bb, desc_array);
|
||||
|
||||
- list_for_each_entry(desc_elt, &desc_list, list) {
|
||||
-
|
||||
- FILE *fp = fopen(desc_elt->desc_path, "r");
|
||||
- if (!fp)
|
||||
- continue;
|
||||
-
|
||||
- mxml_node_t *tree = mxmlLoadFile(NULL, fp, MXML_OPAQUE_CALLBACK);
|
||||
- fclose(fp);
|
||||
-
|
||||
- if (tree) {
|
||||
- void *devices_array = blobmsg_open_array(&bb, "devices");
|
||||
- mxml_node_t *device = mxmlFindElement(tree, tree, "device", NULL, NULL, MXML_DESCEND);
|
||||
- fill_device_instances(&bb, device);
|
||||
- blobmsg_close_array(&bb, devices_array);
|
||||
-
|
||||
- void *services_array = blobmsg_open_array(&bb, "services");
|
||||
- mxml_node_t *service = mxmlFindElement(tree, tree, "device", NULL, NULL, MXML_DESCEND);
|
||||
- fill_service_element(&bb, service);
|
||||
- blobmsg_close_array(&bb, services_array);
|
||||
+ // Devices Array
|
||||
+ void *devices_array = blobmsg_open_array(&bb, "devices");
|
||||
+ fill_device_service_instances(&bb, true);
|
||||
+ blobmsg_close_array(&bb, devices_array);
|
||||
|
||||
- mxmlDelete(tree);
|
||||
- }
|
||||
- }
|
||||
+ // Services Array
|
||||
+ void *services_array = blobmsg_open_array(&bb, "services");
|
||||
+ fill_device_service_instances(&bb, false);
|
||||
+ blobmsg_close_array(&bb, services_array);
|
||||
|
||||
ubus_send_reply(ctx, req, bb.head);
|
||||
blob_buf_free(&bb);
|
||||
@@ -624,3 +679,9 @@ end:
|
||||
uloop_done();
|
||||
ubus_free(ctx);
|
||||
}
|
||||
+
|
||||
+void ssdpd_ubus_stop(void)
|
||||
+{
|
||||
+ uloop_end();
|
||||
+}
|
||||
+
|
||||
--- a/minissdpd/config.h
|
||||
+++ b/minissdpd/config.h
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
/* When NO_BACKGROUND_NO_PIDFILE is defined, minissdpd does not go to
|
||||
* background and does not create any pidfile */
|
||||
-/*#define NO_BACKGROUND_NO_PIDFILE*/
|
||||
+#define NO_BACKGROUND_NO_PIDFILE
|
||||
|
||||
/* define HAVE_IP_MREQN to use struct ip_mreqn instead of struct ip_mreq
|
||||
* for setsockopt(IP_MULTICAST_IF). Available with Linux 2.4+,
|
||||
@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=stunc
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.1.8
|
||||
PKG_VERSION:=1.1.12
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/stunc.git
|
||||
PKG_SOURCE_VERSION:=2628f2c9e0b99064a703a1ad069f0f298bc36076
|
||||
PKG_SOURCE_VERSION:=5b65364709a921db0956bf74a4f126217cfb1775
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -64,19 +64,16 @@ TARGET_CFLAGS += \
|
||||
-Wall -Werror
|
||||
|
||||
ifeq ($(BUILD_VARIANT),wolfssl)
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
|
||||
MAKE_FLAGS += \
|
||||
USE_WOLFSSL="yes"
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),mbedtls)
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/mbedtls
|
||||
MAKE_FLAGS += \
|
||||
USE_MBEDTLS="yes"
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),openssl)
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
|
||||
MAKE_FLAGS += \
|
||||
USE_OPENSSL="yes"
|
||||
endif
|
||||
|
||||
@@ -8,5 +8,5 @@ config stunc 'stunc'
|
||||
option min_keepalive '30'
|
||||
option max_keepalive '3600'
|
||||
# option client_port 7547
|
||||
option log_level '0'
|
||||
option log_level '1'
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#
|
||||
# Copyright (C) 2021 IOPSYS
|
||||
# Copyright (C) 2021-2022 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sulu
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_VERSION:=1.3.26
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu.git
|
||||
PKG_SOURCE_VERSION:=222030dd934438c2340ce751b23840fa4e4848b3
|
||||
PKG_SOURCE_VERSION:=6d6848119bffdbe0ec9b8116caf6375749299dc0
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
@@ -26,9 +26,8 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/sulu
|
||||
SECTION:=sulu
|
||||
CATEGORY:=Utilities
|
||||
MENU=1
|
||||
TITLE:=SULU-CE ReactJS based Web UI Package
|
||||
DEPENDS:=+nginx
|
||||
DEPENDS:=+nginx +mosquitto-auth-shadow
|
||||
endef
|
||||
|
||||
define Package/sulu/description
|
||||
@@ -38,9 +37,16 @@ endef
|
||||
define Package/sulu/install
|
||||
$(INSTALL_DIR) $(1)/sulu
|
||||
$(INSTALL_DIR) $(1)/sulu/config
|
||||
$(INSTALL_DIR) $(1)/sulu/config/widgets
|
||||
$(INSTALL_DIR) $(1)/etc/nginx/
|
||||
$(INSTALL_DIR) $(1)/etc/mosquitto/conf.d/
|
||||
$(CP) $(PKG_BUILD_DIR)/dist/* $(1)/sulu
|
||||
$(CP) $(PKG_BUILD_DIR)/config/* $(1)/sulu/config
|
||||
$(CP) $(PKG_BUILD_DIR)/config/*.json $(1)/sulu/config
|
||||
$(CP) $(PKG_BUILD_DIR)/config/widgets/diagnostics.json $(1)/sulu/config/widgets/
|
||||
$(CP) $(PKG_BUILD_DIR)/config/widgets/wan.json $(1)/sulu/config/widgets/
|
||||
ifeq ($(CONFIG_PACKAGE_skopeo)$(CONFIG_PACKAGE_umoci),yy)
|
||||
$(CP) $(PKG_BUILD_DIR)/config/widgets/lcm-store.json $(1)/sulu/config/widgets/
|
||||
endif
|
||||
$(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
|
||||
3
sulu/files/etc/mosquitto/conf.d/obuspa.conf
Normal file
3
sulu/files/etc/mosquitto/conf.d/obuspa.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
listener 1883 127.0.0.1
|
||||
allow_anonymous true
|
||||
|
||||
5
sulu/files/etc/mosquitto/conf.d/sulu.conf
Normal file
5
sulu/files/etc/mosquitto/conf.d/sulu.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
listener 9001
|
||||
protocol websockets
|
||||
plugin /usr/lib/mosquitto_auth_shadow.so
|
||||
require_certificate false
|
||||
allow_anonymous false
|
||||
@@ -6,12 +6,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=swmodd
|
||||
PKG_VERSION:=2.1.3
|
||||
PKG_VERSION:=2.1.5.1
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=e484557ea7ede6d8ff439081deebd763d4952851
|
||||
PKG_SOURCE_VERSION:=2f953ea76b5779a73a540777dfb450982802e4f8
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/swmodd.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
@@ -20,6 +20,9 @@ endif
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DEPENDS:=bbf
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/swmodd
|
||||
@@ -28,8 +31,9 @@ define Package/swmodd
|
||||
SUBMENU:=TRx69
|
||||
TITLE:= Software Modules Daemon
|
||||
DEPENDS:=+libuci +libubox +ubus +libuuid +opkg +libcurl \
|
||||
+PACKAGE_liblxc:liblxc +PACKAGE_liblxc:cgroupfs-mount \
|
||||
+@BUSYBOX_CONFIG_BUSYBOX +@BUSYBOX_CONFIG_FEATURE_SHOW_SCRIPT
|
||||
+PACKAGE_liblxc:liblxc +@BUSYBOX_CONFIG_BUSYBOX \
|
||||
+@BUSYBOX_CONFIG_FEATURE_SHOW_SCRIPT +@BUSYBOX_CONFIG_SCRIPT \
|
||||
+swmodd-cgroup
|
||||
endef
|
||||
|
||||
define Package/swmodd/description
|
||||
@@ -40,6 +44,14 @@ define Package/swmodd/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/swmodd-cgroup
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:= Cgroup mount handler for Software modules daemon
|
||||
DEPENDS:=+@CONFIG_KERNEL_CGROUPS
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-D_GNU_SOURCE \
|
||||
@@ -79,4 +91,10 @@ ifeq ($(CONFIG_PACKAGE_liblxc),y)
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/swmodd-cgroup/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/etc/init.d/swmodd_cgroup $(1)/etc/init.d/swmodd_cgroup
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,swmodd-cgroup))
|
||||
$(eval $(call BuildPackage,swmodd))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=94
|
||||
STOP=10
|
||||
START=99
|
||||
STOP=01
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/swmodd
|
||||
|
||||
56
swmodd/files/etc/init.d/swmodd_cgroup
Normal file
56
swmodd/files/etc/init.d/swmodd_cgroup
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=01
|
||||
|
||||
log() {
|
||||
echo "swmodd_cgroup: ${@}" >/dev/console
|
||||
}
|
||||
|
||||
cgroup_remounting_required()
|
||||
{
|
||||
if ! mount |grep -q '/sys/fs/cgroup '; then
|
||||
return 1;
|
||||
fi
|
||||
|
||||
if grep -v '^#' /etc/fstab | grep -q cgroup; then
|
||||
log "fstab mounted system, remounting of cgroup not required"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ ! -d /sys/fs/cgroup ] && [ ! -e /proc/cgroups ]; then
|
||||
log "cgroup fs not found"
|
||||
return 1
|
||||
fi
|
||||
|
||||
umount /sys/fs/cgroup
|
||||
return 0;
|
||||
}
|
||||
|
||||
mount_cgroup()
|
||||
{
|
||||
|
||||
if ! cgroup_remounting_required; then
|
||||
log "cgroup remounting not required"
|
||||
return 1
|
||||
fi
|
||||
|
||||
mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
|
||||
cd /sys/fs/cgroup
|
||||
for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do
|
||||
mkdir -p $sys
|
||||
if ! mountpoint -q $sys; then
|
||||
if ! mount -n -t cgroup -o $sys cgroup $sys; then
|
||||
rm -f $sys || true
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -e /sys/fs/cgroup/memory/memory.use_hierarchy ]; then
|
||||
echo 1 > /sys/fs/cgroup/memory/memory.use_hierarchy
|
||||
fi
|
||||
}
|
||||
|
||||
boot()
|
||||
{
|
||||
mount_cgroup
|
||||
}
|
||||
@@ -1,26 +1,22 @@
|
||||
#
|
||||
# Copyright (C) 2020 iopsys Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
# Copyright (C) 2020-2022 iopsys Software Solutions AB
|
||||
#
|
||||
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=twamp
|
||||
PKG_VERSION:=1.1.2
|
||||
PKG_VERSION:=1.2.2
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/twamp.git
|
||||
PKG_SOURCE_VERSION:=c9b6b0fe35e137e967ccef63a9e1253155a59078
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/twamp-light.git
|
||||
PKG_SOURCE_VERSION:=b0111c35ff4908edd82c5d5f4a3c0d6809605b94
|
||||
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_FILES:=LICENSE
|
||||
PKG_BUILD_DEPENDS:=bbf
|
||||
@@ -31,12 +27,12 @@ define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=BBF TWAMP/TWAMP Light feature
|
||||
TITLE:=TWAMP Light Client(TR-390)
|
||||
DEPENDS:=+libuci +ubox +libubus
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
BBF TWAMP/TWAMP Light feature
|
||||
TWAMP Client for Performance Measurement from IP Edge to Customer Equipment using TWAMP Light Protocol
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
@@ -45,7 +41,7 @@ TARGET_CFLAGS += \
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/twamp/* $(PKG_BUILD_DIR)/
|
||||
$(CP) -rf ~/git/twamp-light/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
@@ -62,6 +58,7 @@ define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_BIN) ./files/etc/init.d/twampd $(1)/etc/init.d/twampd
|
||||
$(INSTALL_BIN) ./files/etc/firewall.twamp $(1)/etc/firewall.twamp
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/92-twampfirewall $(1)/etc/uci-defaults/92-twampfirewall
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/93-twamp_fix_reflector $(1)/etc/uci-defaults/93-twamp_fix_reflector
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
|
||||
config twamp 'twamp'
|
||||
option enable '1'
|
||||
option twamp_light '1'
|
||||
#Log levels: Critical=0, Warning=1, Notice=2, Info=3, Debug=4
|
||||
option enable '0'
|
||||
#Log levels: Critical=0, Error=1, Warning=2, Notice=3, Info=4, Debug=5
|
||||
option log_level '3'
|
||||
|
||||
config twamp_reflector 'reflector_1'
|
||||
option enable '0'
|
||||
option interface 'wan'
|
||||
option port '862'
|
||||
option max_ttl '1'
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ function configure_firewall()
|
||||
{
|
||||
local enable port interface
|
||||
|
||||
config_get enable ${1} enable "0"
|
||||
config_get enable ${1} enable "1"
|
||||
config_get port ${1} port
|
||||
config_get interface ${1} interface
|
||||
if [ "$enable" -eq 0 -o -z "${port}" -o -z "${interface}" ]; then
|
||||
@@ -27,5 +27,24 @@ function configure_firewall()
|
||||
fi
|
||||
}
|
||||
|
||||
function delete_rule()
|
||||
{
|
||||
while iptables -w 1 -L zone_${1}_input --line-numbers 2>/dev/null | grep "TWAMP reflector port"; do
|
||||
rule_num="$(iptables -w 1 -L zone_${1}_input --line-numbers | grep "TWAMP reflector port" | head -1|awk '{print $1}')"
|
||||
if [ -n "${rule_num}" ]; then
|
||||
iptables -w 1 -D zone_${1}_input ${rule_num};
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Loop through all interfaces and delete the twamp reflector rule from interface's input chain
|
||||
config_load network
|
||||
config_foreach delete_rule interface
|
||||
|
||||
config_load twamp
|
||||
config_get twamp_enable twamp enable "0"
|
||||
if [ "${twamp_enable}" -eq "0" ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
config_foreach configure_firewall twamp_reflector
|
||||
|
||||
@@ -22,6 +22,9 @@ start_service() {
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
[ -f /etc/firewall.twamp ] && {
|
||||
sh /etc/firewall.twamp
|
||||
}
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
|
||||
22
twamp/files/etc/uci-defaults/93-twamp_fix_reflector
Normal file
22
twamp/files/etc/uci-defaults/93-twamp_fix_reflector
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
function rename_section()
|
||||
{
|
||||
local enable inst
|
||||
|
||||
config_get interface ${1} interface ""
|
||||
if [ -z "${interface}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
inst="$(echo ${1}|cut -d '_' -f 2)"
|
||||
uci_rename twamp ${1} "${interface}_${inst}"
|
||||
}
|
||||
|
||||
config_load twamp
|
||||
config_foreach rename_section twamp_reflector
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=udpecho
|
||||
PKG_VERSION:=2.0.0
|
||||
PKG_VERSION:=2.0.1
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/udpecho.git
|
||||
PKG_SOURCE_VERSION:=aeaf8f5862fff7133e6299ac30ab02c8fbb1ff61
|
||||
PKG_SOURCE_VERSION:=19a555c2d460db6bdfcfa53742011fbb6a4ca6af
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -6,18 +6,17 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=urlfilter
|
||||
PKG_VERSION:=1.1.1
|
||||
PKG_VERSION:=1.1.4
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=5a64642ac33e629151788b3ff1de920776bcd2ed
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/urlfilter.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_VERSION:=e55a2c2c7c992eb5071e82734bdc8850b71b02e0
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -35,7 +34,6 @@ define Package/urlfilter/description
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
|
||||
419
urlfilter/files/etc/bbfdm/json/urlfilter.json
Normal file
419
urlfilter/files/etc/bbfdm/json/urlfilter.json
Normal file
@@ -0,0 +1,419 @@
|
||||
{
|
||||
"json_plugin_version": 1,
|
||||
"Device.{BBF_VENDOR_PREFIX}URLFilter.": {
|
||||
"type": "object",
|
||||
"version": "2.14",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": false,
|
||||
"array": false,
|
||||
"Enable": {
|
||||
"type": "boolean",
|
||||
"version": "2.14",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"name": "globals"
|
||||
},
|
||||
"option": {
|
||||
"name": "enable"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"GlobalBlacklist": {
|
||||
"type": "boolean",
|
||||
"version": "2.14",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"name": "globals"
|
||||
},
|
||||
"option": {
|
||||
"name": "global_blacklist"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"BlacklistURL": {
|
||||
"type": "string",
|
||||
"version": "2.14",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"list": {
|
||||
"datatype": "string"
|
||||
},
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"name": "globals"
|
||||
},
|
||||
"list": {
|
||||
"name": "blacklist_url"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"ProfileNumberOfEntries": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"version": "2.14",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "profile"
|
||||
},
|
||||
"option": {
|
||||
"name": "@Count"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Device.{BBF_VENDOR_PREFIX}URLFilter.Profile.{i}.": {
|
||||
"type": "object",
|
||||
"version": "2.14",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"uniqueKeys": [
|
||||
"Name"
|
||||
],
|
||||
"access": true,
|
||||
"array": true,
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "profile"
|
||||
},
|
||||
"dmmapfile": "dmmap_urlfilter"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"version": "2.14",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 64
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "profile"
|
||||
},
|
||||
"option": {
|
||||
"name": "@Name"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"WhitelistURL": {
|
||||
"type": "string",
|
||||
"version": "2.14",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"list": {
|
||||
"datatype": "string"
|
||||
},
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "profile"
|
||||
},
|
||||
"list": {
|
||||
"name": "whitelist_url"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"BlacklistURL": {
|
||||
"type": "string",
|
||||
"version": "2.14",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"list": {
|
||||
"datatype": "string"
|
||||
},
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "profile"
|
||||
},
|
||||
"list": {
|
||||
"name": "blacklist_url"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"FilterNumberOfEntries": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"version": "2.14",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "filter"
|
||||
},
|
||||
"option": {
|
||||
"name": "@Count"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Device.{BBF_VENDOR_PREFIX}URLFilter.Filter.{i}.": {
|
||||
"type": "object",
|
||||
"version": "2.14",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": true,
|
||||
"array": true,
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "filter"
|
||||
},
|
||||
"dmmapfile": "dmmap_urlfilter"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Enable": {
|
||||
"type": "boolean",
|
||||
"version": "2.14",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "filter"
|
||||
},
|
||||
"option": {
|
||||
"name": "enable"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Profile": {
|
||||
"type": "string",
|
||||
"version": "2.14",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "filter"
|
||||
},
|
||||
"option": {
|
||||
"name": "profile"
|
||||
}
|
||||
},
|
||||
"linker_obj": "Device.{BBF_VENDOR_PREFIX}URLFilter.Profile."
|
||||
}
|
||||
]
|
||||
},
|
||||
"MACAddress": {
|
||||
"type": "string",
|
||||
"version": "2.14",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"list": {
|
||||
"datatype": "string"
|
||||
},
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "filter"
|
||||
},
|
||||
"list": {
|
||||
"name": "macaddr"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Day": {
|
||||
"type": "string",
|
||||
"version": "2.14",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"list": {
|
||||
"datatype": "string"
|
||||
},
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "filter"
|
||||
},
|
||||
"list": {
|
||||
"name": "day"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"StartTime": {
|
||||
"type": "string",
|
||||
"version": "2.14",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "filter"
|
||||
},
|
||||
"option": {
|
||||
"name": "start_time"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Duration": {
|
||||
"type": "string",
|
||||
"version": "2.14",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "urlfilter",
|
||||
"section": {
|
||||
"type": "filter"
|
||||
},
|
||||
"option": {
|
||||
"name": "duration"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#
|
||||
# Copyright (C) 2022 IOPSYS
|
||||
#
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=usp-js
|
||||
@@ -9,6 +14,9 @@ PKG_SOURCE_VERSION:=7e285eb006414f230a3c17acf1b6f4c31c987447
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/usp-js
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uspd
|
||||
PKG_VERSION:=2.2.7
|
||||
PKG_VERSION:=2.2.14.3
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/uspd.git
|
||||
PKG_SOURCE_VERSION:=ff39170a3e0595a67763a61ac81b2f99b5bf11d7
|
||||
PKG_SOURCE_VERSION:=e7d95cb3cb4d28b7fe0df678a9d27c3ab173f5bd
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -26,14 +26,14 @@ define Package/uspd/default
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=Datamodel ubus backend
|
||||
DEPENDS:=+libubox +ubus +@BBFDM_ENABLE_JSON_PLUGIN +@BBFDM_ENABLE_DOTSO_PLUGIN \
|
||||
DEPENDS:=+USE_GLIBC:librt +libubox +ubus +@BBFDM_ENABLE_JSON_PLUGIN +@BBFDM_ENABLE_DOTSO_PLUGIN \
|
||||
+@BBF_TR181 +@BBF_TR104 +@BBF_TR143
|
||||
endef
|
||||
|
||||
define Package/uspd-mbedtls
|
||||
$(Package/uspd/default)
|
||||
TITLE += (mbedtls)
|
||||
DEPENDS += +libbbfdm-mbedtls
|
||||
DEPENDS += +PACKAGE_uspd-mbedtls:libbbfdm-mbedtls
|
||||
VARIANT:=mbedtls
|
||||
DEFAULT_VARIANT:=1
|
||||
endef
|
||||
@@ -41,7 +41,7 @@ endef
|
||||
define Package/uspd-openssl
|
||||
$(Package/uspd/default)
|
||||
TITLE += (openssl)
|
||||
DEPENDS += +libbbfdm-openssl
|
||||
DEPENDS += +PACKAGE_uspd-openssl:libbbfdm-openssl
|
||||
CONFLICTS := uspd-mbedtls
|
||||
VARIANT:=openssl
|
||||
endef
|
||||
@@ -49,17 +49,29 @@ endef
|
||||
define Package/uspd-wolfssl
|
||||
$(Package/uspd/default)
|
||||
TITLE += (wolfssl)
|
||||
DEPENDS += +libbbfdm-wolfssl
|
||||
DEPENDS += +PACKAGE_uspd-wolfssl:libbbfdm-wolfssl
|
||||
CONFLICTS := uspd-mbedtls uspd-openssl
|
||||
VARIANT:=wolfssl
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-D_GNU_SOURCE \
|
||||
-Wall -Werror \
|
||||
-DUSPD_MAX_MSG_LEN="10485760"
|
||||
|
||||
TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
|
||||
ifeq ($(BUILD_VARIANT),openssl)
|
||||
MAKE_FLAGS += USE_OPENSSL="yes"
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),wolfssl)
|
||||
MAKE_FLAGS += USE_WOLFSSL="yes"
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),mbedtls)
|
||||
MAKE_FLAGS += USE_MBEDTLS="yes"
|
||||
endif
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/uspd/* $(PKG_BUILD_DIR)/
|
||||
@@ -69,10 +81,8 @@ endif
|
||||
define Package/uspd/default/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/json/
|
||||
$(INSTALL_BIN) ./files/etc/init.d/uspd $(1)/etc/init.d/uspd
|
||||
$(INSTALL_CONF) ./files/etc/config/uspd $(1)/etc/config/uspd
|
||||
$(INSTALL_DATA) ./files/etc/bbfdm/json/transferComplete.json $(1)/etc/bbfdm/json/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uspd $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
70
voicemngr/Makefile
Normal file
70
voicemngr/Makefile
Normal file
@@ -0,0 +1,70 @@
|
||||
#
|
||||
# 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:=voicemngr
|
||||
PKG_VERSION:=0.1
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
LOCAL_SRC_DIR:=~/git/voip/voicemngr
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/voicemngr.git
|
||||
PKG_SOURCE_VERSION:=13a14593daa610a87c363a1a0acd19f31f405a71
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
# 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
|
||||
|
||||
TARGET_PLATFORM:=
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
TARGET_PLATFORM:=BROADCOM
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_qualcomm),y)
|
||||
TARGET_PLATFORM:=QUALCOMM
|
||||
endif
|
||||
|
||||
export TARGET_PLATFORM
|
||||
export CONFIG_BRCM_SDK_VER_504021
|
||||
export CONFIG_BCM_CHIP_ID
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TARGET_CFLAGS += -Wall -Werror
|
||||
|
||||
define Package/voicemngr
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=IOPSYS Voice Manager
|
||||
URL:=
|
||||
DEPENDS:= +libubox +ubus +libpicoevent +uci +TARGET_iopsys_brcm63xx_arm:bcmkernel +TARGET_iopsys_qualcomm:vtsp
|
||||
endef
|
||||
|
||||
define Package/voicemngr/description
|
||||
Voice manager is a daemon that bridges Asterisk and platform specific DSP/SLIC APIs
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
@echo "Building from the local source. TARGET_PLATFORM=$(TARGET_PLATFORM)"
|
||||
rsync -av --exclude=.* $(LOCAL_SRC_DIR)/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/voicemngr/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/voicemngr $(1)/usr/sbin/
|
||||
$(CP) $(PKG_BUILD_DIR)/libvoice/libvoice.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,voicemngr))
|
||||
|
||||
@@ -4,14 +4,16 @@ START=68
|
||||
STOP=12
|
||||
|
||||
USE_PROCD=1
|
||||
NAME=evoice
|
||||
NAME=voicemngr
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
@@ -20,3 +22,6 @@ reload_service() {
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger asterisk
|
||||
}
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wfa-capi
|
||||
PKG_VERSION:=1.1.2
|
||||
PKG_VERSION:=1.1.3
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=ce29c2d69d0ca96b61f2de5d1ba107c8d31cb5ef
|
||||
PKG_SOURCE_VERSION:=64d9101c8e4930cbd3fe6ce471fb4cfd2b9b80dc
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfa-capi.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
#
|
||||
# Copyright (C) 2021 IOPSYS Software Solutions AB
|
||||
# Copyright (C) 2021-2022 IOPSYS Software Solutions AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wfadatad
|
||||
PKG_VERSION:=7.0.5
|
||||
PKG_VERSION:=2.10.1.4
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=6548ed2d6aaf957d799188d4ff43894c2dd575cb
|
||||
PKG_SOURCE_VERSION:=17ba4ab69b66e1f05d116ba9ddff7eb8498e8374
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfadatad.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_LICENSE:=PROPRIETARY IOPSYS
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wifimngr
|
||||
PKG_VERSION:=14.0.7
|
||||
PKG_VERSION:=14.0.10
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=981ce51b2f135926d6e9135772dcd43d73c39b64
|
||||
PKG_SOURCE_VERSION:=b6481f096228da9805ff159d17ddac4dbce0e1ab
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
Reference in New Issue
Block a user