def tcpdump_read(device, capture_file, protocol='', opts=''):
    """Read the tcpdump packets and deletes the capture file after read

    :param device: lan or wan
    :type device: Object
    :param capture_file: Filename in which the packets were captured
    :type capture_file: String
    :param protocol: protocol to filter. Defaults to ''
    :type protocol: String, Optional
    :param opts: can be more than one parameter but it should be joined with "and" eg: ('host '+dest_ip+' and port '+port). Defaults to ''
    :type opts: String, Optional
    :return: Output of tcpdump read command.
    :rtype: string
    """
    if opts:
        protocol = protocol + ' and ' + opts
    device.sudo_sendline("tcpdump -n -r %s %s" % (capture_file, protocol))
    device.expect(device.prompt)
    output = device.before
    device.sudo_sendline("rm %s" % (capture_file))
    device.expect(device.prompt)
    return output