The tcp_rcv() function is called whenever a TCP packet arrives on the host machine. It performs preliminary processing such as checksumming and looking up the socket before it falls into the state specific checks. Appendix A.2.7 contains code for the three areas where the tcp_rcv() function was modified.