Linux TCP/IP Accept Queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux