Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 ============================================
0004 The proc/net/tcp and proc/net/tcp6 variables
0005 ============================================
0006 
0007 This document describes the interfaces /proc/net/tcp and /proc/net/tcp6.
0008 Note that these interfaces are deprecated in favor of tcp_diag.
0009 
0010 These /proc interfaces provide information about currently active TCP
0011 connections, and are implemented by tcp4_seq_show() in net/ipv4/tcp_ipv4.c
0012 and tcp6_seq_show() in net/ipv6/tcp_ipv6.c, respectively.
0013 
0014 It will first list all listening TCP sockets, and next list all established
0015 TCP connections. A typical entry of /proc/net/tcp would look like this (split
0016 up into 3 parts because of the length of the line)::
0017 
0018    46: 010310AC:9C4C 030310AC:1770 01
0019    |      |      |      |      |   |--> connection state
0020    |      |      |      |      |------> remote TCP port number
0021    |      |      |      |-------------> remote IPv4 address
0022    |      |      |--------------------> local TCP port number
0023    |      |---------------------------> local IPv4 address
0024    |----------------------------------> number of entry
0025 
0026    00000150:00000000 01:00000019 00000000
0027       |        |     |     |       |--> number of unrecovered RTO timeouts
0028       |        |     |     |----------> number of jiffies until timer expires
0029       |        |     |----------------> timer_active (see below)
0030       |        |----------------------> receive-queue
0031       |-------------------------------> transmit-queue
0032 
0033    1000        0 54165785 4 cd1e6040 25 4 27 3 -1
0034     |          |    |     |    |     |  | |  | |--> slow start size threshold,
0035     |          |    |     |    |     |  | |  |      or -1 if the threshold
0036     |          |    |     |    |     |  | |  |      is >= 0xFFFF
0037     |          |    |     |    |     |  | |  |----> sending congestion window
0038     |          |    |     |    |     |  | |-------> (ack.quick<<1)|ack.pingpong
0039     |          |    |     |    |     |  |---------> Predicted tick of soft clock
0040     |          |    |     |    |     |              (delayed ACK control data)
0041     |          |    |     |    |     |------------> retransmit timeout
0042     |          |    |     |    |------------------> location of socket in memory
0043     |          |    |     |-----------------------> socket reference count
0044     |          |    |-----------------------------> inode
0045     |          |----------------------------------> unanswered 0-window probes
0046     |---------------------------------------------> uid
0047 
0048 timer_active:
0049 
0050  ==  ================================================================
0051   0  no timer is pending
0052   1  retransmit-timer is pending
0053   2  another timer (e.g. delayed ack or keepalive) is pending
0054   3  this is a socket in TIME_WAIT state. Not all fields will contain
0055      data (or even exist)
0056   4  zero window probe timer is pending
0057  ==  ================================================================