Merge pull request #13335 from rajkan01/netsocket_dir_restructure

Restructure netsocket directory
pull/13377/head
Martin Kojtal 2020-07-27 14:35:27 +01:00 committed by GitHub
commit 6bd52719f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
289 changed files with 252 additions and 285 deletions

View File

@ -138,7 +138,7 @@ matrix:
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh platform - ./tools/test/travis-ci/doxy-spellchecker/spell.sh platform
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh events - ./tools/test/travis-ci/doxy-spellchecker/spell.sh events
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh rtos - ./tools/test/travis-ci/doxy-spellchecker/spell.sh rtos
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh features/netsocket - ./tools/test/travis-ci/doxy-spellchecker/spell.sh connectivity/netsocket
- <<: *docs-vm - <<: *docs-vm
name: "doxygen" name: "doxygen"
@ -249,7 +249,7 @@ matrix:
- sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' ${EVENTS}/README.md > main.cpp - sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' ${EVENTS}/README.md > main.cpp
- | - |
rm -r rtos/source/TARGET_CORTEX drivers/source/usb connectivity/cellular connectivity/drivers/cellular \ rm -r rtos/source/TARGET_CORTEX drivers/source/usb connectivity/cellular connectivity/drivers/cellular \
connectivity/libraries/ppp features/netsocket features/nanostack features/lwipstack features/frameworks/greentea-client \ connectivity/libraries/ppp connectivity/netsocket features/nanostack features/lwipstack features/frameworks/greentea-client \
features/frameworks/utest features/frameworks/unity components BUILD features/frameworks/utest features/frameworks/unity components BUILD
- python tools/make.py -t GCC_ARM -m NUCLEO_F103RB --source=. --build=BUILD/NUCLEO_F103RB/GCC_ARM -j0 - python tools/make.py -t GCC_ARM -m NUCLEO_F103RB --source=. --build=BUILD/NUCLEO_F103RB/GCC_ARM -j0
# Run local equeue tests # Run local equeue tests

View File

