2 ms·
I wrote a basic TCP stack for a honeypot research project. It is hard and incredibly complex. Yes and no. Most of the complication comes from extra functional
by cperciva 12y ago
I wrote a basic TCP stack for a honeypot research project. It is hard and incredibly complex.
Yes and no. Most of the complication comes from extra functionality (segmentation offload, checksum offload, SACK) or from functionality which is required by the standard but not relevant for a DNS resolver (congestion control, window management, TCP timers).
If all you're doing is accepting a TCP connection, reading a small request, and writing a small response back, you can remove about 90% of the code from your TCP stack.