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:
Will Hawkins
2023-02-28 17:07:46 +00:00
committed by Gopher Robot
parent 10499f4574
commit 6f250766ac
2 changed files with 58 additions and 33 deletions
+2 -1
View File
@@ -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>