@ -112,7 +112,6 @@ set(unittest-includes-base
"${PROJECT_SOURCE_DIR}/stubs" "${PROJECT_SOURCE_DIR}/stubs"
"${PROJECT_SOURCE_DIR}/.." "${PROJECT_SOURCE_DIR}/.."
"${PROJECT_SOURCE_DIR}/../features" "${PROJECT_SOURCE_DIR}/../features"
"${PROJECT_SOURCE_DIR}/../features/netsocket"
"${PROJECT_SOURCE_DIR}/../platform" "${PROJECT_SOURCE_DIR}/../platform"
"${PROJECT_SOURCE_DIR}/../storage/filesystem/littlefs/include" "${PROJECT_SOURCE_DIR}/../storage/filesystem/littlefs/include"
"${PROJECT_SOURCE_DIR}/../storage/filesystem/fat/include" "${PROJECT_SOURCE_DIR}/../storage/filesystem/fat/include"
@ -131,6 +130,7 @@ set(unittest-includes-base
"${PROJECT_SOURCE_DIR}/../features/frameworks/mbed-trace" "${PROJECT_SOURCE_DIR}/../features/frameworks/mbed-trace"
"${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice" "${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice"
"${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice/mbed-client-libservice" "${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice/mbed-client-libservice"
"${PROJECT_SOURCE_DIR}/../connectivity/netsocket/include"
"${PROJECT_SOURCE_DIR}/../features/filesystem/fat" "${PROJECT_SOURCE_DIR}/../features/filesystem/fat"
"${PROJECT_SOURCE_DIR}/../features/filesystem/fat/ChaN" "${PROJECT_SOURCE_DIR}/../features/filesystem/fat/ChaN"
"${PROJECT_SOURCE_DIR}/../features/filesystem/bd" "${PROJECT_SOURCE_DIR}/../features/filesystem/bd"

View File

@ -1,44 +0,0 @@
####################
# UNIT TESTS
####################
set(unittest-sources
../features/netsocket/SocketAddress.cpp
../features/netsocket/NetworkStack.cpp
../features/netsocket/InternetSocket.cpp
../features/netsocket/InternetDatagramSocket.cpp
../features/netsocket/UDPSocket.cpp
../features/netsocket/DTLSSocket.cpp
../features/netsocket/DTLSSocketWrapper.cpp
../features/netsocket/TLSSocketWrapper.cpp
../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c
../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c
../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c
../connectivity/libraries/nanostack-libservice/source/libip6string/stoip6.c
../connectivity/libraries/nanostack-libservice/source/libBits/common_functions.c
)
set(unittest-test-sources
features/netsocket/DTLSSocket/test_DTLSSocket.cpp
stubs/Mutex_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/mbed_atomic_stub.c
stubs/mbed_critical_stub.c
stubs/equeue_stub.c
../features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c
stubs/EventQueue_stub.cpp
stubs/mbed_shared_queues_stub.cpp
stubs/nsapi_dns_stub.cpp
stubs/EventFlags_stub.cpp
stubs/stoip4_stub.c
stubs/ip4tos_stub.c
stubs/Kernel_stub.cpp
stubs/SocketStats_Stub.cpp
)
set(MBEDTLS_USER_CONFIG_FILE_PATH "\"../UNITTESTS/features/netsocket/DTLSSocket/dtls_test_config.h\"")
set_source_files_properties(features/netsocket/DTLSSocket/test_DTLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
set_source_files_properties(../features/netsocket/DTLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})
set_source_files_properties(../features/netsocket/DTLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH})

View File

@ -16,7 +16,7 @@
*/ */
#include <ctype.h> #include <ctype.h>
#include "nsapi_types.h" #include "netsocket/nsapi_types.h"
#include "events/EventQueue.h" #include "events/EventQueue.h"
#include "ATHandler_stub.h" #include "ATHandler_stub.h"

View File

@ -18,7 +18,7 @@
#include "stdint.h" #include "stdint.h"
#include "stdbool.h" #include "stdbool.h"
#include <cstddef> #include <cstddef>
#include "nsapi_types.h" #include "netsocket/nsapi_types.h"
#include "ATHandler.h" #include "ATHandler.h"
#include "FileHandle_stub.h" #include "FileHandle_stub.h"
#include "Callback.h" #include "Callback.h"

View File

@ -16,7 +16,7 @@
*/ */
#include "AT_CellularInformation.h" #include "AT_CellularInformation.h"
#include "nsapi_types.h" #include "netsocket/nsapi_types.h"
using namespace mbed; using namespace mbed;

View File

@ -20,7 +20,7 @@
#include "CellularUtil.h" #include "CellularUtil.h"
#include "CellularLog.h" #include "CellularLog.h"
#include "FileHandle.h" #include "FileHandle.h"
#include "nsapi_types.h" #include "netsocket/nsapi_types.h"
using namespace mbed; using namespace mbed;
using namespace mbed_cellular_util; using namespace mbed_cellular_util;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "CellularInterface.h" #include "netsocket/CellularInterface.h"
MBED_WEAK CellularInterface *CellularInterface::get_target_default_instance() MBED_WEAK CellularInterface *CellularInterface::get_target_default_instance()
{ {

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "ControlPlane_netif.h" #include "netsocket/ControlPlane_netif.h"
#include <list> #include <list>
namespace mbed { namespace mbed {

View File

@ -20,7 +20,7 @@
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "gmock/gmock.h" #include "gmock/gmock.h"
#include "features/netsocket/EMAC.h" #include "netsocket/EMAC.h"
class MockEMAC : public EMAC { class MockEMAC : public EMAC {
public: public:

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "MeshInterface.h" #include "netsocket/MeshInterface.h"
MBED_WEAK MeshInterface *MeshInterface::get_target_default_instance() MBED_WEAK MeshInterface *MeshInterface::get_target_default_instance()
{ {

View File

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
#include "netsocket/NetworkInterface.h" #include "netsocket/NetworkInterface.h"
#include "WiFiInterface.h" #include "netsocket/WiFiInterface.h"
#include "CellularInterface.h" #include "netsocket/CellularInterface.h"
#include "MeshInterface.h" #include "netsocket/MeshInterface.h"
MBED_WEAK WiFiInterface *WiFiInterface::get_default_instance() MBED_WEAK WiFiInterface *WiFiInterface::get_default_instance()
{ {

View File

@ -15,8 +15,8 @@
* limitations under the License. * limitations under the License.
*/ */
#include "NetworkStack.h" #include "netsocket/NetworkStack.h"
#include "nsapi_dns.h" #include "netsocket/nsapi_dns.h"
#include "mbed.h" #include "mbed.h"
#include "stddef.h" #include "stddef.h"
#include <new> #include <new>

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "SocketAddress.h" #include "netsocket/SocketAddress.h"
SocketAddress::SocketAddress(const nsapi_addr_t &addr, uint16_t port) SocketAddress::SocketAddress(const nsapi_addr_t &addr, uint16_t port)

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "SocketStats.h" #include "netsocket/SocketStats.h"
#if MBED_CONF_NSAPI_SOCKET_STATS_ENABLED #if MBED_CONF_NSAPI_SOCKET_STATS_ENABLED
int SocketStats::get_entry_position(const Socket *const reference_id) int SocketStats::get_entry_position(const Socket *const reference_id)

View File

@ -22,7 +22,7 @@
#include "platform/mbed_chrono.h" #include "platform/mbed_chrono.h"
#include "events/EventQueue.h" #include "events/EventQueue.h"
#include "nsapi_types.h" #include "netsocket/nsapi_types.h"
#include "Callback.h" #include "Callback.h"
#include "rtos/Kernel.h" #include "rtos/Kernel.h"

View File

@ -17,11 +17,11 @@
#ifndef _CELLULARCONTEXT_H_ #ifndef _CELLULARCONTEXT_H_
#define _CELLULARCONTEXT_H_ #define _CELLULARCONTEXT_H_
#include "NetworkStack.h" #include "netsocket/NetworkStack.h"
#include "CellularInterface.h" #include "netsocket/CellularInterface.h"
#include "CellularDevice.h" #include "CellularDevice.h"
#include "CellularUtil.h" #include "CellularUtil.h"
#include "ControlPlane_netif.h" #include "netsocket/ControlPlane_netif.h"
#include "PinNames.h" #include "PinNames.h"
/** @file CellularContext.h /** @file CellularContext.h

View File

@ -19,7 +19,7 @@
#define CELLULAR_INFORMATION_H_ #define CELLULAR_INFORMATION_H_
#include <stddef.h> #include <stddef.h>
#include "nsapi_types.h" #include "netsocket/nsapi_types.h"
const int MAX_IMSI_LENGTH = 15; const int MAX_IMSI_LENGTH = 15;
const int MAX_ICCID_LENGTH = 20 + 1; // +1 for zero termination const int MAX_ICCID_LENGTH = 20 + 1; // +1 for zero termination

View File

@ -19,7 +19,7 @@
#include "CellularList.h" #include "CellularList.h"
#include "Callback.h" #include "Callback.h"
#include "nsapi_types.h" #include "netsocket/nsapi_types.h"
namespace mbed { namespace mbed {

View File

@ -21,7 +21,7 @@
#if MBED_CONF_CELLULAR_USE_SMS #if MBED_CONF_CELLULAR_USE_SMS
#include "Callback.h" #include "Callback.h"
#include "nsapi_types.h" #include "netsocket/nsapi_types.h"
namespace mbed { namespace mbed {

View File

@ -19,7 +19,7 @@
#define AT_CELLULAR_STACK_H_ #define AT_CELLULAR_STACK_H_
#include "ATHandler.h" #include "ATHandler.h"
#include "NetworkStack.h" #include "netsocket/NetworkStack.h"
#include "PlatformMutex.h" #include "PlatformMutex.h"
#include "AT_CellularDevice.h" #include "AT_CellularDevice.h"

View File

@ -16,7 +16,7 @@
*/ */
#include "CellularList.h" #include "CellularList.h"
#include "ControlPlane_netif.h" #include "netsocket/ControlPlane_netif.h"
#include "ATHandler.h" #include "ATHandler.h"
#include "AT_CellularDevice.h" #include "AT_CellularDevice.h"

View File

@ -19,7 +19,7 @@
#define CELLULAR_COMMON_ #define CELLULAR_COMMON_
#include <stdint.h> #include <stdint.h>
#include "nsapi_types.h" #include "netsocket/nsapi_types.h"
const int CELLULAR_RETRY_ARRAY_SIZE = 10; const int CELLULAR_RETRY_ARRAY_SIZE = 10;

View File

@ -20,7 +20,7 @@
#include <stddef.h> #include <stddef.h>
#include <inttypes.h> #include <inttypes.h>
#include "nsapi_types.h" #include "netsocket/nsapi_types.h"
namespace mbed_cellular_util { namespace mbed_cellular_util {

View File

@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/AT
../connectivity/cellular/include/cellular/framework/device ../connectivity/cellular/include/cellular/framework/device
../features/netsocket/cellular
) )
# Source files # Source files

View File

@ -12,7 +12,6 @@ set(unittest-includes ${unittest-includes}
../features/frameworks/mbed-client-randlib/mbed-client-randlib ../features/frameworks/mbed-client-randlib/mbed-client-randlib
../drivers ../drivers
../hal ../hal
../features/netsocket/cellular
) )
# Source files # Source files
@ -60,4 +59,3 @@ set(unittest-test-flags
-DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 -DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200
-DMBED_CONF_CELLULAR_USE_SMS=1 -DMBED_CONF_CELLULAR_USE_SMS=1
) )

View File

@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib ../features/frameworks/mbed-client-randlib/mbed-client-randlib
../features/netsocket/cellular
) )
# Source files # Source files

View File

@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib ../features/frameworks/mbed-client-randlib/mbed-client-randlib
../features/netsocket/cellular
) )
# Source files # Source files

View File

@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib ../features/frameworks/mbed-client-randlib/mbed-client-randlib
../features/netsocket/cellular
) )
# Source files # Source files

View File

@ -24,7 +24,7 @@
#include "FileHandle_stub.h" #include "FileHandle_stub.h"
#include "CellularLog.h" #include "CellularLog.h"
#include "ATHandler_stub.h" #include "ATHandler_stub.h"
#include "SocketAddress.h" #include "netsocket/SocketAddress.h"
#include "CellularDevice_stub.h" #include "CellularDevice_stub.h"
#include "AT_CellularDevice_stub.h" #include "AT_CellularDevice_stub.h"
#include "myCellularDevice.h" #include "myCellularDevice.h"

View File

@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/AT
../features/frameworks/mbed-client-randlib/mbed-client-randlib ../features/frameworks/mbed-client-randlib/mbed-client-randlib
../features/netsocket/cellular
) )
# Source files # Source files
@ -20,7 +19,7 @@ set(unittest-sources
../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c
../connectivity/libraries/nanostack-libservice/source/libip6string/stoip6.c ../connectivity/libraries/nanostack-libservice/source/libip6string/stoip6.c
../connectivity/libraries/nanostack-libservice/source/libBits/common_functions.c ../connectivity/libraries/nanostack-libservice/source/libBits/common_functions.c
../features/netsocket/SocketAddress.cpp ../connectivity/netsocket/source/SocketAddress.cpp
) )
# Test files # Test files
@ -51,4 +50,3 @@ set(unittest-test-flags
-DDEVICE_INTERRUPTIN=1 -DDEVICE_INTERRUPTIN=1
-DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 -DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200
) )

