def filter_icmp(packet): """Returns True if packet contains ICMP layer.""" return scapy.ICMP in packet