diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -80,18 +80,23 @@ }; static __inline uint16_t -tcp_get_flags(const struct tcphdr *th) +__tcp_get_flags(const struct tcphdr *th) { - return (((uint16_t)th->th_x2 << 8) | th->th_flags); + return (((uint16_t)th->th_x2 << 8) | th->th_flags); } static __inline void -tcp_set_flags(struct tcphdr *th, uint16_t flags) +__tcp_set_flags(struct tcphdr *th, uint16_t flags) { - th->th_x2 = (flags >> 8) & 0x0f; - th->th_flags = flags & 0xff; + th->th_x2 = (flags >> 8) & 0x0f; + th->th_flags = flags & 0xff; } +#ifdef _KERNEL +#define tcp_get_flags __tcp_get_flags +#define tcp_set_flags __tcp_set_flags +#endif + #define PADTCPOLEN(len) ((((len) / 4) + !!((len) % 4)) * 4) #define TCPOPT_EOL 0