diff options
author | Mithun Iyer <iyerm@google.com> | 2021-05-20 19:12:27 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-05-20 19:15:49 -0700 |
commit | 9157a91a4eca7e0811edb20952e9f22ea2c3f13e (patch) | |
tree | 7b793c5fb55b409da1907321953d975290abde92 /pkg/tcpip/tcpip.go | |
parent | ae96e00bd98f2d8e44e4fe6dc1c9f05454f2cc93 (diff) |
Add protocol state to TCPINFO
Add missing protocol state to TCPINFO struct and update packetimpact.
This re-arranges the TCP state definitions to align with Linux.
Fixes #478
PiperOrigin-RevId: 374996751
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r-- | pkg/tcpip/tcpip.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index 328470f3e..4dc89e746 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -861,6 +861,9 @@ type SettableSocketOption interface { isSettableSocketOption() } +// EndpointState represents the state of an endpoint. +type EndpointState uint8 + // CongestionControlState indicates the current congestion control state for // TCP sender. type CongestionControlState int @@ -897,6 +900,9 @@ type TCPInfoOption struct { // RTO is the retransmission timeout for the endpoint. RTO time.Duration + // State is the current endpoint protocol state. + State EndpointState + // CcState is the congestion control state. CcState CongestionControlState |