mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Chu <benchu@tamu.edu>
To: linux-kernel@vger.kernel.org
Subject: Linux TCP/IP Accept Queue
Date: Fri, 03 Feb 2006 15:21:20 -0600	[thread overview]
Message-ID: <43E3C950.5060203@tamu.edu> (raw)

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

                 reply	other threads:[~2006-02-03 21:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43E3C950.5060203@tamu.edu \
    --to=benchu@tamu.edu \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®