diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-10-23 23:59:32 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-10-23 23:59:32 +0000 |
commit | 10b2240df3a2d5c63ca3bbb7a19c68a9144e824f (patch) | |
tree | 1eb0bf08547f306160a2c7934a370ee7235cf650 /pkg/tcpip/tcpip.go | |
parent | bdf5354e934d5b6fa3211d18731f7255c8bd56f4 (diff) | |
parent | 6d4d9564e3a410684516323fd816b8de64dfb11c (diff) |
Merge release-20190806.1-315-g6d4d956 (automated)
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r-- | pkg/tcpip/tcpip.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index 3d10001d8..353ecd49b 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -673,6 +673,11 @@ func (s *StatCounter) Increment() { s.IncrementBy(1) } +// Decrement minuses one to the counter. +func (s *StatCounter) Decrement() { + s.IncrementBy(^uint64(0)) +} + // Value returns the current value of the counter. func (s *StatCounter) Value() uint64 { return atomic.LoadUint64(&s.count) @@ -881,6 +886,15 @@ type TCPStats struct { // successfully via Listen. PassiveConnectionOpenings *StatCounter + // CurrentEstablished is the number of TCP connections for which the + // current state is either ESTABLISHED or CLOSE-WAIT. + CurrentEstablished *StatCounter + + // EstablishedResets is the number of times TCP connections have made + // a direct transition to the CLOSED state from either the + // ESTABLISHED state or the CLOSE-WAIT state. + EstablishedResets *StatCounter + // ListenOverflowSynDrop is the number of times the listen queue overflowed // and a SYN was dropped. ListenOverflowSynDrop *StatCounter |