mirror of
https://github.com/espressif/openthread.git
synced 2026-08-20 01:19:51 +00:00
[tcp] add OPENTHREAD_CONFIG_TCP_ENABLE guards to headers (#13195)
This commit wraps the contents of `tcp6.hpp` and `tcp6_ext.hpp` with `#if OPENTHREAD_CONFIG_TCP_ENABLE` feature guards to ensure that TCP definitions and types are cleanly excluded when TCP support is disabled in the build configuration. Additionally, it explicitly disables the `OPENTHREAD_CONFIG_TCP_ENABLE` feature flag in the Toranj test configuration to validate building without TCP support.
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
|
||||
#include "openthread-core-config.h"
|
||||
|
||||
#if OPENTHREAD_CONFIG_TCP_ENABLE
|
||||
|
||||
#include <openthread/tcp.h>
|
||||
|
||||
#include "common/as_core_type.hpp"
|
||||
@@ -592,4 +594,6 @@ DefineCoreType(otTcpListener, Ip6::Tcp::Listener);
|
||||
|
||||
} // namespace ot
|
||||
|
||||
#endif // OPENTHREAD_CONFIG_TCP_ENABLE
|
||||
|
||||
#endif // OT_CORE_NET_TCP6_HPP_
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
#include "openthread-core-config.h"
|
||||
|
||||
#if OPENTHREAD_CONFIG_TCP_ENABLE
|
||||
|
||||
#include <openthread/tcp_ext.h>
|
||||
|
||||
#include "net/tcp6.hpp"
|
||||
@@ -130,4 +132,6 @@ DefineCoreType(otTcpCircularSendBuffer, Ip6::TcpCircularSendBuffer);
|
||||
|
||||
} // namespace ot
|
||||
|
||||
#endif // OPENTHREAD_CONFIG_TCP_ENABLE
|
||||
|
||||
#endif // OT_CORE_NET_TCP6_EXT_HPP_
|
||||
|
||||
@@ -141,6 +141,8 @@
|
||||
|
||||
#define OPENTHREAD_CONFIG_IP6_SLAAC_DEPRECATION_INTERVAL 30
|
||||
|
||||
#define OPENTHREAD_CONFIG_TCP_ENABLE 0
|
||||
|
||||
#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 1
|
||||
|
||||
#define OPENTHREAD_CONFIG_MAC_FILTER_SIZE 80
|
||||
|
||||
Reference in New Issue
Block a user