How halcyonazure/cs144 works
Project type and purpose
• This is an educational network‐stack implementation in C++ for Stanford’s CS144 labs (2021).
• It provides a reusable library (“libsponge”) that implements TCP/IP primitives (byte streams, packet parsing, TCP sender/receiver, router, taps), plus a suite of small applications (in “apps/”) that exercise the library, and extensive unit and doctests.
File structure
• Top‐level
• CMakeLists.txt, cmake-variants.yaml, compile_commands.json: build system using CMake.
• README.md, writeups/: documentation and lab reports.
• assignments/: original PDFs of lab exercises.
• etc/: CMake modules, linting/config, Doxygen config.
• tap.sh, tun.sh, txrx.sh: helper scripts to drive TUN/TAP interfaces.
• libsponge/
• Core modules: byte_stream, network_interface, router, stream_reassembler, tcp_connection.
• tcp_helpers/: low‐level packet formats and helpers for Ethernet, ARP, IPv4, TCP, adapters.
• util/: event loop, socket wrappers, parsers, tun interface.
• apps/: standalone executables demonstrating usage (bidirectional_stream_copy, bouncer, webget, simulators, benchmarks).
• tests/ and doctests/: comprehensive unit tests for each library component.
• No separate “frontend/backend”—this is a protocol library + apps + tests.
README insights
• Confirms it’s a hands‐on TCP/IP stack implementation with tests.
• Mentions use of gcc-10, blog writeups.
• Points to original empty “sponge” repo and assignments.
Final advice
• Both build‐time (CMake → libsponge → apps/tests) and run‐time (app → library → OS) views.