summaryrefslogtreecommitdiff
path: root/mesh/mesh-config.h
Commit message (Collapse)AuthorAgeFilesLines
* mesh: Add storage of Mesh Private Beacon settingsBrian Gix2023-01-301-0/+6
| | | | | If current storage does not exist in node.json, the Mesh Private Beacon will be disabled.
* mesh: Add Remote ProvisioningBrian Gix2023-01-301-1/+5
| | | | | | | | Add Remote Provisioning Server Add Remote Provisioning Client Remove local scanning/provisioning Add delete-all dev key function Add NPPI procedures
* mesh: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- LGPL-2.1-or-later : 48 License: LGPL-2.1-or-later mesh/mesh-mgmt.h mesh/mesh-mgmt.c mesh/net-keys.c mesh/mesh-io-api.h mesh/mesh.h mesh/net-keys.h mesh/model.h mesh/util.h mesh/appkey.c mesh/cfgmod.h mesh/appkey.h mesh/prov.h mesh/prov-acceptor.c mesh/net.c mesh/dbus.h mesh/friend.h mesh/mesh-io-generic.c mesh/main.c mesh/util.c mesh/dbus.c mesh/error.h mesh/mesh-config-json.c mesh/agent.h mesh/pb-adv.c mesh/crypto.c mesh/crypto.h mesh/friend.c mesh/pb-adv.h mesh/provision.h mesh/mesh-config.h mesh/mesh-io-generic.h mesh/agent.c mesh/cfgmod-server.c mesh/mesh-io.h mesh/keyring.h mesh/net.h mesh/keyring.c mesh/mesh-defs.h mesh/mesh.c mesh/rpl.c mesh/manager.c mesh/model.c mesh/mesh-io.c mesh/node.c mesh/prov-initiator.c mesh/rpl.h mesh/node.h mesh/manager.h
* mesh: Use correct retransmit parameters for publicationsInga Stotland2020-08-221-2/+2
| | | | | | This adds previously missing retransmit count and interval values specific to model publications. The values are configured by Config CLient and may be different to each model.
* mesh: Make mesh config model binding API consistentInga Stotland2020-08-131-2/+2
| | | | | | This changes the order of function arguments in mesh_config_model_binding_add() and mesh_config_model_binding_del() to make them consistent with the rest of mesh_config_model... APIs
* mesh: Clean up handling of config subscription messagesInga Stotland2020-08-101-3/+3
| | | | | | | | This provides better functional grouping based on whether a group or a virtual label is used for the subscription address. Also, use a single point for sending out the composed Config Server status messages.
* mesh: Add Composition page storage to node.jsonBrian Gix2020-07-081-0/+12
| | | | | | Mesh supports multiple Composition Pages, although only one is defined in the current specification. This change allows saving and retrieval of any pages, numbered 0-255.
* mesh: Check app model settings of pub/sub supportInga Stotland2020-07-011-0/+8
| | | | | | | | | | | | | | | | | | | | This adds handling of new options dictionary included with "Models" and "VendorModels" properties on org.bluez.mesh.Element1 interface. Supported (optional) dictionary entries: "Publish" - indicates whether the model supports publication mechanism. If not present, publication is enabled. "Subscribe" - indicates whether the model supports subscription mechanism. If not present, subscriptions are enabled. If a config message related to subscription state is received for a model that does not support subscription mechanism, an error code 0x08, ("Not A Subscribe Model") is sent in response. If a config message related to publication state is received for a model that does not support publication mechanism, an error code 0x07 ("Invalid Publish Parameters") is sent in response.
* mesh: Fix double-freeBrian Gix2020-05-201-1/+1
| | | | | | | | | | This fixes a double-free error when destroying the NVM storage of a mesh node. Cleanly handle two distinct scenarios: 1. When the node is being deleted at runtime. This causes release of both dynamic memory and NVM storage. 2. During shutdown, we release dynamic memory only.
* mesh: Allow updating CID, PID, VID & CRPL on node attachInga Stotland2020-05-141-0/+4
| | | | | | | This allows to update settings of the following composition fields when an existing node (application) attaches to the daemon: Company ID (CID), Product ID (PID), Versioin ID (VID), CRPL (replay protection depth)
* mesh: Make mesh-config API more consistentInga Stotland2019-10-011-5/+6
| | | | | | | This changes the prototypes for mesh_config_model_binding_add() and mesh_config_model_binding_del() to take the element's address as input parameter instead of the element's index. The change aligns the API with other functions that handle storage of model states.
* mesh: Add closedir() of config directory after opendir()Inga Stotland2019-08-291-2/+2
| | | | | | This adds missing closedir() call to accompany opendir() in mesh_config_load_nodes(). Also, fixes confusing mix of variable names.
* mesh: Move sequence number overcommit to mesh-config-jsonMichaƂ Lowas-Rzechonek2019-08-081-1/+2
| | | | | | | | This confines sequence overcommit logic in mesh-config-json, as other storages might use a different mechanism to ensure reliability. Also, refactored logic to calculate overcommit value to avoid division by zero when messages are sent too fast.
* mesh: Manage node config directory in mesh-configInga Stotland2019-07-151-3/+4
| | | | | | | | | | | | | | | | | | | This completely removes storage.c file. Instead, the handling of mesh node configuration storage is done completely in mesh-config layer by calling the following API functions: bool mesh_config_load_nodes(const char *cfg_dir, mesh_config_node_func_t cb, void *user_data) void mesh_config_release(struct mesh_config *cfg) void mesh_config_destroy(struct mesh_config *cfg) bool mesh_config_save(struct mesh_config *cfg, bool no_wait, mesh_config_status_func_t cb, void *user_data) struct mesh_config *mesh_config_create(const char *cfg_path, const uint8_t uuid[16], struct mesh_config_node *node)
* mesh: Use mesh_config APIs to store node configurationInga Stotland2019-07-151-8/+3
| | | | | | | | This eliminates storage_set...() routines as an intermediate layer between mesh_config layer and the rest of the daemon when storing updated node configuration values. For the JSON based implementation, each call to mesh_config_write...() routines results in writing to the node configuration file.
* mesh: Replace storage_save_config with mesh_config_save_configInga Stotland2019-07-151-4/+5
| | | | | | | | | | | | | | | | This moves writing out of node configuration from storage.c down to mesh-config-<format-specific>.c to allow for more generic storage layout. New generalized API in mesh-config.h: mesh_config_save_config(struct mesh_config *cfg, bool no_wait, mesh_config_status_func_t cb, void *user_data) replaces the old one in storage.h: storage_save_config(struct mesh_node *node, bool no_wait, mesh_status_func_t cb, void *user_data) Currently, only JSON format is supported for storing node configuration: mesh_config_save_config is implemented in mesh-config-json.c
* mesh: Confine dependency on json-c to mesh-config-json.cInga Stotland2019-07-151-32/+45
| | | | | | | | This removes dependency on json-s/json.h header from everywhere in the code except for mesh-config-json.c. The details about node configuration storage format are obfuscated: a pointer to an opaque mesh_config structure is stored with mesh_node and is passed around to mae all the storage related operations.
* mesh: Move load from storage functionality into node.cInga Stotland2019-07-151-31/+28
| | | | | This moves the initialization of a mesh node from stored configuration from storage.c to node.c
* mesh: Change mesh_db prefix to mesh_configInga Stotland2019-07-151-57/+65
| | | | | This changes the naming the API declarations in mesh-config.h: mesh_db_... ->mesh_config_...
* mesh: Rename mesh-db.c to mesh-config-json.cInga Stotland2019-07-151-0/+157
This moves mesh-db.h to mesh-config.h and mesh-db.c to mesh-config-json.c. mesh-config.h declares common APIs for storing mesh node configuration. mesh-config-json.c defines the APIs for JSOn specific storage. This allows for future parallel implementation a different (not JSON-based) mechanism of storing node configuration.