Page MenuHomeFreeBSD

tcp: Make tcp_var.h more self-contained
ClosedPublic

Authored by markj on Apr 8 2024, 5:40 PM.
Tags
None
Referenced Files
F142500241: D44685.id136840.diff
Tue, Jan 20, 10:24 AM
F142462444: D44685.id136769.diff
Tue, Jan 20, 5:17 AM
Unknown Object (File)
Mon, Jan 19, 6:02 PM
Unknown Object (File)
Sun, Jan 18, 3:04 AM
Unknown Object (File)
Wed, Dec 24, 9:54 AM
Unknown Object (File)
Nov 27 2025, 3:09 PM
Unknown Object (File)
Nov 23 2025, 9:34 PM
Unknown Object (File)
Nov 20 2025, 4:06 PM

Details

Summary

struct tcpcb embeds a struct osd and a struct callout. Rather than
forcing all consumers to pull in the same
headers, include the headers directly.

No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Apr 8 2024, 5:40 PM

There is a guard at line 88:

#if defined(_KERNEL) || defined(_WANT_TCPCB)

Maybe move the includes there, just next to netinet/cc/cc.h?
What's the final goal of the change?

Include headers only when needed.

There is a guard at line 88:

#if defined(_KERNEL) || defined(_WANT_TCPCB)

Maybe move the includes there, just next to netinet/cc/cc.h?

Thanks, I missed that. Done.

What's the final goal of the change?

In general we've been trying to make kernel headers self-contained when possible. In my case I found some bits in net-snmp which do not compile because these includes are missing.

I'm fine with this change, but I really prefer net-snmp not to know anything about struct tcpcb. I'll take a look at it later.

This revision was not accepted when it landed; it landed in state Needs Review.Apr 10 2024, 12:54 PM
This revision was automatically updated to reflect the committed changes.