+bool node_read_devclass(meshlink_handle_t *mesh, node_t *n) {
+
+ splay_tree_t *config_tree;
+ char *p;
+
+ init_configuration(&config_tree);
+
+ if(!read_host_config(mesh, config_tree, n->name)) {
+ goto exit;
+ }
+
+ if(get_config_string(lookup_config(config_tree, "DeviceClass"), &p)) {
+ n->devclass = atoi(p);
+ free(p);
+ }
+
+ if((int)n->devclass < 0 || n->devclass > _DEV_CLASS_MAX) {
+ n->devclass = _DEV_CLASS_MAX;
+ }
+
+exit:
+ exit_configuration(&config_tree);
+ return n->devclass != 0;
+}
+
+bool node_write_devclass(meshlink_handle_t *mesh, node_t *n) {
+
+ if((int)n->devclass < 0 || n->devclass > _DEV_CLASS_MAX) {
+ return false;
+ }
+
+ bool result = false;
+
+ splay_tree_t *config_tree;
+ init_configuration(&config_tree);
+
+ // ignore read errors; in case the file does not exist we will create it
+ read_host_config(mesh, config_tree, n->name);
+
+ config_t *cnf = lookup_config(config_tree, "DeviceClass");
+
+ if(!cnf) {
+ cnf = new_config();
+ cnf->variable = xstrdup("DeviceClass");
+ config_add(config_tree, cnf);
+ }
+
+ set_config_int(cnf, n->devclass);
+
+ if(!write_host_config(mesh, config_tree, n->name)) {
+ goto fail;
+ }
+
+ result = true;
+
+fail:
+ exit_configuration(&config_tree);
+ return result;
+}
+
+void load_all_nodes(meshlink_handle_t *mesh) {