blob: 4a79209e77a7c42ed172d0e7a3478ef17c5174bd [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001This document describes the interfaces /proc/net/tcp and /proc/net/tcp6.
Jean Delvared603d0a2007-10-15 12:58:35 -07002Note that these interfaces are deprecated in favor of tcp_diag.
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
4These /proc interfaces provide information about currently active TCP
Jean Delvared603d0a2007-10-15 12:58:35 -07005connections, and are implemented by tcp4_seq_show() in net/ipv4/tcp_ipv4.c
6and tcp6_seq_show() in net/ipv6/tcp_ipv6.c, respectively.
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
8It will first list all listening TCP sockets, and next list all established
9TCP connections. A typical entry of /proc/net/tcp would look like this (split
10up into 3 parts because of the length of the line):
11
12 46: 010310AC:9C4C 030310AC:1770 01
13 | | | | | |--> connection state
14 | | | | |------> remote TCP port number
15 | | | |-------------> remote IPv4 address
16 | | |--------------------> local TCP port number
17 | |---------------------------> local IPv4 address
18 |----------------------------------> number of entry
19
20 00000150:00000000 01:00000019 00000000
21 | | | | |--> number of unrecovered RTO timeouts
22 | | | |----------> number of jiffies until timer expires
23 | | |----------------> timer_active (see below)
24 | |----------------------> receive-queue
25 |-------------------------------> transmit-queue
26
27 1000 0 54165785 4 cd1e6040 25 4 27 3 -1
28 | | | | | | | | | |--> slow start size threshold,
Matt LaPlantefa00e7e2006-11-30 04:55:36 +010029 | | | | | | | | | or -1 if the threshold
Linus Torvalds1da177e2005-04-16 15:20:36 -070030 | | | | | | | | | is >= 0xFFFF
31 | | | | | | | | |----> sending congestion window
32 | | | | | | | |-------> (ack.quick<<1)|ack.pingpong
33 | | | | | | |---------> Predicted tick of soft clock
34 | | | | | | (delayed ACK control data)
35 | | | | | |------------> retransmit timeout
36 | | | | |------------------> location of socket in memory
37 | | | |-----------------------> socket reference count
38 | | |-----------------------------> inode
39 | |----------------------------------> unanswered 0-window probes
40 |---------------------------------------------> uid
41
42timer_active:
43 0 no timer is pending
44 1 retransmit-timer is pending
45 2 another timer (e.g. delayed ack or keepalive) is pending
46 3 this is a socket in TIME_WAIT state. Not all fields will contain
47 data (or even exist)
48 4 zero window probe timer is pending