- /* Set up logging for Meshlink */
- meshlink_set_log_cb(NULL, MESHLINK_DEBUG, logger_cb);
-
- /* Create meshlink instance */
- meshlink_handle_t *mesh = meshlink_open("testconf", argv[1], "node_sim", DEV_CLASS_STATIONARY);
- assert(mesh);
-
- /* Set up logging for Meshlink with the newly acquired Mesh Handle */
- meshlink_set_log_cb(mesh, MESHLINK_DEBUG, logger_cb);
- meshlink_enable_discovery(mesh, false);
- assert(meshlink_start(mesh));
- invite = meshlink_invite_ex(mesh, NULL, argv[2], MESHLINK_INVITE_LOCAL | MESHLINK_INVITE_NUMERIC);
+ meshlink_handle_t *mesh = execute_open(argv[CMD_LINE_ARG_NODENAME], "1");
+ execute_start();
+
+ if(argc > CMD_LINE_ARG_SUBMESH) {
+ s = meshlink_submesh_open(mesh, argv[CMD_LINE_ARG_SUBMESH]);
+ }
+
+ invite = execute_invite(argv[CMD_LINE_ARG_INVITEE], s);