mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-06 00:57:18 -04:00
unix: define extended TCPInfo on Linux
On Linux platforms, the kernel can fill out an extended version of the tcp_info struct. Allow users of the sys package to have access to that information. Change-Id: Ib42ad572dd56c774c6d9e8b17fe3bdd8126147bb Reviewed-on: https://go-review.googlesource.com/c/sys/+/471275 Run-TryBot: Matt Layher <mdlayher@gmail.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Matt Layher <mdlayher@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
committed by
Gopher Robot
parent
10499f4574
commit
6f250766ac
+2
-1
@@ -11,6 +11,7 @@ Input to cgo -godefs. See README.md
|
||||
|
||||
// +godefs map struct_in_addr [4]byte /* in_addr */
|
||||
// +godefs map struct_in6_addr [16]byte /* in6_addr */
|
||||
// +godefs map struct___kernel_sockaddr_storage SockaddrStorage
|
||||
|
||||
package unix
|
||||
|
||||
@@ -31,7 +32,7 @@ package unix
|
||||
#include <utime.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <linux/tcp.h>
|
||||
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/inotify.h>
|
||||
|
||||
+26
-2
@@ -486,6 +486,30 @@ type TCPInfo struct {
|
||||
Rcv_rtt uint32
|
||||
Rcv_space uint32
|
||||
Total_retrans uint32
|
||||
Pacing_rate uint64
|
||||
Max_pacing_rate uint64
|
||||
Bytes_acked uint64
|
||||
Bytes_received uint64
|
||||
Segs_out uint32
|
||||
Segs_in uint32
|
||||
Notsent_bytes uint32
|
||||
Min_rtt uint32
|
||||
Data_segs_in uint32
|
||||
Data_segs_out uint32
|
||||
Delivery_rate uint64
|
||||
Busy_time uint64
|
||||
Rwnd_limited uint64
|
||||
Sndbuf_limited uint64
|
||||
Delivered uint32
|
||||
Delivered_ce uint32
|
||||
Bytes_sent uint64
|
||||
Bytes_retrans uint64
|
||||
Dsack_dups uint32
|
||||
Reord_seen uint32
|
||||
Rcv_ooopack uint32
|
||||
Snd_wnd uint32
|
||||
Rcv_wnd uint32
|
||||
Rehash uint32
|
||||
}
|
||||
|
||||
type CanFilter struct {
|
||||
@@ -528,7 +552,7 @@ const (
|
||||
SizeofIPv6MTUInfo = 0x20
|
||||
SizeofICMPv6Filter = 0x20
|
||||
SizeofUcred = 0xc
|
||||
SizeofTCPInfo = 0x68
|
||||
SizeofTCPInfo = 0xf0
|
||||
SizeofCanFilter = 0x8
|
||||
SizeofTCPRepairOpt = 0x8
|
||||
)
|
||||
@@ -1239,7 +1263,7 @@ type TCPMD5Sig struct {
|
||||
Flags uint8
|
||||
Prefixlen uint8
|
||||
Keylen uint16
|
||||
_ uint32
|
||||
Ifindex int32
|
||||
Key [80]uint8
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user