Build it: read the capture (a pcap reader, layer by layer)

A packet on the wire is wrapped like a letter in a building: a corridor address outside, a street address inside, a flat number inside that, then the letter. This lesson builds the program that unwraps them.
Before you start. You need the street address (IP) of How a parcel finds any house on earth, the corridor address (MAC) of Inside your building (your router's life) and The corridor inside the building (frames, switches and VLANs), the handshake flags of TCP vs UDP, and the 3-way handshake, and the DNS question bytes of DNS on the wire. One click, every layer (what happens when you load a page) timed a page load phase by phase; this lesson opens the packets behind those phases. Python 3, standard library only.