Master the fundamental concepts of network stack fundamentals through this focused micro-challenge.
Ethernet is the dominant link-layer technology for LANs. The Ethernet II header is 14 bytes before the payload begins. For example, bytes 12-13 hold the EtherType: 0x0800 means IPv4, 0x0806 means ARP.
A typical frame on the wire:
ff:ff:ff:ff:ff:ff for broadcastaa:bb:cc:dd:ee:ffFrame size constraints: minimum 64 bytes, maximum 1518 bytes including FCS. Payloads shorter than 46 bytes get padded.
To parse a captured frame manually:
0x8100)This task requires you to parse a simulated Ethernet frame byte array. You will use this exact 14-byte header layout in every tcpdump capture and when you build ARP requests with raw sockets later in the track. Switches forward frames based on the destination MAC you extract here, and VLAN-tagged frames with EtherType 0x8100 shift the IP payload start past byte 14.
Write a C program that parses a simulated Ethernet frame byte array. Print the destination MAC, source MAC, EtherType, and payload length.
Requirements:
Three hints are available for this task, revealed one at a time inside the code workspace so you can struggle productively before seeing them.
All starter code and reference implementations are available for your local setup.
View on Github