Index

Module 12 · From ScratchDNS Server

DNS 03 and 04: The Question and the Answer

DNS Telegram
DNS Telegram · Open board

The question as a telegram: the name spelled as counted chunks, and the answer’s name replaced by a “ditto”. This lesson builds the question’s chunks and, for the answer, the part that holds the address.

Before you start. DNS 01 and 02: The UDP Socket and the Header built a socket and a parser for the 12-byte header: an ID, a flags word, and four counts, the first of which says how many questions follow. The header says there is a question. This lesson reads it (stage 3) and then answers it with real addresses (stage 4). You also need one idea: a DNS record is one fact the directory holds, such as “this name has this address”.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Review From Scratch →

Saved in this browser, and to your account when you sign in.