summaryrefslogtreecommitdiff
path: root/mesh/main.c
diff options
context:
space:
mode:
authorInga Stotland <inga.stotland@intel.com>2019-12-10 16:56:16 -0800
committerBrian Gix <brian.gix@intel.com>2019-12-16 14:52:36 -0800
commit4a1bea28b15b4ab9b9c962597162cb4070587763 (patch)
tree5c6cbdc6919d9dfa7fc10912b1ab43997d70467a /mesh/main.c
parentcf0a39476e5f2bb8a4617b7e6482c17f3aafe6ee (diff)
downloadbluez-4a1bea28b15b4ab9b9c962597162cb4070587763.tar.gz
mesh: Add mesh-main.conf file with general mesh configuration
This adds key file with default settings for the mesh daemon. The following settings are included: Beacon: Default setting for to indicate whether secure network beaconing is enabled for a node whose Beacon state hasn't been configured by a configuration client, i.e., this setting apllies to a newly provisioned, created or imported node. Relay: Default setting for supporting relay Friendship: Default setting for supporting Friendship CRPL: Default depth of replay protection list. FriendQueueSize: Default size of friend queue: the number of messages that each Friend node can store for the Low Power node. ProvTimeout: Provisioning timeout in seconds.
Diffstat (limited to 'mesh/main.c')
-rw-r--r--mesh/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mesh/main.c b/mesh/main.c
index 3c41acb75..010edcf85 100644
--- a/mesh/main.c
+++ b/mesh/main.c
@@ -39,6 +39,7 @@
#include "mesh/mesh-io.h"
static const char *config_dir;
+static const char *mesh_conf_fname;
static int ctlr_index = MGMT_INDEX_NONE;
static const struct option main_options[] = {
@@ -99,8 +100,8 @@ static void request_name_callback(struct l_dbus *dbus, bool success,
return;
}
- if (!mesh_init(config_dir, MESH_IO_TYPE_GENERIC, &ctlr_index,
- mesh_ready_callback, dbus)) {
+ if (!mesh_init(config_dir, mesh_conf_fname, MESH_IO_TYPE_GENERIC,
+ &ctlr_index, mesh_ready_callback, dbus)) {
l_error("Failed to initialize mesh");
l_main_quit();
}
@@ -154,7 +155,7 @@ int main(int argc, char *argv[])
int opt;
const char *str;
- opt = getopt_long(argc, argv, "i:c:ndbh", main_options, NULL);
+ opt = getopt_long(argc, argv, "i:c:f:ndbh", main_options, NULL);
if (opt < 0)
break;
@@ -182,6 +183,9 @@ int main(int argc, char *argv[])
case 'c':
config_dir = optarg;
break;
+ case 'f':
+ mesh_conf_fname = optarg;
+ break;
case 'b':
dbus_debug = true;
break;