-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Features - Added support for LwM2M 1.2 server object requirement for infinite lifetime (lifetime == 0). - Introduced @experimental and @deprecated Doxygen tags. - Added experimental IPSO objects v2 API. - Added experimental Software Management object API. Improvements - Improved integration tests compability and framework stability - Added support for wget2 for validating links in documentation (for HTTP/2 support) Bugfixes - Refactored generation of blockwise Confirmable notifications to avoid a possible assertion failure; requests for subsequent blocks of such notifications are now sent as Piggybacked responses - Fixed a bug in the documentation of an object definition struct - (commercial version only) Fixed problems with running some tests on systems with Mbed TLS 3.x - Fixed a few assertion and pointer punning issues regarding calls to IPSO objects APIs in erroneous cases - Prevent from trying to store empty cert/keys on HSM
- Loading branch information
Showing
701 changed files
with
10,707 additions
and
1,593 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2017-2023 AVSystem <[email protected]> | ||
# Copyright 2017-2024 AVSystem <[email protected]> | ||
# AVSystem Anjay LwM2M SDK | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2017-2023 AVSystem <[email protected]> | ||
# Copyright 2017-2024 AVSystem <[email protected]> | ||
# AVSystem Anjay LwM2M SDK | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2017-2023 AVSystem <[email protected]> | ||
# Copyright 2017-2024 AVSystem <[email protected]> | ||
# AVSystem Anjay LwM2M SDK | ||
# All rights reserved. | ||
# | ||
|
@@ -8,7 +8,7 @@ | |
cmake_minimum_required(VERSION 3.6.0) | ||
|
||
project(anjay C) | ||
set(ANJAY_VERSION "3.6.1" CACHE STRING "Anjay library version") | ||
set(ANJAY_VERSION "3.7.0" CACHE STRING "Anjay library version") | ||
set(ANJAY_BINARY_VERSION 1.0.0) | ||
|
||
set(ANJAY_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") | ||
|
@@ -325,6 +325,7 @@ endif() | |
|
||
cmake_dependent_option(WITH_MODULE_access_control "Access control object implementation module" ON WITH_ACCESS_CONTROL OFF) | ||
option(WITH_MODULE_ipso_objects "Generic implementation of certain kinds of IPSO objects" ON) | ||
option(WITH_MODULE_ipso_objects_v2 "Experimental generic implementation of certain kinds of IPSO objects" ON) | ||
option(WITH_MODULE_security "Security object module" ON) | ||
option(WITH_MODULE_server "Server object module" ON) | ||
option(WITH_MODULE_fw_update "Firmware Update object module" ON) | ||
|
@@ -333,6 +334,7 @@ cmake_dependent_option(WITHOUT_MODULE_fw_update_PUSH_MODE | |
OFF "WITH_MODULE_fw_update;WITH_DOWNLOADER" OFF) | ||
cmake_dependent_option(WITH_MODULE_factory_provisioning "Factory provisioning module" ON "WITH_BOOTSTRAP;WITH_CBOR" OFF) | ||
option(WITH_MODULE_advanced_fw_update "Advanced Firmware Update object module" OFF) | ||
option(WITH_MODULE_sw_mgmt "Software Management object module" OFF) | ||
|
||
################# CODE ######################################################### | ||
|
||
|
@@ -348,10 +350,12 @@ add_library(anjay | |
include_public/anjay/fw_update.h | ||
include_public/anjay/io.h | ||
include_public/anjay/ipso_objects.h | ||
include_public/anjay/ipso_objects_v2.h | ||
include_public/anjay/lwm2m_send.h | ||
include_public/anjay/security.h | ||
include_public/anjay/server.h | ||
include_public/anjay/stats.h | ||
include_public/anjay/sw_mgmt.h | ||
src/anjay_config_log.h | ||
src/anjay_init.h | ||
src/anjay_modules/anjay_access_utils.h | ||
|
@@ -483,6 +487,8 @@ add_library(anjay | |
src/modules/ipso/anjay_ipso_3d_sensor.c | ||
src/modules/ipso/anjay_ipso_basic_sensor.c | ||
src/modules/ipso/anjay_ipso_button.c | ||
src/modules/ipso_v2/anjay_ipso_v2_3d_sensor.c | ||
src/modules/ipso_v2/anjay_ipso_v2_basic_sensor.c | ||
src/modules/security/anjay_mod_security.c | ||
src/modules/security/anjay_mod_security.h | ||
src/modules/security/anjay_security_persistence.c | ||
|
@@ -497,6 +503,7 @@ add_library(anjay | |
src/modules/server/anjay_server_transaction.h | ||
src/modules/server/anjay_server_utils.c | ||
src/modules/server/anjay_server_utils.h | ||
src/modules/sw_mgmt/anjay_sw_mgmt.c | ||
) | ||
|
||
target_include_directories(anjay PUBLIC | ||
|
@@ -528,11 +535,13 @@ set(ANJAY_WITHOUT_IP_STICKINESS "${WITHOUT_IP_STICKINESS}") | |
set(ANJAY_WITHOUT_COMPOSITE_OPERATIONS "${WITHOUT_COMPOSITE_OPERATIONS}") | ||
set(ANJAY_WITH_MODULE_ACCESS_CONTROL "${WITH_MODULE_access_control}") | ||
set(ANJAY_WITH_MODULE_IPSO_OBJECTS "${WITH_MODULE_ipso_objects}") | ||
set(ANJAY_WITH_MODULE_IPSO_OBJECTS_V2 "${WITH_MODULE_ipso_objects_v2}") | ||
set(ANJAY_WITH_MODULE_FW_UPDATE "${WITH_MODULE_fw_update}") | ||
set(ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE "${WITH_MODULE_advanced_fw_update}") | ||
set(ANJAY_WITHOUT_MODULE_FW_UPDATE_PUSH_MODE "${WITHOUT_MODULE_fw_update_PUSH_MODE}") | ||
set(ANJAY_WITH_MODULE_SECURITY "${WITH_MODULE_security}") | ||
set(ANJAY_WITH_MODULE_SERVER "${WITH_MODULE_server}") | ||
set(ANJAY_WITH_MODULE_SW_MGMT "${WITH_MODULE_sw_mgmt}") | ||
set(ANJAY_WITH_NET_STATS "${WITH_NET_STATS}") | ||
set(ANJAY_WITH_COMMUNICATION_TIMESTAMP_API "${WITH_COMMUNICATION_TIMESTAMP_API}") | ||
set(ANJAY_WITH_EVENT_LOOP "${WITH_EVENT_LOOP}") | ||
|
@@ -865,6 +874,10 @@ if(WITH_MODULE_ipso_objects) | |
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/ipso_objects.h" | ||
DESTINATION include/anjay) | ||
endif() | ||
if(WITH_MODULE_ipso_objects_v2) | ||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/ipso_objects_v2.h" | ||
DESTINATION include/anjay) | ||
endif() | ||
if(WITH_MODULE_fw_update) | ||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/fw_update.h" | ||
DESTINATION include/anjay) | ||
|
@@ -885,6 +898,10 @@ if(WITH_MODULE_factory_provisioning) | |
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/factory_provisioning.h" | ||
DESTINATION include/anjay) | ||
endif() | ||
if(WITH_MODULE_sw_mgmt) | ||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include_public/anjay/sw_mgmt.h" | ||
DESTINATION include/anjay) | ||
endif() | ||
|
||
# install CMake package | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/anjay-config.cmake.in | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.. | ||
Copyright 2017-2023 AVSystem <[email protected]> | ||
Copyright 2017-2024 AVSystem <[email protected]> | ||
AVSystem Anjay LwM2M SDK | ||
All rights reserved. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2017-2023 AVSystem <[email protected]> | ||
# Copyright 2017-2024 AVSystem <[email protected]> | ||
# AVSystem Anjay LwM2M SDK | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2017-2023 AVSystem <[email protected]> | ||
# Copyright 2017-2024 AVSystem <[email protected]> | ||
# AVSystem Anjay LwM2M SDK | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2017-2023 AVSystem <[email protected]> | ||
# Copyright 2017-2024 AVSystem <[email protected]> | ||
# AVSystem Anjay LwM2M SDK | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2017-2023 AVSystem <[email protected]> | ||
# Copyright 2017-2024 AVSystem <[email protected]> | ||
# AVSystem Anjay LwM2M SDK | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2017-2023 AVSystem <[email protected]> | ||
# Copyright 2017-2024 AVSystem <[email protected]> | ||
# AVSystem Anjay LwM2M SDK | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright 2017-2023 AVSystem <[email protected]> | ||
# Copyright 2017-2024 AVSystem <[email protected]> | ||
# AVSystem Anjay LwM2M SDK | ||
# All rights reserved. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2017-2023 AVSystem <[email protected]> | ||
# Copyright 2017-2024 AVSystem <[email protected]> | ||
# AVSystem Anjay LwM2M SDK | ||
# All rights reserved. | ||
# | ||
|
@@ -48,6 +48,10 @@ if (${ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE}) | |
|
||
endif() | ||
|
||
if (${ANJAY_WITH_MODULE_SW_MGMT}) | ||
set(SOURCES ${SOURCES} software_mgmt.c) | ||
endif() | ||
|
||
if(NOT WIN32) | ||
set(SOURCES ${SOURCES} objects/ip_ping.c) | ||
endif() | ||
|
@@ -72,6 +76,10 @@ if (${ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE}) | |
set(HEADERS ${HEADERS} advanced_firmware_update.h) | ||
endif() | ||
|
||
if (${ANJAY_WITH_MODULE_SW_MGMT}) | ||
set(HEADERS ${HEADERS} software_mgmt.h) | ||
endif() | ||
|
||
set(ALL_SOURCES ${SOURCES} ${HEADERS}) | ||
|
||
if(NOT TARGET anjay) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2017-2023 AVSystem <[email protected]> | ||
* Copyright 2017-2024 AVSystem <[email protected]> | ||
* AVSystem Anjay LwM2M SDK | ||
* All rights reserved. | ||
* | ||
|
@@ -1021,18 +1021,18 @@ int fw_update_common_perform_upgrade( | |
|
||
int fw_update_common_maybe_create_firmware_file( | ||
advanced_fw_update_logic_t *fw) { | ||
if (fw->next_target_path) { | ||
return 0; | ||
} | ||
if (fw->administratively_set_target_path) { | ||
fw->next_target_path = avs_strdup(fw->administratively_set_target_path); | ||
} else { | ||
fw->next_target_path = generate_random_target_filepath(); | ||
} | ||
if (!fw->next_target_path) { | ||
if (fw->administratively_set_target_path) { | ||
fw->next_target_path = | ||
avs_strdup(fw->administratively_set_target_path); | ||
} else { | ||
fw->next_target_path = generate_random_target_filepath(); | ||
} | ||
if (!fw->next_target_path) { | ||
return -1; | ||
} | ||
demo_log(INFO, "Created %s", fw->next_target_path); | ||
return -1; | ||
} | ||
demo_log(INFO, "Created %s", fw->next_target_path); | ||
return 0; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2017-2023 AVSystem <[email protected]> | ||
* Copyright 2017-2024 AVSystem <[email protected]> | ||
* AVSystem Anjay LwM2M SDK | ||
* All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2017-2023 AVSystem <[email protected]> | ||
* Copyright 2017-2024 AVSystem <[email protected]> | ||
* AVSystem Anjay LwM2M SDK | ||
* All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2017-2023 AVSystem <[email protected]> | ||
* Copyright 2017-2024 AVSystem <[email protected]> | ||
* AVSystem Anjay LwM2M SDK | ||
* All rights reserved. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2017-2023 AVSystem <[email protected]> | ||
* Copyright 2017-2024 AVSystem <[email protected]> | ||
* AVSystem Anjay LwM2M SDK | ||
* All rights reserved. | ||
* | ||
|
@@ -292,6 +292,9 @@ static void demo_delete(anjay_demo_t *demo) { | |
#ifdef ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE | ||
advanced_firmware_update_uninstall(demo->advanced_fw_update_logic_table); | ||
#endif // ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE | ||
#ifdef ANJAY_WITH_MODULE_SW_MGMT | ||
sw_mgmt_update_destroy(demo->sw_mgmt_table); | ||
#endif // ANJAY_WITH_MODULE_SW_MGMT | ||
#ifdef WITH_DEMO_USE_STANDALONE_OBJECTS | ||
standalone_server_object_cleanup(demo->server_obj_ptr); | ||
standalone_security_object_cleanup(demo->security_obj_ptr); | ||
|
@@ -585,6 +588,14 @@ static int demo_init(anjay_demo_t *demo, cmdline_args_t *cmdline_args) { | |
} | ||
#endif // ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE | ||
|
||
#if defined(ANJAY_WITH_MODULE_SW_MGMT) && defined(ANJAY_WITH_DOWNLOADER) | ||
avs_net_security_info_t *sw_mgmt_security_info_ptr = NULL; | ||
if (cmdline_args->sw_mgmt_security_info.mode | ||
!= (avs_net_security_mode_t) -1) { | ||
sw_mgmt_security_info_ptr = &cmdline_args->sw_mgmt_security_info; | ||
} | ||
#endif // defined(ANJAY_WITH_MODULE_SW_MGMT) && defined(ANJAY_WITH_DOWNLOADER) | ||
|
||
demo->connection_args = &cmdline_args->connection_args; | ||
#ifdef AVS_COMMONS_STREAM_WITH_FILE | ||
# ifdef ANJAY_WITH_ATTR_STORAGE | ||
|
@@ -777,6 +788,28 @@ static int demo_init(anjay_demo_t *demo, cmdline_args_t *cmdline_args) { | |
} | ||
#endif // ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE | ||
|
||
#ifdef ANJAY_WITH_MODULE_SW_MGMT | ||
if (sw_mgmt_install( | ||
demo->anjay, &demo->sw_mgmt_common, demo->sw_mgmt_table, | ||
cmdline_args->sw_mgmt_persistence_file, | ||
cmdline_args->prefer_same_socket_downloads, | ||
cmdline_args->sw_mgmt_delayed_first_instance_install_result, | ||
cmdline_args->sw_mgmt_terminate_after_downloading, | ||
cmdline_args->sw_mgmt_disable_repeated_activation_deactivation | ||
# ifdef ANJAY_WITH_DOWNLOADER | ||
, | ||
sw_mgmt_security_info_ptr, | ||
cmdline_args->sw_mgmt_tx_params_modified | ||
? &cmdline_args->sw_mgmt_tx_params | ||
: NULL, | ||
&cmdline_args->sw_mgmt_tcp_request_timeout, | ||
cmdline_args->sw_mgmt_auto_suspend | ||
# endif // ANJAY_WITH_DOWNLOADER | ||
)) { | ||
return -1; | ||
} | ||
#endif // ANJAY_WITH_MODULE_SW_MGMT | ||
|
||
#ifdef ANJAY_WITH_MODULE_ACCESS_CONTROL | ||
if (!dm_persistence_restored | ||
&& (add_default_access_entries(demo) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2017-2023 AVSystem <[email protected]> | ||
* Copyright 2017-2024 AVSystem <[email protected]> | ||
* AVSystem Anjay LwM2M SDK | ||
* All rights reserved. | ||
* | ||
|
@@ -27,6 +27,10 @@ | |
#ifdef ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE | ||
# include "advanced_firmware_update.h" | ||
#endif // ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE | ||
|
||
#ifdef ANJAY_WITH_MODULE_SW_MGMT | ||
# include "software_mgmt.h" | ||
#endif // ANJAY_WITH_MODULE_SW_MGMT | ||
#include "objects.h" | ||
|
||
typedef int anjay_demo_object_get_instances_t(const anjay_dm_object_def_t **, | ||
|
@@ -66,6 +70,10 @@ struct anjay_demo_struct { | |
advanced_fw_update_logic_t | ||
advanced_fw_update_logic_table[FW_UPDATE_IID_IMAGE_SLOTS]; | ||
#endif // ANJAY_WITH_MODULE_ADVANCED_FW_UPDATE | ||
#ifdef ANJAY_WITH_MODULE_SW_MGMT | ||
sw_mgmt_common_logic_t sw_mgmt_common; | ||
sw_mgmt_logic_t sw_mgmt_table[SW_MGMT_PACKAGE_COUNT]; | ||
#endif // ANJAY_WITH_MODULE_SW_MGMT | ||
|
||
#ifdef WITH_DEMO_USE_STANDALONE_OBJECTS | ||
const anjay_dm_object_def_t **security_obj_ptr; | ||
|
Oops, something went wrong.