View File

@ -8,7 +8,6 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/include/cellular/framework/device/cellulardevice ../connectivity/cellular/include/cellular/framework/device/cellulardevice
../connectivity/cellular/include/cellular/framework/device ../connectivity/cellular/include/cellular/framework/device
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../features/netsocket/cellular
) )
# Source files # Source files
@ -19,7 +18,7 @@ set(unittest-sources
../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c
../connectivity/libraries/nanostack-libservice/source/libip6string/stoip6.c ../connectivity/libraries/nanostack-libservice/source/libip6string/stoip6.c
../connectivity/libraries/nanostack-libservice/source/libBits/common_functions.c ../connectivity/libraries/nanostack-libservice/source/libBits/common_functions.c
../features/netsocket/SocketAddress.cpp ../connectivity/netsocket/source/SocketAddress.cpp
) )
# Test files # Test files

View File

@ -8,7 +8,6 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/include/cellular/framework/device/cellulardevice ../connectivity/cellular/include/cellular/framework/device/cellulardevice
../connectivity/cellular/include/cellular/framework/device ../connectivity/cellular/include/cellular/framework/device
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../features/netsocket/cellular
) )
# Source files # Source files
@ -49,4 +48,3 @@ set(unittest-test-flags
-DDEVICE_SERIAL=1 -DDEVICE_SERIAL=1
-DDEVICE_INTERRUPTIN=1 -DDEVICE_INTERRUPTIN=1
) )

