Chapter 28. TCP Input
28.1. Introduction
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 ...
Get TCP/IP Illustrated now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.