Compare commits

..

224 Commits

Author SHA1 Message Date
Vivek Kumar Dutta
696f26fd46 passwdqc: v2.0.3 2025-02-06 12:59:21 +05:30
Janusz Dziedzic
abc15029e6 wifimngr: 17.5.3 2025-02-05 19:17:54 +00:00
Janusz Dziedzic
d992340d98 libwifi: 7.9.0 2025-02-05 17:20:39 +00:00
Jakob Olsson
e5fa525364 map-controller: 6.2.2.1 2025-02-05 16:59:37 +01:00
Marina Maslova
39622c277c map-agent: 6.3.1.2 2025-02-05 18:59:53 +04:00
Vivek Kumar Dutta
98a6c9bd62 icwmp: faultstring improvements 2025-02-05 19:29:55 +05:30
Vivek Kumar Dutta
409cecd943 sulu: Fix admin acl for ParentalControl 2025-02-05 17:37:07 +05:30
Vivek Kumar Dutta
54c92d5b42 bbfdm: 1.14.4
- Fix kill sequence of bbfdm services
- Removed support of BBF_CONFIGMNGR_SCRIPT_BACKEND
- Removed support of BBF_MAX_OBJECT_INSTANCES
- Enabled debug release
2025-02-05 17:26:58 +05:30
Jakob Olsson
2ef97edd43 map-agent: 6.3.1.1 2025-02-05 11:45:40 +01:00
Vivek Kumar Dutta
e19c743888 wifidmd: Fix 80+80MHz in OperatingChannelBandwidth 2025-02-05 14:51:59 +05:30
Roman Azarenko
81b5ade110 self-diagnostics: 1.0.12
- Fix saving model and serial number for report filename

Fixes: b0049df366 ("self-diagnostics: 1.0.10")
2025-02-05 03:24:58 +00:00
Jakob Olsson
c0cfca286e map-controller: 6.2.2.0 2025-02-04 16:51:15 +01:00
Jakob Olsson
584b0b9721 map-agent: 6.3.1.0 2025-02-04 16:48:04 +01:00
Jakob Olsson
d5634eb756 ieee1905: 8.7.0 2025-02-04 16:48:04 +01:00
Vivek Kumar Dutta
38304c4d90 parental-control: Fix segfault with logs 2025-02-04 12:52:11 +05:30
Janusz Dziedzic
b92064f72b ieee1905: add arping dependency 2025-02-03 09:22:30 +00:00
Vivek Kumar Dutta
38814a8f89 sulu: Optimize sulu setup 2025-02-03 10:03:17 +05:30
Vivek Kumar Dutta
9d5ff37aca wifidmd: Optimize SetSSID operate cmd 2025-02-02 14:38:17 +05:30
Vivek Kumar Dutta
68dec1aa1b obuspa: Fix max controller definition 2025-02-02 11:02:13 +05:30
Markus Gothe
f3bbafc15c libethernet: 7.2.117 2025-02-01 14:06:32 +01:00
Janusz Dziedzic
1789bd5afd wifimngr: 17.5.2 2025-01-31 16:27:29 +00:00
arbala
8e5bbbd37f remove use of cat for map-backhaul file 2025-01-31 15:20:38 +00:00
Amin Ben Romdhane
95bd27f079 bbfdm: 1.14.3 2025-01-31 15:09:37 +01:00
Vivek Kumar Dutta
7a9cd965a0 usermngr: 1.3.3 2025-01-31 16:20:30 +05:30
Vivek Kumar Dutta
67673fa604 tr104: package specific vendor extension 2025-01-31 15:42:54 +05:30
Vivek Kumar Dutta
9f54857be0 timemngr: package specific vendor extension 2025-01-31 14:25:27 +05:30
Vivek Kumar Dutta
a733e610b4 qosmngr: package specific vendor extension 2025-01-31 14:04:28 +05:30
Vivek Kumar Dutta
f48ada800e obuspa: package specific vendor extension 2025-01-31 13:11:20 +05:30
Vivek Kumar Dutta
868785688e netmngr: package specific vendor extension 2025-01-31 13:00:22 +05:30
Vivek Kumar Dutta
e9ccbaa772 ethmngr: package specific vendor extension 2025-01-31 12:47:24 +05:30
Janusz Dziedzic
0b6b0e6ca2 wifimngr: 17.5.1 2025-01-30 14:47:15 +00:00
Janusz Dziedzic
47e0ecff71 libwifi: 7.8.9 2025-01-30 14:45:44 +00:00
Reidar Cederqvist
3123202381 SULU: update to version 4.0.4 ready for beta1 2025-01-30 15:27:25 +01:00
Jakob Olsson
9a1861aeb2 map-controller: 6.2.1.0 2025-01-30 15:19:28 +01:00
Jakob Olsson
bba41922cc ieee1905: 8.6.5 2025-01-30 15:18:33 +01:00
Vivek Kumar Dutta
373611b687 mcastmngr: package specific vendor extn 2025-01-30 11:24:45 +00:00
Vivek Kumar Dutta
9576104e83 bridgemngr: package specific vendor extn 2025-01-30 11:24:45 +00:00
Vivek Kumar Dutta
57f14e5e58 parental-control: Support to define vendor extension 2025-01-30 11:24:45 +00:00
Vivek Kumar Dutta
d51a6fe3c6 bbfdm: Support to handler vendor extensions 2025-01-30 11:24:45 +00:00
Jakob Olsson
05b0f91ae0 ieee1905: 8.6.4 2025-01-30 10:37:09 +01:00
Jakob Olsson
aea7fe15e6 map-controller: 6.2.0.0 2025-01-30 10:36:26 +01:00
Jakob Olsson
c6c5e53dc8 map-agent: 6.3.0.0 2025-01-30 10:35:03 +01:00
Vivek Kumar Dutta
03d6f8ab44 icwmp: 9.8.28 2025-01-30 09:59:29 +05:30
Suvendhu Hansa
06ad490dd8 qosmngr: fix unnamed uci section usages 2025-01-30 09:35:33 +05:30
Vivek Kumar Dutta
439e1ac346 wifidmd: Align with mld ubus object names 2025-01-29 19:03:02 +05:30
Vivek Kumar Dutta
d62639e761 wifidmd: Updated dependency list 2025-01-29 13:16:14 +05:30
Janusz Dziedzic
a1569f010d map-agent: airoha simplify mld_prefix 2025-01-28 16:14:31 +00:00
Janusz Dziedzic
a513907df7 libwifi: 7.8.8 2025-01-28 16:14:07 +00:00
Suvendhu Hansa
2e9942589a qosmngr: support percentage ShapingRate 2025-01-28 13:56:17 +00:00
Reidar Cederqvist
6d6962e02e sulu: align with vendor extension update 2025-01-28 11:49:07 +00:00
Janusz Dziedzic
4ded4e8708 map-agent: 6.2.3.13 2025-01-28 11:02:08 +00:00
Janusz Dziedzic
d48a389d86 wifimngr: 17.5.0 2025-01-28 11:02:08 +00:00
Vivek Kumar Dutta
adcd7faafc bbfdm: Rename default Vendor extension prefix to X_IOWRT_EU 2025-01-28 16:11:38 +05:30
Amin Ben Romdhane
2acea2c6dd bbfdm: Introduce a new libbbfdm-api library version 2 2025-01-28 09:16:30 +00:00
Janusz Dziedzic
b8fc40e336 libwifi: 7.8.7 2025-01-28 07:31:26 +00:00
Markus Gothe
86d9d8721b libethernet: econet: Fix ifstats for broadcast and multicast. 2025-01-27 15:05:06 +01:00
Janusz Dziedzic
f031977f41 map-agent: add openssl-util/ebtables deps 2025-01-27 11:40:07 +00:00
Jakob Olsson
87a782f70e map-controller: 6.1.2.21 2025-01-27 10:54:05 +01:00
Vivek Kumar Dutta
f293c57de0 obuspa: Fix unique key search 2025-01-24 19:23:12 +05:30
Markus Gothe
9f354e1294 ebtables-extensions: Fix building of kernel modules.
Needs headers to be copied so we can build all files.
2025-01-24 14:38:19 +01:00
Elena Vengerova
44527f36a8 wifimngr: 17.4.9 2025-01-24 17:15:49 +04:00
Elena Vengerova
0d3f63ccda libwifi: 7.8.6 2025-01-24 16:44:06 +04:00
Marina Maslova
8839edb8f3 mapagent: set mld_prefix to 'mld_bss' for airoha 2025-01-24 16:34:04 +04:00
Marina Maslova
f8a3b236aa map-agent: 6.2.3.12 2025-01-24 16:30:02 +04:00
Erik Karlsson
c55ab35b14 qosmngr: fix ebtables-extensions dependencies
They should not be included on Broadcom. It leads to build failures.
2025-01-24 12:13:39 +00:00
Markus Gothe
b5397361d0 libethernet: econet: Add PON support. 2025-01-24 13:09:20 +01:00
Marina Maslova
15f4bc772c wifimngr: 17.4.8 2025-01-24 15:19:21 +04:00
Filip Matusiak
b97c158e53 ieee1905: 8.6.3
CI: fix run_compile_test dependency issue
map: align return value of tlv_validate_multi() with tlv_validate()
2025-01-24 11:00:30 +01:00
Vivek Kumar Dutta
b727004b4a ebtables-extensions: 2.0.4 2025-01-24 09:09:46 +05:30
Markus Gothe
a81e572f00 ebtables-extensions: Update naming convention.
Use a similiar naming convention as iptables
kernel modules.
2025-01-24 04:30:47 +01:00
Markus Gothe
e1c819724f libethernet: Fix detection of 'ae_wan' WAN-interface. 2025-01-23 14:14:46 +01:00
Vivek Kumar Dutta
e75042bfe5 libqos: Prevent going out of an array 2025-01-23 16:14:23 +05:30
Markus Gothe
da50843b37 mcastmngr: Fix snooping stats. 2025-01-23 09:28:31 +00:00
Suvendhu Hansa
ad43f26119 ethmngr: Config option to expose legacy ethernet object 2025-01-23 14:50:26 +05:30
Vivek Kumar Dutta
b1110c426b periodicstats: 1.5.16 2025-01-23 13:29:12 +05:30
Vivek Kumar Dutta
27e2c1ef7e ieee1905: Select datamodel plugin as default 2025-01-23 10:46:44 +05:30
Janusz Dziedzic
e7a8dd7683 map-agent: allow enable/disable MLO for airoha 2025-01-22 15:45:39 +00:00
Vivek Kumar Dutta
932b345e2b bulkdata: use bbfdm logging 2025-01-22 19:46:04 +05:30
Erik Karlsson
1567b1facb logmngr: make logging more responsive
Flush every second.
2025-01-22 11:45:13 +00:00
Vivek Kumar Dutta
0dfbdd2d02 parental-control: Added loglevel 2025-01-22 17:14:33 +05:30
Reidar Cederqvist
8ba85e2e40 sulu: 4.0.2
- remove unused config options
- add new option to make sulu default WEB UI
2025-01-22 08:07:00 +00:00
Janusz Dziedzic
4e976e89b7 libwifi: 7.8.5 2025-01-22 07:53:47 +00:00
Vivek Kumar Dutta
4203eefe9f ethmngr: Updated log level 2025-01-22 13:02:09 +05:30
Vivek Kumar Dutta
3940dbbd43 ethmngr: support add/del RMONStats objects 2025-01-22 12:52:50 +05:30
Markus Gothe
f84c374a16 mcastmngr: Make sure we don't crash during boot up.
Avoid polluting the syslog with messages regarding
mcastmngr crashing:

procd: Instance mcast::instance1 s in a crash loop 6 crashes, 0 seconds since last crash
2025-01-22 03:04:08 +00:00
Janusz Dziedzic
a116104811 libwifi: 7.8.4 2025-01-21 20:46:03 +00:00
Janusz Dziedzic
8454c2a092 map-agent: 6.2.3.11 2025-01-21 20:05:30 +00:00
Amin Ben Romdhane
e7e6a40d26 wifidmd: 1.0.23 2025-01-21 20:55:31 +01:00
Amin Ben Romdhane
34e6281473 bbfdm: 1.13.6 2025-01-21 20:54:23 +01:00
Markus Gothe
e3c9182bbc bridgemngr: Create centralized ebtables setup.
Create a centralized setup for ebtables.
This is necessary to garantuee the order
of how chains are created.

Right now it provides a 1:1 drop-in
replacement of how things currently work
and no changes are needed in the short term.
2025-01-21 11:38:36 +01:00
Markus Gothe
5cac9516c0 Revert "l2filter: Create centralized ebtables setup."
This reverts commit d67a40b6a0.
2025-01-21 11:15:47 +01:00
Markus Gothe
d67a40b6a0 l2filter: Create centralized ebtables setup.
Create a centralized setup for ebtables.
This is necessary to garantuee the order
of how chains are created.

Right now it provides a 1:1 drop-in
replacement of how things currently work
and no changes are needed in the short term.
2025-01-20 13:54:27 +01:00
Vivek Kumar Dutta
4c0582b1a0 netmngr: Fix IPv6rd object registration 2025-01-20 14:26:19 +05:30
Amin Ben Romdhane
9e7ef97e14 wifidmd: Config option to select DataElements and/or legacy WiFi 2025-01-20 10:09:14 +05:30
Vivek Kumar Dutta
114cbf2cf4 hostmngr: ActiveIPConnections Vendor extension 2025-01-19 21:25:43 +05:30
Vivek Kumar Dutta
c38e706e01 bbfdm: 1.13.5 2025-01-19 21:14:06 +05:30
Vivek Kumar Dutta
ef3ef93a5c netmngr: 1.1.1 2025-01-19 19:42:36 +05:30
Vivek Kumar Dutta
1bb792a893 timemngr: 1.1.5 2025-01-19 19:30:22 +05:30
Vivek Kumar Dutta
8c1e4ef6aa parental-control: 1.0.2 2025-01-17 22:11:22 +05:30
Vivek Kumar Dutta
5cf3c68b96 ethmngr: 3.0.1 2025-01-17 21:46:02 +05:30
Suvendhu Hansa
75a5058d15 sysmngr: Vendor extensions for FileDescriptors and ActiveConnections 2025-01-17 12:25:02 +00:00
Amin Ben Romdhane
930565f528 netmngr: Define a config flag for each Object exposed by libnetmngr 2025-01-17 11:53:59 +01:00
Erik Karlsson
3d3397703f map-agent: hotplug: topology-discovery: fix typo from previous change 2025-01-17 10:52:06 +01:00
Amin Ben Romdhane
fc2b5a2380 bbfdm: Delete OUT_NAME option as it is no longer in use 2025-01-17 10:44:33 +01:00
Janusz Dziedzic
0aa0cb6424 ieee1905: allow to build without TR181 2025-01-17 08:20:11 +00:00
Elena Vengerova
61b74b5bd3 libwifi: 7.8.3 2025-01-16 20:51:52 +04:00
Andreas Gnau
1d8add390d blkpg-part: Add package
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-01-16 13:15:00 +01:00
Reidar Cederqvist
797e8cae82 update sulu to latest devel version 2025-01-15 19:05:51 +01:00
Jakob Olsson
083960ee2e map-agent: hotplug: topology-discovery: redirect ubus invokes to dev/null 2025-01-15 12:57:11 +01:00
Vivek Kumar Dutta
3f59dd1c89 libethernet: select required enct_api dependency 2025-01-15 17:22:18 +05:30
Jakob Olsson
823b5936f8 map-controller: 6.1.2.20 2025-01-15 11:23:02 +01:00
Jakob Olsson
368fe2aafa map-controller: 6.1.2.19 2025-01-15 10:19:20 +01:00
Vivek Kumar Dutta
8f1b18e4d4 libethernet: updated airoha depedency 2025-01-14 16:56:57 +00:00
Suvendhu Hansa
f3b6dbfceb ethmngr: unified service datamodel daemon 2025-01-14 16:55:40 +00:00
Jakob Olsson
b5ac400fd6 map-controller: 6.1.2.18 2025-01-14 15:18:42 +01:00
Suvendhu Hansa
ae1189c0d2 logmngr: Fix missing startup logs 2025-01-14 15:43:22 +05:30
Reidar Cederqvist
4e57074351 sulu: update sulu to latest devel
in this commit allplugins are merged into core, and
a new plugin is added for Genexis theme
2025-01-13 15:01:16 +01:00
Janusz Dziedzic
bbd0f972c6 libwifi: 7.8.2 2025-01-13 12:54:59 +00:00
arbala
50ceda4cd4 map-controller: 6.1.2.17 2025-01-10 16:29:06 +01:00
Suvendhu Hansa
0f5f018e99 sysmngr: Added TemperatureStatus DM 2025-01-09 06:28:13 +05:30
Vivek Kumar Dutta
eff826ac39 wifidmd: Remove wifi object from non-wireless devices 2025-01-09 06:17:48 +05:30
Vivek Kumar Dutta
62aed7d759 bbfdm: Updated conflicting API with libeasy 2025-01-09 06:15:47 +05:30
Piotr Kubik
4d72fddff8 iop: feeds_update: Remove script
Script is now stored in top repo.
2025-01-08 12:29:42 +01:00
Janusz Dziedzic
eb18ec1e2b map-controller: 6.1.2.16 2025-01-08 09:31:03 +00:00
Vivek Kumar Dutta
82a5082538 obuspa: Integrate v9.0.4 2025-01-08 09:10:50 +00:00
Andreas Gnau
4ec80e072d questd: Remove
Questd is no longer maintained. Alternative APIs are available to
achieve the same functionality.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-01-07 15:16:20 +00:00
Andreas Gnau
c4f4edd39d iop: Remove KConfig symbols
* CONFIG_TARGET_VERSION has not been used for years, remove it.
* CONFIG_TARGET_CUSTOMER is only used by one feed and is defined there as
  well, so the definition here is not needed, remove it.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-01-07 16:07:48 +01:00
Janusz Dziedzic
b02342e752 libwifi: 7.8.1 2025-01-07 10:15:10 +00:00
Janusz Dziedzic
562733b291 map-controller: 6.1.2.15 2025-01-03 14:39:14 +00:00
Janusz Dziedzic
9f6d7d44ed map-agent: 6.2.3.10 2025-01-03 14:39:14 +00:00
Janusz Dziedzic
84faa7f55b libwifi: 7.8.0 2025-01-03 11:58:42 +00:00
Vivek Kumar Dutta
b939c6988e sysmngr: 1.0.13 2025-01-02 19:07:36 +05:30
Suvendhu Hansa
9a28469028 hostmngr: Added vendor extensions 2025-01-02 17:30:47 +05:30
Vivek Kumar Dutta
64123c0f62 ethmngr: Support for Interface Stats Reset 2025-01-02 15:11:47 +05:30
Vivek Kumar Dutta
923a3e2f08 firewallmngr: use name option as instance marker 2025-01-02 14:00:11 +05:30
Suvendhu Hansa
c92e073ec5 periodicstats: unified daemon + datamodel 2025-01-02 06:33:46 +00:00
Suvendhu Hansa
6cdabddc23 bulkdata: Fix random crashes 2024-12-27 09:53:53 +00:00
Markus Gothe
a0eab2f7b9 qosmngr: Improve TSID to be unique. 2024-12-27 09:28:33 +01:00
Vivek Kumar Dutta
cb4b5c0c7c sysmngr: Updated fwbank validator to accept partial data 2024-12-26 19:43:47 +05:30
Rahul Thakur
bc4bb6b9ea mcastmngr: fix mld filtering 2024-12-24 16:20:56 +05:30
Vivek Kumar Dutta
c41ed55d5f wifidmd: Fix typo in MeasurementReport parameter 2024-12-23 10:59:29 +05:30
Jakob Olsson
4860a1a5a8 map-controler: 6.1.2.14 2024-12-19 16:51:08 +01:00
Vivek Kumar Dutta
973a0c689a sysmngr: added validator for reset_reason file 2024-12-19 19:16:58 +05:30
Jakob Olsson
89d03dc3b9 decollector: 6.1.0.7 2024-12-17 10:28:24 +01:00
Jakob Olsson
510dedb352 map-agent: 6.2.3.9 2024-12-17 10:27:13 +01:00
Jakob Olsson
caf9074ab8 map-agent: 6.2.3.8 2024-12-16 17:08:04 +01:00
Jakob Olsson
0676d5b990 map-controller: 6.1.2.13 2024-12-16 16:16:29 +01:00
Jakob Olsson
fb0413467b map-controller: 6.1.2.12 2024-12-16 14:22:10 +01:00
Markus Gothe
148aa95651 qosmngr: Fix Airoha issue with token rate. 2024-12-12 20:49:20 +01:00
Markus Gothe
daf54622d8 Update WAN ingress ratelimit with generic method.
Instead of using the MAC to do ratelimting we use
the Frame Engine, this has the the benefit of being
a more universal solution and will work with PON
without the need of implement APIs for using the
MAC to do ingress ratelimiting.