View File

@ -8,7 +8,6 @@ set(unittest-includes ${unittest-includes}
../connectivity/cellular/include/cellular/framework/device/cellularstatemachine ../connectivity/cellular/include/cellular/framework/device/cellularstatemachine
../connectivity/cellular/include/cellular/framework/device ../connectivity/cellular/include/cellular/framework/device
../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/common
../features/netsocket/cellular
) )
# Source files # Source files

View File

@ -25,7 +25,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "ESP8266.h" #include "ESP8266.h"
#include "features/netsocket/nsapi_types.h" #include "netsocket/nsapi_types.h"
#include "mbed_trace.h" #include "mbed_trace.h"
#include "PinNames.h" #include "PinNames.h"
#include "platform/Callback.h" #include "platform/Callback.h"

View File

@ -23,8 +23,8 @@
#include <ctime> #include <ctime>
#include "drivers/BufferedSerial.h" #include "drivers/BufferedSerial.h"
#include "features/netsocket/nsapi_types.h" #include "netsocket/nsapi_types.h"
#include "features/netsocket/WiFiAccessPoint.h" #include "netsocket/WiFiAccessPoint.h"
#include "PinNames.h" #include "PinNames.h"
#include "platform/ATCmdParser.h" #include "platform/ATCmdParser.h"
#include "platform/Callback.h" #include "platform/Callback.h"
@ -32,7 +32,7 @@
#include "platform/mbed_error.h" #include "platform/mbed_error.h"
#include "rtos/Mutex.h" #include "rtos/Mutex.h"
#include "rtos/ThisThread.h" #include "rtos/ThisThread.h"
#include "features/netsocket/SocketAddress.h" #include "netsocket/SocketAddress.h"
// Various timeouts for different ESP8266 operations // Various timeouts for different ESP8266 operations
// (some of these can't use literal form as they're needed for defaults in this header, where // (some of these can't use literal form as they're needed for defaults in this header, where

