static int start_netprobe(const struct sa *turn_srv,
			  int proto, bool secure,
			  const char *username, const char *password)
{
	int err;

	re_printf("starting netprobe with TURN%s-server %J"
		  " (proto=%s) ..\n",
		  secure ? "S" : "", turn_srv,
		  net_proto2name(proto));

#define PACKET_COUNT 50
#define PACKET_INTERVAL 20

	if (netprobec >= ARRAY_SIZE(netprobev)) {
		warning("reached maximum %zu netprobes\n", netprobec);
		return 0;
	}

	netprobev[netprobec].turn_srv = *turn_srv;
	netprobev[netprobec].secure = secure;
	netprobev[netprobec].proto = proto;
	

	err = netprobe_alloc(&netprobev[netprobec].np,
			     turn_srv, proto, secure,
			     username, password,
			     PACKET_COUNT, PACKET_INTERVAL,
			     netprobe_handler, (void *)netprobec);
	if (err) {
		warning("could not create netprobe (%m)\n", err);
		goto out;
	}

	netprobec++;

 out:
	return err;
}
static int start_netprobe(const struct sa *turn_srv,
			  int proto, bool secure,
			  const char *username, const char *password)
{
	int err;

	re_printf("starting netprobe with TURN%s-server %J"
		  " (proto=%s) ..\n",
		  secure ? "S" : "", turn_srv,
		  net_proto2name(proto));

#define PACKET_COUNT 50
#define PACKET_INTERVAL 20

	if (netprobec >= ARRAY_SIZE(netprobev)) {
		warning("reached maximum %zu netprobes\n", netprobec);
		return 0;
	}

	netprobev[netprobec].turn_srv = *turn_srv;
	netprobev[netprobec].secure = secure;
	netprobev[netprobec].proto = proto;
	

	err = netprobe_alloc(&netprobev[netprobec].np,
			     turn_srv, proto, secure,
			     username, password,
			     PACKET_COUNT, PACKET_INTERVAL,
			     netprobe_handler, (void *)netprobec);
	if (err) {
		warning("could not create netprobe (%m)\n", err);
		goto out;
	}

	netprobec++;

 out:
	return err;
}