This also works fine when the integrated switch
is used as the wan.
2024-12-12 17:12:40 +00:00
Vivek Kumar Dutta
22aa3ff065 obuspa: updated test controller dependency 2024-12-12 11:39:08 +00:00
Vivek Kumar Dutta
eb06147743 mosquitto-auth-shadow: updated dependency on mosquitto-ssl to avoid ambiguity 2024-12-12 11:15:53 +00:00
Jakob Olsson
aaa8171f06 map-agent: 6.2.3.7 2024-12-12 11:57:11 +01:00
Jakob Olsson
8037020206 map-controller: 6.1.2.11 2024-12-12 10:41:13 +01:00
Jakob Olsson
3ab1e18f7d map-agent: 6.2.3.6 2024-12-11 16:42:01 +01:00
Jakob Olsson
d28738ecbf map-agent: 6.2.3.5 2024-12-11 15:57:23 +01:00
Jakob Olsson
247eea7a77 map-agent: 6.2.3.4 2024-12-11 13:19:11 +01:00
Vivek Kumar Dutta
404bb37ced obuspa: Fix unique key registrations 2024-12-11 15:03:05 +05:30
Vivek Kumar Dutta
722ddf9f88 bbfdm: Update Security object proto to cwmp 2024-12-11 14:59:31 +05:30
Vivek Kumar Dutta
c0b146a3fe logmngr: Updated unique datamodel parameters 2024-12-11 12:33:11 +05:30
Vivek Kumar Dutta
7acc13dd85 wifidmd: Updated unique key parameters 2024-12-11 11:53:06 +05:30
Vivek Kumar Dutta
14449614a2 firewallmngr: Updated unique datamodel parameters 2024-12-11 11:45:56 +05:30
Vivek Kumar Dutta
1e218554de sysmngr: Mark unique datamodel parameters 2024-12-11 11:43:19 +05:30
Vivek Kumar Dutta
05017194b5 dnsmngr: Updated unique key parameters 2024-12-11 11:38:29 +05:30
Vivek Kumar Dutta
6f709c0623 bridgemngr: Updated unique key parameters 2024-12-11 11:35:33 +05:30
Vivek Kumar Dutta
dd4907e86d tr104: Updated default values for CallStatus parameters 2024-12-11 09:58:14 +05:30
Jakob Olsson
b1eb97b7d7 map-controller: 6.1.2.10 2024-12-10 16:36:49 +01:00
Jakob Olsson
d9b86df719 map-agent: 6.2.3.3 2024-12-10 16:23:18 +01:00
Vivek Kumar Dutta
e656deb8f5 obuspa: enable cwmp specific datamodel 2024-12-10 19:49:51 +05:30
Vivek Kumar Dutta
e8f1b2167a icwmp: register xmpp for both proto 2024-12-10 19:38:21 +05:30
Amin Ben Romdhane
cfceae73ff sysmngr: 1.0.9 2024-12-10 13:24:49 +01:00
Rahul Thakur
6c7aa21626 logmngr: fix syslog-ng conf generation 2024-12-10 10:16:26 +00:00
Mohd Husaam Mehdi
52f554b84d qosmgr: add support for wan ingress and egress rate control 2024-12-10 09:51:47 +00:00
Vivek Kumar Dutta
70c823e303 obuspa: Optmize datamodel caching 2024-12-10 12:07:28 +05:30
Filip Matusiak
1f94ad341b map-agent: 6.2.3.2 2024-12-09 17:12:26 +01:00
Vivek Kumar Dutta
e02ad277f7 bbfdm: Fix empty output from microservices without proto 2024-12-09 17:05:51 +05:30
Janusz Dziedzic
a8a5f99769 wifimngr: 17.4.7 2024-12-06 15:18:12 +01:00
Mohd Husaam Mehdi
d161ef2238 qosmngr: updates related to rate control
* separate scheduling logic from rate control logic
* add support for burst_size
2024-12-06 13:46:35 +00:00
Jakob Olsson
64d1873eba map-agent: 6.2.3.1 2024-12-06 14:14:46 +01:00
Vivek Kumar Dutta
29a123446a wifidmd: update MLDUnit changes in mapcontroller/agent 2024-12-06 12:34:30 +00:00
Vivek Kumar Dutta
e7374d6bce icwmp: Register XMPP as cwmp and CWMPManagementServer as usp 2024-12-06 12:34:30 +00:00
Vivek Kumar Dutta
7dd517dba7 obuspa: register core datamodel with cwmp proto 2024-12-06 12:34:30 +00:00
Vivek Kumar Dutta
c7a6bdb4a0 bulkdata: register datamodel as cwmp only 2024-12-06 12:34:30 +00:00
Vivek Kumar Dutta
5e009f97e9 bbfdm: Support proto based filter for micro-services 2024-12-06 12:34:30 +00:00
Amin Ben Romdhane
d2a43566bc sysmngr: 1.0.8 2024-12-06 12:04:50 +01:00
Jakob Olsson
ab2b11e343 map-agent: 6.2.3.0 2024-12-06 10:48:41 +01:00
Amin Ben Romdhane
67db9fcc48 sysmngr: Added support for fwbank ubus object 2024-12-05 15:56:40 +01:00
Vivek Kumar Dutta
db855e4c38 wifidmd: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
b3b7d666b1 usermngr: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
dda4099874 userinterface: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
6c4f2842b8 usbmngr: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
fcad858660 tr104: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
8bd1e237ef timemngr: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
1e4af81108 sysmngr: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
6dbd4fbade swmodd: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
cd6a127fb9 sshmngr: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
cb3653ebe9 port-trigger: Install datamodel as firewallmngr plugin 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
765201ded3 ssdpd: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
54f75846ca qosmngr: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
090795699d ponmngr: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
551033461a periodicstats: Align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
2c3a493457 parental-control: Align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
e0bf63926a obuspa: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
c6e8454989 netmngr: Align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
16f1276346 mcastmngr: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
5d223f5909 ieee1905: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
83541d7e03 icwmp: Align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
76042997ca hostmngr: Align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
e47abdff8f firewallmngr: Align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
3eaa20c12e ethmngr: Align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
7ffb8b398f dslmngr: Align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
5b449b886c dnsmngr: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
13b00ca74d dhcpmngr: Align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
8b9e1a0f94 ddnsmngr: align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
9e3ee55e12 bulkdata: Align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
6a9eee1af5 bridgemngr: Align with bbfdm 2024-12-05 12:58:35 +00:00
Vivek Kumar Dutta
d9d2fc882f bbfdm: Register micro-services before exposing over ubus 2024-12-05 12:58:35 +00:00
Janusz Dziedzic
7df39bd465 map-agent: wait ap-autoconfig when MLO
Don't generate APs early - just wait
ap-autoconfig.
2024-12-05 12:31:12 +00:00
Janusz Dziedzic
317c1bdff0 libwifi: 7.7.9 2024-12-05 09:47:15 +00:00
Janusz Dziedzic
ac5602443f wifimngr: 17.4.6 2024-12-05 09:33:45 +00:00
Jakob Olsson
9816a42f00 map-agent: 6.2.2.3 2024-12-04 12:27:55 +01:00
Mohd Husaam Mehdi
12f70a7d91 qosmngr: add ingress and egress rate control support for airoha 2024-12-04 13:10:30 +05:30
Vivek Kumar Dutta
f3959d1ffd bulkdata: Fix segfault when server not responding 2024-12-04 12:59:33 +05:30
Suvendhu Hansa
b8c4404ba6 parental-control: 1.0.0 2024-12-03 21:47:33 +05:30
177 changed files with 2887 additions and 1514 deletions

View File

