- /* Send him everything we know */
-
- send_everything(mesh, c);
-
- /* Create an edge_t for this connection */
-
- assert(devclass >= 0 && devclass < DEV_CLASS_COUNT);
-
- c->edge = new_edge();
- c->edge->from = mesh->self;
- c->edge->to = n;
- sockaddrcpy_setport(&c->edge->address, &c->address, atoi(hisport));
- c->edge->weight = mesh->dev_class_traits[devclass].edge_weight;
- c->edge->connection = c;
-
- node_add_recent_address(mesh, n, &c->address);
- edge_add(mesh, c->edge);
-
- /* Notify everyone of the new edge */
-
- send_add_edge(mesh, mesh->everyone, c->edge, 0);
-
- /* Run MST and SSSP algorithms */
-
- graph(mesh);