The subject, actually explained.
Detailed notes for first-time study, rebuilt from Stevens, Fenner & Rudoff — UNIX Network Programming, Vol 1, not from slides. Every protocol diagram here is live, every C program steps line by line next to the state it creates, and every question from last year's paper is worked in full.
Written so that someone who has never opened a socket can follow it, and still complete enough to answer a ten-mark question from.
Before the exam
Start here if you are short on time.
Unit 1 — Introduction & Sockets
Chapters 1–4
Unit 2 — TCP Client/Server & Options
Chapters 5 and 7
How to read this
The page uses a small, fixed set of blocks. Learn them once.
socket() is
picking up a handset; bind() is telling people your number.
inet_addr cannot represent
255.255.255.255; TIME_WAIT lasts 2 MSL,
not one.
What the colours mean
Colour on this site is never decoration — it is a claim about the data, and it is the same claim on every page and in both themes.
So in a diagram, a sky arrow is always something the client sent and a mint arrow is always something the server sent — no legend needed, on any figure, in any chapter.