View File

@ -24,7 +24,7 @@
#include "ESP8266Interface.h" #include "ESP8266Interface.h"
#include "events/EventQueue.h" #include "events/EventQueue.h"
#include "events/mbed_shared_queues.h" #include "events/mbed_shared_queues.h"
#include "features/netsocket/nsapi_types.h" #include "netsocket/nsapi_types.h"
#include "mbed_trace.h" #include "mbed_trace.h"
#include "platform/Callback.h" #include "platform/Callback.h"
#include "platform/mbed_atomic.h" #include "platform/mbed_atomic.h"

View File

@ -24,12 +24,12 @@
#include "ESP8266/ESP8266.h" #include "ESP8266/ESP8266.h"
#include "events/EventQueue.h" #include "events/EventQueue.h"
#include "events/mbed_shared_queues.h" #include "events/mbed_shared_queues.h"
#include "features/netsocket/NetworkInterface.h" #include "netsocket/NetworkInterface.h"
#include "features/netsocket/NetworkStack.h" #include "netsocket/NetworkStack.h"
#include "features/netsocket/nsapi_types.h" #include "netsocket/nsapi_types.h"
#include "features/netsocket/SocketAddress.h" #include "netsocket/SocketAddress.h"
#include "features/netsocket/WiFiAccessPoint.h" #include "netsocket/WiFiAccessPoint.h"
#include "features/netsocket/WiFiInterface.h" #include "netsocket/WiFiInterface.h"
#include "platform/Callback.h" #include "platform/Callback.h"
#include "platform/mbed_chrono.h" #include "platform/mbed_chrono.h"
#if MBED_CONF_RTOS_PRESENT #if MBED_CONF_RTOS_PRESENT

