linux: add tcp_cc_info and its related types

Add the ability to retrieve congestion control information from a socket via TCP_CC_INFO.

Fixes golang/go#68232

Change-Id: I2ea15928ec0e3192b670759bab4b659e62be553b
GitHub-Last-Rev: b8b8c44f1f047fe6c60fae8adc695f2633dadd7c
GitHub-Pull-Request: golang/sys#200
Reviewed-on: https://go-review.googlesource.com/c/sys/+/595676
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Leo Antunes
2024-09-17 15:50:50 +00:00
committed by Gopher Robot
parent d58f986c89
commit 48aad76ed3
3 changed files with 74 additions and 0 deletions
+8
View File
@@ -112,6 +112,7 @@ struct termios2 {
#include <linux/if_pppox.h>
#include <linux/if_tun.h>
#include <linux/if_xdp.h>
#include <linux/inet_diag.h>
#include <linux/ipc.h>
#include <linux/kcm.h>
#include <linux/keyctl.h>
@@ -757,6 +758,12 @@ type Ucred C.struct_ucred
type TCPInfo C.struct_tcp_info
type TCPVegasInfo C.struct_tcpvegas_info
type TCPDCTCPInfo C.struct_tcp_dctcp_info
type TCPBBRInfo C.struct_tcp_bbr_info
type CanFilter C.struct_can_filter
type ifreq C.struct_ifreq
@@ -798,6 +805,7 @@ const (
SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
SizeofUcred = C.sizeof_struct_ucred
SizeofTCPInfo = C.sizeof_struct_tcp_info
SizeofTCPCCInfo = C.sizeof_union_tcp_cc_info
SizeofCanFilter = C.sizeof_struct_can_filter
SizeofTCPRepairOpt = C.sizeof_struct_tcp_repair_opt
)