tcp: allow userspace use of tcp header flags accessor functions

Provide accessor functions to all 12 possible TCP header
flags for userspace too.

Reviewed By:           zlei
MFC after:             2 weeks
Sponsored by:          Netapp, Inc.
Differential Revision: https://reviews.freebsd.org/D43152
This commit is contained in:
Richard Scheffenegger 2023-12-22 00:47:36 +01:00
parent eb4d13126d
commit 8717c306bd

View File

@ -1576,6 +1576,7 @@ tcp_fields_to_net(struct tcphdr *th)
th->th_win = htons(th->th_win);
th->th_urp = htons(th->th_urp);
}
#endif /* _KERNEL */
static inline uint16_t
tcp_get_flags(const struct tcphdr *th)
@ -1589,6 +1590,4 @@ tcp_set_flags(struct tcphdr *th, uint16_t flags)
th->th_x2 = (flags >> 8) & 0x0f;
th->th_flags = flags & 0xff;
}
#endif /* _KERNEL */
#endif /* _NETINET_TCP_VAR_H_ */