public static int getAvailablePortNumber(String IP, int firstPort, int lastPort, int ownPort){
		int current_portnumber = firstPort - 1;
		boolean temp_result = false;
		
		while((temp_result == false) && (current_portnumber <= lastPort)){
			current_portnumber++;
			if(current_portnumber != ownPort){
				temp_result = Protocol.isPortInUse(IP, current_portnumber);
			}
		}
		
		return current_portnumber;
	}