diff --git a/src/pkg/syscall/types_linux.go b/src/pkg/syscall/types_linux.go index 89e043f9e6..d222baa486 100644 --- a/src/pkg/syscall/types_linux.go +++ b/src/pkg/syscall/types_linux.go @@ -195,6 +195,8 @@ type Inet6Pktinfo C.struct_in6_pktinfo type Ucred C.struct_ucred +type TCPInfo C.struct_tcp_info + const ( SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 @@ -211,6 +213,7 @@ const ( SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo SizeofUcred = C.sizeof_struct_ucred + SizeofTCPInfo = C.sizeof_struct_tcp_info ) // Netlink routing and interface messages diff --git a/src/pkg/syscall/ztypes_linux_amd64.go b/src/pkg/syscall/ztypes_linux_amd64.go index d5583a7c2e..4077f038a5 100644 --- a/src/pkg/syscall/ztypes_linux_amd64.go +++ b/src/pkg/syscall/ztypes_linux_amd64.go @@ -253,6 +253,40 @@ type Ucred struct { Gid uint32 } +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + const ( SizeofSockaddrInet4 = 0x10 SizeofSockaddrInet6 = 0x1c @@ -269,6 +303,7 @@ const ( SizeofInet4Pktinfo = 0xc SizeofInet6Pktinfo = 0x14 SizeofUcred = 0xc + SizeofTCPInfo = 0x68 ) const (