git: 815ef05284d1 - main - netinet: remove _WANT_INPCB and _WANT_TCPCB
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 12 Mar 2026 16:40:55 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=815ef05284d184d83613adcf60def403607be6a0
commit 815ef05284d184d83613adcf60def403607be6a0
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-03-12 04:48:06 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-03-12 16:37:53 +0000
netinet: remove _WANT_INPCB and _WANT_TCPCB
These were hacks since FreeBSD 12 that provided some transition period for
utilities to migrate from reading kernel memory via kvm(3) to sysctl(3)
based APIs. The transition period is over.
---
sys/netinet/cc/cc.h | 8 ++++----
sys/netinet/in_pcb.h | 2 +-
sys/netinet/tcp_var.h | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/sys/netinet/cc/cc.h b/sys/netinet/cc/cc.h
index 890bea69a14b..fa175166c9ee 100644
--- a/sys/netinet/cc/cc.h
+++ b/sys/netinet/cc/cc.h
@@ -86,7 +86,7 @@ int cc_register_algo(struct cc_algo *add_cc);
int cc_deregister_algo(struct cc_algo *remove_cc);
#endif /* _KERNEL */
-#if defined(_KERNEL) || defined(_WANT_TCPCB)
+#if defined(_KERNEL)
struct cc_var {
void *cc_data; /* Per-connection private CC algorithm data. */
int bytes_this_ack; /* # bytes acked by the current ACK. */
@@ -112,15 +112,15 @@ struct cc_var {
#define CCF_HYSTART_CAN_SH_CWND 0x0800 /* Can hystart when going CSS -> CA slam the cwnd */
#define CCF_HYSTART_CONS_SSTH 0x1000 /* Should hystart use the more conservative ssthresh */
-#endif /* defined(_KERNEL) || defined(_WANT_TCPCB) */
+#endif /* defined(_KERNEL) */
typedef enum {
-#if defined(_KERNEL) || defined(_WANT_TCPCB)
+#if defined(_KERNEL)
/* ACK types passed to the ack_received() hook. */
CC_ACK = 0x0001, /* Regular in sequence ACK. */
CC_DUPACK = 0x0002, /* Duplicate ACK. */
CC_PARTIALACK = 0x0004, /* Not yet. */
CC_SACK = 0x0008, /* Not yet. */
-#endif /* defined(_KERNEL) || defined(_WANT_TCPCB) */
+#endif /* defined(_KERNEL) */
/* Congestion signal types passed to the cong_signal() hook. */
CC_ECN = 0x0100, /* ECN marked packet received. */
CC_RTO = 0x0200, /* RTO fired. */
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h
index 975b8129c70d..cd7a7303865f 100644
--- a/sys/netinet/in_pcb.h
+++ b/sys/netinet/in_pcb.h
@@ -128,7 +128,7 @@ struct in_conninfo {
#define inc6_laddr inc_ie.ie6_laddr
#define inc6_zoneid inc_ie.ie6_zoneid
-#if defined(_KERNEL) || defined(_WANT_INPCB)
+#if defined(_KERNEL)
/*
* struct inpcb captures the network layer state for TCP, UDP, and raw IPv4 and
* IPv6 sockets. In the case of TCP and UDP, further per-connection state is
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 7f836f5a1df4..8dff330cb46b 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -85,7 +85,7 @@
#define TCP_EI_BITS_RST_IN_FR 0x200 /* a front state reset */
#define TCP_EI_BITS_2MS_TIMER 0x400 /* 2 MSL timer expired */
-#if defined(_KERNEL) || defined(_WANT_TCPCB)
+#if defined(_KERNEL)
#include <sys/_callout.h>
#include <sys/osd.h>
@@ -500,7 +500,7 @@ struct tcpcb {
uint64_t tcp_proc_time[TCP_NUM_CNT_COUNTERS];
#endif
};
-#endif /* _KERNEL || _WANT_TCPCB */
+#endif /* _KERNEL */
#ifdef _KERNEL
struct tcptemp {