@@ -2,13 +2,9 @@ if PACKAGE_bbfdmd
config BBF_VENDOR_PREFIX
string "Vendor Prefix"
default "X_IOPSYS_EU_"
default "X_IOWRT_EU_"
config BBF_OBFUSCATION_KEY
string "Obfuscation key"
default "371d530c95a17d1ca223a29b7a6cdc97e1135c1e0959b51106cca91a0b148b5e42742d372a359760742803f2a44bd88fca67ccdcfaeed26d02ce3b6049cb1e04"
config BBF_MAX_OBJECT_INSTANCES
int "Maximum number of instances per object"
default 255
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.12.26
PKG_VERSION:=1.14.4
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=811f0616c6a861c9b78d5a079a0f79f3eb0b23b2
PKG_SOURCE_VERSION:=c8967d6bf47c8bc96cf8df94236b4edfc95aabea
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -19,6 +19,8 @@ endif
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
RSTRIP:=true
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
include bbfdm.mk
@@ -68,10 +70,6 @@ define Package/bbfdmd/config
source "$(SOURCE)/Config_bbfdmd.in"
endef
define Package/bbf_configmngr/config
source "$(SOURCE)/bbf_configmngr.in"
endef
define Package/libbbfdm-api/description
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
endef
@@ -100,12 +98,14 @@ endif
CMAKE_OPTIONS += \
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
-DBBF_MAX_OBJECT_INSTANCES:Integer=$(CONFIG_BBF_MAX_OBJECT_INSTANCES) \
-DBBFDMD_MAX_MSG_LEN:Integer=10485760
-DBBFDMD_MAX_MSG_LEN:Integer=10485760 \
-DCMAKE_BUILD_TYPE:String="Debug" \
define Package/libbbfdm-api/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/libbbfdm-api.so $(1)/lib/
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/legacy/libbbfdm-api.so $(1)/lib/
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/version-2/libbbfdm-api-v2.so $(1)/lib/
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/libexec/rpcd/bbf.secure $(1)/usr/libexec/rpcd/bbf.secure
@@ -133,6 +133,7 @@ define Package/bbfdmd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbfdmd/ubus/bbfdmd $(1)/usr/sbin/
$(STRIP) $(1)/usr/sbin/bbfdmd
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/etc/init.d/bbfdmd $(1)/etc/init.d/bbfdmd
@@ -158,17 +159,14 @@ endef
define Package/bbf_configmngr/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/bbfdm/
ifeq ($(CONFIG_BBF_CONFIGMNGR_C_BACKEND),y)
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/bbf_configd $(1)/usr/sbin/
$(INSTALL_BIN) ./files/etc/init.d/bbf_configd $(1)/etc/init.d/bbf_configd
$(INSTALL_DIR) $(1)/usr/share/bbfdm/scripts
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/share/bbfdm/scripts/bbf_config_notify.sh $(1)/usr/share/bbfdm/scripts/
endif
ifeq ($(CONFIG_BBF_CONFIGMNGR_SCRIPT_BACKEND),y)
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/libexec/rpcd/bbf.config $(1)/usr/libexec/rpcd/bbf.config
endif
$(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/bbf_configd $(1)/usr/sbin/
$(STRIP) $(1)/usr/sbin/bbf_configd
$(INSTALL_BIN) ./files/etc/init.d/bbf_configd $(1)/etc/init.d/bbf_configd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/files/usr/share/bbfdm/scripts/bbf_config_notify.sh $(1)/usr/share/bbfdm/scripts/
$(INSTALL_DATA) ./files/etc/bbfdm/critical_services.json $(1)/etc/bbfdm/
endef
@@ -182,11 +180,17 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/libbbfdm-api
$(INSTALL_DIR) $(1)/usr/include/libbbfdm-api/legacy
$(INSTALL_DIR) $(1)/usr/include/libbbfdm-api/version-2
$(INSTALL_DIR) $(1)/usr/include/libbbfdm-ubus
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/*.h $(1)/usr/include/libbbfdm-api/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/legacy/*.h $(1)/usr/include/libbbfdm-api/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/legacy/*.h $(1)/usr/include/libbbfdm-api/legacy/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/version-2/*.h $(1)/usr/include/libbbfdm-api/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/version-2/*.h $(1)/usr/include/libbbfdm-api/version-2/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-ubus/bbfdm-ubus.h $(1)/usr/include/libbbfdm-ubus/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/include/*.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/libbbfdm-api.so $(1)/usr/lib
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/legacy/include/*.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/legacy/libbbfdm-api.so $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/version-2/libbbfdm-api-v2.so $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libbbfdm-ubus/libbbfdm-ubus.so $(1)/usr/lib
endef

View File

@@ -1,19 +0,0 @@
if PACKAGE_bbf_configmngr
choice
prompt "Select backend daemon for bbf.config"
default BBF_CONFIGMNGR_C_BACKEND
help
Select which backend daemon should be used for ubus bbf.config
config BBF_CONFIGMNGR_SCRIPT_BACKEND
bool "Use shell script backend"
help
Enable this option to use shell script as the backend for bbf.config. This can be useful for quick and easy scripting of configuration tasks.
config BBF_CONFIGMNGR_C_BACKEND
bool "Use C code backend"
help
Enable this option to use a C code implementation as the backend for bbf.config. This option is generally preferred for performance-critical tasks and scenarios requiring more robust and efficient handling.
endchoice
endif

View File

@@ -47,7 +47,6 @@ BBFDM_INSTALL_CORE_PLUGIN:=$(BBFDM_DIR)/tools/bbfdm.sh -p
# Note:
# - There could be only one main plugin file, so its bind to PKG_NAME
# - Micro-service input.json will be auto generated with this call
# - Use -u (optional argument) to overwrite ubus object name
#
# Example:
# BBFDM_INSTALL_MS_DM $(PKG_BUILD_DIR)/libcwmp.so $(1) $(PKG_NAME)
@@ -88,6 +87,9 @@ BBFDM_INSTALL_MS_PLUGIN:=$(BBFDM_DIR)/tools/bbfdm.sh -m -p
#
BBFDM_INSTALL_SCRIPT:=$(BBFDM_DIR)/tools/bbfdm.sh -s
BBFDM_REGISTER_SERVICES:=$(BBFDM_DIR)/tools/bbfdm.sh -t
# Deprecated functions errors
define BbfdmInstallPluginInMicroservice
$(warning # BbfdmInstallPluginInMicroservice function is deprecated, use BBFDM_INSTALL_MS_PLUGIN macro #)

View File

@@ -1,7 +1,7 @@
config bbfdmd 'bbfdmd'
option enable '1'
option debug '0'
option loglevel '3'
option loglevel '4'
config micro_services 'micro_services'
option enable '1'

View File

@@ -1,7 +1,7 @@
#!/bin/sh /etc/rc.common
START=80
STOP=10
STOP=07
USE_PROCD=1
PROG=/usr/sbin/bbf_configd

View File

@@ -1,12 +1,12 @@
#!/bin/sh /etc/rc.common
START=60
STOP=8
STOP=05
USE_PROCD=1
PROG=/usr/sbin/dm-service
BBFDM_MICROSERVICE_DIR="/etc/bbfdm/micro_services"
BBFDM_MICROSERVICE_DIR="/etc/bbfdm/services"
. /usr/share/libubox/jshn.sh
@@ -24,7 +24,7 @@ validate_bbfdm_micro_service_section()
_add_microservice()
{
local name path loglevel
local enable enable_core
local enable enable_core unified_daemon
# Check enable from micro-service
path="${1}"
@@ -41,9 +41,14 @@ _add_microservice()
log "datamodel micro-service ${name} not enabled"
return 0
fi
json_get_var unified_daemon unified_daemon 0
if [ "${unified_daemon}" -eq "1" ]; then
return 0
fi
json_select config
json_get_var loglevel loglevel 3
json_get_var loglevel loglevel 4
procd_open_instance "${name}"

View File

@@ -1,7 +1,7 @@
#!/bin/sh /etc/rc.common
START=97
STOP=10
STOP=06
USE_PROCD=1
PROG=/usr/sbin/bbfdmd
@@ -17,7 +17,7 @@ validate_bbfdm_bbfdmd_section()
uci_validate_section bbfdm bbfdmd "bbfdmd" \
'enable:bool:true' \
'debug:bool:false' \
'loglevel:uinteger:3'
'loglevel:uinteger:4'
}
configure_bbfdmd()

View File

@@ -2,18 +2,18 @@
BBFDM_BASE_DM_PATH="usr/share/bbfdm"
BBFDM_INPUT_PATH="etc/bbfdm/micro_services"
INPUT_TEMPLATE='{"daemon":{"enable":"1","service_name":"template","config":{"loglevel":"3"}}}'
OUT_NAME=""
INPUT_FILE="0"
MICRO_SERVICE=0
SCRIPT=0
DIAG=0
PLUGIN=0
DEST=""
VENDOR_EXTN=""
TOOLS="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
SRC=""
while getopts ":mpsdu:" opt; do
while getopts ":mpsdtv:" opt; do
case ${opt} in
m)
MICRO_SERVICE=1
@@ -27,8 +27,11 @@ while getopts ":mpsdu:" opt; do
d)
DIAG=1
;;
u)
OUT_NAME="${OPTARG}"
t)
INPUT_FILE=1
;;
v)
VENDOR_EXTN=${OPTARG}
;;
?)
echo "Invalid option: ${OPTARG}"
@@ -89,6 +92,10 @@ bbfdm_install_dm()
minfile=$(mktemp)
jq -c 'del(..|.description?)' ${src} > ${minfile}
if [ -n "${VENDOR_EXTN}" ]; then
sed -i "s/{BBF_VENDOR_PREFIX}/${VENDOR_EXTN}/g" ${minfile}
fi
src=${minfile}
if dpkg -s python3-jsonschema >/dev/null 2>&1; then
echo "Verifying bbfdm Datamodel JSON file"
@@ -108,23 +115,6 @@ bbfdm_install_dm()
fi
}
bbfdm_generate_input()
{
local dest ser
dest_dir=${1}
ser=${2}
dest=${dest_dir}/${ser}.json
if [ -n "${OUT_NAME}" ]; then
echo ${INPUT_TEMPLATE} | jq --arg service "${ser}" --arg OUT "${OUT_NAME}" '.daemon |= (.service_name = $service |.output.name = $OUT)' > ${dest}
else
echo ${INPUT_TEMPLATE} | jq --arg service "${ser}" '.daemon.service_name = $service' > ${dest}
fi
chmod 466 ${dest}
}
if [ -z "$SRC" ] || [ -z "${DEST}" ] ; then
echo "# BBFDM Null value in src[${SRC}], dest[${DEST}]"
exit 1
@@ -141,6 +131,39 @@ if [ "${SCRIPT}" -eq "1" ]; then
exit 0
fi
if [ "${INPUT_FILE}" -eq "1" ]; then
tempfile=""
if [ ! -f "${SRC}" ]; then
echo "# Datamodel Input file ${SRC} not available"
exit 1
fi
if ! cat ${SRC} |jq >/dev/null 2>&1; then
echo "# Invalid datamodel json input file"
exit 1
fi
if [ -z "${DATA}" ]; then
echo "# Package name not provided ...."
exit 1
fi
tempfile=$(mktemp)
cp ${SRC} ${tempfile}
if [ -n "${VENDOR_EXTN}" ]; then
sed -i "s/{BBF_VENDOR_PREFIX}/${VENDOR_EXTN}/g" ${tempfile}
fi
install_dir ${DEST}/etc/bbfdm/services
install_data ${tempfile} ${DEST}/etc/bbfdm/services/${DATA}.json
if [ -f "${tempfile}" ]; then
rm ${tempfile}
fi
exit 0
fi
if [ "${MICRO_SERVICE}" -eq "1" ]; then
if [ -z "${DATA}" ]; then
echo "# service_name[${DATA}] not provided"
@@ -151,10 +174,6 @@ if [ "${MICRO_SERVICE}" -eq "1" ]; then
extn="$(basename ${SRC})"
install_dir ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}.${extn##*.}
# main micro-service datamodel plugin, create an input file as well
install_dir ${DEST}/${BBFDM_INPUT_PATH}
bbfdm_generate_input ${DEST}/${BBFDM_INPUT_PATH}/ ${DATA}
else
install_dir ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}/$(basename ${SRC})

45
blkpg-part/Makefile Normal file
View File

@@ -0,0 +1,45 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2025 IOPSYS Software Solutions AB
include $(TOPDIR)/rules.mk
PKG_NAME:=blkpg-part
PKG_VERSION:=1
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=5a4ec5f53ed904b37fba03f3797fbe2af3077f8d
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/gportay/blkpg-part.git
PKG_MIRROR_HASH:=skip
PKG_MAINTAINER:=Andreas Gnau <andreas.gnau@iopsys.eu>
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
MAKE_INSTALL_FLAGS += PREFIX=/usr
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Disc
TITLE:=User space partition table and disk geometry handling utility
URL:=https://www.portay.io/blkpg-part/
endef
define Package/$(PKG_NAME)/description
blkpg-part creates temporary partitions that are not part of the GPT/MBR.
It makes a partition block device from any consecutive blocks that are
not partitioned. It creates, resizes and deletes partitions on the fly
without writing back the changes to the partition table.
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkpg-part $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,7 +1,5 @@
if PACKAGE_bridgemngr
menu "Configuration"
config BRIDGEMNGR_BRIDGE_VLAN
bool "Use bridge-vlan backend"
help
@@ -13,5 +11,7 @@ config BRIDGEMNGR_BRIDGE_VENDOR_EXT
help
Set this option to use bridge BBF vendor extensions.
endmenu
config BRIDGEMNGR_BRIDGE_VENDOR_PREFIX
string "Package specific datamodel Vendor Prefix for TR181 extensions"
default ""
endif

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bridgemngr
PKG_VERSION:=1.0.7
PKG_VERSION:=1.0.11
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/bridgemngr
PKG_SOURCE_VERSION:=4f22b4a4270c8d9b94b9de6f5cbe2a1dd86a3027
PKG_SOURCE_VERSION:=18c2921a1cf5bfa027c11c5e6ca605ef69fd1168
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -40,18 +40,31 @@ endef
MAKE_PATH:=src
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VENDOR_PREFIX),"")
VENDOR_PREFIX = $(CONFIG_BBF_VENDOR_PREFIX)
else
VENDOR_PREFIX = $(CONFIG_BRIDGEMNGR_BRIDGE_VENDOR_PREFIX)
endif
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(VENDOR_PREFIX)\\\"
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VLAN),y)
TARGET_CFLAGS += -DBRIDGE_VLAN_BACKEND
endif
define Package/bridgemngr/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libbridgemngr.so $(1) $(PKG_NAME)
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VENDOR_EXT), y)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libbridgeext.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) ./files/VLAN_Filtering_Extension.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) -v ${VENDOR_PREFIX} ./files/VLAN_Filtering_Extension.json $(1) $(PKG_NAME)
endif
$(INSTALL_BIN) ./files/etc/init.d/bridging $(1)/etc/init.d/
$(INSTALL_DATA) ./files/etc/config/bridging $(1)/etc/config/
endef
ifeq ($(LOCAL_DEV),1)

View File

@@ -0,0 +1,16 @@
{
"daemon": {
"enable": "1",
"service_name": "bridgemngr",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "Bridging"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -0,0 +1,33 @@
#L2 filter UCI file
config chain 'qos_output'
option target 'qos_output'
option table 'nat'
option chain 'OUTPUT'
option policy 'RETURN'
config chain 'dscp2pbits'
option target 'dscp2pbits'
option table 'broute'
option chain 'BROUTING'
option policy 'RETURN'
config chain 'qos'
option target 'qos'
option table 'broute'
option chain 'BROUTING'
option policy 'RETURN'
config chain 'prevlanxlate'
option target 'prevlanxlate'
option table 'broute'
option chain 'BROUTING'
option policy 'RETURN'
option append 'false'
config chain 'mcsnooping'
option target 'mcsnooping'
option table 'broute'
option chain 'BROUTING'
option policy 'RETURN'
option append 'false'

View File

@@ -0,0 +1,93 @@
#!/bin/sh /etc/rc.common
# Start after bdmf shell, wanconf, and switch-script but before the network-script
START=20
STOP=10
USE_PROCD=1
. /lib/functions.sh
handle_ebtables_chain() {
local sid="$1"
local table
local chain
local target
local policy
local append
local enabled
local ret
config_get table "$sid" table filter
config_get chain "$sid" chain
config_get policy "$sid" policy RETURN
config_get target "$sid" target
config_get_bool append "$sid" append 1
config_get_bool enabled "$sid" enabled 1
[ "$enabled" = "0" ] && return
[ -z "${chain}" -o -z "${target}" ] && return
if [ "$append" != "0" ]; then
append="-A"
else
append="-I"
fi
ebtables --concurrent -t "$table" -N "$target" -P "$policy" 2> /dev/null
ret=$?
if [ $ret -eq 0 ]; then
ebtables --concurrent -t "$table" ${append} "$chain" -j "$target"
else
ebtables --concurrent -t "$table" -D "$chain" -j "$target"
ebtables --concurrent -t "$table" ${append} "$chain" -j "$target"
fi
}
handle_ebtables_rule() {
local sid="$1"
local table
local chain
local target
local match
local value
local enabled
local ret
config_get table "$sid" table filter
config_get chain "$sid" chain
config_get match "$sid" match
config_get value "$sid" value
config_get target "$sid" target RETURN
config_get_bool append "$sid" append 1
config_get_bool enabled "$sid" enabled 1
[ "$enabled" = "0" ] && return
[ -z "${chain}" -o -z "${target}" ] && return
if [ "$append" != "0" ]; then
append="-A"
else
append="-I"
fi
ebtables --concurrent -t "$table" -D "$chain" ${match} -j "$target" ${value} 2> /dev/null
ebtables --concurrent -t "$table" ${append} "$chain" ${match} -j "$target" ${value}
}
start_service() {
config_load bridging
config_foreach handle_ebtables_chain chain
config_foreach handle_ebtables_rule rule
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger bridging
}

View File

@@ -7,13 +7,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=2.1.14
PKG_VERSION:=2.1.19
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bulkdata.git
PKG_SOURCE_VERSION:=93c9e87cb9f8f635cece1473cff6f67cff9ff7c0
PKG_SOURCE_VERSION:=628525b02ae9ccd39f4bc85cf616ed4a102bca48
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -54,6 +54,8 @@ define Package/bulkdata/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
$(INSTALL_DATA) ./files/etc/config/bulkdata $(1)/etc/config/
$(INSTALL_BIN) ./files/etc/init.d/bulkdatad $(1)/etc/init.d/
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
endef
$(eval $(call BuildPackage,bulkdata))

View File

@@ -0,0 +1,17 @@
{
"daemon": {
"enable": "1",
"service_name": "bulkdata",
"unified_daemon": true,
"services": [
{
"parent_dm": "Device.",
"object": "BulkData",
"proto": "cwmp"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -1,6 +1,6 @@
config bulkdata 'bulkdata'
option enable '0'
#Log levels: Error=1, Warning=2, Info=3, Debug=4
option log_level '3'
#Log levels: As per syslog 0-7, default 6=>LOG_INFO
option loglevel '3'

View File

@@ -6,9 +6,20 @@ STOP=10
USE_PROCD=1
PROG="/usr/sbin/bulkdatad"
validate_global_section() {
uci_validate_section bulkdata bulkdata bulkdata \
'enable:bool:1' \
'loglevel:uinteger:3'
}
start_service() {
local enable loglevel
validate_global_section
procd_open_instance "bulkdata"
procd_set_param command "$PROG"
procd_append_param command -l ${loglevel}
procd_set_param respawn
procd_close_instance "bulkdata"
}

View File

@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ddnsmngr
PKG_VERSION:=1.0.9
PKG_VERSION:=1.0.10
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
@@ -71,6 +71,7 @@ ifeq ($(CONFIG_DDNSMNGR_BACKEND_INADYN),y)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/files/inadyn/server/* $(1)/etc/ddnsmngr/servers
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/inadyn/usr/libexec/rpcd/ddnsmngr $(1)/usr/libexec/rpcd/ddnsmngr
endif
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libddnsmngr.so $(1) $(PKG_NAME)
endef

View File

@@ -0,0 +1,16 @@
{
"daemon": {
"enable": "1",
"service_name": "ddnsmngr",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "DynamicDNS"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=decollector
PKG_VERSION:=6.1.0.6
PKG_VERSION:=6.1.0.7
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=37669ed8365397d65656f11a04f6af8cae57607c
PKG_SOURCE_VERSION:=db4eae19a3f716eec5a37aa2786b9bbbe3160b54
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip

View File

@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dhcpmngr
PKG_VERSION:=1.0.4
PKG_VERSION:=1.0.5
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
@@ -52,6 +52,7 @@ ifeq ($(CONFIG_DNSMNGR_BACKEND_UNBOUND),y)
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DATA) ./files/etc/uci-defaults/unbound.odhcpd.uci_default $(1)/etc/uci-defaults/16-set-unbound-as-odhcpd-leasetrigger
endif
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libdhcpmngr.so $(1) $(PKG_NAME)
endef

View File

@@ -0,0 +1,20 @@
{
"daemon": {
"enable": "1",
"service_name": "dhcpmngr",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "DHCPv4"
},
{
"parent_dm": "Device.",
"object": "DHCPv6"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmngr
PKG_VERSION:=1.0.12
PKG_VERSION:=1.0.14
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dnsmngr.git
PKG_SOURCE_VERSION:=fb49088ddb498980e2c91f03aea10bd502caeca1
PKG_SOURCE_VERSION:=e64ec01b57d8b32e5230b34f6a3866250b1a8faf
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -64,6 +64,7 @@ ifeq ($(CONFIG_DNSMNGR_BACKEND_DNSMASQ),y)
endif
define Package/dnsmngr/install
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libdnsmngr.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_SCRIPT) -d $(PKG_BUILD_DIR)/scripts/nslookup $(1)
ifeq ($(CONFIG_DNSMNGR_DNS_SD),y)

View File

@@ -0,0 +1,16 @@
{
"daemon": {
"enable": "1",
"service_name": "dnsmngr",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "DNS"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dslmngr
PKG_VERSION:=1.2.8
PKG_VERSION:=1.2.9
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
@@ -78,6 +78,7 @@ ifeq ($(CONFIG_TARGET_brcmbca),y)
endif
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dslmngr $(1)/sbin/
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/libbbfdsl.so $(1) $(PKG_NAME)
endef

View File

@@ -0,0 +1,28 @@
{
"daemon": {
"enable": "1",
"service_name": "dslmngr",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "DSL"
},
{
"parent_dm": "Device.",
"object": "FAST"
},
{
"parent_dm": "Device.",
"object": "ATM"
},
{
"parent_dm": "Device.",
"object": "PTM"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -6,21 +6,21 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ebtables-extensions
PKG_VERSION:=2.0.1
PKG_VERSION:=2.0.4
PKG_LICENSE:=GPL-2.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5ef3a5b057f6b59a4b90bd5ca15a852b0c27f3b3
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ebtables-extensions.git
PKG_SOURCE_VERSION:=9a2af49b455ee25ca0694274e004ced7c09855a0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
include $(INCLUDE_DIR)/package.mk
define KernelPackage/vlantranslation
define KernelPackage/ebt-vlantranslation
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables VLAN translation
FILES:=$(PKG_BUILD_DIR)/src/ebt_vlantranslation.ko
@@ -29,7 +29,7 @@ define KernelPackage/vlantranslation
KCONFIG:=
endef
define KernelPackage/dscp2pbit
define KernelPackage/ebt-dscp2pbit
SUBMENU:=Other modules
TITLE:=Kernel module for DSCP-to-Pbit mapping
DEPENDS+=+kmod-ebtables
@@ -38,7 +38,7 @@ define KernelPackage/dscp2pbit
KCONFIG:=
endef
define KernelPackage/dhcp
define KernelPackage/ebt-dhcp
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables DHCP snooping
FILES:=$(PKG_BUILD_DIR)/src/ebt_dhcp.ko
@@ -47,7 +47,7 @@ define KernelPackage/dhcp
KCONFIG:=
endef
define KernelPackage/dhcpv6
define KernelPackage/ebt-dhcpv6
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables DHCPv6 snooping
FILES:=$(PKG_BUILD_DIR)/src/ebt_dhcpv6.ko
@@ -56,7 +56,7 @@ define KernelPackage/dhcpv6
KCONFIG:=
endef
define KernelPackage/ra
define KernelPackage/ebt-ra
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables NDP/RA snooping
FILES:=$(PKG_BUILD_DIR)/src/ebt_ra.ko
@@ -65,7 +65,7 @@ define KernelPackage/ra
KCONFIG:=
endef
define KernelPackage/dns
define KernelPackage/ebt-dns
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables DNS manipulation
FILES:=$(PKG_BUILD_DIR)/src/ebt_dns.ko
@@ -74,7 +74,7 @@ define KernelPackage/dns
KCONFIG:=
endef
define KernelPackage/pppoe_disc
define KernelPackage/ebt-pppoe_disc
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables PPPoE manipulation
FILES:=$(PKG_BUILD_DIR)/src/ebt_pppoe_disc.ko
@@ -83,7 +83,7 @@ define KernelPackage/pppoe_disc
KCONFIG:=
endef
define KernelPackage/l2pt
define KernelPackage/ebt-l2pt
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables L2CP tunneling
FILES:=$(PKG_BUILD_DIR)/src/ebt_l2pt.ko
@@ -92,7 +92,7 @@ define KernelPackage/l2pt
KCONFIG:=
endef
define KernelPackage/xtarp
define KernelPackage/ebt-xtarp
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables extended ARP matching
FILES:=$(PKG_BUILD_DIR)/src/ebt_xtarp.ko
@@ -101,7 +101,7 @@ define KernelPackage/xtarp
KCONFIG:=
endef
define KernelPackage/xtip
define KernelPackage/ebt-xtip
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables extended IPv4 matching
FILES:=$(PKG_BUILD_DIR)/src/ebt_xtip.ko
@@ -110,7 +110,7 @@ define KernelPackage/xtip
KCONFIG:=
endef
define KernelPackage/xtip6
define KernelPackage/ebt-xtip6
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables extended IPv6 matching
FILES:=$(PKG_BUILD_DIR)/src/ebt_xtip6.ko
@@ -119,50 +119,76 @@ define KernelPackage/xtip6
KCONFIG:=
endef
define KernelPackage/dhcp/description
define KernelPackage/ebt-igmpsnooping
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables IGMP snooping
FILES:=$(PKG_BUILD_DIR)/src/ebt_igmpsnooping.ko
DEPENDS+=+kmod-ebtables
# AUTOLOAD:=$(call AutoLoad,30,ebt_igmpsnooping) - Will be loaded on demand
KCONFIG:=
endef
define KernelPackage/ebt-mldsnooping
SUBMENU:=Other modules
TITLE:=Kernel module for ebtables MLD snooping
FILES:=$(PKG_BUILD_DIR)/src/ebt_mldsnooping.ko
DEPENDS+=+kmod-ebtables
# AUTOLOAD:=$(call AutoLoad,30,ebt_mldsnooping) - Will be loaded on demand
KCONFIG:=
endef
define KernelPackage/ebt-dhcp/description
Kernel module to enable DHCP snooping for ebtables
endef
define KernelPackage/dhcpv6/description
define KernelPackage/ebt-dhcpv6/description
Kernel module to enable DHCPv6 snooping for ebtables
endef
define KernelPackage/ra/description
define KernelPackage/ebt-ra/description
Kernel module to enable NDP/RA snooping for ebtables
endef
define KernelPackage/dns/description
define KernelPackage/ebt-dns/description
Kernel module to enable DNS manipulation for ebtables
endef
define KernelPackage/pppoe_disc/description
define KernelPackage/ebt-pppoe_disc/description
Kernel module to enable PPPoE manipulation for ebtables
endef
define KernelPackage/l2pt/description
define KernelPackage/ebt-l2pt/description
Kernel module to enable L2CP tunneling for ebtables
endef
define KernelPackage/xtarp/description
define KernelPackage/ebt-xtarp/description
Kernel module to enable extended ARP matching for ebtables
endef
define KernelPackage/xtip/description
define KernelPackage/ebt-xtip/description
Kernel module to enable extended IPv4 matching for ebtables
endef
define KernelPackage/xtip6/description
define KernelPackage/ebt-xtip6/description
Kernel module to enable extended IPv6 matching for ebtables
endef
define KernelPackage/vlantranslation/description
define KernelPackage/ebt-vlantranslation/description
Kernel module to enable VLAN translation for ebtables
endef
define KernelPackage/dscp2pbit/description
define KernelPackage/ebt-dscp2pbit/description
Kernel module to enable DSCP-to-Pbit mapping for ebtables
endef
define KernelPackage/ebt-igmpsnooping/description
Kernel module to enable IGMP snooping for ebtables
endef
define KernelPackage/ebt-mldsnooping/description
Kernel module to enable MLD snooping for ebtables
endef
ifeq ($(CONFIG_TARGET_brcmbca),y)
include ../../broadcom/bcmkernel/bcm-kernel-toolchain.mk
endif
@@ -187,6 +213,8 @@ endif
$(CP) $(PKG_BUILD_DIR)/src/ebt_xtarp.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
$(CP) $(PKG_BUILD_DIR)/src/ebt_xtip.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
$(CP) $(PKG_BUILD_DIR)/src/ebt_xtip6.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
$(CP) $(PKG_BUILD_DIR)/src/ebt_igmpsnooping.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
$(CP) $(PKG_BUILD_DIR)/src/ebt_mldsnooping.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
endef
define Build/InstallDev
@@ -204,6 +232,8 @@ endif
$(CP) $(PKG_BUILD_DIR)/src/ebt_xtarp.h $(1)/include/uapi/linux/netfilter_bridge/
$(CP) $(PKG_BUILD_DIR)/src/ebt_xtip.h $(1)/include/uapi/linux/netfilter_bridge/
$(CP) $(PKG_BUILD_DIR)/src/ebt_xtip6.h $(1)/include/uapi/linux/netfilter_bridge/
$(CP) $(PKG_BUILD_DIR)/src/ebt_igmpsnooping.h $(1)/include/uapi/linux/netfilter_bridge/
$(CP) $(PKG_BUILD_DIR)/src/ebt_mldsnooping.h $(1)/include/uapi/linux/netfilter_bridge/
endef
KERNEL_MAKE_FLAGS += -I$(LINUX_DIR)/include
@@ -215,14 +245,16 @@ define Build/Compile
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)/src" modules
endef
$(eval $(call KernelPackage,vlantranslation))
$(eval $(call KernelPackage,dscp2pbit))
$(eval $(call KernelPackage,dhcp))
$(eval $(call KernelPackage,dhcpv6))
$(eval $(call KernelPackage,ra))
$(eval $(call KernelPackage,dns))
$(eval $(call KernelPackage,pppoe_disc))
$(eval $(call KernelPackage,l2pt))
$(eval $(call KernelPackage,xtarp))
$(eval $(call KernelPackage,xtip))
$(eval $(call KernelPackage,xtip6))
$(eval $(call KernelPackage,ebt-vlantranslation))
$(eval $(call KernelPackage,ebt-dscp2pbit))
$(eval $(call KernelPackage,ebt-dhcp))
$(eval $(call KernelPackage,ebt-dhcpv6))
$(eval $(call KernelPackage,ebt-ra))
$(eval $(call KernelPackage,ebt-dns))
$(eval $(call KernelPackage,ebt-pppoe_disc))
$(eval $(call KernelPackage,ebt-l2pt))
$(eval $(call KernelPackage,ebt-xtarp))
$(eval $(call KernelPackage,ebt-xtip))
$(eval $(call KernelPackage,ebt-xtip6))
$(eval $(call KernelPackage,ebt-igmpsnooping))
$(eval $(call KernelPackage,ebt-mldsnooping))

View File

@@ -2,8 +2,16 @@ if (PACKAGE_ethmngr)
menu "Configurations"
config TR181_VENDOR_EXTENSIONS_MACVLAN
bool "Use TR181 vendor extension MACVLAN"
config ETHMNGR_MACVLAN_EXTENSION
bool "Enable datamodel MACVLAN vendor extension"
default y
config ETHMNGR_EXPOSE_ETHERNET_OBJECT
bool "Expose ethernet ubus object to fetch and clear interface stats"
default y
config ETHMNGR_VENDOR_PREFIX
string "Package specific datamodel Vendor Prefix for TR181 extensions"
default ""
endmenu
endif

View File

@@ -5,30 +5,30 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=2.1.9
PKG_VERSION:=3.0.5
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/ethmngr.git
PKG_SOURCE_VERSION:=2d35e86cc8dfd7ef4e0d8579f5d314e90faadc90
PKG_SOURCE_VERSION:=01e1c5f6642a8fa79fc445c71558ad02bda40eb5
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
define Package/ethmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Ethernet status and configration utility
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_ipq53xx||TARGET_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl +libeasy
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
DEPENDS:=+libethernet +libuci +libubox +ubus +libpthread +libnl-genl +libeasy
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +libblobmsg-json +libjson-c +libc +libubus
endef
define Package/ethmngr/description
@@ -41,39 +41,39 @@ define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./ethmngr/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE \
-DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
-D_GNU_SOURCE
ifeq ($(CONFIG_TR181_VENDOR_EXTENSIONS_MACVLAN),y)
TARGET_CFLAGS += -DTR181_VENDOR_EXTENSIONS_MACVLAN
ifeq ($(CONFIG_ETHMNGR_VENDOR_PREFIX),"")
VENDOR_PREFIX = $(CONFIG_BBF_VENDOR_PREFIX)
else
VENDOR_PREFIX = $(CONFIG_ETHMNGR_VENDOR_PREFIX)
endif
ifeq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_ipq53xx)$(CONFIG_TARGET_mediatek),)
define Build/Compile
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(VENDOR_PREFIX)\\\"
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/ethmngr/* $(PKG_BUILD_DIR)/
endef
endif
ifeq ($(CONFIG_ETHMNGR_MACVLAN_EXTENSION),y)
TARGET_CFLAGS += -DETHMNGR_MACVLAN_EXTENSION
endif
ifeq ($(CONFIG_ETHMNGR_EXPOSE_ETHERNET_OBJECT),y)
TARGET_CFLAGS += -DETHMNGR_EXPOSE_ETHERNET_OBJECT
endif
define Package/ethmngr/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/etc/ethmngr
$(INSTALL_DIR) $(1)/etc/ethmngr/plugins
ifneq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_ipq53xx)$(CONFIG_TARGET_mediatek),)
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethmngr $(1)/usr/sbin/
endif
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/libbbfethernet.so $(1) $(PKG_NAME)
ifeq ($(CONFIG_TR181_VENDOR_EXTENSIONS_MACVLAN),y)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/libbbfethernetmacvlan.so $(1) $(PKG_NAME)
endif
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
endef
$(eval $(call BuildPackage,ethmngr))

View File

@@ -0,0 +1,16 @@
{
"daemon": {
"enable": "1",
"service_name": "ethmngr",
"unified_daemon": true,
"services": [
{
"parent_dm": "Device.",
"object": "Ethernet"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -1,28 +1,17 @@
#!/bin/sh /etc/rc.common
START=15
START=80
STOP=90
USE_PROCD=1
PROG=/usr/sbin/ethmngr
. /lib/functions.sh
include /lib/ethernet
start_service() {
if [ -f $PROG ]; then
procd_open_instance
procd_open_instance "ethmngr"
procd_set_param command ${PROG}
procd_append_param command -l 3
procd_set_param respawn
procd_close_instance
procd_close_instance "ethmngr"
fi
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger network
}

View File

@@ -1,20 +0,0 @@
{
"ethport_update": {
"if" : [
{
"event": "network.device"
}
],
"then" : [
{
"cli": "/sbin/hotplug-call ethernet",
"envs": {
"PORT": "&network.device->ifname",
"LINK": "&network.device->link"
},
"timeout": 1
}
]
}
}

View File

@@ -1,2 +0,0 @@
uci -q set ruleng.ethport=rule
uci -q set ruleng.ethport.recipe='/etc/ruleng/ethport.json'

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=firewallmngr
PKG_VERSION:=1.0.6
PKG_VERSION:=1.0.9
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/firewallmngr.git
PKG_SOURCE_VERSION:=2cac05871f7a8d93c144157c5f3f129deecf1a29
PKG_SOURCE_VERSION:=77ad8425b73a3ac63f6160dc217635394ac87907
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -69,6 +69,7 @@ endif
$(INSTALL_BIN) ./files/firewall.service $(1)/etc/
$(INSTALL_DATA) ./files/etc/uci-defaults/97-firewall-service $(1)/etc/uci-defaults/
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libfirewallmngr.so $(1) $(PKG_NAME)
endef

View File

@@ -0,0 +1,20 @@
{
"daemon": {
"enable": "1",
"service_name": "firewallmngr",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "Firewall"
},
{
"parent_dm": "Device.",
"object": "NAT"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -10,6 +10,15 @@ config HOSTMNGR_PLATFORM_HAS_WIFI
bool "Platform has WiFi"
default y if PACKAGE_libwifi
config HOSTMNGR_DATAMODEL_EXT
bool "Keep vendor specific datamodel parameters"
default n
config HOSTMNGR_VENDOR_PREFIX
depends on HOSTMNGR_DATAMODEL_EXT
string "Vendor Prefix for hostmngr datamodel extension"
default ""
endmenu
endif

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostmngr
PKG_VERSION:=1.2.11
PKG_VERSION:=1.2.14
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=431b122a051a28a16b430c9dcc83d26f73030f79
PKG_SOURCE_VERSION:=6ea9fdb38a8e067b850841d6e7f7266bf76c363a
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/hostmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -24,6 +24,7 @@ PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
define Package/hostmngr
SECTION:=utils
CATEGORY:=Utilities
@@ -54,6 +55,15 @@ ifeq ($(CONFIG_HOSTMNGR_PLATFORM_HAS_WIFI),y)
TARGET_CFLAGS += -DHAS_WIFI
endif
ifeq ($(CONFIG_HOSTMNGR_DATAMODEL_EXT),y)
TARGET_CFLAGS += -DHAS_VENDOR_EXT
ifeq ($(CONFIG_HOSTMNGR_VENDOR_PREFIX),"")
TARGET_CFLAGS += -DCUSTOM_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
else
TARGET_CFLAGS += -DCUSTOM_PREFIX=\\\"$(CONFIG_HOSTMNGR_VENDOR_PREFIX)\\\"
endif
endif
MAKE_PATH:=src
define Package/hostmngr/install
@@ -62,7 +72,14 @@ define Package/hostmngr/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/hostmngr $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/share/hostmngr
$(INSTALL_DATA) ./files/scripts/hosts_acl.sh $(1)/usr/share/hostmngr/
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostmngr.so $(1) $(PKG_NAME)
ifeq ($(CONFIG_HOSTMNGR_DATAMODEL_EXT),y)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostext.so $(1) $(PKG_NAME)
endif
endef
ifeq ($(LOCAL_DEV),1)

View File

@@ -0,0 +1,16 @@
{
"daemon": {
"enable": "1",
"service_name": "hostmngr",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "Hosts"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.8.24
PKG_VERSION:=9.8.29
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=868abeb86c2974b3647c7f66e085808c0f296721
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=4075ec2c530fb1590aa484f98ed37c9dda5216f5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -77,6 +77,7 @@ define Package/icwmp/install
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/libcwmpdm.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) ./files/etc/bbfdm/json/CWMPManagementServer.json $(1) $(PKG_NAME)
endef

25
icwmp/bbfdm_service.json Normal file
View File

@@ -0,0 +1,25 @@
{
"daemon": {
"enable": "1",
"service_name": "icwmp",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "ManagementServer"
},
{
"parent_dm": "Device.",
"object": "CWMPManagementServer",
"proto": "usp"
},
{
"parent_dm": "Device.",
"object": "XMPP"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -20,9 +20,8 @@ config cpe 'cpe'
option default_lan_interface 'lan'
option log_to_console 'disable'
option log_to_file 'disable'
# log_severity: INFO (Default)
# log_severity possible configs: EMERG, ALERT, CRITIC ,ERROR, WARNING, NOTICE, INFO, DEBUG
option log_severity 'ERROR'
option log_severity 'WARNING'
option log_file_name '/var/log/icwmpd.log'
option log_max_size '102400'
option userid '' #$OUI-$SER

View File

@@ -23,6 +23,7 @@ config IEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY
config IEEE1905_BUILD_TR181_PLUGIN
bool "Build TR-181 mapping module (responsible for Device.IEEE1905.)"
default y
endmenu

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.6.1
PKG_VERSION:=8.7.0
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5f7e6e30cbda36e431ecb7150d7494bce0c26f6f
PKG_SOURCE_VERSION:=e65188bb2a05cf83f50ecf2ef8042cf75abe94a0
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -22,8 +22,10 @@ PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
ifeq ($(CONFIG_IEEE1905_BUILD_TR181_PLUGIN),y)
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
endif
define Package/ieee1905/Default
SECTION:=utils
@@ -39,7 +41,8 @@ define Package/libieee1905
$(call Package/ieee1905/Default)
TITLE:=libieee1905.so (library for CMDU and TLV handling)
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +libwifiutils
+libjson-c +libblobmsg-json +libwifiutils \
+iputils-arping
endef
define Package/ieee1905
@@ -48,8 +51,10 @@ define Package/ieee1905
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ubus +libpthread \
+libieee1905 +IEEE1905_PLATFORM_HAS_WIFI:libwifi \
+libwifiutils
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
+libwifiutils +iputils-arping
DEPENDS+=+IEEE1905_BUILD_TR181_PLUGIN:libbbfdm-api \
+IEEE1905_BUILD_TR181_PLUGIN:libbbfdm-ubus \
+IEEE1905_BUILD_TR181_PLUGIN:dm-service
endef
include $(wildcard plugins/*.mk)
@@ -97,7 +102,10 @@ TARGET_CFLAGS += -DEXTENSION_ALLOWED
endif
TARGET_CFLAGS += -DHAS_UBUS
ifeq ($(CONFIG_IEEE1905_BUILD_TR181_PLUGIN),y)
TARGET_CFLAGS += -DBUILD_TR181_PLUGIN
endif
MAKE_FLAGS += \
extmod_subdirs="$(patsubst %,extensions/%,$(plugins))"
@@ -111,7 +119,10 @@ define Package/ieee1905/install
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ieee1905d $(1)/usr/sbin/
ifeq ($(CONFIG_IEEE1905_BUILD_TR181_PLUGIN),y)
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/tr181/ieee1905dm.so $(1) $(PKG_NAME)
endif
endef
define Package/libieee1905/install

View File

@@ -0,0 +1,16 @@
{
"daemon": {
"enable": "1",
"service_name": "ieee1905",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "IEEE1905"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -1,7 +0,0 @@
config TARGET_VERSION
string
prompt "Software Version"
config TARGET_CUSTOMER
string
prompt "Customer ID"

View File

@@ -24,10 +24,6 @@ define Package/iop/description
This package contains iopsysWrt SDK utilities
endef
define Package/iop/config
source "$(SOURCE)/Config.in"
endef
define Build/Compile
true
endef

View File

@@ -1,9 +0,0 @@
#!/bin/bash
function feeds_update {
# always return true
exit 0
}
register_command "feeds_update" "Compatibility function only"

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libethernet
PKG_VERSION:=7.2.111
PKG_VERSION:=7.2.117
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=6e7216e657dfb59e869e393ef58e6b4593c16fc7
PKG_SOURCE_VERSION:=e917cdcfa0beb15a452f204521bea3d3571190b3
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libethernet.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -66,7 +66,8 @@ define Package/libethernet
SUBMENU:=IOPSYS HAL libs
MENU:=1
TITLE:= Ethernet library (libethernet)
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_airoha:ecnt_api +TARGET_brcmbca:bcm963xx-bsp
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_brcmbca:bcm963xx-bsp
DEPENDS+=+TARGET_airoha:ecnt_api +TARGET_airoha:kmod-npu +MODULE_DEFAULT_xpon_bsp:xpon_bsp
endef
define Package/libethernet/description
@@ -83,7 +84,7 @@ endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./libethernet/* $(PKG_BUILD_DIR)/
$(CP) -rf ~/git/libethernet/* $(PKG_BUILD_DIR)/
endef
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libqos
PKG_VERSION:=7.2.108
PKG_VERSION:=7.2.109
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=6a72e35e1a662e2f707e4901679676a9c09b3bc2
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libqos.git
PKG_SOURCE_VERSION:=4948d372c3d7e43a0ba9aee517dbb83b94bba3dc
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
@@ -78,7 +78,7 @@ endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./libqos/* $(PKG_BUILD_DIR)/
$(CP) -rf ~/git/libqos/* $(PKG_BUILD_DIR)/
endef
endif

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libwifi
PKG_VERSION:=7.7.8
PKG_VERSION:=7.9.0
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b12d933e1cdd3b84eefbb45b0ecf2d1927f5d5dc
PKG_SOURCE_VERSION:=b4d974c213eb2ad0b98165241b83bbda013ba452
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libwifi.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
@@ -41,23 +41,22 @@ else ifeq ($(CONFIG_TARGET_armvirt),y)
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_airoha),y)
TARGET_PLATFORM=ECONET
TARGET_WIFI_TYPE=MEDIATEK MAC80211
TARGET_WIFI_TYPE=MEDIATEK
TARGET_CFLAGS +=-DIOPSYS_ECONET
ifeq ($(CONFIG_TARGET_airoha_an7581),y)
TARGET_CFLAGS +=-DCONFIG_MTK
endif
else ifeq ($(CONFIG_TARGET_ipq95xx),y)
TARGET_PLATFORM=IPQ95XX
TARGET_WIFI_TYPE=QUALCOMM MAC80211
TARGET_WIFI_TYPE=QUALCOMM
TARGET_CFLAGS +=-DIPQ95XX
else ifeq ($(CONFIG_TARGET_ipq53xx),y)
TARGET_PLATFORM=IPQ53XX
TARGET_WIFI_TYPE=QUALCOMM MAC80211
TARGET_WIFI_TYPE=QUALCOMM
TARGET_CFLAGS +=-DIPQ53XX
else
$(info Unexpected CONFIG_TARGET, use default MAC80211)
TARGET_PLATFORM=MAC80211
TARGET_WIFI_TYPE=MAC80211
TARGET_CFLAGS +=-DIOPSYS_MAC80211
endif

View File

@@ -5,12 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=logmngr
PKG_VERSION:=1.0.6
PKG_VERSION:=1.0.8
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/system/logmngr.git
PKG_SOURCE_VERSION:=37f9eef6ad92ab4835893c6c8ee65338917071b6
PKG_SOURCE_VERSION:=7c2056c9f5dc23fd1260846c72210365ec69c882
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -43,7 +44,7 @@ endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./logmngr/* $(PKG_BUILD_DIR)/
$(CP) -rf ~/git/logmngr/* $(PKG_BUILD_DIR)/
endef
endif

View File

@@ -16,7 +16,7 @@ create_service_section() {
# the service section of the fluent-bit.conf file has hardcoded values,
# no need to lookup any uci section to configure this section
echo "[SERVICE]" >> ${TMP_CONF_FILE}
echo " flush 3" >> ${TMP_CONF_FILE}
echo " flush 1" >> ${TMP_CONF_FILE}
echo " daemon off" >> ${TMP_CONF_FILE}
echo " log_level info" >> ${TMP_CONF_FILE}
echo " parsers_file /etc/fluent-bit/parsers.conf" >> ${TMP_CONF_FILE}

View File

@@ -15,7 +15,14 @@ create_config_file() {
create_option_section() {
# the option section of the syslog-ng.conf file has hardcoded values,
# no need to lookup any uci section to configure this section
echo -e "@version: 4.4" >> ${TMP_CONF_FILE}
local syslog_version=$(syslog-ng -V | grep -i "Installer-Version" | awk -F': ' '{print $2}' | cut -d '.' -f1,2)
if [ -n "$syslog_version" ]; then
echo -e "@version: $syslog_version" >> ${TMP_CONF_FILE}
else
echo -e "@version: 4.7" >> ${TMP_CONF_FILE}
fi
echo -e '@include "scl.conf"' >> ${TMP_CONF_FILE}
echo -e "options {" >> ${TMP_CONF_FILE}
echo -e "\tchain_hostnames(no);" >> ${TMP_CONF_FILE}
@@ -37,7 +44,8 @@ create_input_section() {
# on any uci value
echo -e "source $tag {" >> ${TMP_CONF_FILE}
echo -e "\tinternal();" >> ${TMP_CONF_FILE}
echo -e "\tunix-dgram("/dev/log");" >> ${TMP_CONF_FILE}
echo -e "\tunix-dgram(\"/dev/log\");" >> ${TMP_CONF_FILE}
echo -e "\tfile(\"/proc/kmsg\" program_override(\"kernel\"));" >> ${TMP_CONF_FILE}
echo "};" >> ${TMP_CONF_FILE}
}
@@ -315,11 +323,10 @@ handle_action_section() {
}
apply_config_file() {
echo -e '@include "/etc/syslog-ng.d/"' >> ${TMP_CONF_FILE}
cp ${TMP_CONF_FILE} ${CONF_FILE}
}
PROG=/usr/sbin/syslog-ng-ctl
logmngr_init() {
create_config_file
@@ -339,7 +346,9 @@ logmngr_init() {
logrotate_init
fi
procd_open_instance logmngr
procd_set_param command $PROG reload
procd_close_instance
if procd_running 'syslog-ng'; then
/etc/init.d/syslog-ng reload
else
/etc/init.d/syslog-ng start
fi
}

View File

@@ -1,7 +1,7 @@
#!/bin/sh /etc/rc.common
START=12
STOP=89
USE_PROCD=1
. /lib/functions.sh

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=6.2.2.2
PKG_VERSION:=6.3.1.2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=8554576cc8a68b89faba1b13a7be0386325da26a
PKG_SOURCE_VERSION:=4547277f0637a4e7f18ff676350400efb4e37138
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
@@ -28,7 +28,9 @@ define Package/map-agent
CATEGORY:=Utilities
TITLE:=WiFi multi-AP Agent (EasyMesh R2)
DEPENDS:=+libwifi +libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 \
+ieee1905-map-plugin +ip-bridge +AGENT_USE_LIBDPP:libdpp
+ieee1905-map-plugin +ip-bridge +AGENT_USE_LIBDPP:libdpp \
+uuidgen +openssl-util +!TARGET_brcmbca:ebtables-legacy \
+!TARGET_brcmbca:ebtables-legacy-utils
endef
ifeq ($(CONFIG_AGENT_USE_LIBDPP),y)

View File

@@ -63,7 +63,7 @@ else
[ $dhcp -eq 1 ] || exit 0
else
[ -f $map_bh_file ] || exit 0
cur_bh="$(cat $map_bh_file | jsonfilter -e @.ifname)"
cur_bh="$(jsonfilter -e @.ifname < "$map_bh_file" 2>/dev/null)" || exit 0
[ "$cur_bh" = "$PORT" ] || exit 0
fi
########################################################

View File

@@ -15,13 +15,13 @@ rc="$?"
issue_discovery() {
local iface="$1"
res=$(ubus -t5 call ieee1905 buildcmdu "{\"type\":0, \"ifname\":\"${iface}\"}")
res=$(ubus -t5 call ieee1905 buildcmdu "{\"type\":0, \"ifname\":\"${iface}\"}" > /dev/null 2>&1)
json_load "$res" > /dev/null 2>&1
json_get_var data data
[ "$data" == "" ] && return
ubus call ieee1905 cmdu "{\"dst\":\"01:80:c2:00:00:13\", \"type\":0, \"data\":\"${data}\"}"
ubus call ieee1905 cmdu "{\"dst\":\"01:80:c2:00:00:13\", \"type\":0, \"data\":\"${data}\"}" > /dev/null 2>&1
}
process_vlans() {

View File

@@ -73,6 +73,7 @@ generate_multiap_config() {
ifname="wlan${devidx}_0"
ifname_bh="wlan${devidx}_1"
else
uci set mapagent.agent.mld_prefix="bss"
ifname_sta=""
case "$band" in
2g)
@@ -98,6 +99,11 @@ generate_multiap_config() {
if [ "${network_mode}" == "extender" ]; then
ifname="${ifname_sta}"
fi
[ "$disable_mlo" == "1" ] || {
uci set wireless.$dev.mlo="1"
uci set wireless.$dev.mlo_capable="1"
}
fi
uci set wireless.$dev.channels="$channels"

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=6.1.2.9
PKG_VERSION:=6.2.2.1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=94b30d021b13e9488f9c76e7ceece48c9a567321
PKG_SOURCE_VERSION:=f3d3ef332678f6417d78529323119a71ba715337
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
LOCAL_DEV=0

View File

@@ -9,6 +9,7 @@ config controller 'controller'
option primary_vid '1'
option primary_pcp '0'
option allow_bgdfs '0'
option stale_sta_timeout '30d'
option channel_plan '0'
option de_collect_interval '60'

View File

@@ -23,6 +23,7 @@ validate_controller_section() {
'initial_channel_scan:bool:true' \
'resend_num:uinteger:0' \
'allow_bgdfs:range(0,2629744)' \
'stale_sta_timeout:string' \
'channel_plan:range(0,2629744)' \
'enable_ts:bool:false'

5
mcastmngr/Config.in Normal file
View File

@@ -0,0 +1,5 @@
if PACKAGE_mcastmngr
config MCASTMNGR_VENDOR_PREFIX
string "Package specific datamodel Vendor Prefix for TR181 extensions"
default ""
endif

View File

@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mcastmngr
PKG_VERSION:=1.2.7
PKG_VERSION:=1.2.10
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
LOCAL_DEV:=0
@@ -29,21 +29,33 @@ MAKE_PATH:=bbf_plugin
define Package/mcastmngr
CATEGORY:=Utilities
TITLE:=Multicast Proxy/Snooping Manager
DEPENDS:=+!TARGET_brcmbca:mcproxy +libuci +libubox +libubus +libblobmsg-json
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json
DEPENDS+=+!TARGET_brcmbca:mcproxy +!TARGET_brcmbca:sipcalc
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +!TARGET_brcmbca:kmod-ebt-igmpsnooping +!TARGET_brcmbca:kmod-ebt-mldsnooping
DEPENDS+=+!TARGET_brcmbca:ebtables-legacy +bridgemngr
endef
define Package/mcastmngr/description
Configures IGMP and MLD snooping and proxy
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/mcastmngr/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
ifeq ($(CONFIG_MCASTMNGR_VENDOR_PREFIX),"")
VENDOR_PREFIX = $(CONFIG_BBF_VENDOR_PREFIX)
else
VENDOR_PREFIX = $(CONFIG_MCASTMNGR_VENDOR_PREFIX)
endif
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(VENDOR_PREFIX)\\\"
define Package/mcastmngr/install
$(CP) ./files/common/* $(1)/
@@ -52,6 +64,7 @@ ifneq ($(CONFIG_TARGET_brcmbca),)
else
$(CP) ./files/linux/* $(1)/
endif
$(BBFDM_REGISTER_SERVICES) -v ${VENDOR_PREFIX} ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/bbf_plugin/libmcast_bbf.so $(1) $(PKG_NAME)
endef

View File

@@ -0,0 +1,20 @@
{
"daemon": {
"enable": "1",
"service_name": "mcastmngr",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "{BBF_VENDOR_PREFIX}IGMP"
},
{
"parent_dm": "Device.",
"object": "{BBF_VENDOR_PREFIX}MLD"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -251,3 +251,7 @@ configure_mcast() {
configure_mcpd
}
validate_params() {
return 0
}

View File

@@ -33,6 +33,10 @@ start_service() {
configure_mcast
fi
if ! validate_params; then
return
fi
if [ -z "${PROG_PARAMS}" ]; then
start_mcast_service
else

View File

@@ -9,6 +9,7 @@ CONFFILE=
PROG_EXE=/usr/sbin/mcproxy
PROG_PARAMS=
PROG_PARAMS_SEPARATOR=:
readonly WANPORT="$(jsonfilter -i /etc/board.json -e @.network.wan.device)"
snooping_bridges=
@@ -89,9 +90,16 @@ config_mcproxy_interfaces() {
for excp in $exceptions; do
case $excp in
*/*)
ip_start="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
ip_end="$(ipcalc.sh $excp | grep BROADCAST | awk '{print substr($0,11)}')"
filter="$filter ($ip_start - $ip_end | *)"
if [ "$protocol" == "igmp" ]; then
ip_start="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
ip_end="$(ipcalc.sh $excp | grep BROADCAST | awk '{print substr($0,11)}')"
filter="$filter ($ip_start - $ip_end | *)"
elif [ "$protocol" == "mld" ]; then
output="$(sipcalc $excp | grep "Network range" -A 1 | cut -d'-' -f2 | tr '\n' ' ')"
ip_start="$(echo $output | awk '{print $1}')"
ip_end="$(echo $output | awk '{print $2}')"
filter="$filter ($ip_start - $ip_end | *)"
fi
;;
*)
filter="$filter ($excp | *)"
@@ -304,6 +312,22 @@ config_mcproxy_instance() {
[ -n $fast_leave ] &&
config_sysfs_mcast_fastleave "$downstreams" "$fast_leave"
config_sysfs_mcast_flood "$downstreams" "$mcast_mode"
for iface in $downstreams; do
if device_is_bridge "$iface"; then
if [ "${protocol}" = "mld" ]; then
ebtables -t broute -I mcsnooping -s Unicast -d 33:33:00:00:00:00/ff:ff:00:00:00:00 --logical-in ${iface} ! -i "${WANPORT}+" --mld-snooping
elif [ "${protocol}" = "igmp" ]; then
ebtables -t broute -I mcsnooping -s Unicast -d 01:00:5e:00:00:00/ff:ff:ff:00:00:00 --logical-in ${iface} ! -i "${WANPORT}+" --igmp-snooping
fi
else
if [ "${protocol}" = "mld" ]; then
ebtables -t broute -I mcsnooping -s Unicast -d 33:33:00:00:00:00/ff:ff:00:00:00:00 -i ${iface} --mld-snooping
elif [ "${protocol}" = "igmp" ]; then
ebtables -t broute -I mcsnooping -s Unicast -d 01:00:5e:00:00:00/ff:ff:ff:00:00:00 -i ${iface} --igmp-snooping
fi
fi
done
fi
PROG_PARAMS="${PROG_PARAMS} -f ${CONFFILE}${PROG_PARAMS_SEPARATOR}"
@@ -317,6 +341,12 @@ disable_snooping_iface() {
disable_snooping() {
config_load network
config_foreach disable_snooping_iface device
ebtables --concurrent -t broute -F mcsnooping
# Clean up populated /procfs entries
rmmod ebt_igmpsnooping 2> /dev/null #Loaded on demand
rmmod ebt_mldsnooping 2> /dev/null #Loaded on demand
}
config_snooping() {
@@ -388,6 +418,14 @@ config_snooping() {
[ -n "$q_resp_interval" ] && config_sysfs_mcast_q_resp_interval "$interfaces" "$q_resp_interval"
[ -n "$last_mem_q_int" ] && config_sysfs_mcast_last_mem_q_int "$interfaces" "$last_mem_q_int"
[ -n "$fast_leave" ] && config_sysfs_mcast_fastleave "$interfaces" "$fast_leave"
for iface in $snooping_bridges; do
if [ "${protocol}" = "mld" ]; then
ebtables -t broute -I mcsnooping -s Unicast -d 33:33:00:00:00:00/ff:ff:00:00:00:00 --logical-in ${iface} ! -i "${WANPORT}+" --mld-snooping
elif [ "${protocol}" = "igmp" ]; then
ebtables -t broute -I mcsnooping -s Unicast -d 01:00:5e:00:00:00/ff:ff:ff:00:00:00 --logical-in ${iface} ! -i "${WANPORT}+" --igmp-snooping
fi
done
}
config_mcproxy() {
@@ -418,3 +456,9 @@ configure_mcast() {
read_mcast_proxy_params
config_mcproxy
}
validate_params() {
[ -n "${PROG_PARAMS}" ] && return 0
return 1
}

View File

@@ -5,61 +5,11 @@
readonly TEMPFILE="/tmp/snooping_stats_"$$
mcast_snooping_interface() {
local interface intf gip vid port
config_get interface "$1" interface
for intf in $interface; do
[ -z "$(bridge mdb show dev "$intf" 2> /dev/null | grep -v -F "port ${intf} " | xargs)" ] && continue
json_add_object ""
json_add_string "interface" "$intf"
json_add_array "groups"
for gip in $(bridge mdb show dev "$intf" | grep -v -F "port ${intf} " | cut -f6 -d' ' | sort -u | xargs); do
json_add_object ""
json_add_string "groupaddr" "$gip"
json_add_array "clients"
for port in $(bridge mdb show dev "$intf" | grep -v -F "port ${intf} " | grep -F "grp ${gip} " | cut -f4 -d' ' | sort -u | xargs); do
json_add_object ""
json_add_string "device" "$port"
for vid in $(bridge mdb show dev "$intf" | grep -F "port ${port} grp ${gip} " | grep -F ' vid ' | cut -f9 -d' ' | sort -u | xargs); do
json_add_object ""
json_add_string "vid" "$vid"
json_close_object #close the associated vid object
done
json_close_object #close the associated device object
done
json_close_array #close the associated devices array
json_close_object # close the groups object
done # close the loop for group addresses
json_close_array #close the groups array
json_close_object # close the snooping object
done # close the loop for interfaces
}
meld_files() {
local type="$1"
local snooping_stats="/tmp/${type}_snooping_stats"
local old_mod_time=$(date +%s 2>/dev/null -r "$snooping_stats")
# Sending signal to mcproxy to dump multicast data in /tmp/${type}_snooping_stats
local mcast_pids=$(pidof mcproxy)
for pid in $mcast_pids
do
$(kill -10 $pid)
done
# Wait for signal is being processed by mcproxy
if [ -n "$mcast_pids" ]; then
for i in 1 2 3; do
local new_mod_time=$(date +%s 2>/dev/null -r "$snooping_stats")
[ -n "$new_mod_time" ] && [ "$new_mod_time" != "$old_mod_time" ] && break
sleep 0.1
done
fi
[ ! -e "$snooping_stats" ] && return 0
cat "$snooping_stats" >> "$TEMPFILE"
tail -n +2 "/proc/net/${type}_snooping" >> "$TEMPFILE"
}
read_snooping_file() {
@@ -98,7 +48,8 @@ read_snooping_file() {
case $line in
br-*)
found_ip=0
grp_ip="$(echo $line | awk -F ' ' '{ print $2 }')"
grp_ip="$(echo $line | awk -F ' ' '{ print $7 }')"
if [ -z "$mcast_addrs" ]; then
mcast_addrs="$grp_ip"
continue
@@ -136,7 +87,7 @@ read_snooping_file() {
if [ "$snoop_iface" != "$intf" ]; then
continue
fi
grp_ip="$(echo $line | awk -F ' ' '{ print $2 }')"
grp_ip="$(echo $line | awk -F ' ' '{ print $7 }')"
if [ "$grp_ip" != "$gip_addr" ]; then
continue
fi
@@ -145,7 +96,7 @@ read_snooping_file() {
if [ -n "$(echo $gip_addr | grep -oE "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$")" ]; then
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
else
gip="$(echo $gip_addr | grep -oE '^([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}$')"
gip="$(sipcalc -6 "$gip_addr" | awk '/^Compressed address/{print $4}')"
fi
json_add_string "groupaddr" "$gip"
json_add_array "clients"
@@ -153,16 +104,16 @@ read_snooping_file() {
fi
json_add_object ""
host_ip="$(echo $line | awk -F ' ' '{ print $3 }')"
host_ip="$(echo $line | awk -F ' ' '{ print $8 }')"
if [ -n "$(echo $host_ip | grep -oE "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$")" ]; then
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
else
h_ip="$(echo $host_ip | grep -oE '^([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}$')"
h_ip="$(sipcalc -6 "$host_ip" | awk '/^Compressed address/{print $4}')"
fi
json_add_string "ipaddr" "$h_ip"
src_port="$(echo $line | awk -F ' ' '{ print $4 }')"
src_port="$(echo $line | awk -F ' ' '{ print $2 }')"
json_add_string "device" "$src_port"
timeout="$(echo $line | awk -F ' ' '{ print $5 }')"
timeout="$(echo $line | awk -F ' ' '{ print $9 }')"
json_add_int "timeout" "$timeout"
json_close_object #close the associated device object
;;
@@ -186,9 +137,6 @@ read_mcast_stats() {
meld_files "igmp"
meld_files "mld"
read_snooping_file
# L2 Snooping goes here
config_load mcast
config_foreach mcast_snooping_interface "snooping"
json_close_array # close the snooping array
json_dump

View File

@@ -14,7 +14,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mosquitto-auth-shadow
PKG_VERSION:=1.0.0
PKG_VERSION:=1.0.1
PKG_MAINTAINER:=Erik Karlsson <erik.karlsson@genexis.eu>
PKG_LICENSE:=EPL-2.0
@@ -27,7 +27,7 @@ define Package/mosquitto-auth-shadow
SECTION:=net
CATEGORY:=Network
TITLE:=mosquitto - /etc/shadow authentication plugin
DEPENDS:=mosquitto
DEPENDS:=+mosquitto-ssl
USERID:=mosquitto=200:mosquitto=200 mosquitto=200:shadow=11
endef

30
netmngr/Config.in Normal file
View File

@@ -0,0 +1,30 @@
if PACKAGE_netmngr
config NETMNGR_GRE_OBJ
bool "Enable Device.GRE. Object"
default y
config NETMNGR_IP_OBJ
bool "Enable Device.IP. Object"
default y
config NETMNGR_ROUTING_OBJ
bool "Enable Device.Routing. Object"
default y
config NETMNGR_PPP_OBJ
bool "Enable Device.PPP. Object"
default y
config NETMNGR_ROUTER_ADVERTISEMENT_OBJ
bool "Enable Device.RouterAdvertisement. Object"
default y
config NETMNGR_IPV6RD_OBJ
bool "Enable Device.IPv6rd. Object"
default y
config NETMNGR_VENDOR_PREFIX
string "Package specific datamodel Vendor Prefix for TR181 extensions"
default ""
endif

View File

@@ -1,17 +1,17 @@
#
# Copyright (C) 2020-2024 iopsys
# Copyright (C) 2024-2025 iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=netmngr
PKG_VERSION:=1.0.7
PKG_VERSION:=1.1.3
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/netmngr.git
PKG_SOURCE_VERSION:=539c23695a086fd3d628da7b0f0de764726cfa09
PKG_SOURCE_VERSION:=f9a0e9490743c55bf7c6df02495b4dbba8c66aeb
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -33,12 +33,47 @@ define Package/netmngr/description
Package to add Network data model support.
endef
define Package/netmngr/config
source "$(SOURCE)/Config.in"
endef
MAKE_PATH:=src
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
ifeq ($(CONFIG_NETMNGR_VENDOR_PREFIX),"")
VENDOR_PREFIX = $(CONFIG_BBF_VENDOR_PREFIX)
else
VENDOR_PREFIX = $(CONFIG_NETMNGR_VENDOR_PREFIX)
endif
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(VENDOR_PREFIX)\\\"
ifeq ($(CONFIG_NETMNGR_GRE_OBJ),y)
MAKE_FLAGS += NETMNGR_GRE_OBJ=y
endif
ifeq ($(CONFIG_NETMNGR_IP_OBJ),y)
MAKE_FLAGS += NETMNGR_IP_OBJ=y
endif
ifeq ($(CONFIG_NETMNGR_ROUTING_OBJ),y)
MAKE_FLAGS += NETMNGR_ROUTING_OBJ=y
endif
ifeq ($(CONFIG_NETMNGR_PPP_OBJ),y)
MAKE_FLAGS += NETMNGR_PPP_OBJ=y
endif
ifeq ($(CONFIG_NETMNGR_ROUTER_ADVERTISEMENT_OBJ),y)
MAKE_FLAGS += NETMNGR_ROUTER_ADVERTISEMENT_OBJ=y
endif
ifeq ($(CONFIG_NETMNGR_IPV6RD_OBJ),y)
MAKE_FLAGS += NETMNGR_IPV6RD_OBJ=y
endif
define Package/netmngr/install
$(BBFDM_INSTALL_MS_DM) -u Network $(PKG_BUILD_DIR)/src/libnetmngr.so $(1) $(PKG_NAME)
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libnetmngr.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_CORE_PLUGIN) $(PKG_BUILD_DIR)/src/libinterface_stack.so $(1)
endef

View File

@@ -0,0 +1,36 @@
{
"daemon": {
"enable": "1",
"service_name": "netmngr",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "IP"
},
{
"parent_dm": "Device.",
"object": "GRE"
},
{
"parent_dm": "Device.",
"object": "PPP"
},
{
"parent_dm": "Device.",
"object": "Routing"
},
{
"parent_dm": "Device.",
"object": "RouterAdvertisement"
},
{
"parent_dm": "Device.",
"object": "IPv6rd"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -1,3 +1,4 @@
if PACKAGE_obuspa
config OBUSPA_MTP_ENABLE_MQTT
bool "Enable MQTT as mtp protocol"
default y
@@ -57,8 +58,12 @@ config OBUSPA_SESSION_EXTENSION
config OBUSPA_CWMP_DATAMODEL_SUPPORT
bool "Adds USPAgent, STOMP and MQTT dm from CWMP"
default n
default y
help
Expose Device.USPAgent., Device.STOMP., Device.MQTT.Client. objects over
ubus to make it available to bbfdm for CWMP access
config OBUSPA_VENDOR_PREFIX
string "Package specific datamodel Vendor Prefix for TR181 extensions"
default ""
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=9.0.0.18
PKG_VERSION:=9.0.4.4
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
PKG_SOURCE_VERSION:=91f9882651de301153060dfe0784859d849aa809
PKG_SOURCE_VERSION:=1e5638d104075741a62d777ea9a2c508740c3634
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -50,9 +50,16 @@ TARGET_CFLAGS += \
-D_GNU_SOURCE \
-DHAVE_STRERROR_R \
-Wall \
-D_DM_VENDOR_PREFIX=$(CONFIG_BBF_VENDOR_PREFIX) \
-Werror
ifeq ($(CONFIG_OBUSPA_VENDOR_PREFIX),"")
VENDOR_PREFIX = $(CONFIG_BBF_VENDOR_PREFIX)
else
VENDOR_PREFIX = $(CONFIG_OBUSPA_VENDOR_PREFIX)
endif
TARGET_CFLAGS += -D_DM_VENDOR_PREFIX=$(VENDOR_PREFIX)
CMAKE_OPTIONS += -DCMAKE_INSTALL_PREFIX=/tmp
CMAKE_OPTIONS += -DCMAKE_INSTALL_LOCALSTATEDIR=""
@@ -96,7 +103,7 @@ ifeq ($(CONFIG_OBUSPA_SESSION_EXTENSION),y)
TARGET_CFLAGS += -DOBUSPA_ENABLE_SESSION_EXT
endif
ifdef $(CONFIG_OBUSPA_MAX_CONTROLLERS_NUM)
ifneq ($(CONFIG_OBUSPA_MAX_CONTROLLERS_NUM),)
TARGET_CFLAGS += -DOBUSPA_MAX_CONTROLLERS_NUM=$(CONFIG_OBUSPA_MAX_CONTROLLERS_NUM)
endif
@@ -120,7 +127,7 @@ define Package/obuspa/install
$(INSTALL_DATA) ./files/etc/config/obuspa $(1)/etc/config/
$(INSTALL_DATA) ./files/etc/users/roles/*.json $(1)/etc/users/roles/
$(INSTALL_DATA) ./files/etc/obuspa/usp_utils.sh $(1)/etc/obuspa/
echo "$(CONFIG_BBF_VENDOR_PREFIX)" > $(1)/etc/obuspa/vendor_prefix
echo "$(VENDOR_PREFIX)" > $(1)/etc/obuspa/vendor_prefix
$(INSTALL_BIN) ./files/etc/uci-defaults/01-fix-upgrade-uci $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/60-generate-ctrust-defaults $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/obuspa-set-dhcp-option $(1)/etc/uci-defaults/
@@ -128,6 +135,7 @@ define Package/obuspa/install
$(INSTALL_BIN) ./files/etc/firewall.usp $(1)/etc/
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_obuspa_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_obuspa_opt125.user
ifeq ($(CONFIG_OBUSPA_CWMP_DATAMODEL_SUPPORT),y)
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/libuspagentdm.so $(1) $(PKG_NAME)
endif
ifeq ($(CONFIG_OBUSPA_ENABLE_TEST_CONTROLLER),y)

9
obuspa/Readme.md Normal file
View File

@@ -0,0 +1,9 @@
# Obuspa patch management
As a part of obuspa integration, patch files used to manage changes in obuspa core files.
| Patch series | Remarks |
| ------------ | ------- |
| 00 - series | Up-streamable features/bugs |
| 10 - series | ubus-integration optimizations |
| 20 - series | deployment specific |

27
obuspa/bbfdm_service.json Normal file
View File

@@ -0,0 +1,27 @@
{
"daemon": {
"enable": "1",
"service_name": "obuspa",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "USPAgent",
"proto": "cwmp"
},
{
"parent_dm": "Device.",
"object": "MQTT",
"proto": "cwmp"
},
{
"parent_dm": "Device.",
"object": "STOMP",
"proto": "cwmp"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -11,4 +11,5 @@ config obuspa 'global'
#option trust_cert '/etc/obuspa/ca.pem'
#option client_cert '/etc/obuspa/client.pem'
#option log_dest '/tmp/obuspa.log'
option dm_caching_exclude '/etc/obuspa/transient_dm.json'

View File

@@ -11,7 +11,7 @@ add_usp_test()
{
uci_add mosquitto listener usptest
uci_set mosquitto usptest enabled 1
uci_set mosquitto usptest port '9001'
uci_set mosquitto usptest port '9004'
uci_set mosquitto usptest protocol 'websockets'
uci_set mosquitto usptest auth_plugin '/usr/lib/mosquitto_auth_shadow.so'
}

View File

@@ -1,6 +1,8 @@
--- a/src/core/device_controller.c
+++ b/src/core/device_controller.c
@@ -4282,6 +4282,14 @@ int ProcessControllerAdded(int cont_inst
Index: obuspa-9.0.0.25/src/core/device_controller.c
===================================================================
--- obuspa-9.0.0.25.orig/src/core/device_controller.c
+++ obuspa-9.0.0.25/src/core/device_controller.c
@@ -4210,6 +4210,14 @@ int ProcessControllerAdded(int cont_inst
goto exit;
}
@@ -15,7 +17,7 @@
// Exit if unable to get the object instance numbers present in this controller's MTP table
USP_SNPRINTF(path, sizeof(path), "%s.%d.MTP", device_cont_root, cont_instance);
err = DATA_MODEL_GetInstances(path, &iv);
@@ -4323,14 +4331,6 @@ int ProcessControllerAdded(int cont_inst
@@ -4251,14 +4259,6 @@ int ProcessControllerAdded(int cont_inst
DEVICE_MQTT_UpdateControllerTopics();
#endif

View File

@@ -1,13 +0,0 @@
--- a/src/core/cli_server.c
+++ b/src/core/cli_server.c
@@ -785,10 +785,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);

View File

@@ -1,18 +1,21 @@
diff --git a/src/core/bdc_exec.c b/src/core/bdc_exec.c
index dc30a98..6a2938b 100644
--- a/src/core/bdc_exec.c
+++ b/src/core/bdc_exec.c
@@ -548,11 +548,19 @@ int StartSendingReport(bdc_connection_t
@@ -548,10 +548,25 @@ int StartSendingReport(bdc_connection_t *bc)
// Set the list of headers
bc->headers = NULL;
- bc->headers = curl_slist_append(bc->headers, "Content-Type: application/json; charset=UTF-8");
- if (bc->flags & BDC_FLAG_HEADER_OBJ_HIER)
- bc->headers = curl_slist_append(bc->headers, "BBF-Report-Format: NameValuePair");
+
+
+ if (bc->flags & BDC_FLAG_HEADER_OBJ_HIER) {
+ bc->headers = curl_slist_append(bc->headers, "Content-Type: application/json; charset=UTF-8");
bc->headers = curl_slist_append(bc->headers, "BBF-Report-Format: ObjectHierarchy");
- else
+ bc->headers = curl_slist_append(bc->headers, "BBF-Report-Format: ObjectHierarchy");
+ } else if (bc->flags & BDC_FLAG_HEADER_NAME_VAL) {
+ bc->headers = curl_slist_append(bc->headers, "Content-Type: application/json; charset=UTF-8");
bc->headers = curl_slist_append(bc->headers, "BBF-Report-Format: NameValuePair");
+ bc->headers = curl_slist_append(bc->headers, "BBF-Report-Format: NameValuePair");
+ } else if (bc->flags & BDC_FLAG_HEADER_PER_COL) {
+ bc->headers = curl_slist_append(bc->headers, "Content-Type: text/csv; charset=UTF-8");
+ bc->headers = curl_slist_append(bc->headers, "BBF-Report-Format: ParameterPerColumn");
@@ -20,59 +23,69 @@
+ bc->headers = curl_slist_append(bc->headers, "Content-Type: text/csv; charset=UTF-8");
+ bc->headers = curl_slist_append(bc->headers, "BBF-Report-Format: ParameterPerRow");
+ }
+
if (bc->flags & BDC_FLAG_GZIP)
{
+ curl_easy_setopt(curl_ctx, CURLOPT_ACCEPT_ENCODING, "gzip");
bc->headers = curl_slist_append(bc->headers, "Content-Encoding: gzip");
}
diff --git a/src/core/bdc_exec.h b/src/core/bdc_exec.h
index 8c259c5..6322221 100644
--- a/src/core/bdc_exec.h
+++ b/src/core/bdc_exec.h
@@ -53,6 +53,9 @@ void BDC_EXEC_ScheduleExit(void);
@@ -53,6 +53,8 @@ void BDC_EXEC_ScheduleExit(void);
#define BDC_FLAG_PUT 0x00000001 // If set, HTTP PUT should be used instead of HTTP POST when sending the report to the BDC server
#define BDC_FLAG_GZIP 0x00000002 // If set, the reports contants are Gzipped
#define BDC_FLAG_DATE_HEADER 0x00000004 // If set, the date header should be included in the HTTP post.
-#define BDC_FLAG_HEADER_OBJ_HIER 0x00000008 // If set, report format in header would be ObjectHierarchy otherwise NameValuePair
-
-
+#define BDC_FLAG_HEADER_OBJ_HIER 0x00000008 // If set, report format in header would be json ObjectHierarchy
+#define BDC_FLAG_HEADER_NAME_VAL 0x00000010 // If set, report format in header would be json NameValuePair
+#define BDC_FLAG_HEADER_PER_ROW 0x00000020 // If set, report format in header would be csv ParameterPerRow
+#define BDC_FLAG_HEADER_PER_COL 0x00000040 // If set, report format in header would be csv ParameterPerColumn
#endif
diff --git a/src/core/device_bulkdata.c b/src/core/device_bulkdata.c
index 915b282..f799793 100755
--- a/src/core/device_bulkdata.c
+++ b/src/core/device_bulkdata.c
@@ -70,9 +70,12 @@
@@ -70,8 +70,12 @@
//------------------------------------------------------------------------------
// Definitions for formats that we support
-#define BULKDATA_ENCODING_TYPE "JSON"
-#define BULKDATA_JSON_REPORT_FORMAT "NameValuePair"
+#define BULKDATA_ENCODING_TYPE_JSON "JSON"
+#define BULKDATA_ENCODING_TYPE_CSV "CSV"
#define BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE "NameValuePair"
#define BULKDATA_JSON_REPORT_FORMAT_OBJ_HIER "ObjectHierarchy"
+#define BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE "NameValuePair"
+#define BULKDATA_JSON_REPORT_FORMAT_OBJ_HIER "ObjectHierarchy"
+#define BULKDATA_CSV_REPORT_FORMAT_PER_COLUMN "ParameterPerColumn"
+#define BULKDATA_CSV_REPORT_FORMAT_PER_ROW "ParameterPerRow"
// Definitions for Device.BulkData.Profile.{i}.JSONEncoding.ReportTimestamp
@@ -156,6 +159,7 @@ static char *profile_push_event_args[] =
@@ -161,6 +165,7 @@ static char *profile_push_event_args[] =
typedef struct
{
int num_retained_failed_reports;
+ char encoding_type[10];
char report_timestamp[33];
char url[1025];
char username[257];
@@ -164,6 +168,11 @@ typedef struct
#ifdef ENABLE_MQTT
char mqtt_reference[254]; // relates to Device.BulkData.Profile.{i}.MQTT.Reference
char mqtt_publish_topic[254]; // relates to Device.BulkData.Profile.{i}.MQTT.PublishTopic
@@ -171,6 +176,12 @@ typedef struct
char password[257];
char compression[9];
char method[9];
bool use_date_header;
char report_format[20];
+ char report_format[20];
+ char field_separator[10];
+ char row_separator[10];
+ char escape_char[10];
+ char csv_format[20];
+ char row_timestamp[33];
bool use_date_header;
} profile_ctrl_params_t;
//------------------------------------------------------------------------------
@@ -211,6 +220,7 @@ int Validate_BulkDataEncodingType(dm_req
@@ -219,6 +230,7 @@ int Validate_BulkDataEncodingType(dm_req_t *req, char *value);
int Validate_BulkDataReportingInterval(dm_req_t *req, char *value);
int Validate_BulkDataReference(dm_req_t *req, char *value);
int Validate_BulkDataReportFormat(dm_req_t *req, char *value);
@@ -80,25 +93,26 @@
int Validate_BulkDataReportTimestamp(dm_req_t *req, char *value);
int Validate_BulkDataCompression(dm_req_t *req, char *value);
int Validate_BulkDataHTTPMethod(dm_req_t *req, char *value);
@@ -239,6 +249,8 @@ bulkdata_profile_t *bulkdata_find_profil
@@ -246,7 +258,8 @@ bulkdata_profile_t *bulkdata_find_free_profile(void);
bulkdata_profile_t *bulkdata_find_profile(int profile_id);
int bulkdata_calc_report_map(bulkdata_profile_t *bp, kv_vector_t *report_map);
int bulkdata_reduce_to_alt_name(char *spec, char *path, char *alt_name, char *out_buf, int buf_len);
char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp, char *report_format);
+char *bulkdata_generate_csv_report(bulkdata_profile_t *bp, char *field_separator, char *row_separator,
+ char *escape_char, char *csv_format, char *row_timestamp);
-char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp);
+char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp, char *report_format);
+char *bulkdata_generate_csv_report(bulkdata_profile_t *bp, char *field_separator, char *row_separator, char *escape_char, char *csv_format, char *row_timestamp);
unsigned char *bulkdata_compress_report(profile_ctrl_params_t *ctrl, char *input_buf, int input_len, int *p_output_len);
int bulkdata_schedule_sending_http_report(profile_ctrl_params_t *ctrl, bulkdata_profile_t *bp, unsigned char *json_report, int report_len);
int bulkdata_start_profile(bulkdata_profile_t *bp);
@@ -253,6 +265,8 @@ char *bulkdata_platform_calc_uri_query_s
@@ -261,6 +274,8 @@ char *bulkdata_platform_calc_uri_query_string(kv_vector_t *escaped_map);
int bulkdata_platform_get_param_refs(int profile_id, param_ref_vector_t *param_refs);
void bulkdata_expand_param_ref(param_ref_entry_t *pr, group_get_vector_t *ggv);
void bulkdata_append_to_result_map(param_ref_entry_t *pr, group_get_vector_t *ggv, kv_vector_t *report_map);
+void append_string_to_target(char *str, char **output);
+char *csv_encode(const char *str);
/*********************************************************************//**
**
@@ -285,7 +299,7 @@ int DEVICE_BULKDATA_Init(void)
#ifdef ENABLE_MQTT
int Validate_BulkDataMqttReference(dm_req_t *req, char *value);
void bulkdata_process_profile_mqtt(bulkdata_profile_t *bp);
@@ -298,7 +313,7 @@ int DEVICE_BULKDATA_Init(void)
err |= USP_REGISTER_VendorParam_ReadOnly("Device.BulkData.Status", Get_BulkDataGlobalStatus, DM_STRING);
err |= USP_REGISTER_Param_Constant("Device.BulkData.MinReportingInterval", BULKDATA_MINIMUM_REPORTING_INTERVAL_STR, DM_UINT);
err |= USP_REGISTER_Param_SupportedList("Device.BulkData.Protocols", bdc_protocols, NUM_ELEM(bdc_protocols));
@@ -107,7 +121,7 @@
err |= USP_REGISTER_Param_Constant("Device.BulkData.ParameterWildCardSupported", "true", DM_BOOL);
err |= USP_REGISTER_Param_Constant("Device.BulkData.MaxNumberOfProfiles", BULKDATA_MAX_PROFILES_STR, DM_INT);
err |= USP_REGISTER_Param_Constant("Device.BulkData.MaxNumberOfParameterReferences", "-1", DM_INT);
@@ -300,7 +314,7 @@ int DEVICE_BULKDATA_Init(void)
@@ -313,7 +328,7 @@ int DEVICE_BULKDATA_Init(void)
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.Name", "", NULL, NULL, DM_STRING);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.NumberOfRetainedFailedReports", "0", Validate_NumberOfRetainedFailedReports, NULL, DM_INT);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.Protocol", BULKDATA_PROTOCOL_HTTP, Validate_BulkDataProtocol, NULL, DM_STRING);
@@ -116,8 +130,12 @@
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.ReportingInterval", "86400", Validate_BulkDataReportingInterval, NotifyChange_BulkDataReportingInterval, DM_UINT);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.TimeReference", UNKNOWN_TIME_STR, NULL, NotifyChange_BulkDataTimeReference, DM_DATETIME);
@@ -315,6 +329,13 @@ int DEVICE_BULKDATA_Init(void)
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.JSONEncoding.ReportFormat", BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE, Validate_BulkDataReportFormat, NULL, DM_STRING);
@@ -325,9 +340,16 @@ int DEVICE_BULKDATA_Init(void)
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.Parameter.{i}.Reference", "", Validate_BulkDataReference, NULL, DM_STRING);
// Device.BulkData.Profile.{i}.JSONEncoding
- err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.JSONEncoding.ReportFormat", BULKDATA_JSON_REPORT_FORMAT, Validate_BulkDataReportFormat, NULL, DM_STRING);
+ err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.JSONEncoding.ReportFormat", BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE, Validate_BulkDataReportFormat, NULL, DM_STRING);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.JSONEncoding.ReportTimestamp", BULKDATA_JSON_TIMESTAMP_FORMAT_EPOCH, Validate_BulkDataReportTimestamp, NULL, DM_STRING);
+ // Device.BulkData.Profile.{i}.CSVEncoding
@@ -130,23 +148,37 @@
// Device.BulkData.Profile.{i}.HTTP
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.HTTP.URL", "", NULL, NotifyChange_BulkDataURL, DM_STRING);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.HTTP.Username", "", NULL, NULL, DM_STRING);
@@ -594,9 +615,10 @@ int Validate_BulkDataProtocol(dm_req_t *
@@ -613,9 +635,10 @@ int Validate_BulkDataProtocol(dm_req_t *req, char *value)
int Validate_BulkDataEncodingType(dm_req_t *req, char *value)
{
// Exit if trying to set a value outside of the range we accept
- if (strcmp(value, BULKDATA_ENCODING_TYPE) != 0)
+ if (strcmp(value, BULKDATA_ENCODING_TYPE_JSON) != 0 && strcmp(value, BULKDATA_ENCODING_TYPE_CSV) != 0)
{
- {
- USP_ERR_SetMessage("%s: Only EncodingType supported is '%s'", __FUNCTION__, BULKDATA_ENCODING_TYPE);
+ if (strcmp(value, BULKDATA_ENCODING_TYPE_JSON) != 0 && strcmp(value, BULKDATA_ENCODING_TYPE_CSV) != 0)
+ {
+ USP_ERR_SetMessage("%s: Only EncodingType supported are '%s,%s'", __FUNCTION__,
+ BULKDATA_ENCODING_TYPE_JSON, BULKDATA_ENCODING_TYPE_CSV);
return USP_ERR_INVALID_VALUE;
}
@@ -713,6 +735,32 @@ int Validate_BulkDataReportFormat(dm_req
/*********************************************************************//**
**
@@ -719,9 +742,36 @@ int Validate_BulkDataReference(dm_req_t *req, char *value)
int Validate_BulkDataReportFormat(dm_req_t *req, char *value)
{
// Exit if trying to set a value outside of the range we accept
- if (strcmp(value, BULKDATA_JSON_REPORT_FORMAT) != 0)
+ if (strcmp(value, BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE) != 0 &&
+ strcmp(value, BULKDATA_JSON_REPORT_FORMAT_OBJ_HIER) != 0)
+ {
+ USP_ERR_SetMessage("%s: Supported JSON Report Formats are '%s', '%s'", __FUNCTION__, BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE, BULKDATA_JSON_REPORT_FORMAT_OBJ_HIER);
+ return USP_ERR_INVALID_VALUE;
+ }
+
+ return USP_ERR_OK;
+}
+
+/*********************************************************************//**
+**
+** Validate_BulkDataCSVReportFormat
+**
+** Validates Device.BulkData.Profile.{i}.CSVEncoding.ReportFormat
@@ -162,21 +194,14 @@
+ // Exit if trying to set a value outside of the range we accept
+ if (strcmp(value, BULKDATA_CSV_REPORT_FORMAT_PER_COLUMN) != 0 &&
+ strcmp(value, BULKDATA_CSV_REPORT_FORMAT_PER_ROW) != 0)
+ {
{
- USP_ERR_SetMessage("%s: Only JSON Report Format supported is '%s'", __FUNCTION__, BULKDATA_JSON_REPORT_FORMAT);
+ USP_ERR_SetMessage("%s: Only JSON Report Format supported are '%s', '%s'", __FUNCTION__,
+ BULKDATA_CSV_REPORT_FORMAT_PER_COLUMN, BULKDATA_CSV_REPORT_FORMAT_PER_ROW);
+ return USP_ERR_INVALID_VALUE;
+ }
+
+ return USP_ERR_OK;
+}
+
+/*********************************************************************//**
+**
** Validate_BulkDataReportTimestamp
**
** Validates Device.BulkData.Profile.{i}.JSONEncoding.ReportTimestamp
@@ -2004,6 +2052,14 @@ int bulkdata_platform_get_profile_contro
return USP_ERR_INVALID_VALUE;
}
@@ -2052,6 +2102,14 @@ int bulkdata_platform_get_profile_control_params(bulkdata_profile_t *bp, profile
return err;
}
@@ -191,7 +216,7 @@
// Exit if unable to get ReportTimestamp
USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.JSONEncoding.ReportTimestamp", bp->profile_id);
err = DATA_MODEL_GetParameterValue(path, ctrl_params->report_timestamp, sizeof(ctrl_params->report_timestamp), 0);
@@ -2020,6 +2076,46 @@ int bulkdata_platform_get_profile_contro
@@ -2060,6 +2118,54 @@ int bulkdata_platform_get_profile_control_params(bulkdata_profile_t *bp, profile
return err;
}
@@ -235,10 +260,18 @@
+ return err;
+ }
+
return USP_ERR_OK;
}
@@ -2256,7 +2352,7 @@ void bulkdata_process_profile_http(bulkd
+ // Exit if unable to get ReportFormat
+ USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.JSONEncoding.ReportFormat", bp->profile_id);
+ err = DATA_MODEL_GetParameterValue(path, ctrl_params->report_format, sizeof(ctrl_params->report_format), 0);
+ if (err != USP_ERR_OK)
+ {
+ return err;
+ }
+
#ifdef ENABLE_MQTT
{
char protocol[32];
@@ -2333,7 +2439,7 @@ void bulkdata_process_profile_http(bulkdata_profile_t *bp)
{
int err;
report_t *cur_report;
@@ -247,11 +280,11 @@
profile_ctrl_params_t ctrl;
unsigned char *compressed_report;
int compressed_len;
@@ -2295,10 +2391,23 @@ void bulkdata_process_profile_http(bulkd
@@ -2372,10 +2478,23 @@ void bulkdata_process_profile_http(bulkdata_profile_t *bp)
}
// Exit if unable to generate the report
- json_report = bulkdata_generate_json_report(bp, ctrl.report_timestamp, ctrl.report_format);
- json_report = bulkdata_generate_json_report(bp, ctrl.report_timestamp);
- if (json_report == NULL)
- {
- USP_ERR_SetMessage("%s: bulkdata_generate_json_report failed", __FUNCTION__);
@@ -275,7 +308,7 @@
return;
}
@@ -2307,14 +2416,14 @@ void bulkdata_process_profile_http(bulkd
@@ -2384,14 +2503,14 @@ void bulkdata_process_profile_http(bulkdata_profile_t *bp)
USP_LOG_Info("BULK DATA: using compression method=%s", ctrl.compression);
if (enable_protocol_trace)
{
@@ -294,15 +327,15 @@
}
// NOTE: From this point on, only the compressed_report exists
@@ -2344,9 +2453,15 @@ void bulkdata_process_profile_usp_event(
@@ -2421,8 +2540,15 @@ void bulkdata_process_profile_usp_event(bulkdata_profile_t *bp)
kv_vector_t event_args;
kv_pair_t kv;
report_t *cur_report;
- char *json_report;
char report_timestamp[33];
+ char report_format[20];
+ char *report;
+ char encoding_type[10] = {0};
char report_timestamp[33] = {0};
char report_format[20] = {0};
+ char field_separator[10];
+ char row_separator[10];
+ char escape_char[10];
@@ -311,7 +344,7 @@
// Exit if the MTP has not been connected to successfully after bootup
// This is to prevent BDC events being enqueued before the Boot! event is sent (the Boot! event is only sent after successfully connecting to the MTP).
@@ -2355,20 +2470,62 @@ void bulkdata_process_profile_usp_event(
@@ -2431,13 +2557,63 @@ void bulkdata_process_profile_usp_event(bulkdata_profile_t *bp)
goto exit;
}
@@ -320,19 +353,15 @@
- err = DATA_MODEL_GetParameterValue(path, report_timestamp, sizeof(report_timestamp), 0);
- if (err != USP_ERR_OK)
- {
- return;
- }
+ // Exit if unable to get EncodingType
+ USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.EncodingType", bp->profile_id);
+ err = DATA_MODEL_GetParameterValue(path, encoding_type, sizeof(encoding_type), 0);
+ if (err != USP_ERR_OK) {
return;
}
- // Exit if unable to get ReportFormat
- USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.JSONEncoding.ReportFormat", bp->profile_id);
- err = DATA_MODEL_GetParameterValue(path, report_format, sizeof(report_format), 0);
- if (err != USP_ERR_OK)
- {
- return;
+ return;
+ }
+
+ if (strcmp(encoding_type, BULKDATA_ENCODING_TYPE_JSON) == 0) {
+ // Exit if unable to get ReportTimestamp
+ USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.JSONEncoding.ReportTimestamp", bp->profile_id);
@@ -382,15 +411,14 @@
+ if (err != USP_ERR_OK) {
+ return;
+ }
}
+ }
// When sending via USP events, only one report is ever sent in each USP event
@@ -2388,10 +2545,16 @@ void bulkdata_process_profile_usp_event(
// So ensure all retained reports are removed. NOTE: Clearing the reports here is only necessary when switching protocol from HTTP to USP event, and where HTTP had some unsent reports
@@ -2455,11 +2631,17 @@ void bulkdata_process_profile_usp_event(bulkdata_profile_t *bp)
}
bp->num_retained_reports = 1;
// Exit if unable to generate the report
- json_report = bulkdata_generate_json_report(bp, report_timestamp, report_format);
- if (json_report == NULL)
+ if (strcmp(encoding_type, BULKDATA_ENCODING_TYPE_JSON) == 0) {
+ report = bulkdata_generate_json_report(bp, report_timestamp, report_format);
+ } else {
@@ -398,14 +426,17 @@
+ csv_format, row_timestamp);
+ }
+
// Exit if unable to generate the report
- json_report = bulkdata_generate_json_report(bp, report_timestamp);
- if (json_report == NULL)
+ if (report == NULL)
{
- USP_ERR_SetMessage("%s: bulkdata_generate_json_report failed", __FUNCTION__);
+ USP_ERR_SetMessage("%s: bulkdata failed to generate report", __FUNCTION__);
+ USP_ERR_SetMessage("%s: bulkdata_generate_report failed", __FUNCTION__);
return;
}
@@ -2399,15 +2562,15 @@ void bulkdata_process_profile_usp_event(
@@ -2467,15 +2649,15 @@ void bulkdata_process_profile_usp_event(bulkdata_profile_t *bp)
// Construct event_args manually to avoid the overhead of a malloc and copy of the report in KV_VECTOR_Add()
kv.key = "Data";
@@ -424,10 +455,194 @@
// From the point of view of this code, the report(s) have been successfully sent, so don't retain them
// NOTE: Sending of the reports successfully is delegated to the USP notification retry mechanism
@@ -2869,6 +3032,319 @@ char *bulkdata_generate_json_report(bulk
@@ -2547,7 +2729,7 @@ void bulkdata_process_profile_mqtt(bulkdata_profile_t *bp)
}
/*********************************************************************//**
// Exit if unable to generate the report
- report = bulkdata_generate_json_report(bp, ctrl.report_timestamp);
+ report = bulkdata_generate_json_report(bp, ctrl.report_timestamp, ctrl.report_format);
if (report == NULL)
{
USP_ERR_SetMessage("%s: bulkdata_generate_json_report failed", __FUNCTION__);
@@ -2762,7 +2944,7 @@ int bulkdata_reduce_to_alt_name(char *spec, char *path, char *alt_name, char *ou
** \return pointer to NULL terminated dynamically allocated buffer containing the serialized report to send
**
**************************************************************************/
-char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp)
+char *bulkdata_generate_json_name_value_pair_report(bulkdata_profile_t *bp, char *report_timestamp)
{
JsonNode *top; // top of report
JsonNode *array; // array of reports (retained + current)
@@ -2867,6 +3049,483 @@ char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timesta
return result;
}
+static char *create_json_obj_hier_report(bulkdata_profile_t *bp, char *report_timestamp)
+{
+ JsonNode *top; // top of report
+ JsonNode *array; // array of reports (retained + current)
+ JsonNode *element; // element of json array, containing an individual report
+ JsonNode *temp;
+ char *param_path;
+ char *param_type_value;
+ char param_type;
+ char *param_value;
+ kv_vector_t *report_map;
+ report_t *report;
+ double value_as_number;
+ long long value_as_ll;
+ unsigned long long value_as_ull;
+ bool value_as_bool;
+ int i, j;
+ char buf[32];
+ kv_pair_t *kv;
+ int err;
+ char *result;
+
+ top = json_mkobject();
+ array = json_mkarray();
+
+ // Iterate over all reports adding them to the JSON array
+ for (i=0; i < bp->num_retained_reports; i++)
+ {
+ report = &bp->reports[i];
+ report_map = &report->report_map;
+
+ // Add Collection time to each json report element (only if specified and not 'None')
+ element = json_mkobject();
+ if (strcmp(report_timestamp, "Unix-Epoch")==0)
+ {
+ json_append_member(element, "CollectionTime", json_mknumber(report->collection_time));
+ }
+ else if (strcmp(report_timestamp, "ISO-8601")==0)
+ {
+ result = iso8601_from_unix_time(report->collection_time, buf, sizeof(buf));
+ if (result != NULL)
+ {
+ json_append_member(element, "CollectionTime", json_mkstring(buf));
+ }
+ }
+
+ temp = element;
+ // Iterate over each parameter, adding it to the json element. Take account of the parameter's type
+ for (j=0; j < report_map->num_entries; j++)
+ {
+ char buff[2056] = {0};
+ char *pch = NULL, *pchr = NULL, *argv[128] = {0};
+ int n = 0;
+
+ kv = &report_map->vector[j];
+ param_path = kv->key;
+ param_type_value = kv->value;
+ param_type = param_type_value[0]; // First character denotes the type of the parameter
+ param_value = &param_type_value[1]; // Subsequent characters contain the parameter's value
+
+ strncpy(buff, param_path, sizeof(buff));
+ for (pch = strtok_r(buff, ".", &pchr); pch != NULL; pch = strtok_r(NULL, ".", &pchr)) {
+ int idx;
+ JsonNode *obj = element;
+ argv[n] = pch;
+
+ for (idx = 0; idx <= n; idx++) {
+ if (obj == NULL)
+ break;
+ obj = json_find_member(obj, argv[idx]);
+ }
+
+ if (obj)
+ temp = obj;
+ else {
+ if (pchr != NULL && *pchr != '\0') {
+ // It is a DMOBJ
+ JsonNode *new = json_mkobject();
+ json_append_member(temp, pch, new);
+ temp = new;
+ } else {
+ // It is a DMPARAM
+ switch (param_type)
+ {
+ case 'S':
+ json_append_member(temp, pch, json_mkstring(param_value) );
+ break;
+
+ case 'U':
+ value_as_ull = strtoull(param_value, NULL, 10);
+ json_append_member(temp, pch, json_mkulonglong(value_as_ull) );
+ break;
+
+ case 'L':
+ value_as_ll = strtoll(param_value, NULL, 10);
+ json_append_member(temp, pch, json_mklonglong(value_as_ll) );
+ break;
+
+ case 'N':
+ value_as_number = atof(param_value);
+ json_append_member(temp, pch, json_mknumber(value_as_number) );
+ break;
+
+ case 'B':
+ err = TEXT_UTILS_StringToBool(param_value, &value_as_bool);
+ if (err == USP_ERR_OK)
+ {
+ json_append_member(temp, pch, json_mkbool(value_as_bool) );
+ }
+ break;
+
+ default:
+ USP_ERR_SetMessage("%s: Invalid JSON parameter type ('%c') in report map for %s", __FUNCTION__, param_type_value[0], param_path);
+ break;
+ }
+ }
+ }
+ n++;
+ }
+ }
+
+ // Add the json element to the json array
+ json_append_element(array, element);
+ }
+
+ // Finally add the array to the report top level
+ json_append_member(top, "Report", array);
+
+ // Serialize the JSON tree
+ result = json_stringify(top, " ");
+
+ // Clean up the JSON tree
+ json_delete(top); // Other JsonNodes which are children of this top level tree will be deleted
+
+ return result;
+}
+
+/*********************************************************************//**
+**
+** bulkdata_generate_json_report
+**
+** Generates a JSON name-value pair or object-hierarchy format report
+** NOTE: The report contains all retained failed reports, as well as the current report
+** See TR-157 section A.4.2 (end) for an example, and section A.3.5.2 for layout of content containing failed report transmissions
+**
+** \param bp - pointer to bulk data profile containing all reports (current and retained)
+** \param report_timestamp - value of Device.BulkData.Profile.{i}.JSONEncoding.ReportTimestamp
+**
+** \return pointer to NULL terminated dynamically allocated buffer containing the serialized report to send
+**
+**************************************************************************/
+char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp, char *report_format)
+{
+ char *result = NULL;
+
+ if (strcmp(report_format, BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE) == 0) {
+ result = bulkdata_generate_json_name_value_pair_report(bp, report_timestamp);
+ } else if (strcmp(report_format, BULKDATA_JSON_REPORT_FORMAT_OBJ_HIER) == 0) {
+ result = create_json_obj_hier_report(bp, report_timestamp);
+ }
+
+ return result;
+}
+
+/*********************************************************************//**
+**
+** safe_asprintf
+**
+** Wrapper around asprintf that calls terminate in case of error
@@ -739,18 +954,13 @@
+ return output;
+}
+
+/*********************************************************************//**
+**
** bulkdata_compress_report
/*********************************************************************//**
**
** Compresses the report to send
@@ -3020,9 +3496,18 @@ int bulkdata_schedule_sending_http_repor
** bulkdata_compress_report
@@ -3070,6 +3729,20 @@ int bulkdata_schedule_sending_http_report(profile_ctrl_params_t *ctrl, bulkdata_
flags |= BDC_FLAG_DATE_HEADER;
}
- if (strcmp(ctrl->report_format, BULKDATA_JSON_REPORT_FORMAT_OBJ_HIER) == 0)
- {
- flags |= BDC_FLAG_HEADER_OBJ_HIER;
+ if (strcmp(ctrl->encoding_type, BULKDATA_ENCODING_TYPE_JSON) == 0) {
+ if (strcmp(ctrl->report_format, BULKDATA_JSON_REPORT_FORMAT_OBJ_HIER) == 0) {
+ flags |= BDC_FLAG_HEADER_OBJ_HIER;
@@ -763,6 +973,8 @@
+ } else {
+ flags |= BDC_FLAG_HEADER_PER_ROW;
+ }
}
+ }
+
// Exit if failed to post a message to BDC thread
// NOTE: Ownership of full_url, query_string, report, username and password passes to BDC_EXEC
err = BDC_EXEC_PostReportToSend(bp->profile_id, full_url, query_string, username, password, report, report_len, flags);

View File

@@ -1,20 +0,0 @@
--- a/src/core/data_model.c
+++ b/src/core/data_model.c
@@ -160,6 +160,7 @@ int SetVendorParam(dm_node_t *node, char
double_link_t *FindLinkToFirstObject(double_linked_list_t *list);
int OverrideNodeType(dm_node_t *node, dm_node_type_t type, char *schema_path, dm_instances_t *inst);
+extern bool is_running_cli_local_command;
/*********************************************************************//**
**
** DATA_MODEL_Init
@@ -267,7 +268,9 @@ int DATA_MODEL_Init(void)
}
// Set the default values of OUI, Serial Number and (LocalAgent) EndpointID, and cache EndpointID
+ if (is_running_cli_local_command == false) {
err = DEVICE_LOCAL_AGENT_SetDefaults();
+ }
if (err != USP_ERR_OK)
{
return err;

View File

@@ -1,366 +0,0 @@
--- a/src/core/bdc_exec.c
+++ b/src/core/bdc_exec.c
@@ -549,9 +549,14 @@ int StartSendingReport(bdc_connection_t
// Set the list of headers
bc->headers = NULL;
bc->headers = curl_slist_append(bc->headers, "Content-Type: application/json; charset=UTF-8");
- bc->headers = curl_slist_append(bc->headers, "BBF-Report-Format: NameValuePair");
+ if (bc->flags & BDC_FLAG_HEADER_OBJ_HIER)
+ bc->headers = curl_slist_append(bc->headers, "BBF-Report-Format: ObjectHierarchy");
+ else
+ bc->headers = curl_slist_append(bc->headers, "BBF-Report-Format: NameValuePair");
+
if (bc->flags & BDC_FLAG_GZIP)
{
+ curl_easy_setopt(curl_ctx, CURLOPT_ACCEPT_ENCODING, "gzip");
bc->headers = curl_slist_append(bc->headers, "Content-Encoding: gzip");
}
--- a/src/core/bdc_exec.h
+++ b/src/core/bdc_exec.h
@@ -53,6 +53,6 @@ void BDC_EXEC_ScheduleExit(void);
#define BDC_FLAG_PUT 0x00000001 // If set, HTTP PUT should be used instead of HTTP POST when sending the report to the BDC server
#define BDC_FLAG_GZIP 0x00000002 // If set, the reports contants are Gzipped
#define BDC_FLAG_DATE_HEADER 0x00000004 // If set, the date header should be included in the HTTP post.
-
+#define BDC_FLAG_HEADER_OBJ_HIER 0x00000008 // If set, report format in header would be ObjectHierarchy otherwise NameValuePair
#endif
--- a/src/core/device_bulkdata.c
+++ b/src/core/device_bulkdata.c
@@ -71,7 +71,8 @@
//------------------------------------------------------------------------------
// Definitions for formats that we support
#define BULKDATA_ENCODING_TYPE "JSON"
-#define BULKDATA_JSON_REPORT_FORMAT "NameValuePair"
+#define BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE "NameValuePair"
+#define BULKDATA_JSON_REPORT_FORMAT_OBJ_HIER "ObjectHierarchy"
// Definitions for Device.BulkData.Profile.{i}.JSONEncoding.ReportTimestamp
@@ -162,6 +163,7 @@ typedef struct
char compression[9];
char method[9];
bool use_date_header;
+ char report_format[20];
} profile_ctrl_params_t;
//------------------------------------------------------------------------------
@@ -236,7 +238,7 @@ bulkdata_profile_t *bulkdata_find_free_p
bulkdata_profile_t *bulkdata_find_profile(int profile_id);
int bulkdata_calc_report_map(bulkdata_profile_t *bp, kv_vector_t *report_map);
int bulkdata_reduce_to_alt_name(char *spec, char *path, char *alt_name, char *out_buf, int buf_len);
-char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp);
+char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp, char *report_format);
unsigned char *bulkdata_compress_report(profile_ctrl_params_t *ctrl, char *input_buf, int input_len, int *p_output_len);
int bulkdata_schedule_sending_http_report(profile_ctrl_params_t *ctrl, bulkdata_profile_t *bp, unsigned char *json_report, int report_len);
int bulkdata_start_profile(bulkdata_profile_t *bp);
@@ -310,7 +312,7 @@ int DEVICE_BULKDATA_Init(void)
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.Parameter.{i}.Reference", "", Validate_BulkDataReference, NULL, DM_STRING);
// Device.BulkData.Profile.{i}.JSONEncoding
- err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.JSONEncoding.ReportFormat", BULKDATA_JSON_REPORT_FORMAT, Validate_BulkDataReportFormat, NULL, DM_STRING);
+ err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.JSONEncoding.ReportFormat", BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE, Validate_BulkDataReportFormat, NULL, DM_STRING);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.JSONEncoding.ReportTimestamp", BULKDATA_JSON_TIMESTAMP_FORMAT_EPOCH, Validate_BulkDataReportTimestamp, NULL, DM_STRING);
// Device.BulkData.Profile.{i}.HTTP
@@ -698,9 +700,11 @@ int Validate_BulkDataReference(dm_req_t
int Validate_BulkDataReportFormat(dm_req_t *req, char *value)
{
// Exit if trying to set a value outside of the range we accept
- if (strcmp(value, BULKDATA_JSON_REPORT_FORMAT) != 0)
+ if (strcmp(value, BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE) != 0 &&
+ strcmp(value, BULKDATA_JSON_REPORT_FORMAT_OBJ_HIER) != 0)
{
- USP_ERR_SetMessage("%s: Only JSON Report Format supported is '%s'", __FUNCTION__, BULKDATA_JSON_REPORT_FORMAT);
+ USP_ERR_SetMessage("%s: Only JSON Report Format supported are '%s', '%s'", __FUNCTION__,
+ BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE, BULKDATA_JSON_REPORT_FORMAT_OBJ_HIER);
return USP_ERR_INVALID_VALUE;
}
@@ -2008,6 +2012,14 @@ int bulkdata_platform_get_profile_contro
return err;
}
+ // Exit if unable to get ReportFormat
+ USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.JSONEncoding.ReportFormat", bp->profile_id);
+ err = DATA_MODEL_GetParameterValue(path, ctrl_params->report_format, sizeof(ctrl_params->report_format), 0);
+ if (err != USP_ERR_OK)
+ {
+ return err;
+ }
+
return USP_ERR_OK;
}
@@ -2283,7 +2295,7 @@ void bulkdata_process_profile_http(bulkd
}
// Exit if unable to generate the report
- json_report = bulkdata_generate_json_report(bp, ctrl.report_timestamp);
+ json_report = bulkdata_generate_json_report(bp, ctrl.report_timestamp, ctrl.report_format);
if (json_report == NULL)
{
USP_ERR_SetMessage("%s: bulkdata_generate_json_report failed", __FUNCTION__);
@@ -2333,7 +2345,8 @@ void bulkdata_process_profile_usp_event(
kv_pair_t kv;
report_t *cur_report;
char *json_report;
- char report_timestamp[33];
+ char report_timestamp[33] = {0};
+ char report_format[20] = {0};
// Exit if the MTP has not been connected to successfully after bootup
// This is to prevent BDC events being enqueued before the Boot! event is sent (the Boot! event is only sent after successfully connecting to the MTP).
@@ -2350,6 +2363,14 @@ void bulkdata_process_profile_usp_event(
return;
}
+ // Exit if unable to get ReportFormat
+ USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.JSONEncoding.ReportFormat", bp->profile_id);
+ err = DATA_MODEL_GetParameterValue(path, report_format, sizeof(report_format), 0);
+ if (err != USP_ERR_OK)
+ {
+ return;
+ }
+
// When sending via USP events, only one report is ever sent in each USP event
// So ensure all retained reports are removed. NOTE: Clearing the reports here is only necessary when switching protocol from HTTP to USP event, and where HTTP had some unsent reports
bulkdata_clear_retained_reports(bp);
@@ -2367,7 +2388,7 @@ void bulkdata_process_profile_usp_event(
bp->num_retained_reports = 1;
// Exit if unable to generate the report
- json_report = bulkdata_generate_json_report(bp, report_timestamp);
+ json_report = bulkdata_generate_json_report(bp, report_timestamp, report_format);
if (json_report == NULL)
{
USP_ERR_SetMessage("%s: bulkdata_generate_json_report failed", __FUNCTION__);
@@ -2579,21 +2600,7 @@ int bulkdata_reduce_to_alt_name(char *sp
return USP_ERR_OK;
}
-/*********************************************************************//**
-**
-** bulkdata_generate_json_report
-**
-** Generates a JSON name-value pair format report
-** NOTE: The report contains all retained failed reports, as well as the current report
-** See TR-157 section A.4.2 (end) for an example, and section A.3.5.2 for layout of content containing failed report transmissions
-**
-** \param bp - pointer to bulk data profile containing all reports (current and retained)
-** \param report_timestamp - value of Device.BulkData.Profile.{i}.JSONEncoding.ReportTimestamp
-**
-** \return pointer to NULL terminated dynamically allocated buffer containing the serialized report to send
-**
-**************************************************************************/
-char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp)
+static char *create_json_name_value_pair_report(bulkdata_profile_t *bp, char *report_timestamp)
{
JsonNode *top; // top of report
JsonNode *array; // array of reports (retained + current)
@@ -2608,7 +2615,6 @@ char *bulkdata_generate_json_report(bulk
long long value_as_ll;
unsigned long long value_as_ull;
bool value_as_bool;
- char *result;
int i, j;
char buf[32];
kv_pair_t *kv;
@@ -2631,7 +2637,7 @@ char *bulkdata_generate_json_report(bulk
}
else if (strcmp(report_timestamp, "ISO-8601")==0)
{
- result = iso8601_from_unix_time(report->collection_time, buf, sizeof(buf));
+ char *result = iso8601_from_unix_time(report->collection_time, buf, sizeof(buf));
if (result != NULL)
{
json_append_member(element, "CollectionTime", json_mkstring(buf));
@@ -2690,11 +2696,174 @@ char *bulkdata_generate_json_report(bulk
json_append_member(top, "Report", array);
// Serialize the JSON tree
- result = json_stringify(top, " ");
+ char *output = json_stringify(top, " ");
// Clean up the JSON tree
json_delete(top); // Other JsonNodes which are children of this top level tree will be deleted
+ return output;
+}
+
+static char *create_json_obj_hier_report(bulkdata_profile_t *bp, char *report_timestamp)
+{
+ JsonNode *top; // top of report
+ JsonNode *array; // array of reports (retained + current)
+ JsonNode *element; // element of json array, containing an individual report
+ JsonNode *temp;
+ char *param_path;
+ char *param_type_value;
+ char param_type;
+ char *param_value;
+ kv_vector_t *report_map;
+ report_t *report;
+ double value_as_number;
+ long long value_as_ll;
+ unsigned long long value_as_ull;
+ bool value_as_bool;
+ int i, j;
+ char buf[32];
+ kv_pair_t *kv;
+ int err;
+
+ top = json_mkobject();
+ array = json_mkarray();
+
+ // Iterate over all reports adding them to the JSON array
+ for (i=0; i < bp->num_retained_reports; i++)
+ {
+ report = &bp->reports[i];
+ report_map = &report->report_map;
+
+ // Add Collection time to each json report element (only if specified and not 'None')
+ element = json_mkobject();
+ if (strcmp(report_timestamp, "Unix-Epoch")==0)
+ {
+ json_append_member(element, "CollectionTime", json_mknumber(report->collection_time));
+ }
+ else if (strcmp(report_timestamp, "ISO-8601")==0)
+ {
+ char *result = iso8601_from_unix_time(report->collection_time, buf, sizeof(buf));
+ if (result != NULL)
+ {
+ json_append_member(element, "CollectionTime", json_mkstring(buf));
+ }
+ }
+
+ temp = element;
+ // Iterate over each parameter, adding it to the json element. Take account of the parameter's type
+ for (j=0; j < report_map->num_entries; j++)
+ {
+ char buff[2056] = {0};
+ char *pch = NULL, *pchr = NULL, *argv[128] = {0};
+ int n = 0;
+
+ kv = &report_map->vector[j];
+ param_path = kv->key;
+ param_type_value = kv->value;
+ param_type = param_type_value[0]; // First character denotes the type of the parameter
+ param_value = &param_type_value[1]; // Subsequent characters contain the parameter's value
+
+ strncpy(buff, param_path, sizeof(buff));
+ for (pch = strtok_r(buff, ".", &pchr); pch != NULL; pch = strtok_r(NULL, ".", &pchr)) {
+ int idx;
+ JsonNode *obj = element;
+ argv[n] = pch;
+
+ for (idx = 0; idx <= n; idx++) {
+ if (obj == NULL)
+ break;
+ obj = json_find_member(obj, argv[idx]);
+ }
+
+ if (obj)
+ temp = obj;
+ else {
+ if (pchr != NULL && *pchr != '\0') {
+ // It is a DMOBJ
+ JsonNode *new = json_mkobject();
+ json_append_member(temp, pch, new);
+ temp = new;
+ } else {
+ // It is a DMPARAM
+ switch (param_type)
+ {
+ case 'S':
+ json_append_member(temp, pch, json_mkstring(param_value) );
+ break;
+
+ case 'U':
+ value_as_ull = strtoull(param_value, NULL, 10);
+ json_append_member(temp, pch, json_mkulonglong(value_as_ull) );
+ break;
+
+ case 'L':
+ value_as_ll = strtoll(param_value, NULL, 10);
+ json_append_member(temp, pch, json_mklonglong(value_as_ll) );
+ break;
+
+ case 'N':
+ value_as_number = atof(param_value);
+ json_append_member(temp, pch, json_mknumber(value_as_number) );
+ break;
+
+ case 'B':
+ err = TEXT_UTILS_StringToBool(param_value, &value_as_bool);
+ if (err == USP_ERR_OK)
+ {
+ json_append_member(temp, pch, json_mkbool(value_as_bool) );
+ }
+ break;
+
+ default:
+ USP_ERR_SetMessage("%s: Invalid JSON parameter type ('%c') in report map for %s", __FUNCTION__, param_type_value[0], param_path);
+ break;
+ }
+ }
+ }
+ n++;
+ }
+ }
+
+ // Add the json element to the json array
+ json_append_element(array, element);
+ }
+
+ // Finally add the array to the report top level
+ json_append_member(top, "Report", array);
+
+ // Serialize the JSON tree
+ char *output = json_stringify(top, " ");
+
+ // Clean up the JSON tree
+ json_delete(top); // Other JsonNodes which are children of this top level tree will be deleted
+
+ return output;
+}
+
+/*********************************************************************//**
+**
+** bulkdata_generate_json_report
+**
+** Generates a JSON name-value pair or object-hierarchy format report
+** NOTE: The report contains all retained failed reports, as well as the current report
+** See TR-157 section A.4.2 (end) for an example, and section A.3.5.2 for layout of content containing failed report transmissions
+**
+** \param bp - pointer to bulk data profile containing all reports (current and retained)
+** \param report_timestamp - value of Device.BulkData.Profile.{i}.JSONEncoding.ReportTimestamp
+**
+** \return pointer to NULL terminated dynamically allocated buffer containing the serialized report to send
+**
+**************************************************************************/
+char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp, char *report_format)
+{
+ char *result = NULL;
+
+ if (strcmp(report_format, BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE) == 0) {
+ result = create_json_name_value_pair_report(bp, report_timestamp);
+ } else if (strcmp(report_format, BULKDATA_JSON_REPORT_FORMAT_OBJ_HIER) == 0) {
+ result = create_json_obj_hier_report(bp, report_timestamp);
+ }
+
return result;
}
@@ -2851,6 +3020,11 @@ int bulkdata_schedule_sending_http_repor
flags |= BDC_FLAG_DATE_HEADER;
}
+ if (strcmp(ctrl->report_format, BULKDATA_JSON_REPORT_FORMAT_OBJ_HIER) == 0)
+ {
+ flags |= BDC_FLAG_HEADER_OBJ_HIER;
+ }
+
// Exit if failed to post a message to BDC thread
// NOTE: Ownership of full_url, query_string, report, username and password passes to BDC_EXEC
err = BDC_EXEC_PostReportToSend(bp->profile_id, full_url, query_string, username, password, report, report_len, flags);

View File

@@ -1,37 +0,0 @@
--- a/src/core/cli_server.c
+++ b/src/core/cli_server.c
@@ -753,6 +753,15 @@ int ExecuteCli_Get(char *arg1, char *arg
}
#endif
+ char *path[2] = {0};
+
+ path[0] = arg1;
+ if (arg1 == NULL) {
+ vendor_create_dm_cache(path, 0);
+ } else {
+ vendor_create_dm_cache(path, 1);
+ }
+
// Exit if unable to get a list of all parameters referenced by the expression
STR_VECTOR_Init(&params);
INT_VECTOR_Init(&group_ids);
--- a/src/core/data_model.h
+++ b/src/core/data_model.h
@@ -371,5 +371,6 @@ bool DM_PRIV_IsChildOf(char *path, dm_no
bool DM_PRIV_IsChildNodeOf(dm_node_t *node, dm_node_t *parent_node);
bool DM_PRIV_AreAllChildrenGroupId(dm_node_t *parent, int group_id);
+int vendor_create_dm_cache(char *paths[], int num_paths);
#endif
--- a/src/core/handle_get.c
+++ b/src/core/handle_get.c
@@ -123,6 +123,7 @@ void MSG_HANDLER_HandleGet(Usp__Msg *usp
goto exit;
}
+ vendor_create_dm_cache(path_exprs, num_path_expr);
// Calculate the number of hierarchical levels to traverse in the data model when performing partial path resolution
// NOTE: protocol buffer has depth as an unsigned quantity, but internally we use a signed number, so limit range to that of a signed number
depth = usp->body->request->get->max_depth;

View File

@@ -1,5 +1,22 @@
--- a/src/core/data_model.c
+++ b/src/core/data_model.c
Index: obuspa-9.0.4.1/src/core/cli_server.c
===================================================================
--- obuspa-9.0.4.1.orig/src/core/cli_server.c
+++ obuspa-9.0.4.1/src/core/cli_server.c
@@ -715,10 +715,6 @@ int ExecuteCli_Get(str_vector_t *args)
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);
Index: obuspa-9.0.4.1/src/core/data_model.c
===================================================================
--- obuspa-9.0.4.1.orig/src/core/data_model.c
+++ obuspa-9.0.4.1/src/core/data_model.c
@@ -1316,7 +1316,7 @@ int DATA_MODEL_NotifyInstanceAdded(char
// Exit if instance already exists - nothing to do
if (exists)

View File

@@ -0,0 +1,62 @@
Index: obuspa-9.0.4.1/src/core/cli_server.c
===================================================================
--- obuspa-9.0.4.1.orig/src/core/cli_server.c
+++ obuspa-9.0.4.1/src/core/cli_server.c
@@ -501,6 +501,7 @@ int CLI_SERVER_ExecuteCliCommand(char *c
SendCliResponse("WARNING: Discarding unused args: %s\n", args.vector[cli_cmd->max_args+1]);
}
+ vendor_create_dm_cache(NULL, 0);
// Process command
err = cli_cmd->exec_cmd(&args);
print_help = false;
@@ -683,6 +684,13 @@ int ExecuteCli_Get(str_vector_t *args)
}
#endif
+ if (arg1 != NULL) {
+ char *path[2] = {0};
+
+ path[0] = arg1;
+ vendor_create_dm_cache(path, 1);
+ }
+
// Exit if unable to get a list of all parameters referenced by the expression
STR_VECTOR_Init(&params);
INT_VECTOR_Init(&group_ids);
Index: obuspa-9.0.4.1/src/core/data_model.h
===================================================================
--- obuspa-9.0.4.1.orig/src/core/data_model.h
+++ obuspa-9.0.4.1/src/core/data_model.h
@@ -370,5 +370,6 @@ int DM_PRIV_ReRegister_DBParam_Default(c
bool DM_PRIV_IsChildNodeOf(dm_node_t *node, dm_node_t *parent_node);
void DM_PRIV_GetAllEventsAndCommands(dm_node_t *node, str_vector_t *events, str_vector_t *commands);
+int vendor_create_dm_cache(char *paths[], int num_paths);
#endif
Index: obuspa-9.0.4.1/src/core/handle_get.c
===================================================================
--- obuspa-9.0.4.1.orig/src/core/handle_get.c
+++ obuspa-9.0.4.1/src/core/handle_get.c
@@ -123,6 +123,7 @@ void MSG_HANDLER_HandleGet(Usp__Msg *usp
goto exit;
}
+ vendor_create_dm_cache(path_exprs, num_path_expr);
// Calculate the number of hierarchical levels to traverse in the data model when performing partial path resolution
// NOTE: protocol buffer has depth as an unsigned quantity, but internally we use a signed number, so limit range to that of a signed number
depth = usp->body->request->get->max_depth;
Index: obuspa-9.0.4.1/src/core/msg_handler.c
===================================================================
--- obuspa-9.0.4.1.orig/src/core/msg_handler.c
+++ obuspa-9.0.4.1/src/core/msg_handler.c
@@ -862,6 +862,8 @@ int HandleUspMessage(Usp__Msg *usp, char
MSG_HANDLER_UspMsgTypeToString(usp->header->msg_type),
iso8601_cur_time(buf, sizeof(buf)) );
+ // Drop the cached data before processing next message
+ vendor_create_dm_cache(NULL, 0);
// Process the message
cur_msg_type = usp_msg_type;
switch(usp_msg_type)

View File

@@ -1,5 +1,7 @@
--- a/src/core/device.h
+++ b/src/core/device.h
Index: obuspa-9.0.4.1/src/core/device.h
===================================================================
--- obuspa-9.0.4.1.orig/src/core/device.h
+++ obuspa-9.0.4.1/src/core/device.h
@@ -338,6 +338,10 @@ void DEVICE_CONTROLLER_SetInheritedRole(
int DEVICE_CONTROLLER_CountEnabledWebsockClientConnections(void);
#endif
@@ -11,8 +13,10 @@
#ifndef REMOVE_USP_BROKER
int DEVICE_SUBSCRIPTION_RouteNotification(Usp__Msg *usp, int instance);
bool DEVICE_SUBSCRIPTION_MarkVendorLayerSubs(int broker_instance, subs_notify_t notify_type, char *path, int group_id);
--- a/src/core/device_controller.c
+++ b/src/core/device_controller.c
Index: obuspa-9.0.4.1/src/core/device_controller.c
===================================================================
--- obuspa-9.0.4.1.orig/src/core/device_controller.c
+++ obuspa-9.0.4.1/src/core/device_controller.c
@@ -967,6 +967,78 @@ int DEVICE_CONTROLLER_QueueBinaryMessage
return USP_ERR_OK;
}
@@ -92,9 +96,11 @@
/*********************************************************************//**
**
** DEVICE_CONTROLLER_IsMTPConfigured
--- a/src/core/msg_handler.c
+++ b/src/core/msg_handler.c
@@ -1210,6 +1210,15 @@ int ValidateUspRecord(UspRecord__Record
Index: obuspa-9.0.4.1/src/core/msg_handler.c
===================================================================
--- obuspa-9.0.4.1.orig/src/core/msg_handler.c
+++ obuspa-9.0.4.1/src/core/msg_handler.c
@@ -1219,6 +1219,15 @@ int ValidateUspRecord(UspRecord__Record
usp_service_instance = USP_BROKER_GetUspServiceInstance(rec->from_id, 0);
#endif

View File

@@ -1,6 +1,8 @@
--- a/src/core/mqtt.c
+++ b/src/core/mqtt.c
@@ -256,6 +256,8 @@ void MqttSubscriptionDestroy(mqtt_subscr
Index: obuspa-9.0.4.1/src/core/mqtt.c
===================================================================
--- obuspa-9.0.4.1.orig/src/core/mqtt.c
+++ obuspa-9.0.4.1/src/core/mqtt.c
@@ -258,6 +258,8 @@ void MqttSubscriptionDestroy(mqtt_subscr
#define DEFINE_MQTT_TrustCertVerifyCallbackIndex(index) \
int MQTT_TrustCertVerifyCallback_##index (int preverify_ok, X509_STORE_CTX *x509_ctx) \
{\
@@ -9,7 +11,7 @@
return DEVICE_SECURITY_TrustCertVerifyCallbackWithCertChain(preverify_ok, x509_ctx, &mqtt_clients[index].cert_chain);\
}
@@ -266,6 +268,11 @@ DEFINE_MQTT_TrustCertVerifyCallbackIndex
@@ -268,6 +270,11 @@ DEFINE_MQTT_TrustCertVerifyCallbackIndex
DEFINE_MQTT_TrustCertVerifyCallbackIndex(2);
DEFINE_MQTT_TrustCertVerifyCallbackIndex(3);
DEFINE_MQTT_TrustCertVerifyCallbackIndex(4);
@@ -21,7 +23,7 @@
// Add more, with incrementing indexes here, if you change MAX_MQTT_CLIENTS
//------------------------------------------------------------------------------------
@@ -276,10 +283,15 @@ ssl_verify_callback_t* mqtt_verify_callb
@@ -278,10 +285,15 @@ ssl_verify_callback_t* mqtt_verify_callb
MQTT_TrustCertVerifyCallbackIndex(2),
MQTT_TrustCertVerifyCallbackIndex(3),
MQTT_TrustCertVerifyCallbackIndex(4),

View File

@@ -1,13 +1,14 @@
if PACKAGE_urlfilter
if PACKAGE_parental-control
menu "Configuration"
config URLFILTER_INCLUDE_BUNDLES
config PARENTAL_CONTROL_INCLUDE_URLFILTER_BUNDLES
bool "Include default bundle files"
default n
help
Set this option to include bundle files by default,
they are also included in the UCI, urlfilter
still needs to be enabled though.
endmenu
config PARENTAL_CONTROL_VENDOR_PREFIX
string "Package specific datamodel Vendor Prefix for TR181 extensions"
default ""
endif

View File

@@ -1,17 +1,17 @@
#
# Copyright (C) 2021 IOPSYS
# Copyright (C) 2021-2024 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=urlfilter
PKG_VERSION:=3.0.2
PKG_NAME:=parental-control
PKG_VERSION:=1.0.4
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/urlfilter.git
PKG_SOURCE_VERSION:=4361d2f615499c71181d839d780f7305f91a7b70
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/parental-control.git
PKG_SOURCE_VERSION:=eea7793e26b52f45f4e47e849894ac3f8cdc3747
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -22,15 +22,16 @@ PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
define Package/urlfilter
define Package/parental-control
SECTION:=utils
CATEGORY:=Utilities
TITLE:=URL filter
DEPENDS:=+libuci +libnetfilter-queue +libnfnetlink +iptables-mod-nfqueue +libpthread +libubox +ubus +conntrack +libcurl +cmph
DEPENDS:=+libuci +libnetfilter-queue +libnfnetlink +iptables-mod-nfqueue +libpthread
DEPENDS+=+libubox +ubus +conntrack +libcurl +cmph
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
endef
define Package/urlfilter/description
define Package/parental-control/description
Enables filtering of packets on the basis of URL and source MAC address.
endef
@@ -38,20 +39,26 @@ define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
TARGET_CFLAGS += \
-D_GNU_SOURCE\
-DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
TARGET_CFLAGS += -D_GNU_SOURCE
ifeq ($(CONFIG_PARENTAL_CONTROL_VENDOR_PREFIX),"")
VENDOR_PREFIX = $(CONFIG_BBF_VENDOR_PREFIX)
else
VENDOR_PREFIX = $(CONFIG_PARENTAL_CONTROL_VENDOR_PREFIX)
endif
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(VENDOR_PREFIX)\\\"
TARGET_LDFLAGS += \
-lcmph
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./urlfilter/* $(PKG_BUILD_DIR)/
$(CP) -rf ~/git/parental-control/* $(PKG_BUILD_DIR)/
endef
endif
define Package/urlfilter/install
define Package/parental-control/install
$(INSTALL_DIR) $(1)/lib/parentalcontrol
$(INSTALL_DATA) ./files/lib/parentalcontrol/parentalcontrol.sh $(1)/lib/parentalcontrol/
@@ -62,7 +69,7 @@ define Package/urlfilter/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/urlfilter $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/etc/init.d/urlfilter $(1)/etc/init.d/
$(INSTALL_BIN) ./files/etc/init.d/parentalcontrol $(1)/etc/init.d/
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/etc/config/parentalcontrol $(1)/etc/config/parentalcontrol
@@ -71,12 +78,12 @@ define Package/urlfilter/install
$(INSTALL_DATA) ./files/etc/uci-defaults/95-firewall_parentalcontrol.ucidefaults $(1)/etc/uci-defaults/
$(INSTALL_DATA) ./files/etc/uci-defaults/95-migrate_urlfilter.ucidefaults $(1)/etc/uci-defaults/
ifeq ($(CONFIG_URLFILTER_INCLUDE_BUNDLES),y)
$(INSTALL_DIR) $(1)/etc/urlfilter
$(INSTALL_DATA) ./files/etc/urlfilter/urlbundles.tar.xz $(1)/etc/urlfilter/
endif
$(BBFDM_REGISTER_SERVICES) -v ${VENDOR_PREFIX} ./bbfdm_service.json $(1) parentalcontrol
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/libparentalcontrol.so $(1) $(PKG_NAME)
ifeq ($(CONFIG_PARENTAL_CONTROL_INCLUDE_URLFILTER_BUNDLES),y)
$(INSTALL_DIR) $(1)/etc/parental-control
$(INSTALL_DATA) ./files/etc/parental-control/urlbundles.tar.xz $(1)/etc/parental-control/
endif
endef
$(eval $(call BuildPackage,urlfilter))
$(eval $(call BuildPackage,parental-control))

View File

@@ -0,0 +1,16 @@
{
"daemon": {
"enable": "1",
"service_name": "parentalcontrol",
"unified_daemon": true,
"services": [
{
"parent_dm": "Device.",
"object": "{BBF_VENDOR_PREFIX}ParentalControl"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -0,0 +1,3 @@
config globals 'globals'
option enable '0'
option loglevel '3'

View File

@@ -0,0 +1,88 @@
#!/bin/sh /etc/rc.common
START=95
STOP=10
USE_PROCD=1
PROG=/usr/sbin/urlfilter
. /lib/parentalcontrol/parentalcontrol.sh
validate_global_section() {
uci_validate_section parentalcontrol globals globals \
'enable:bool:1' \
'loglevel:uinteger:3'
}
remove_fw_rules() {
# remove urlfilter daemon rules
remove_iptables_nfqueue_rules
# remove internet_access and profile_bedtime_schedule rules
remove_internet_schedule_rules
}
configure_fw_rules() {
local enable
remove_fw_rules
config_load parentalcontrol
config_get_bool enable globals enable 0
if [ "${enable}" -eq "0" ]; then
# Parental control is disabled
return 0
fi
# Now flush the existing connections, otherwise,
# URL filtering cannot be performed on already open sites.
if [ -n "$(which conntrack)" ]; then
sleep 5
conntrack -F
fi
# this is for urlfilter daemon
add_iptables_nfqueue_rules
# this for internet_access and profile_bedtime_schedule sections
add_internet_schedule_rules
}
start_service() {
local enable loglevel
config_load parentalcontrol
validate_global_section
# add default bundles
process_default_bundles
# add firewall rules
configure_fw_rules
procd_open_instance parentalcontrol_dm
procd_set_param command ${PROG}
procd_append_param command -l ${loglevel}
procd_set_param respawn
procd_close_instance
}
stop_service() {
# remove default bundles
remove_default_bundles
remove_fw_rules
}
reload_service() {
ret=$(ubus call service list '{"name":"parentalcontrol"}' | jsonfilter -qe '@.parentalcontrol.instances.parentalcontrol_dm.running')
if [ "$ret" != "true" ]; then
stop
start
else
configure_fw_rules
ubus send parentalcontrol.reload
fi
}
service_triggers() {
procd_add_reload_trigger "parentalcontrol"
procd_add_reload_trigger "schedules"
}

Some files were not shown because too many files have changed in this diff Show More