Master the fundamental concepts of network stack fundamentals through this focused micro-challenge.
Every network packet traverses a layered architecture before reaching the wire. The OSI model has seven layers; the TCP/IP model collapses them into four. For example, when you run ping 8.8.8.8, the ICMP echo request passes through application, network, link, and physical layers before the NIC transmits anything.
The TCP/IP model maps cleanly to real headers you will parse later:
0x08001 for ICMPTracing a ping from application to wire:
ping creates an ICMP echo request (type 8, code 0)10x0800Each layer adds its own header (encapsulation). The receiver strips headers in reverse order.
This task asks you to document each layer with printf statements for a ping packet. You will need this mental map when Wireshark shows you nested protocol trees and you must decide which layer owns a given field.
Write a C program that documents each network layer with printf statements. Show what happens at each layer for a ping packet.
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