diff --git a/net/tcp/tcp.h b/net/tcp/tcp.h index bc3c2cab499..891c8fa8562 100644 --- a/net/tcp/tcp.h +++ b/net/tcp/tcp.h @@ -37,12 +37,19 @@ #include #include -#if defined(CONFIG_NET_TCP) && !defined(CONFIG_NET_TCP_NO_STACK) +#ifdef CONFIG_NET_TCP /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* This is a helper pointer for accessing the contents of the tcp header */ + +#define TCPIPv4BUF ((FAR struct tcp_hdr_s *)IPBUF(IPv4_HDRLEN)) +#define TCPIPv6BUF ((FAR struct tcp_hdr_s *)IPBUF(IPv6_HDRLEN)) + +#ifndef CONFIG_NET_TCP_NO_STACK + #define NET_TCP_HAVE_STACK 1 /* Allocate a new TCP data callback */ @@ -104,11 +111,6 @@ #define TCP_FAST_RETRANSMISSION_THRESH 3 -/* This is a helper pointer for accessing the contents of the tcp header */ - -#define TCPIPv4BUF ((FAR struct tcp_hdr_s *)IPBUF(IPv4_HDRLEN)) -#define TCPIPv6BUF ((FAR struct tcp_hdr_s *)IPBUF(IPv6_HDRLEN)) - /**************************************************************************** * Public Type Definitions ****************************************************************************/ @@ -2025,5 +2027,6 @@ void tcp_sendbuffer_notify(FAR struct tcp_conn_s *conn); } #endif -#endif /* CONFIG_NET_TCP && !CONFIG_NET_TCP_NO_STACK */ +#endif /* !CONFIG_NET_TCP_NO_STACK */ +#endif /* CONFIG_NET_TCP */ #endif /* __NET_TCP_TCP_H */