mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 18:56:38 +00:00
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:
parent
eb4d13126d
commit
8717c306bd
|
@ -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_ */
|
||||
|
|
Loading…
Reference in a new issue