public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Linux TCP/IP Accept Queue
@ 2006-02-03 21:21 Benjamin Chu
  0 siblings, 0 replies; only message in thread
From: Benjamin Chu @ 2006-02-03 21:21 UTC (permalink / raw)
  To: linux-kernel

Hello! I got few questions about the Linux kernel source code for 
implementing the TCP/IP.

 I just want to understand how the tcp/ip handle a incoming connection 
request from a remote client. As far as I know, after a connection 
request from a remote client completes the TCP 3-way handshake with the 
local server (in Established state). It would become an open request and 
this open request will be placed in the accept queue. At this point a 
new child socket is created and pointed to by the open request. And each 
time an "userspace application" (http, ftp..etc) process executes the 
"accept()" system call, the first open request in the accept queue is 
removed and the socket which is pointed to by this open request is 
returned.

 I tried to track the source code of the Linux kernel. My questions are:

 1. After a connection request from a client complete the TCP 3-way 
handshake(in Established state), does the function "tcp_acceptq_queue" 
in "tcp.h" must be called? Does this function handle the task which puts 
a new open request into accept queue ?.

 2. Each time the Web server process executes the accept() system call, 
 Does the function "tcp_accept" in "tcp.c" must be called. Does this 
function  handle the task which removes the first open request in the 
accept queue and return the socket which is pointed to by the open request?


Is there anything  which I describe above correct or not? Or there is 
any reference regarding this matter? Please tell me! Thank you very much!

p.s. My Linux Kernel Version is 2.4.25

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-03 21:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-03 21:21 Linux TCP/IP Accept Queue Benjamin Chu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox