5 int main(int argc, char *argv[]) {
6 // Open a new meshlink instance.
8 meshlink_handle_t *mesh = meshlink_open("basic_conf", "foo");
12 // Check that our own node exists.
14 meshlink_node_t *self = meshlink_get_node(mesh, "foo");
17 if(strcmp(self->name, "foo"))
20 // Start and stop the mesh.
22 if(!meshlink_start(mesh))
26 // Make sure we can start and stop the mesh again.
28 if(!meshlink_start(mesh))
32 // Close the mesh and open it again, now with a different name parameter.
36 // Check that the name is ignored now, and that we still are "foo".
38 mesh = meshlink_open("basic_conf", "bar");
42 if(meshlink_get_node(mesh, "bar"))
45 self = meshlink_get_node(mesh, "foo");
48 if(strcmp(self->name, "foo"))
51 // Start and stop the mesh.
53 if(!meshlink_start(mesh))