View File

@ -16,7 +16,7 @@
*/ */
#include "platform/Callback.h" #include "platform/Callback.h"
#include "CellularNonIPSocket.h" #include "netsocket/CellularNonIPSocket.h"
#include <stdio.h> #include <stdio.h>
using namespace mbed; using namespace mbed;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "DTLSSocket.h" #include "netsocket/DTLSSocket.h"
#define TRACE_GROUP "TLSS" #define TRACE_GROUP "TLSS"
#include "mbed-trace/mbed_trace.h" #include "mbed-trace/mbed_trace.h"

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "DTLSSocketWrapper.h" #include "netsocket/DTLSSocketWrapper.h"
#include "platform/Callback.h" #include "platform/Callback.h"
#include "drivers/Timer.h" #include "drivers/Timer.h"
#include "events/mbed_events.h" #include "events/mbed_events.h"

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "EMACInterface.h" #include "netsocket/EMACInterface.h"
using namespace mbed; using namespace mbed;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "EthernetInterface.h" #include "netsocket/EthernetInterface.h"
/* No actual interface implementation here, as EthernetInterface is /* No actual interface implementation here, as EthernetInterface is
* just an EMACInterface. But we can be the default EthInterface - step up * just an EMACInterface. But we can be the default EthInterface - step up

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "InternetDatagramSocket.h" #include "netsocket/InternetDatagramSocket.h"
#include "Timer.h" #include "Timer.h"
#include "mbed_assert.h" #include "mbed_assert.h"

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "InternetSocket.h" #include "netsocket/InternetSocket.h"
#include "platform/mbed_critical.h" #include "platform/mbed_critical.h"
#include "platform/Callback.h" #include "platform/Callback.h"

View File

@ -61,4 +61,3 @@ uint32_t NetStackMemoryManager::copy_from_buf(void *ptr, uint32_t len, const net
return copied_len; return copied_len;
} }

View File

@ -180,4 +180,3 @@ nsapi_error_t NetworkInterface::set_blocking(bool blocking)
{ {
return NSAPI_ERROR_UNSUPPORTED; return NSAPI_ERROR_UNSUPPORTED;
} }

View File

@ -16,10 +16,10 @@
#include "netsocket/NetworkInterface.h" #include "netsocket/NetworkInterface.h"
#include "EthInterface.h" #include "netsocket/EthInterface.h"
#include "WiFiInterface.h" #include "netsocket/WiFiInterface.h"
#include "CellularInterface.h" #include "netsocket/CellularInterface.h"
#include "MeshInterface.h" #include "netsocket/MeshInterface.h"
/* Weak default instance static classes for the various abstract classes. /* Weak default instance static classes for the various abstract classes.
* Applications can override these. * Applications can override these.

View File

@ -14,8 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
#include "NetworkStack.h" #include "netsocket/NetworkStack.h"
#include "nsapi_dns.h" #include "netsocket/nsapi_dns.h"
#include "stddef.h" #include "stddef.h"
#include <new> #include <new>
#include "events/EventQueue.h" #include "events/EventQueue.h"
@ -434,4 +434,3 @@ NetworkStack *nsapi_create_stack(nsapi_stack_t *stack)
"The nsapi_stack_t stack buffer must fit a NetworkStackWrapper"); "The nsapi_stack_t stack buffer must fit a NetworkStackWrapper");
return new (stack->_stack_buffer) NetworkStackWrapper; return new (stack->_stack_buffer) NetworkStackWrapper;
} }

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "PPPInterface.h" #include "netsocket/PPPInterface.h"
using namespace mbed; using namespace mbed;
@ -166,4 +166,3 @@ nsapi_error_t PPPInterface::set_blocking(bool blocking)
_blocking = blocking; _blocking = blocking;
return NSAPI_ERROR_OK; return NSAPI_ERROR_OK;
} }

View File

@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
#include "SocketAddress.h" #include "netsocket/SocketAddress.h"
#include "NetworkInterface.h" #include "netsocket/NetworkInterface.h"
#include "NetworkStack.h" #include "netsocket/NetworkStack.h"
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include "ip4string.h" #include "ip4string.h"

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "SocketStats.h" #include "netsocket/SocketStats.h"
#include "platform/mbed_error.h" #include "platform/mbed_error.h"
#include "platform/mbed_assert.h" #include "platform/mbed_assert.h"
#ifdef MBED_CONF_RTOS_PRESENT #ifdef MBED_CONF_RTOS_PRESENT

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "TCPSocket.h" #include "netsocket/TCPSocket.h"
#include "Timer.h" #include "Timer.h"
#include "mbed_assert.h" #include "mbed_assert.h"

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "TLSSocket.h" #include "netsocket/TLSSocket.h"
#define TRACE_GROUP "TLSS" #define TRACE_GROUP "TLSS"
#include "mbed-trace/mbed_trace.h" #include "mbed-trace/mbed_trace.h"

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "TLSSocketWrapper.h" #include "netsocket/TLSSocketWrapper.h"
#include "platform/Callback.h" #include "platform/Callback.h"
#include "drivers/Timer.h" #include "drivers/Timer.h"
#include "events/mbed_events.h" #include "events/mbed_events.h"

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
#include "UDPSocket.h" #include "netsocket/UDPSocket.h"
#include "Timer.h" #include "Timer.h"
#include "mbed_assert.h" #include "mbed_assert.h"

View File

@ -31,4 +31,3 @@ uint8_t WiFiAccessPoint::get_channel() const
{ {
return _ap.channel; return _ap.channel;
} }

View File

@ -18,7 +18,7 @@
/* Declare __STDC_LIMIT_MACROS so stdint.h defines INT32_MAX when using C++ */ /* Declare __STDC_LIMIT_MACROS so stdint.h defines INT32_MAX when using C++ */
#define __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS
#include "nsapi_dns.h" #include "netsocket/nsapi_dns.h"
#include "netsocket/UDPSocket.h" #include "netsocket/UDPSocket.h"
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
@ -26,7 +26,7 @@
#include <stdint.h> #include <stdint.h>
#include "mbed_shared_queues.h" #include "mbed_shared_queues.h"
#include "events/EventQueue.h" #include "events/EventQueue.h"
#include "OnboardNetworkStack.h" #include "netsocket/OnboardNetworkStack.h"
#include "rtos/Kernel.h" #include "rtos/Kernel.h"
#include "PlatformMutex.h" #include "PlatformMutex.h"
#include "SingletonPtr.h" #include "SingletonPtr.h"

