Network Programming 23CS7PCNWP · Sem VII · BMSCE
23CS7PCNWP Network Programming Sem VII Units 1–2

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.

Figure 2.5TCP three-way handshake
client server SYN j connect() SYN k, ACK j+1 ACK k+1 accept() returns
Three packets, and the connection exists. Chapter 2 has this one playable, step by step, with the states on both ends.

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.

Every idea that is not obvious on sight carries one of these. If a paragraph lost you, look for the yellow one underneath it — that is the same thing said without the vocabulary.
The same idea again as something you already do. socket() is picking up a handset; bind() is telling people your number.
§2.6 · p.37 The book's own words, or a literal function prototype. Set in mono on sunken paper, so you always know which sentences you can quote.
The specific thing that costs marks. inet_addr cannot represent 255.255.255.255; TIME_WAIT lasts 2 MSL, not one.
Where this appeared, or is likely to. Links straight to the worked answer.

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.

Sky — the client side
Mint — the server side
Butter — a term being defined
Rose — an error, an RST, a trap
Lilac — SCTP

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.