-/*
- Configure node_t myself and set up the local sockets (listen only)
-*/
-bool setup_myself(void) {
- config_t *cfg;
- subnet_t *subnet;
- char *name, *hostname, *mode, *afname, *cipher, *digest;
- char *address = NULL;
- char *envp[5];
- struct addrinfo *ai, *aip, hint = {0};
- bool choice;
- int i, err;
-
- myself = new_node();
- myself->connection = new_connection();
- init_configuration(&myself->connection->config_tree);
-
- xasprintf(&myself->hostname, "MYSELF");
- xasprintf(&myself->connection->hostname, "MYSELF");
-
- myself->connection->options = 0;
- myself->connection->protocol_version = PROT_CURRENT;
-
- if(!get_config_string(lookup_config(config_tree, "Name"), &name)) { /* Not acceptable */
- logger(LOG_ERR, "Name for tinc daemon required!");
- return false;
+/// Fill in node details from a config blob.
+bool node_read_from_config(meshlink_handle_t *mesh, node_t *n, const config_t *config) {
+ if(n->canonical_address) {
+ return true;