I have a pcap file and I can read it with the following code in Python:
from scapy.all import *
packets = rdpcap("mypfile.pcap")
Now I want to read the content of each layer separately like this (the packets are collected from a 6LoWPAN network):
for packet in packets:
print("Show me layer 2")
print("Show me layer 3")
print("Show me layer 4")
Could you please help in this regard as I am new in Scapy?