From 8717c306bd5929b9d3cc9535aa1f9830993033de Mon Sep 17 00:00:00 2001 From: Richard Scheffenegger Date: Fri, 22 Dec 2023 00:47:36 +0100 Subject: [PATCH] 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 --- sys/netinet/tcp_var.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index f8d5654afa24..af441b4fc7d7 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -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_ */