private boolean open_connection(Packet app_pack) throws InterruptedException
	{
		//conexão já foi aberta
		if (this.in_connection)
			return true;
		
		//destino inalcançável
		Packet packet = build_raw_TCP_packet(app_pack);
		if (packet == null)
			return false;
		
		TCP transport = (TCP) packet.getTransport();
		transport.setSequence_number(0);
		transport.setACK_number(0);
		transport.setACK(false);
		transport.setSYN(true);
		packet.setTransport(transport);

		//SYN
		int timeout = 10;
		do
		{
			send_packet(packet);
			sleep(100);
			timeout--;
			//sem resposta remota
			if (timeout == 0)
				return false;
		}
		//SYN-ACK
		while (!got_ACK(0));
		
		packet.set_new_Id();
		transport.setSequence_number(1);
		transport.setACK_number(1);
		transport.setACK(true);
		transport.setSYN(false);
		packet.setTransport(transport);
		
		//ACK
		send_packet(packet);
		this.buffer.clear();
		this.in_connection = true;
		return true;
	}