Problem with Sockets

From: Sandeep Gupta (sandeepg@iitk.ac.in)
Date: Thu Feb 03 2000 - 15:18:58 EST


Hi all,

I am working on linux 2.2.5
I cannot understand code for the following --

How connection establishment takes place --
  Precisely :
  1) How a socket that is in TCP_LISTEN state,
     handles any incoming requests..
      
     What I could I figure out -
       For any incoming packet
 
       tcp_v4_rcv is called and then it calls
       tcp_v4_do_rcv which if socket is in TCP_LISTEN state calls
       tcp_v4_hnd_req which confusing me -- why ..cuz it
                        finds possible connection requests by calling
       tcp_v4_search_req

    My confusion : Are not the received skb and sk ( received as
parameters) already constitute a request? So why do we search for more?

  2) How sockets which listen on standard ports, deal with incoming
     connection requests. Precisely what if at all do the new sockets
     (which are created as a result of accept)
     share with this socket listening on standard port?

     What function call sequence is associated with all this?

  3) There is a hashtable

     This is for all sockets, to keep track of the local port allocations.
     #define TCP_BHTABLE_SIZE 512
     
     Can anybody tell me what are these local port allocations?

Can anybody help me out?

bye
Sandeep

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Feb 07 2000 - 21:00:10 EST