- hostname, *port, proto);
- else
- printf_verbose("Connecting to hostname : %s, port : %d, "
- "session id : %" PRIu64 ", proto : IPv%d\n",
- hostname, *port, *session_id, proto);
+ ctx->relay_hostname, ctx->port, proto);
+ ret = 0;
+ goto end;
+ }
+ ret = sscanf(remain[2], "host/%[a-zA-Z.0-9%-]/%s",
+ ctx->traced_hostname, ctx->session_name);
+ if (ret != 2) {
+ fprintf(stderr, "[error] Format : "
+ "net://<hostname>/host/<traced_hostname>/<session_name>\n");
+ goto end;
+ }
+
+ printf_verbose("Connecting to hostname : %s, port : %d, "
+ "traced hostname : %s, session name : %s, "
+ "proto : IPv%d\n",
+ ctx->relay_hostname, ctx->port, ctx->traced_hostname,
+ ctx->session_name, proto);