Get all the layers in a packet
How can I get a list of all the layers in scapy? Eg: Ether/IP/UDP/DNS or Ether/IP/TCP/HTTP . The only thing I can think of is to do a packet.summary() and parse the output, which seems very crude. I think there should be a method built-in, but cannot find any in the documentation. Any suggestions? What I am trying to do is to iterate over all the fields of a specific protocol given by a user and display its values. Update: What I am looking for exactly can be seen in wireshark: Open any capture, select a packet, and in the 'Frame' menu, one can see Protocols in frame: eth:ip:udp:data This is