def incoming_logs_validations(incoming_port, ok_message, mock_message=False):
    '''
    Validate that there is incoming traffic of CEF messages to the given port
    :param mock_message: Tells if to mock messages into the tcpdump
    :param mock_messages: Tels if to send mock messages to the pipe to validate it
    :param incoming_port: port to validate
    :param ok_message: message printed if found CEF messages
    :return:
    '''
    start_seconds = int(round(time.time()))
    end_seconds = int(round(time.time()))
    mock_message_counter = 0
    print("This will take " + str(tcpdump_time_restriction) + " seconds.")
    command_tokens = ["sudo", "tcpdump", "-A", "-ni", "any", "port", incoming_port, "-vv"]
    print_notice(" ".join(command_tokens))
    tcp_dump = subprocess.Popen(command_tokens, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    line = str(tcp_dump.stdout.readline())
    # Handle command not found
    if "command not found" in line:
        print_error("Notice that \'tcpdump\' is not installed in your linux machine.\nWe cannot monitor traffic without it.\nPlease install \'tcpdump\'.")
        return False
    poll_obj = select.poll()
    poll_obj.register(tcp_dump.stdout, select.POLLIN)
    while (end_seconds - start_seconds) < tcpdump_time_restriction:
        if mock_message is True and mock_message_counter < mock_message_max:
            # Sending mock messages
            mock_message_counter += 1
            send_cef_message_local(daemon_port, 1)
        poll_result = poll_obj.poll(0)
        if poll_result:
            line = str(tcp_dump.stdout.readline())
            if handle_tcpdump_line(line, incoming_port, ok_message):
                return True
        end_seconds = int(round(time.time()))
    print_error("Could not locate \"CEF\" message in tcpdump")
    return False

    Validate that there is incoming traffic of CEF messages to the given port
    :param mock_message: Tells if to mock messages into the tcpdump
    :param mock_messages: Tels if to send mock messages to the pipe to validate it
    :param incoming_port: port to validate
    :param ok_message: message printed if found CEF messages
    :return:
    
DataConnectors/CEF/cef_troubleshoot.py