Commit graph

1407 commits

Author SHA1 Message Date
Daniel Danzberger
7e0300b000 tr181: wifi-openwrt: add missing functions
This fixes 'undefined reference' errors when linking for:
- os_get_radio_operating_standard
- os_get_wifi_access_point_status

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-25 18:11:00 +01:00
Daniel Danzberger
d8438806f1 tr181: deviceinfo: use os spcific implementations for some options
The following attributes are moved to OS specific implementations:
- Manufacturer
- ManufacturerOUI
- SoftwareVersion
- SerialNumber
- ProductClass

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-25 18:11:00 +01:00
Amin Ben Ramdhane
682e6f3977 Fix the value of Device.Ethernet.Link.{i}.LowerLayers parameter of wan interface + fix indentation 2020-03-25 17:33:29 +01:00
Amin Ben Ramdhane
f1a7b2cbaf VLANTermination: remove vlan_method option 2020-03-25 16:18:57 +01:00
Amin Ben Ramdhane
50f8d36627 Fix indentation 2020-03-25 12:38:52 +01:00
Jomily K Joseph
fa07b8c3b6 bbf: Layer2 Vlan Deployment changes
- Changes done in IP.Interface, Device.Ethernet, Bridging.Bridge objects.
2020-03-25 11:45:10 +01:00
Omar Kallel
c4d65b917a Get value of WiFi.AccessPoint.Status WiFi.Radio.OperatingStandards from ubus 2020-03-23 18:15:18 +01:00
Amin Ben Ramdhane
21af510617 Fix bugs: Diagnostics Objects 2020-03-23 11:49:22 +01:00
Omar Kallel
c2196ef2cc Fix bugs: Device.WiFi.AccessPoint 2020-03-20 08:19:52 +01:00
Omar Kallel
a25b8584cb Fix bugs: Device.WiFi.Radio 2020-03-19 09:45:26 +01:00
Amin Ben Ramdhane
e3777371b1 WiFi: update parameters with new ubus objects 2020-03-18 22:47:41 +01:00
Omar Kallel
a1ceee7441 Fix returned value format of the parameter Device.DynamicDNS.SupportedServices 2020-03-18 17:34:39 +01:00
Amin Ben Ramdhane
37992a5bc9 Fix the size of ProtocolsVersion 2020-03-17 23:50:39 +01:00
Amin Ben Ramdhane
2997e9781b Update the object definition according to the code generation 2020-03-17 17:20:30 +01:00
Amin Ben Ramdhane
234d0f8f33 Update code generation 2020-03-17 16:21:48 +01:00
Amin Ben Ramdhane
389ae8cdb7 add get value of Device.IP.Interface.{i}.IPv4Address.{i}.Staus parameter 2020-03-17 16:20:59 +01:00
Amin Ben Ramdhane
bf8737c49e Update the time format according to the standard 2020-03-17 14:11:52 +01:00
Daniel Danzberger
17e255c450 Only link SSL libraries when selected by config
This commit fixes '-lssl' and '-lmbedtls' being linked even when they
haven't been selected by --enable-libmbedtls or --enable-libopenssl

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-17 12:54:26 +01:00
Daniel Danzberger
ff759d2cca tr181: Add OS specific implementations
When code is build with --enable-generic-openwrt,
the tr181 implementations from dmtree/tr181/.*-openwrt.c are used.
Otherwise for IOPSYS-WRT, dmtree/tr181/*-iopsyswrt.c sources are used.

Note that all functions that have OS specific handlers, are prefixed
with 'os__' and are implemented in their OS specific file.

Functions that are only available in IOPSYS-WRT are prefixed with
'os_iopsys_*'.

More OpenWrt OS impelementations will follow in future commits.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-17 12:54:26 +01:00
Amin Ben Ramdhane
ce8bf4e319 Update the time format according to the standard 2020-03-16 23:29:02 +01:00
Amin Ben Ramdhane
65f38dccb1 DeviceInfo: Update parameters according to new ubus format 2020-03-16 18:05:17 +01:00
Amin Ben Ramdhane
faf175823b ManagementServer: fix some issues according to the standard
- Fix the value of Device.ManagementServer.PeriodicInformTime parameter
2020-03-16 17:59:59 +01:00
Amin Ben Ramdhane
0205794276 PTM: fix some issues according to the standard
- Device.PTM.Link.{i}.Enable : add set value function
 - Device.PTM.Link.{i}.Status : add get value function
 - Fix the value of some parameters
2020-03-16 17:58:33 +01:00
Amin Ben Ramdhane
0b6a9b2f12 ATM: fix some issues according to the standard
- Device.ATM.Link.{i}.Enable : add set value function
 - Device.ATM.Link.{i}.Status : add get value function
 - Fix the value of some parameters
2020-03-16 17:57:14 +01:00
Amin Ben Ramdhane
198c207e6e VoiceService: fix some issues according to the standard
- VoiceService.{i}.VoiceProfile.{i}.Name : add set value
 - Fix the value of some parameters
2020-03-16 17:50:55 +01:00
Omar Kallel
e92a4d81b2 Improve dmasprintf function: dynamic allocation instead of buffer fix size 2020-03-16 17:02:54 +01:00
Amin Ben Ramdhane
a1f7ce98cf Ticket refs #1254: Improvement validation parameters 2020-03-13 16:28:32 +01:00
Jeff Lyons
1f9c6b08d3 add default response to get_value_security_mode to prevent SEGV 2020-03-13 08:19:16 +00:00
Amin Ben Ramdhane
488066671c tr104,tr157: Remove unused functions 2020-03-10 23:43:37 +01:00
Amin Ben Ramdhane
323b40d8aa Only export symbols to the library that belong to the API interface (complement: tr104, tr143 and tr157) 2020-03-10 23:32:03 +01:00
Amin Ben Ramdhane
69fc84cc37 Remove static definitions of functions used by other packages
These functions are called in icwmp package.
2020-03-10 22:25:48 +01:00
Daniel Danzberger
26ec85f20e Fix warnings when neither mbedtls nor openssl is build
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-10 17:44:23 +01:00
Daniel Danzberger
521e38a853 Fix snprintf destination buffer sizes
Fixes snprintf truncated output compiler warnings.

Example:
--
../dmentrylibrary.c:31:38: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
   31 |     snprintf(buf, sizeof(buf), "%s/%s", folder_path, entry->d_name);
      |                                      ^
../dmentrylibrary.c:31:5: note: ‘snprintf’ output 2 or more bytes (assuming 257) into a destination of size 256
   31 |     snprintf(buf, sizeof(buf), "%s/%s", folder_path, entry->d_name);
--

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-10 14:34:08 +01:00
Daniel Danzberger
a377f7dfd2 tr181: Remove unused functions
This fixes 'defined but not used' compiler warnings

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-10 13:36:37 +01:00
Daniel Danzberger
0460307fb4 Only export symbols to the library that belong to the API interface
This commit makes all symbols that are not part of the API Interface,
or used only in the object files where they are defined, static.

Causing the following benefits:
 - The compiler can resolve functions for better performance
 - The library size is decreased

NOTE: Spec file generators need to be adjusted for newer spec's to not do the same mistakes again

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-09 21:23:57 +01:00
Daniel Danzberger
9b8a2de146 Add --enable-generic-openwrt configure option
This option allows selecting between a build with IOPSYS WRT features,
like the "router.*" ubus objects and a generic OpenWrt.

When GENERIC_OPENWRT is defined, only features that are available on a
generic openwrt build should be used.

This option is disabled by default.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-09 12:53:02 +01:00
Daniel Danzberger
43b4cff541 Don't define _XOPEN_SOURCE when compiling with _GNU_SOURCE
_XOPEN_SOURCE is included by _GNU_SOURCE.
This fixes redefinition errors of _XOPEN_SOURCE when the libc
implementations define it because of _GNU_SOURCE.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-09 12:25:13 +01:00
Omar Kallel
fbedd21f07 Ticket refs #1835: Device.Security. object (code style review) 2020-03-04 12:06:11 +01:00
Omar Kallel
5b0bc22622 Ticket Refs #1835: TR-181: Device.Security object 2020-03-03 15:30:08 +01:00
Amin Ben Ramdhane
2b7ead2d60 Improvement of the excel generator 2020-03-03 00:01:23 +01:00
Amin Ben Ramdhane
e15bb5d2c9 Update DeviceInfo.ProcessStatus.Process. object 2020-03-02 19:31:26 +01:00
Amin Ben Ramdhane
862c54780e Update WiFi object with new ubus calls: wifi, wifi.radio, wifi.ap 2020-03-02 19:28:07 +01:00
Amin Ben Ramdhane
1cc121df01 Excel generator: add new column for protocols 2020-03-02 11:17:32 +01:00
Amin Ben Ramdhane
fa7642d9cd Ticket refs #1845: bbf-tools: generate supported USP operate commands 2020-02-27 17:13:39 +01:00
Amin Ben Ramdhane
be7204e16e Update json file + upnp: add mapping parameters 2020-02-21 18:49:28 +01:00
Amin Ben Ramdhane
29b85e3edd Add a comment for unsupported parameters 2020-02-21 18:48:27 +01:00
Amin Ben Ramdhane
d80716634a Ticket refs #1254: validation parameters: add the missing objects 2020-02-21 11:47:42 +01:00
Amin Ben Ramdhane
905d78844c Ticket refs #1254: TR-x69: add support for parameter validation 2020-02-20 23:25:49 +01:00
Amin Ben Ramdhane
3848bac3aa WiFi Object: use new wifi.radio and wifi.ap ubus objects
- read WiFi.Radio and WiFi.SSID from iopsys wifi.radio and wifi.ap ubus objects instead of reading them from sysfs or ifconfig
2020-02-20 10:13:10 +01:00
Daniel Danzberger
1ea3b384d6 tr181: dynamicdns: fix invalid call to snprintf
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-02-19 11:53:48 +01:00