+ if(!x && errno) {
+ logger(mesh, MESHLINK_ERROR, "Failed to read `%s': %s", filename, strerror(errno));
+ }
+
+ return x;
+}
+
+bool read_host_config(meshlink_handle_t *mesh, splay_tree_t *config_tree, const char *name) {
+ char filename[PATH_MAX];
+ bool x;
+
+ snprintf(filename, PATH_MAX, "%s" SLASH "hosts" SLASH "%s", mesh->confbase, name);
+ x = read_config_file(config_tree, filename);
+
+ return x;
+}
+
+bool write_host_config(struct meshlink_handle *mesh, const struct splay_tree_t *config_tree, const char *name) {
+ char filename[PATH_MAX];
+
+ snprintf(filename, PATH_MAX, "%s" SLASH "hosts" SLASH "%s", mesh->confbase, name);
+ return write_config_file(config_tree, filename);
+}
+
+bool modify_config_file(struct meshlink_handle *mesh, const char *name, const char *key, const char *value, int trim) {
+ assert(mesh && name && key);