summaryrefslogtreecommitdiff
path: root/mesh/node.h
Commit message (Collapse)AuthorAgeFilesLines
* mesh: Add internal Mesh Private Beacon modelBrian Gix2023-01-301-0/+2
| | | | | Adds recgnition that the Mesh Private Beacon model is internal and foundational, without bindings.
* mesh: Add Remote ProvisioningBrian Gix2023-01-301-0/+3
| | | | | | | | Add Remote Provisioning Server Add Remote Provisioning Client Remove local scanning/provisioning Add delete-all dev key function Add NPPI procedures
* mesh: Re-arrange Join/Create/Import/Attach page savingBrian Gix2020-10-071-2/+0
| | | | | | | When an App is creating or attaching to a node, it first evaluates the validity of the Apps composition. Invalid compositions are not allowed to continue. Valid compositions need to be saved, which means that create_node_config() must be called as part of Composition validation.
* 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: Clean up handling of config model binding messagesInga Stotland2020-08-101-4/+0
| | | | | | | This modification allows using a single point for sending out the composed status messages by the Config Server. Also, remove unused definitions for binding functions in node.h
* mesh: Move model functionality out of node.c to model.cInga Stotland2020-07-251-2/+2
| | | | | | | | | This moves the model related code out of node.c to model.c providing for better functional separation of modules. Also, use the value of 0xFFFF for internal representation of vendor ID for BT SIG defined models. This allows to maintain a single internal vendor ID / model ID space.
* mesh: Add Composition page storage to node.jsonBrian Gix2020-07-081-1/+5
| | | | | | 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: Emit PropertiesChanged when IV Index changesInga Stotland2020-06-221-0/+1
| | | | | | This adds emitting of PropertiesChanged signal whenever the mesh IV index is updated to indicate that the vlaues of "IvIndex" property has been modified.
* mesh: Add "node is busy" check for Leave() & Attach()Inga Stotland2020-06-101-0/+1
| | | | | | | | | | | | | | | This introduces the following behavior change for those methods on Network interface that specify node token as an input parameter Leave() method: If Leave method is called for a node that is being processed as a result of a Create, Import, Join or Attach method calls in progress, node removal is not allowed and org.bluez.mesh.Error.Busy error is returned. Attach() method: If Attach method is called for a node that is being processed as a result of a Create, Import or Join method calls in progress, node attachment is not allowed and org.bluez.mesh.Error.Busy error is returned.
* mesh: Delete unused functionInga Stotland2020-06-101-1/+0
| | | | This deletes unused function node_is_provisioned()
* mesh: Clean up Attach() method callInga Stotland2020-05-221-1/+1
| | | | | This consolidates error return form one place: off a callback with unsuccessful status.
* mesh: Clean up Import() method callInga Stotland2020-05-221-1/+1
| | | | | This removes unnecessary failing conditions in Import() call and simplifies iterations through "flags" dictionary.
* mesh: Remove unused function prototypes from node.hInga Stotland2020-05-221-2/+0
|
* mesh: Add finalization of a newly created nodeInga Stotland2020-05-221-0/+1
| | | | | | | | | | | | When a new node is created as a result of successful completion of either Join() or Create() or Import() methods and has been confirmed via successful token delivery to the application, clean up node's D-Bus resources (application path, element paths, etc) that have been gathered during the initial GetMAnagedObjects() call. Also, remove the agent instance associaed with the new node. These resources will be re-populated after the Attach() call verifies the node's integrity.
* mesh: remove unused node_set_device_key()Jakub Witowski2020-01-311-1/+0
| | | | | This patch removes node_set_device_key() function, because it is unused.
* mesh: Fix logic in AppKey deletionInga Stotland2020-01-141-2/+2
| | | | | | | | When deleting an AppKey from a node, call mesh_config_app_key_del() only from appkey level (i.e., keep it contained in appkey.c and remove the duplicate call in node.c) Also, simplify the node_app_key_delete() argument list.
* mesh: Fix getting managed objects from ObjectManagerMichał Lowas-Rzechonek2019-12-181-4/+4
| | | | | | | | | | | | | | | | | | | D-Bus spec mandates that GetManagedObjects method of org.freedesktop.DBus.ObjectManager interface returns *children* only: https://dbus.freedesktop.org/doc/dbus-specification.html > All returned object paths are children of the object path implementing > this interface, i.e. their object paths start with the ObjectManager's > object path plus '/' Both test scripts and ELL abuse this by returning application interfaces via ObjectManager attached to the same path, but other D-Bus implementations do not, making Attach() fail because mandatory interfaces cannot be found. This patch fixes the issue by scanning hierarchy returned by GetManagedObjects for object implementing org.bluez.mesh.Application1 interface and keeping that as node's app_path.
* mesh: Delete unused functionInga Stotland2019-12-101-1/+0
| | | | | This removes node_parse_composition() implementation as it is not used anywhere in the rest of the code base.
* mesh: Move sequence number overcommit to mesh-config-jsonMichał Lowas-Rzechonek2019-08-081-6/+0
| | | | | | | | 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: Implement Import() D-Bus API of org.bluez.mesh.Network1 interfaceMichał Lowas-Rzechonek2019-08-011-0/+5
| | | | | | | | | This method allows local nodes to be imported from an external provisioning database, enabling applications to create mesh nodes without using provisioning procedure. The procedure is similar to provisioning procedure, but all data exchange happens over D-Bus.
* mesh: Create or re-use a node storage directory for keyringInga Stotland2019-07-151-2/+1
| | | | | | | | This adds APIs to set a directory for storing node's key ring info. The directory is named MESH_STORAGE_DIR/<node uuid>. This directory may contain additional node info plus node configuration, if node configuration storage follows the same layout (as it does when JSON based config file format is used).
* mesh: Manage node config directory in mesh-configInga Stotland2019-07-151-2/+1
| | | | | | | | | | | | | | | | | | | 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: Confine dependency on json-c to mesh-config-json.cInga Stotland2019-07-151-3/+6
| | | | | | | | 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: Expose resources needed by Management1 interfaceBrian Gix2019-07-141-0/+3
|
* mesh: Update copyright datesInga Stotland2019-05-171-1/+1
|
* mesh: Reconfigure node storage treeBrian Gix2019-05-131-2/+2
| | | | | | Add a tree structure to a nodes data storage, in order to safely handle Replay Protection list, Refactor local Sequence Numbers, and add Key storage for Config Client nodes.
* mesh: Add CreateNetwork method() implementationInga Stotland2019-05-101-3/+5
| | | | | | | | | | | This implements CreateNetwork() method on org.bluez.mesh.Network1 interface. Invoking this method generates a self-provisioned local node associated with a brand new mesh network. This new network is bare bones: only one network key is defined. The new node assumes the role of mesh network manager and will be able to use soon to be implemented methods of org.bluez.mesh.Management1 interface to provision remote nodes into its network and to add/update/remove network and application keys.
* mesh: Use node uuids as storage directory namesMichał Lowas-Rzechonek2019-05-081-1/+1
| | | | | | | | | | | Instead of keeping track of unique 16bit node identifiers, reuse their UUIDs to create both storage directories and dbus objects. Because of that: - UUID is no longer stored in the JSON file, it's inferred from the directory name instead - Join(), CreateNetwork() and ImportLocalNode() APIs return an error if given UUID already registered within the daemon
* mesh: Clean up processing of Attach() methodInga Stotland2019-05-021-4/+5
| | | | | | This changes the prototype for the callback function of Attach() method call: remove unused node_path argument and make the callback more generalized and re-usable for other method calls.
* mesh: Create and store random token per nodeBrian Gix2019-04-091-0/+2
| | | | | Fix issue with device key being used as a token. Token now seperate, and with a portable representation in the node database.
* mesh: Cleanup storage save and remove proceduresInga Stotland2019-02-281-0/+1
| | | | | | | | | To remove a node config directory completely, the directory needs to be empty. Both node.json and node,json.bak files must are deleted. Also, change storage_save_config() type to void to eliminate meaningless checks.
* mesh: Re-arrange node cleanup functionsInga Stotland2019-02-281-2/+2
| | | | | Rename node_free() to node_remove() and consolidate clean up operations. Change declarations for internally used functions to static.
* mesh: Add org.bluez.mesh.Node D-Bus API supportInga Stotland2019-01-081-14/+29
| | | | | | | | | | | | | | | Add support for maintaining multiple local nodes within a single daemon. A mesh node is an adressable entity in Bluetooth mesh. A local mesh capable device may have multiple distinct representations as a mesh node on different mesh networks. Each such representation (aka "node configuration") maintains runtime storage of encryption/decryption keys, model subscriptions and publications, etc. Also, implement D-Bus methods for org.bluez.mesh.Node interaface: Send(), Publish(), VendorPublish() Also, add support for generating temporary mesh node entity for Join() method and verification of credentials for Attach() method
* mesh: Header files for mesh access layer and utilitiesInga Stotland2018-08-201-0/+80
| | | | This adds initial implementation of Mesh access layer functionality
* tools: Move meshctl sources under tools/mesh directoryInga Stotland2018-07-061-125/+0
| | | | This is a temporary location until the unified mesh solution is provided
* mesh: meshctl: Add subscriptions to node structure and json databaseSteve Brown2018-02-161-0/+2
| | | | | | | | | | | | | | sub-add 0101 c000 1000 { "modelId":"1000", "bind":[ 1 ], "subscribe":[ "c000" ] },
* mesh: move GATT defines to the appropriate header fileInga Stotland2017-08-281-11/+0
| | | | | Group mesh GATT definitions in mesh/gatt.h file. Also remove unused members in mesh_node structure.
* mesh: Remove circular include protection guardsMarcel Holtmann2017-08-211-12/+0
|
* mesh: define APIs for Bluetooth MeshBrian Gix2017-08-211-0/+146