from scapy.all import * def packet_callback(packet): print(packet.summary()) sniff(iface="eth1", prn=packet_callback, count=10)