Chapter 28. TCP Input


TCP input processing is the largest piece of code that we examine in this text. The function tcp_input is about 1100 lines of code. The processing of incoming segments is not complicated, just long and detailed. Many implementations, including the one in Net/3, closely follow the input event processing steps in RFC 793, which spell out in detail how to respond to the various input segments, based on the current state of the connection.

The tcp_input function is called by ipintr (through the pr_input function in the protocol switch table) when a datagram is received with a protocol field of TCP. tcp_input executes at the software interrupt level.

The function is so long that we divide its discussion into two chapters. ...

Get TCP/IP Illustrated now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.