diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index 1ed14c805406a8..6d5d5c453f881c 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -74,8 +74,10 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState() if (mSystemState != nullptr) { params.systemLayer = mSystemState->SystemLayer(); - params.tcpEndPointManager = mSystemState->TCPEndPointManager(); params.udpEndPointManager = mSystemState->UDPEndPointManager(); +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + params.tcpEndPointManager = mSystemState->TCPEndPointManager(); +#endif #if CONFIG_NETWORK_LAYER_BLE params.bleLayer = mSystemState->BleLayer(); #endif @@ -109,8 +111,10 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) ReturnErrorOnFailure(DeviceLayer::PlatformMgr().InitChipStack()); stateParams.systemLayer = &DeviceLayer::SystemLayer(); - stateParams.tcpEndPointManager = DeviceLayer::TCPEndPointManager(); stateParams.udpEndPointManager = DeviceLayer::UDPEndPointManager(); +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + stateParams.tcpEndPointManager = DeviceLayer::TCPEndPointManager(); +#endif #else stateParams.systemLayer = params.systemLayer; stateParams.tcpEndPointManager = params.tcpEndPointManager; @@ -408,8 +412,10 @@ CHIP_ERROR DeviceControllerSystemState::Shutdown() } mSystemLayer = nullptr; - mTCPEndPointManager = nullptr; mUDPEndPointManager = nullptr; +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + mTCPEndPointManager = nullptr; +#endif #if CONFIG_NETWORK_LAYER_BLE mBleLayer = nullptr; #endif // CONFIG_NETWORK_LAYER_BLE diff --git a/src/include/platform/CHIPDeviceLayer.h b/src/include/platform/CHIPDeviceLayer.h index 9e317b3d7ccb96..4e2eef9b558df1 100644 --- a/src/include/platform/CHIPDeviceLayer.h +++ b/src/include/platform/CHIPDeviceLayer.h @@ -44,14 +44,24 @@ namespace DeviceLayer { void SetSystemLayerForTesting(System::LayerImpl * layer); // These functions are defined in src/platform/Globals.cpp -chip::Inet::EndPointManager * UDPEndPointManager(); -chip::Inet::EndPointManager * TCPEndPointManager(); chip::System::Layer & SystemLayer(); #if CHIP_SYSTEM_CONFIG_USE_SOCKETS chip::System::LayerSockets & SystemLayerSockets(); #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS +inline chip::Inet::EndPointManager * UDPEndPointManager() +{ + return &ConnectivityMgr().UDPEndPointManager(); +} + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +inline chip::Inet::EndPointManager * TCPEndPointManager() +{ + return &ConnectivityMgr().TCPEndPointManager(); +} +#endif + } // namespace DeviceLayer } // namespace chip diff --git a/src/include/platform/ConnectivityManager.h b/src/include/platform/ConnectivityManager.h index a44b1c53321a96..162a31c3a3ab0e 100644 --- a/src/include/platform/ConnectivityManager.h +++ b/src/include/platform/ConnectivityManager.h @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -33,6 +34,10 @@ #include #include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + namespace chip { namespace Ble { @@ -158,6 +163,12 @@ class ConnectivityManager void SetDelegate(ConnectivityManagerDelegate * delegate) { mDelegate = delegate; } ConnectivityManagerDelegate * GetDelegate() const { return mDelegate; } + chip::Inet::EndPointManager & UDPEndPointManager(); + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + chip::Inet::EndPointManager & TCPEndPointManager(); +#endif + // WiFi station methods WiFiStationMode GetWiFiStationMode(); CHIP_ERROR SetWiFiStationMode(WiFiStationMode val); @@ -323,6 +334,18 @@ extern ConnectivityManagerImpl & ConnectivityMgrImpl(); namespace chip { namespace DeviceLayer { +inline chip::Inet::EndPointManager & ConnectivityManager::UDPEndPointManager() +{ + return static_cast(this)->_UDPEndPointManager(); +} + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +inline chip::Inet::EndPointManager & ConnectivityManager::TCPEndPointManager() +{ + return static_cast(this)->_TCPEndPointManager(); +} +#endif + inline ConnectivityManager::WiFiStationMode ConnectivityManager::GetWiFiStationMode() { return static_cast(this)->_GetWiFiStationMode(); diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_TCP.h b/src/include/platform/internal/GenericConnectivityManagerImpl_TCP.h new file mode 100644 index 00000000000000..dbf98837673ac9 --- /dev/null +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_TCP.h @@ -0,0 +1,54 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides a generic implementation of ConnectivityManager features + * for use on platforms that use TCP. + */ + +#pragma once + +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +template +class GenericConnectivityManagerImpl_TCP +{ +public: + // ConnectivityManager: + chip::Inet::EndPointManager & _TCPEndPointManager(); + +private: + static chip::Inet::TCPEndPointManagerImpl sTCPEndPointManagerImpl; +}; + +template +chip::Inet::TCPEndPointManagerImpl GenericConnectivityManagerImpl_TCP::sTCPEndPointManagerImpl; + +template +inline chip::Inet::EndPointManager & GenericConnectivityManagerImpl_TCP::_TCPEndPointManager() +{ + return sTCPEndPointManagerImpl; +} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_UDP.h b/src/include/platform/internal/GenericConnectivityManagerImpl_UDP.h new file mode 100644 index 00000000000000..e22a048840ff41 --- /dev/null +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_UDP.h @@ -0,0 +1,54 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Provides a generic implementation of ConnectivityManager features + * for use on platforms that use UDP. + */ + +#pragma once + +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +template +class GenericConnectivityManagerImpl_UDP +{ +public: + // ConnectivityManager: + chip::Inet::EndPointManager & _UDPEndPointManager(); + +private: + static chip::Inet::UDPEndPointManagerImpl sUDPEndPointManagerImpl; +}; + +template +chip::Inet::UDPEndPointManagerImpl GenericConnectivityManagerImpl_UDP::sUDPEndPointManagerImpl; + +template +inline chip::Inet::EndPointManager & GenericConnectivityManagerImpl_UDP::_UDPEndPointManager() +{ + return sUDPEndPointManagerImpl; +} + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/Ameba/ConnectivityManagerImpl.h b/src/platform/Ameba/ConnectivityManagerImpl.h index 61f602961f2ce4..9863c47dec88d8 100644 --- a/src/platform/Ameba/ConnectivityManagerImpl.h +++ b/src/platform/Ameba/ConnectivityManagerImpl.h @@ -20,6 +20,11 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_WIFI #include @@ -55,6 +60,10 @@ class PlatformManagerImpl; class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif #if CHIP_DEVICE_CONFIG_ENABLE_WIFI public Internal::GenericConnectivityManagerImpl_WiFi, #else diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 22b151d893ba5c..675b26502f5362 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -325,8 +325,10 @@ if (chip_device_platform != "none") { "../include/platform/internal/GenericConnectivityManagerImpl_NoBLE.h", "../include/platform/internal/GenericConnectivityManagerImpl_NoThread.h", "../include/platform/internal/GenericConnectivityManagerImpl_NoWiFi.h", + "../include/platform/internal/GenericConnectivityManagerImpl_TCP.h", "../include/platform/internal/GenericConnectivityManagerImpl_Thread.h", "../include/platform/internal/GenericConnectivityManagerImpl_Thread.ipp", + "../include/platform/internal/GenericConnectivityManagerImpl_UDP.h", "../include/platform/internal/GenericConnectivityManagerImpl_WiFi.h", "../include/platform/internal/GenericConnectivityManagerImpl_WiFi.ipp", "../include/platform/internal/GenericDeviceInstanceInfoProvider.h", diff --git a/src/platform/CYW30739/ConnectivityManagerImpl.h b/src/platform/CYW30739/ConnectivityManagerImpl.h index 3fc89d769be695..5369cdaa9818a2 100644 --- a/src/platform/CYW30739/ConnectivityManagerImpl.h +++ b/src/platform/CYW30739/ConnectivityManagerImpl.h @@ -20,6 +20,11 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -40,6 +45,10 @@ namespace DeviceLayer { */ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE public Internal::GenericConnectivityManagerImpl_BLE, #else diff --git a/src/platform/Darwin/ConnectivityManagerImpl.h b/src/platform/Darwin/ConnectivityManagerImpl.h index 718ca594378006..bd57fc3b41e8b4 100644 --- a/src/platform/Darwin/ConnectivityManagerImpl.h +++ b/src/platform/Darwin/ConnectivityManagerImpl.h @@ -20,6 +20,11 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -56,6 +61,10 @@ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl_NoThread, #endif public Internal::GenericConnectivityManagerImpl_NoWiFi, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif public Internal::GenericConnectivityManagerImpl { // Allow the ConnectivityManager interface class to delegate method calls to diff --git a/src/platform/EFR32/ConnectivityManagerImpl.h b/src/platform/EFR32/ConnectivityManagerImpl.h index 304bf4d9e4d9db..97f71e1db43a9b 100644 --- a/src/platform/EFR32/ConnectivityManagerImpl.h +++ b/src/platform/EFR32/ConnectivityManagerImpl.h @@ -20,6 +20,11 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -50,6 +55,10 @@ class PlatformManagerImpl; */ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE public Internal::GenericConnectivityManagerImpl_BLE, #else diff --git a/src/platform/ESP32/ConnectivityManagerImpl.h b/src/platform/ESP32/ConnectivityManagerImpl.h index 0dcc99b396e40b..3bdd1418c23564 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl.h +++ b/src/platform/ESP32/ConnectivityManagerImpl.h @@ -23,6 +23,11 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_WIFI #include @@ -62,6 +67,10 @@ class PlatformManagerImpl; */ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif #if CHIP_DEVICE_CONFIG_ENABLE_WIFI public Internal::GenericConnectivityManagerImpl_WiFi, #else diff --git a/src/platform/Globals.cpp b/src/platform/Globals.cpp index 681af16026615b..b49e08ad739773 100644 --- a/src/platform/Globals.cpp +++ b/src/platform/Globals.cpp @@ -19,31 +19,11 @@ /* this file behaves like a config.h, comes first */ #include -#include -#include #include namespace chip { namespace DeviceLayer { -chip::Inet::EndPointManager * UDPEndPointManager() -{ - static chip::Inet::UDPEndPointManagerImpl gUDPEndPointManager; - return &gUDPEndPointManager; -} - -#if INET_CONFIG_ENABLE_TCP_ENDPOINT -chip::Inet::EndPointManager * TCPEndPointManager() -{ -#if INET_CONFIG_ENABLE_TCP_ENDPOINT - static chip::Inet::TCPEndPointManagerImpl gTCPEndPointManager; - return &gTCPEndPointManager; -#else // INET_CONFIG_ENABLE_TCP_ENDPOINT - return nullptr; -#endif // INET_CONFIG_ENABLE_TCP_ENDPOINT -} -#endif // INET_CONFIG_ENABLE_TCP_ENDPOINT - chip::System::LayerImpl * gMockedSystemLayer = nullptr; void SetSystemLayerForTesting(System::LayerImpl * layer) diff --git a/src/platform/Linux/ConnectivityManagerImpl.h b/src/platform/Linux/ConnectivityManagerImpl.h index 1c009abbee5773..020ba83c32361f 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.h +++ b/src/platform/Linux/ConnectivityManagerImpl.h @@ -20,6 +20,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -104,6 +108,10 @@ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl_WiFi, #else public Internal::GenericConnectivityManagerImpl_NoWiFi, +#endif + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, #endif public Internal::GenericConnectivityManagerImpl { diff --git a/src/platform/P6/ConnectivityManagerImpl.h b/src/platform/P6/ConnectivityManagerImpl.h index 6f742f2fe3ebfb..dca6b3330887a1 100644 --- a/src/platform/P6/ConnectivityManagerImpl.h +++ b/src/platform/P6/ConnectivityManagerImpl.h @@ -21,6 +21,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #include #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include @@ -46,6 +50,10 @@ class PlatformManagerImpl; */ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif public Internal::GenericConnectivityManagerImpl_WiFi, #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE public Internal::GenericConnectivityManagerImpl_BLE, diff --git a/src/platform/Tizen/ConnectivityManagerImpl.h b/src/platform/Tizen/ConnectivityManagerImpl.h index e5003f674a6847..7d8e619a367380 100644 --- a/src/platform/Tizen/ConnectivityManagerImpl.h +++ b/src/platform/Tizen/ConnectivityManagerImpl.h @@ -21,6 +21,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -68,6 +72,10 @@ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl_WiFi, #else public Internal::GenericConnectivityManagerImpl_NoWiFi, +#endif + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, #endif public Internal::GenericConnectivityManagerImpl { diff --git a/src/platform/Zephyr/ConnectivityManagerImpl.h b/src/platform/Zephyr/ConnectivityManagerImpl.h index 16e39cdb1b63db..4c003f23a4861a 100644 --- a/src/platform/Zephyr/ConnectivityManagerImpl.h +++ b/src/platform/Zephyr/ConnectivityManagerImpl.h @@ -19,6 +19,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -47,6 +51,10 @@ namespace DeviceLayer { */ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE public Internal::GenericConnectivityManagerImpl_BLE, #else diff --git a/src/platform/android/ConnectivityManagerImpl.h b/src/platform/android/ConnectivityManagerImpl.h index 7b27e3cf867b36..1d526a0dd09f73 100644 --- a/src/platform/android/ConnectivityManagerImpl.h +++ b/src/platform/android/ConnectivityManagerImpl.h @@ -20,6 +20,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -89,6 +93,10 @@ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl_WiFi, #else public Internal::GenericConnectivityManagerImpl_NoWiFi, +#endif + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, #endif public Internal::GenericConnectivityManagerImpl { diff --git a/src/platform/bouffalolab/BL602/ConnectivityManagerImpl.h b/src/platform/bouffalolab/BL602/ConnectivityManagerImpl.h index e74d536d2ed339..023bb3f36cd8e0 100644 --- a/src/platform/bouffalolab/BL602/ConnectivityManagerImpl.h +++ b/src/platform/bouffalolab/BL602/ConnectivityManagerImpl.h @@ -20,6 +20,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #include #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include @@ -44,6 +48,10 @@ namespace DeviceLayer { */ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif public Internal::GenericConnectivityManagerImpl_WiFi, #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE public Internal::GenericConnectivityManagerImpl_BLE, diff --git a/src/platform/cc13x2_26x2/ConnectivityManagerImpl.h b/src/platform/cc13x2_26x2/ConnectivityManagerImpl.h index fe6476b017fab0..5abed2848f065f 100644 --- a/src/platform/cc13x2_26x2/ConnectivityManagerImpl.h +++ b/src/platform/cc13x2_26x2/ConnectivityManagerImpl.h @@ -25,6 +25,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -45,6 +49,10 @@ namespace DeviceLayer { */ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE public Internal::GenericConnectivityManagerImpl_BLE, #else diff --git a/src/platform/fake/ConnectivityManagerImpl.h b/src/platform/fake/ConnectivityManagerImpl.h index 301a890172f0b6..bed51c1202602f 100644 --- a/src/platform/fake/ConnectivityManagerImpl.h +++ b/src/platform/fake/ConnectivityManagerImpl.h @@ -19,6 +19,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #include #include #include @@ -28,6 +32,10 @@ namespace DeviceLayer { class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif public Internal::GenericConnectivityManagerImpl_NoBLE, public Internal::GenericConnectivityManagerImpl_NoThread, public Internal::GenericConnectivityManagerImpl_NoWiFi diff --git a/src/platform/mbed/ConnectivityManagerImpl.h b/src/platform/mbed/ConnectivityManagerImpl.h index a74319c2a39ae1..8bae58a9ff4de7 100644 --- a/src/platform/mbed/ConnectivityManagerImpl.h +++ b/src/platform/mbed/ConnectivityManagerImpl.h @@ -21,6 +21,11 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_WIFI #include @@ -49,6 +54,10 @@ namespace DeviceLayer { */ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif #if CHIP_DEVICE_CONFIG_ENABLE_WIFI public Internal::GenericConnectivityManagerImpl_WiFi, #else diff --git a/src/platform/nrfconnect/ConnectivityManagerImpl.h b/src/platform/nrfconnect/ConnectivityManagerImpl.h index 16e39cdb1b63db..4c003f23a4861a 100644 --- a/src/platform/nrfconnect/ConnectivityManagerImpl.h +++ b/src/platform/nrfconnect/ConnectivityManagerImpl.h @@ -19,6 +19,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -47,6 +51,10 @@ namespace DeviceLayer { */ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE public Internal::GenericConnectivityManagerImpl_BLE, #else diff --git a/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.h b/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.h index 115c5ecebe40e4..4b8708d3dc604b 100644 --- a/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.h +++ b/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.h @@ -21,6 +21,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -51,6 +55,10 @@ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl_NoThread, #endif public Internal::GenericConnectivityManagerImpl_NoWiFi, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif public Internal::GenericConnectivityManagerImpl { // Allow the ConnectivityManager interface class to delegate method calls to diff --git a/src/platform/qpg/ConnectivityManagerImpl.h b/src/platform/qpg/ConnectivityManagerImpl.h index 61432f71ad0e19..d016dbcba5ef7e 100644 --- a/src/platform/qpg/ConnectivityManagerImpl.h +++ b/src/platform/qpg/ConnectivityManagerImpl.h @@ -19,6 +19,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -45,6 +49,10 @@ namespace DeviceLayer { */ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE public Internal::GenericConnectivityManagerImpl_BLE, #else diff --git a/src/platform/telink/ConnectivityManagerImpl.h b/src/platform/telink/ConnectivityManagerImpl.h index 54ba7717346c78..549f2ca156f4a8 100644 --- a/src/platform/telink/ConnectivityManagerImpl.h +++ b/src/platform/telink/ConnectivityManagerImpl.h @@ -19,6 +19,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -47,6 +51,10 @@ namespace DeviceLayer { */ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE public Internal::GenericConnectivityManagerImpl_BLE, #else diff --git a/src/platform/webos/ConnectivityManagerImpl.h b/src/platform/webos/ConnectivityManagerImpl.h index dd702d7f995915..361ffab71684ff 100644 --- a/src/platform/webos/ConnectivityManagerImpl.h +++ b/src/platform/webos/ConnectivityManagerImpl.h @@ -20,6 +20,10 @@ #include #include +#include +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #else @@ -104,6 +108,10 @@ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl_WiFi, #else public Internal::GenericConnectivityManagerImpl_NoWiFi, +#endif + public Internal::GenericConnectivityManagerImpl_UDP, +#if INET_CONFIG_ENABLE_TCP_ENDPOINT + public Internal::GenericConnectivityManagerImpl_TCP, #endif public Internal::GenericConnectivityManagerImpl {