From 672851429808adef9482c11c960adc2927f1e496 Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Tue, 21 Jun 2022 17:33:51 -0400 Subject: [PATCH] Move UDPEndPointManager out of Globals.cpp (#19784) Currently there is no way for platforms to provide storage for UDPEndPointManager or to provide an alternate instance, as there is a prescribed static instance in Globals.cpp. Move this instance to ConnectivityManager, which platforms provide the implementation for. Note to porters: You can inherit from GenericConnectivityManagerImpl_UDP if previous behavior was working for you. --- .../CHIPDeviceControllerFactory.cpp | 12 +++-- src/include/platform/CHIPDeviceLayer.h | 14 +++++- src/include/platform/ConnectivityManager.h | 23 +++++++++ .../GenericConnectivityManagerImpl_TCP.h | 42 ++++++++++++++++ .../GenericConnectivityManagerImpl_TCP.ipp | 48 +++++++++++++++++++ .../GenericConnectivityManagerImpl_UDP.h | 42 ++++++++++++++++ .../GenericConnectivityManagerImpl_UDP.ipp | 48 +++++++++++++++++++ .../Ameba/ConnectivityManagerImpl.cpp | 6 +++ src/platform/Ameba/ConnectivityManagerImpl.h | 9 ++++ src/platform/BUILD.gn | 4 ++ .../CYW30739/ConnectivityManagerImpl.cpp | 6 +++ .../CYW30739/ConnectivityManagerImpl.h | 9 ++++ .../Darwin/ConnectivityManagerImpl.cpp | 6 +++ src/platform/Darwin/ConnectivityManagerImpl.h | 9 ++++ .../EFR32/ConnectivityManagerImpl.cpp | 6 +++ src/platform/EFR32/ConnectivityManagerImpl.h | 9 ++++ .../EFR32/ConnectivityManagerImpl_WIFI.cpp | 6 +++ .../ESP32/ConnectivityManagerImpl.cpp | 6 +++ src/platform/ESP32/ConnectivityManagerImpl.h | 9 ++++ src/platform/Globals.cpp | 20 -------- .../Linux/ConnectivityManagerImpl.cpp | 6 +++ src/platform/Linux/ConnectivityManagerImpl.h | 8 ++++ src/platform/P6/ConnectivityManagerImpl.cpp | 7 +++ src/platform/P6/ConnectivityManagerImpl.h | 8 ++++ .../Tizen/ConnectivityManagerImpl.cpp | 6 +++ src/platform/Tizen/ConnectivityManagerImpl.h | 8 ++++ .../Zephyr/ConnectivityManagerImpl.cpp | 6 +++ src/platform/Zephyr/ConnectivityManagerImpl.h | 8 ++++ .../android/ConnectivityManagerImpl.cpp | 6 +++ .../android/ConnectivityManagerImpl.h | 8 ++++ .../BL602/ConnectivityManagerImpl.cpp | 6 +++ .../BL602/ConnectivityManagerImpl.h | 8 ++++ .../cc13x2_26x2/ConnectivityManagerImpl.cpp | 6 +++ .../cc13x2_26x2/ConnectivityManagerImpl.h | 8 ++++ src/platform/fake/ConnectivityManagerImpl.cpp | 6 +++ src/platform/fake/ConnectivityManagerImpl.h | 8 ++++ src/platform/mbed/ConnectivityManagerImpl.cpp | 6 +++ src/platform/mbed/ConnectivityManagerImpl.h | 9 ++++ .../nrfconnect/ConnectivityManagerImpl.cpp | 6 +++ .../nrfconnect/ConnectivityManagerImpl.h | 8 ++++ .../k32w/k32w0/ConnectivityManagerImpl.cpp | 6 +++ .../nxp/k32w/k32w0/ConnectivityManagerImpl.h | 8 ++++ src/platform/qpg/ConnectivityManagerImpl.cpp | 6 +++ src/platform/qpg/ConnectivityManagerImpl.h | 8 ++++ .../telink/ConnectivityManagerImpl.cpp | 6 +++ src/platform/telink/ConnectivityManagerImpl.h | 8 ++++ .../webos/ConnectivityManagerImpl.cpp | 6 +++ src/platform/webos/ConnectivityManagerImpl.h | 8 ++++ 48 files changed, 507 insertions(+), 25 deletions(-) create mode 100644 src/include/platform/internal/GenericConnectivityManagerImpl_TCP.h create mode 100644 src/include/platform/internal/GenericConnectivityManagerImpl_TCP.ipp create mode 100644 src/include/platform/internal/GenericConnectivityManagerImpl_UDP.h create mode 100644 src/include/platform/internal/GenericConnectivityManagerImpl_UDP.ipp diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index ab2d0b3637a195..09a0c732804336 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; @@ -414,8 +418,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..3ff2f8539c4542 --- /dev/null +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_TCP.h @@ -0,0 +1,42 @@ +/* + * + * 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: + static chip::Inet::EndPointManager & _TCPEndPointManager(); +}; + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_TCP.ipp b/src/include/platform/internal/GenericConnectivityManagerImpl_TCP.ipp new file mode 100644 index 00000000000000..f63721ea9c49ef --- /dev/null +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_TCP.ipp @@ -0,0 +1,48 @@ +/* + * + * 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. + */ + +#ifndef GENERIC_CONNECTIVITY_MANAGER_IMPL_TCP_CPP +#define GENERIC_CONNECTIVITY_MANAGER_IMPL_TCP_CPP + +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +template +chip::Inet::EndPointManager & GenericConnectivityManagerImpl_TCP::_TCPEndPointManager() +{ + static chip::Inet::TCPEndPointManagerImpl sTCPEndPointManagerImpl; + return sTCPEndPointManagerImpl; +} + +// Fully instantiate the generic implementation class in whatever compilation unit includes this file. +// NB: This must come after all templated class members are defined. +template class GenericConnectivityManagerImpl_TCP; + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip + +#endif // GENERIC_CONNECTIVITY_MANAGER_IMPL_TCP_CPP diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_UDP.h b/src/include/platform/internal/GenericConnectivityManagerImpl_UDP.h new file mode 100644 index 00000000000000..5ca07a9bb98309 --- /dev/null +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_UDP.h @@ -0,0 +1,42 @@ +/* + * + * 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: + static chip::Inet::EndPointManager & _UDPEndPointManager(); +}; + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_UDP.ipp b/src/include/platform/internal/GenericConnectivityManagerImpl_UDP.ipp new file mode 100644 index 00000000000000..86adff0bc096f3 --- /dev/null +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_UDP.ipp @@ -0,0 +1,48 @@ +/* + * + * 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. + */ + +#ifndef GENERIC_CONNECTIVITY_MANAGER_IMPL_UDP_CPP +#define GENERIC_CONNECTIVITY_MANAGER_IMPL_UDP_CPP + +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +template +chip::Inet::EndPointManager & GenericConnectivityManagerImpl_UDP::_UDPEndPointManager() +{ + static chip::Inet::UDPEndPointManagerImpl sUDPEndPointManagerImpl; + return sUDPEndPointManagerImpl; +} + +// Fully instantiate the generic implementation class in whatever compilation unit includes this file. +// NB: This must come after all templated class members are defined. +template class GenericConnectivityManagerImpl_UDP; + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip + +#endif // GENERIC_CONNECTIVITY_MANAGER_IMPL_UDP_CPP diff --git a/src/platform/Ameba/ConnectivityManagerImpl.cpp b/src/platform/Ameba/ConnectivityManagerImpl.cpp index 8c4ede5aaa05b9..d9dfa8bc9a38e8 100644 --- a/src/platform/Ameba/ConnectivityManagerImpl.cpp +++ b/src/platform/Ameba/ConnectivityManagerImpl.cpp @@ -20,6 +20,12 @@ #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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..a71d473baa653e 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -325,8 +325,12 @@ 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_TCP.ipp", "../include/platform/internal/GenericConnectivityManagerImpl_Thread.h", "../include/platform/internal/GenericConnectivityManagerImpl_Thread.ipp", + "../include/platform/internal/GenericConnectivityManagerImpl_UDP.h", + "../include/platform/internal/GenericConnectivityManagerImpl_UDP.ipp", "../include/platform/internal/GenericConnectivityManagerImpl_WiFi.h", "../include/platform/internal/GenericConnectivityManagerImpl_WiFi.ipp", "../include/platform/internal/GenericDeviceInstanceInfoProvider.h", diff --git a/src/platform/CYW30739/ConnectivityManagerImpl.cpp b/src/platform/CYW30739/ConnectivityManagerImpl.cpp index c6f9446b10a8e2..e6e2aaa1167777 100644 --- a/src/platform/CYW30739/ConnectivityManagerImpl.cpp +++ b/src/platform/CYW30739/ConnectivityManagerImpl.cpp @@ -20,6 +20,12 @@ #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_THREAD #include #endif 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.cpp b/src/platform/Darwin/ConnectivityManagerImpl.cpp index 87e38e4250d8d7..9d1bdf6e59c578 100644 --- a/src/platform/Darwin/ConnectivityManagerImpl.cpp +++ b/src/platform/Darwin/ConnectivityManagerImpl.cpp @@ -26,6 +26,12 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/EFR32/ConnectivityManagerImpl.cpp index beddd75158d134..c38a5e5bb1e268 100644 --- a/src/platform/EFR32/ConnectivityManagerImpl.cpp +++ b/src/platform/EFR32/ConnectivityManagerImpl.cpp @@ -23,6 +23,12 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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/EFR32/ConnectivityManagerImpl_WIFI.cpp b/src/platform/EFR32/ConnectivityManagerImpl_WIFI.cpp index 5d0085d6569af5..3b74a88274a83f 100644 --- a/src/platform/EFR32/ConnectivityManagerImpl_WIFI.cpp +++ b/src/platform/EFR32/ConnectivityManagerImpl_WIFI.cpp @@ -29,6 +29,12 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif diff --git a/src/platform/ESP32/ConnectivityManagerImpl.cpp b/src/platform/ESP32/ConnectivityManagerImpl.cpp index dab26056596f6f..3c2eb0da17e43b 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl.cpp @@ -21,6 +21,12 @@ #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp index 91186fef69ecf0..f30e0648435c57 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.cpp +++ b/src/platform/Linux/ConnectivityManagerImpl.cpp @@ -42,6 +42,12 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/P6/ConnectivityManagerImpl.cpp index 22034d9f561b66..64740c23d18435 100644 --- a/src/platform/P6/ConnectivityManagerImpl.cpp +++ b/src/platform/P6/ConnectivityManagerImpl.cpp @@ -20,6 +20,13 @@ #include #include + +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/Tizen/ConnectivityManagerImpl.cpp index b761847efff1e7..a539307ab45ac6 100644 --- a/src/platform/Tizen/ConnectivityManagerImpl.cpp +++ b/src/platform/Tizen/ConnectivityManagerImpl.cpp @@ -27,6 +27,12 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/Zephyr/ConnectivityManagerImpl.cpp index c09181db994e8d..c5029f37a67862 100644 --- a/src/platform/Zephyr/ConnectivityManagerImpl.cpp +++ b/src/platform/Zephyr/ConnectivityManagerImpl.cpp @@ -23,6 +23,12 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/android/ConnectivityManagerImpl.cpp index 4cbabc39b354cc..0c3b94d3a01b1e 100644 --- a/src/platform/android/ConnectivityManagerImpl.cpp +++ b/src/platform/android/ConnectivityManagerImpl.cpp @@ -27,6 +27,12 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/bouffalolab/BL602/ConnectivityManagerImpl.cpp index f1424c5aca8e8a..8696fd53d65ebf 100644 --- a/src/platform/bouffalolab/BL602/ConnectivityManagerImpl.cpp +++ b/src/platform/bouffalolab/BL602/ConnectivityManagerImpl.cpp @@ -27,6 +27,12 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #include #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 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.cpp b/src/platform/cc13x2_26x2/ConnectivityManagerImpl.cpp index 04889a1c9733f1..186f7d82cf590b 100644 --- a/src/platform/cc13x2_26x2/ConnectivityManagerImpl.cpp +++ b/src/platform/cc13x2_26x2/ConnectivityManagerImpl.cpp @@ -24,6 +24,12 @@ /* this file behaves like a config.h, comes first */ #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/fake/ConnectivityManagerImpl.cpp index 6037cb662d0090..7f359d6fa43056 100644 --- a/src/platform/fake/ConnectivityManagerImpl.cpp +++ b/src/platform/fake/ConnectivityManagerImpl.cpp @@ -18,6 +18,12 @@ #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + namespace chip { namespace DeviceLayer { 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.cpp b/src/platform/mbed/ConnectivityManagerImpl.cpp index 7e91ba1a1eb976..5c57060813c042 100644 --- a/src/platform/mbed/ConnectivityManagerImpl.cpp +++ b/src/platform/mbed/ConnectivityManagerImpl.cpp @@ -22,6 +22,12 @@ #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/nrfconnect/ConnectivityManagerImpl.cpp index c09181db994e8d..c5029f37a67862 100644 --- a/src/platform/nrfconnect/ConnectivityManagerImpl.cpp +++ b/src/platform/nrfconnect/ConnectivityManagerImpl.cpp @@ -23,6 +23,12 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.cpp index 51227fa1019c63..3182a874fbf41c 100644 --- a/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.cpp @@ -31,6 +31,12 @@ #include #endif +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/qpg/ConnectivityManagerImpl.cpp index c04f461cb48421..0a3f507a999532 100644 --- a/src/platform/qpg/ConnectivityManagerImpl.cpp +++ b/src/platform/qpg/ConnectivityManagerImpl.cpp @@ -17,6 +17,12 @@ /* this file behaves like a config.h, comes first */ #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/telink/ConnectivityManagerImpl.cpp index a5b8853414ac8d..130a5634f5d2d1 100644 --- a/src/platform/telink/ConnectivityManagerImpl.cpp +++ b/src/platform/telink/ConnectivityManagerImpl.cpp @@ -23,6 +23,12 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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.cpp b/src/platform/webos/ConnectivityManagerImpl.cpp index a58d6255c101fc..bcac878229e4b6 100644 --- a/src/platform/webos/ConnectivityManagerImpl.cpp +++ b/src/platform/webos/ConnectivityManagerImpl.cpp @@ -42,6 +42,12 @@ #include #include +#include + +#if INET_CONFIG_ENABLE_TCP_ENDPOINT +#include +#endif + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include #endif 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 {