View File

@ -10,11 +10,11 @@ Target API
The target for this plan is to test: The target for this plan is to test:
- [Socket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/Socket.h). - [Socket](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/Socket.h).
- [UDPSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/UDPSocket.h). - [UDPSocket](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/UDPSocket.h).
- [TCPSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.h). - [TCPSocket](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/TCPSocket.h).
- [TLSSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TLSSocket.h). - [TLSSocket](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/TLSSocket.h).
- [DNS](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/DNS.h). - [DNS](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/DNS.h).
Please see the [Network Socket documentation](https://os.mbed.com/docs/mbed-os/latest/apis/network-socket.html) for reference. Please see the [Network Socket documentation](https://os.mbed.com/docs/mbed-os/latest/apis/network-socket.html) for reference.
@ -122,7 +122,7 @@ key = /etc/letsencrypt/live/<test_server_url>/privkey.pem
Get, update and install certificate files by certbot (Provided by Let's Encrypt <https://letsencrypt.org/>). Get, update and install certificate files by certbot (Provided by Let's Encrypt <https://letsencrypt.org/>).
- Install lighthttpd server: - Install lighthttpd server:
```.sh ```.sh
$ sudo apt-get install lighttpd $ sudo apt-get install lighttpd
$ sudo rm -rf /var/www/html/* $ sudo rm -rf /var/www/html/*
@ -133,7 +133,7 @@ Get, update and install certificate files by certbot (Provided by Let's Encrypt
``` ```
- Install and set up certbot: - Install and set up certbot:
```.sh ```.sh
$ sudo apt-get update $ sudo apt-get update
$ sudo apt-get install software-properties-common $ sudo apt-get install software-properties-common
@ -143,9 +143,9 @@ Get, update and install certificate files by certbot (Provided by Let's Encrypt
$ sudo certbot certonly $ sudo certbot certonly
$ sudo certbot certonly --webroot -w /var/www/html -d <test_server_url> $ sudo certbot certonly --webroot -w /var/www/html -d <test_server_url>
``` ```
- Set test server to renew certificate before expiry. - Set test server to renew certificate before expiry.
```.sh ```.sh
$ sudo echo "SHELL=/bin/sh" > /etc/cron.d/certbot $ sudo echo "SHELL=/bin/sh" > /etc/cron.d/certbot
$ sudo echo "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" > /etc/cron.d/certbot $ sudo echo "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" > /etc/cron.d/certbot
@ -177,7 +177,7 @@ PORT STATE SERVICE
Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds
$ sudo nmap -sU -p7,9,13,37,2007,2009,2013 echo.mbedcloudtesting.com $ sudo nmap -sU -p7,9,13,37,2007,2009,2013 echo.mbedcloudtesting.com
Starting Nmap 7.01 ( https://nmap.org ) at 2019-01-08 15:05 CET Starting Nmap 7.01 ( https://nmap.org ) at 2019-01-08 15:05 CET
Nmap scan report for echo.mbedcloudtesting.com (52.215.34.155) Nmap scan report for echo.mbedcloudtesting.com (52.215.34.155)
@ -800,7 +800,7 @@ Repeatedly send packets to echo server and read incoming packets back. Verify di
**Expected result:** **Expected result:**
- At least one `sendto()` call of every size returns the packet size. - At least one `sendto()` call of every size returns the packet size.
- Errors returned from `recvfrom()` calls are tolerated. - Errors returned from `recvfrom()` calls are tolerated.
- Calculate packet loss rate. The maximum tolerated packet loss rate is 30%. - Calculate packet loss rate. The maximum tolerated packet loss rate is 30%.
### UDPSOCKET_ECHOTEST_NONBLOCK ### UDPSOCKET_ECHOTEST_NONBLOCK
@ -832,7 +832,7 @@ mode.
**Expected result:** **Expected result:**
- At least one `sendto()` call of every size returns the packet size. - At least one `sendto()` call of every size returns the packet size.
- Errors returned from `recvfrom()` calls are tolerated. - Errors returned from `recvfrom()` calls are tolerated.
- Calculate packet loss rate. The maximum tolerated packet loss rate is 30%. - Calculate packet loss rate. The maximum tolerated packet loss rate is 30%.
### UDPSOCKET_ECHOTEST_CONNECT_SEND_RECV ### UDPSOCKET_ECHOTEST_CONNECT_SEND_RECV
@ -1241,7 +1241,7 @@ Make an HTTP request to a closed socket.
### TLSSOCKET_SEND_UNCONNECTED ### TLSSOCKET_SEND_UNCONNECTED
**Description:** **Description:**
Make an HTTP request to an unconnected socket. Make an HTTP request to an unconnected socket.

Some files were not shown because too many files have changed in this diff Show More