This function is called when a socket in the LISTEN state receives a SYN segment. This is an attempt by a client to initiate a connection with the server.
Our first change involves the waking up of the socket. A check is made to determine if the segment contains data. If it does, we leave the socket alone until we have all the data:
if (data_len <= 0)
/*
* If we have received data in the SYN segment,
* we don't want to wake up the socket yet, need
* to do a bit of processing first.
*/
sk->data_ready(sk,0);
}
timinput{code/pseudo_conn_request}}{\scriptsize \pr