3 way handshake

Chir0n io.chir0n at gmail.com
Thu Apr 19 14:30:39 EDT 2012


Hi Anuz,

I have google before, but without success.

This file don't seems to contain the timeouts.

I have been searching for the timeouts of TCP connections for my
monograph and I have found the following struct in file
net/netfilter/nf_conntrack_proto_tcp.c:

 73 static unsigned int tcp_timeouts[TCP_CONNTRACK_MAX] __read_mostly = {
 74         [TCP_CONNTRACK_SYN_SENT]        = 2 MINS,
 75         [TCP_CONNTRACK_SYN_RECV]        = 60 SECS,
 76         [TCP_CONNTRACK_ESTABLISHED]     = 5 DAYS,
 77         [TCP_CONNTRACK_FIN_WAIT]        = 2 MINS,
 78         [TCP_CONNTRACK_CLOSE_WAIT]      = 60 SECS,
 79         [TCP_CONNTRACK_LAST_ACK]        = 30 SECS,
 80         [TCP_CONNTRACK_TIME_WAIT]       = 2 MINS,
 81         [TCP_CONNTRACK_CLOSE]           = 10 SECS,
 82         [TCP_CONNTRACK_SYN_SENT2]       = 2 MINS,
 83 };

So I don't understood it well. I need to know:

(a) in how much time I need to receive an ACK after I send an SYN;
(b)  how much time the connection is closed if any packet is send by a node.

Maybe there are a documentation about these constants?

Thank very much!

On Thu, Apr 19, 2012 at 12:30 PM, Anuz Pratap Singh Tomar
<chambilkethakur at gmail.com> wrote:
>
>
> On Thu, Apr 19, 2012 at 2:49 PM, Chir0n <io.chir0n at gmail.com> wrote:
>>
>> Hello,
>>
>> Can someone tell me where I can find out the code snippet that has the
>> 3 way handshake values?
>>
> after doing a bit of googling, you can easily reach to this location:
> http://lxr.linux.no/#linux+v3.3.2/net/ipv4/tcp_input.c#L5801
>
> This is where state machine is implemented for TCP.
>
>
>
>>
>> Best regards,
>>
>> Chiron
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>



More information about the Kernelnewbies mailing list