Page MenuHomeFreeBSD

tcp: Make tcp_var.h more self-contained
ClosedPublic

Authored by markj on Mon, Apr 8, 5:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 4:37 AM
Unknown Object (File)
Fri, Apr 26, 4:54 AM
Unknown Object (File)
Thu, Apr 11, 5:51 PM
Unknown Object (File)
Wed, Apr 10, 1:19 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.Mon, Apr 8, 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.Wed, Apr 10, 12:54 PM
This revision was automatically updated to reflect the committed changes.