aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Scheffenegger <rscheff@FreeBSD.org>2023-12-21 23:47:36 +0000
committerRichard Scheffenegger <rscheff@FreeBSD.org>2023-12-22 01:20:29 +0000
commit8717c306bd5929b9d3cc9535aa1f9830993033de (patch)
tree8a049f0fc3e21946f0c07311e66504612ce96de4
parenteb4d13126d85665197ed7efc17c1ab442daa70ea (diff)
downloadsrc-8717c306bd5929b9d3cc9535aa1f9830993033de.tar.gz
src-8717c306bd5929b9d3cc9535aa1f9830993033de.zip
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
-rw-r--r--sys/netinet/tcp_var.h3
1 files changed, 1 insertions, 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_ */