mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #13335 from rajkan01/netsocket_dir_restructure
Restructure netsocket directorypull/13377/head
commit
6bd52719f6
|
@ -138,7 +138,7 @@ matrix:
|
|||
- ./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 rtos
|
||||
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh features/netsocket
|
||||
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh connectivity/netsocket
|
||||
|
||||
- <<: *docs-vm
|
||||
name: "doxygen"
|
||||
|
@ -249,7 +249,7 @@ matrix:
|
|||
- 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 \
|
||||
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
|
||||
- python tools/make.py -t GCC_ARM -m NUCLEO_F103RB --source=. --build=BUILD/NUCLEO_F103RB/GCC_ARM -j0
|
||||
# Run local equeue tests
|
||||
|
|
|
@ -112,7 +112,6 @@ set(unittest-includes-base
|
|||
"${PROJECT_SOURCE_DIR}/stubs"
|
||||
"${PROJECT_SOURCE_DIR}/.."
|
||||
"${PROJECT_SOURCE_DIR}/../features"
|
||||
"${PROJECT_SOURCE_DIR}/../features/netsocket"
|
||||
"${PROJECT_SOURCE_DIR}/../platform"
|
||||
"${PROJECT_SOURCE_DIR}/../storage/filesystem/littlefs/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}/../connectivity/libraries/nanostack-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/ChaN"
|
||||
"${PROJECT_SOURCE_DIR}/../features/filesystem/bd"
|
||||
|
|
|
@ -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})
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include "nsapi_types.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
#include "events/EventQueue.h"
|
||||
#include "ATHandler_stub.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "stdint.h"
|
||||
#include "stdbool.h"
|
||||
#include <cstddef>
|
||||
#include "nsapi_types.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
#include "ATHandler.h"
|
||||
#include "FileHandle_stub.h"
|
||||
#include "Callback.h"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "AT_CellularInformation.h"
|
||||
#include "nsapi_types.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
|
||||
using namespace mbed;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "CellularUtil.h"
|
||||
#include "CellularLog.h"
|
||||
#include "FileHandle.h"
|
||||
#include "nsapi_types.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
|
||||
using namespace mbed;
|
||||
using namespace mbed_cellular_util;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "CellularInterface.h"
|
||||
#include "netsocket/CellularInterface.h"
|
||||
|
||||
MBED_WEAK CellularInterface *CellularInterface::get_target_default_instance()
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "ControlPlane_netif.h"
|
||||
#include "netsocket/ControlPlane_netif.h"
|
||||
#include <list>
|
||||
|
||||
namespace mbed {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "gtest/gtest.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "features/netsocket/EMAC.h"
|
||||
#include "netsocket/EMAC.h"
|
||||
|
||||
class MockEMAC : public EMAC {
|
||||
public:
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "MeshInterface.h"
|
||||
#include "netsocket/MeshInterface.h"
|
||||
|
||||
MBED_WEAK MeshInterface *MeshInterface::get_target_default_instance()
|
||||
{
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
#include "netsocket/NetworkInterface.h"
|
||||
#include "WiFiInterface.h"
|
||||
#include "CellularInterface.h"
|
||||
#include "MeshInterface.h"
|
||||
#include "netsocket/WiFiInterface.h"
|
||||
#include "netsocket/CellularInterface.h"
|
||||
#include "netsocket/MeshInterface.h"
|
||||
|
||||
MBED_WEAK WiFiInterface *WiFiInterface::get_default_instance()
|
||||
{
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "NetworkStack.h"
|
||||
#include "nsapi_dns.h"
|
||||
#include "netsocket/NetworkStack.h"
|
||||
#include "netsocket/nsapi_dns.h"
|
||||
#include "mbed.h"
|
||||
#include "stddef.h"
|
||||
#include <new>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "SocketAddress.h"
|
||||
#include "netsocket/SocketAddress.h"
|
||||
|
||||
|
||||
SocketAddress::SocketAddress(const nsapi_addr_t &addr, uint16_t port)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "SocketStats.h"
|
||||
#include "netsocket/SocketStats.h"
|
||||
|
||||
#if MBED_CONF_NSAPI_SOCKET_STATS_ENABLED
|
||||
int SocketStats::get_entry_position(const Socket *const reference_id)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "platform/mbed_chrono.h"
|
||||
|
||||
#include "events/EventQueue.h"
|
||||
#include "nsapi_types.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
|
||||
#include "Callback.h"
|
||||
#include "rtos/Kernel.h"
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
#ifndef _CELLULARCONTEXT_H_
|
||||
#define _CELLULARCONTEXT_H_
|
||||
|
||||
#include "NetworkStack.h"
|
||||
#include "CellularInterface.h"
|
||||
#include "netsocket/NetworkStack.h"
|
||||
#include "netsocket/CellularInterface.h"
|
||||
#include "CellularDevice.h"
|
||||
#include "CellularUtil.h"
|
||||
#include "ControlPlane_netif.h"
|
||||
#include "netsocket/ControlPlane_netif.h"
|
||||
#include "PinNames.h"
|
||||
|
||||
/** @file CellularContext.h
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#define CELLULAR_INFORMATION_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include "nsapi_types.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
|
||||
const int MAX_IMSI_LENGTH = 15;
|
||||
const int MAX_ICCID_LENGTH = 20 + 1; // +1 for zero termination
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "CellularList.h"
|
||||
#include "Callback.h"
|
||||
#include "nsapi_types.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
|
||||
namespace mbed {
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#if MBED_CONF_CELLULAR_USE_SMS
|
||||
|
||||
#include "Callback.h"
|
||||
#include "nsapi_types.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
|
||||
namespace mbed {
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#define AT_CELLULAR_STACK_H_
|
||||
|
||||
#include "ATHandler.h"
|
||||
#include "NetworkStack.h"
|
||||
#include "netsocket/NetworkStack.h"
|
||||
#include "PlatformMutex.h"
|
||||
#include "AT_CellularDevice.h"
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "CellularList.h"
|
||||
#include "ControlPlane_netif.h"
|
||||
#include "netsocket/ControlPlane_netif.h"
|
||||
#include "ATHandler.h"
|
||||
#include "AT_CellularDevice.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#define CELLULAR_COMMON_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "nsapi_types.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
|
||||
const int CELLULAR_RETRY_ARRAY_SIZE = 10;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <stddef.h>
|
||||
#include <inttypes.h>
|
||||
#include "nsapi_types.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
|
||||
namespace mbed_cellular_util {
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes}
|
|||
../connectivity/cellular/include/cellular/framework/common
|
||||
../connectivity/cellular/include/cellular/framework/AT
|
||||
../connectivity/cellular/include/cellular/framework/device
|
||||
../features/netsocket/cellular
|
||||
)
|
||||
|
||||
# Source files
|
||||
|
|
|
@ -12,7 +12,6 @@ set(unittest-includes ${unittest-includes}
|
|||
../features/frameworks/mbed-client-randlib/mbed-client-randlib
|
||||
../drivers
|
||||
../hal
|
||||
../features/netsocket/cellular
|
||||
)
|
||||
|
||||
# Source files
|
||||
|
@ -60,4 +59,3 @@ set(unittest-test-flags
|
|||
-DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200
|
||||
-DMBED_CONF_CELLULAR_USE_SMS=1
|
||||
)
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes}
|
|||
../connectivity/cellular/include/cellular/framework/common
|
||||
../connectivity/cellular/include/cellular/framework/AT
|
||||
../features/frameworks/mbed-client-randlib/mbed-client-randlib
|
||||
../features/netsocket/cellular
|
||||
)
|
||||
|
||||
# Source files
|
||||
|
|
|
@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes}
|
|||
../connectivity/cellular/include/cellular/framework/common
|
||||
../connectivity/cellular/include/cellular/framework/AT
|
||||
../features/frameworks/mbed-client-randlib/mbed-client-randlib
|
||||
../features/netsocket/cellular
|
||||
)
|
||||
|
||||
# Source files
|
||||
|
|
|
@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes}
|
|||
../connectivity/cellular/include/cellular/framework/common
|
||||
../connectivity/cellular/include/cellular/framework/AT
|
||||
../features/frameworks/mbed-client-randlib/mbed-client-randlib
|
||||
../features/netsocket/cellular
|
||||
)
|
||||
|
||||
# Source files
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "FileHandle_stub.h"
|
||||
#include "CellularLog.h"
|
||||
#include "ATHandler_stub.h"
|
||||
#include "SocketAddress.h"
|
||||
#include "netsocket/SocketAddress.h"
|
||||
#include "CellularDevice_stub.h"
|
||||
#include "AT_CellularDevice_stub.h"
|
||||
#include "myCellularDevice.h"
|
||||
|
|
|
@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes}
|
|||
../connectivity/cellular/include/cellular/framework/common
|
||||
../connectivity/cellular/include/cellular/framework/AT
|
||||
../features/frameworks/mbed-client-randlib/mbed-client-randlib
|
||||
../features/netsocket/cellular
|
||||
)
|
||||
|
||||
# Source files
|
||||
|
@ -20,7 +19,7 @@ set(unittest-sources
|
|||
../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
|
||||
../features/netsocket/SocketAddress.cpp
|
||||
../connectivity/netsocket/source/SocketAddress.cpp
|
||||
)
|
||||
|
||||
# Test files
|
||||
|
@ -51,4 +50,3 @@ set(unittest-test-flags
|
|||
-DDEVICE_INTERRUPTIN=1
|
||||
-DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200
|
||||
)
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ set(unittest-includes ${unittest-includes}
|
|||
../connectivity/cellular/include/cellular/framework/device/cellulardevice
|
||||
../connectivity/cellular/include/cellular/framework/device
|
||||
../connectivity/cellular/include/cellular/framework/common
|
||||
../features/netsocket/cellular
|
||||
)
|
||||
|
||||
# Source files
|
||||
|
@ -19,7 +18,7 @@ set(unittest-sources
|
|||
../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
|
||||
../features/netsocket/SocketAddress.cpp
|
||||
../connectivity/netsocket/source/SocketAddress.cpp
|
||||
)
|
||||
|
||||
# Test files
|
||||
|
|
|
@ -8,7 +8,6 @@ set(unittest-includes ${unittest-includes}
|
|||
../connectivity/cellular/include/cellular/framework/device/cellulardevice
|
||||
../connectivity/cellular/include/cellular/framework/device
|
||||
../connectivity/cellular/include/cellular/framework/common
|
||||
../features/netsocket/cellular
|
||||
)
|
||||
|
||||
# Source files
|
||||
|
@ -49,4 +48,3 @@ set(unittest-test-flags
|
|||
-DDEVICE_SERIAL=1
|
||||
-DDEVICE_INTERRUPTIN=1
|
||||
)
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ set(unittest-includes ${unittest-includes}
|
|||
../connectivity/cellular/include/cellular/framework/device/cellularstatemachine
|
||||
../connectivity/cellular/include/cellular/framework/device
|
||||
../connectivity/cellular/include/cellular/framework/common
|
||||
../features/netsocket/cellular
|
||||
)
|
||||
|
||||
# Source files
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "ESP8266.h"
|
||||
#include "features/netsocket/nsapi_types.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
#include "mbed_trace.h"
|
||||
#include "PinNames.h"
|
||||
#include "platform/Callback.h"
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
#include <ctime>
|
||||
|
||||
#include "drivers/BufferedSerial.h"
|
||||
#include "features/netsocket/nsapi_types.h"
|
||||
#include "features/netsocket/WiFiAccessPoint.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
#include "netsocket/WiFiAccessPoint.h"
|
||||
#include "PinNames.h"
|
||||
#include "platform/ATCmdParser.h"
|
||||
#include "platform/Callback.h"
|
||||
|
@ -32,7 +32,7 @@
|
|||
#include "platform/mbed_error.h"
|
||||
#include "rtos/Mutex.h"
|
||||
#include "rtos/ThisThread.h"
|
||||
#include "features/netsocket/SocketAddress.h"
|
||||
#include "netsocket/SocketAddress.h"
|
||||
|
||||
// Various timeouts for different ESP8266 operations
|
||||
// (some of these can't use literal form as they're needed for defaults in this header, where
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "ESP8266Interface.h"
|
||||
#include "events/EventQueue.h"
|
||||
#include "events/mbed_shared_queues.h"
|
||||
#include "features/netsocket/nsapi_types.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
#include "mbed_trace.h"
|
||||
#include "platform/Callback.h"
|
||||
#include "platform/mbed_atomic.h"
|
||||
|
|
|
@ -24,12 +24,12 @@
|
|||
#include "ESP8266/ESP8266.h"
|
||||
#include "events/EventQueue.h"
|
||||
#include "events/mbed_shared_queues.h"
|
||||
#include "features/netsocket/NetworkInterface.h"
|
||||
#include "features/netsocket/NetworkStack.h"
|
||||
#include "features/netsocket/nsapi_types.h"
|
||||
#include "features/netsocket/SocketAddress.h"
|
||||
#include "features/netsocket/WiFiAccessPoint.h"
|
||||
#include "features/netsocket/WiFiInterface.h"
|
||||
#include "netsocket/NetworkInterface.h"
|
||||
#include "netsocket/NetworkStack.h"
|
||||
#include "netsocket/nsapi_types.h"
|
||||
#include "netsocket/SocketAddress.h"
|
||||
#include "netsocket/WiFiAccessPoint.h"
|
||||
#include "netsocket/WiFiInterface.h"
|
||||
#include "platform/Callback.h"
|
||||
#include "platform/mbed_chrono.h"
|
||||
#if MBED_CONF_RTOS_PRESENT
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "platform/Callback.h"
|
||||
#include "CellularNonIPSocket.h"
|
||||
#include "netsocket/CellularNonIPSocket.h"
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace mbed;
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "DTLSSocket.h"
|
||||
#include "netsocket/DTLSSocket.h"
|
||||
|
||||
#define TRACE_GROUP "TLSS"
|
||||
#include "mbed-trace/mbed_trace.h"
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "DTLSSocketWrapper.h"
|
||||
#include "netsocket/DTLSSocketWrapper.h"
|
||||
#include "platform/Callback.h"
|
||||
#include "drivers/Timer.h"
|
||||
#include "events/mbed_events.h"
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "EMACInterface.h"
|
||||
#include "netsocket/EMACInterface.h"
|
||||
|
||||
using namespace mbed;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "EthernetInterface.h"
|
||||
#include "netsocket/EthernetInterface.h"
|
||||
|
||||
/* No actual interface implementation here, as EthernetInterface is
|
||||
* just an EMACInterface. But we can be the default EthInterface - step up
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "InternetDatagramSocket.h"
|
||||
#include "netsocket/InternetDatagramSocket.h"
|
||||
#include "Timer.h"
|
||||
#include "mbed_assert.h"
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "InternetSocket.h"
|
||||
#include "netsocket/InternetSocket.h"
|
||||
#include "platform/mbed_critical.h"
|
||||
#include "platform/Callback.h"
|
||||
|
|
@ -61,4 +61,3 @@ uint32_t NetStackMemoryManager::copy_from_buf(void *ptr, uint32_t len, const net
|
|||
|
||||
return copied_len;
|
||||
}
|
||||
|
|
@ -180,4 +180,3 @@ nsapi_error_t NetworkInterface::set_blocking(bool blocking)
|
|||
{
|
||||
return NSAPI_ERROR_UNSUPPORTED;
|
||||
}
|
||||
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
#include "netsocket/NetworkInterface.h"
|
||||
|
||||
#include "EthInterface.h"
|
||||
#include "WiFiInterface.h"
|
||||
#include "CellularInterface.h"
|
||||
#include "MeshInterface.h"
|
||||
#include "netsocket/EthInterface.h"
|
||||
#include "netsocket/WiFiInterface.h"
|
||||
#include "netsocket/CellularInterface.h"
|
||||
#include "netsocket/MeshInterface.h"
|
||||
|
||||
/* Weak default instance static classes for the various abstract classes.
|
||||
* Applications can override these.
|
|
@ -14,8 +14,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "NetworkStack.h"
|
||||
#include "nsapi_dns.h"
|
||||
#include "netsocket/NetworkStack.h"
|
||||
#include "netsocket/nsapi_dns.h"
|
||||
#include "stddef.h"
|
||||
#include <new>
|
||||
#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");
|
||||
return new (stack->_stack_buffer) NetworkStackWrapper;
|
||||
}
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "PPPInterface.h"
|
||||
#include "netsocket/PPPInterface.h"
|
||||
|
||||
using namespace mbed;
|
||||
|
||||
|
@ -166,4 +166,3 @@ nsapi_error_t PPPInterface::set_blocking(bool blocking)
|
|||
_blocking = blocking;
|
||||
return NSAPI_ERROR_OK;
|
||||
}
|
||||
|
|
@ -14,9 +14,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "SocketAddress.h"
|
||||
#include "NetworkInterface.h"
|
||||
#include "NetworkStack.h"
|
||||
#include "netsocket/SocketAddress.h"
|
||||
#include "netsocket/NetworkInterface.h"
|
||||
#include "netsocket/NetworkStack.h"
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "ip4string.h"
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "SocketStats.h"
|
||||
#include "netsocket/SocketStats.h"
|
||||
#include "platform/mbed_error.h"
|
||||
#include "platform/mbed_assert.h"
|
||||
#ifdef MBED_CONF_RTOS_PRESENT
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "TCPSocket.h"
|
||||
#include "netsocket/TCPSocket.h"
|
||||
#include "Timer.h"
|
||||
#include "mbed_assert.h"
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "TLSSocket.h"
|
||||
#include "netsocket/TLSSocket.h"
|
||||
|
||||
#define TRACE_GROUP "TLSS"
|
||||
#include "mbed-trace/mbed_trace.h"
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "TLSSocketWrapper.h"
|
||||
#include "netsocket/TLSSocketWrapper.h"
|
||||
#include "platform/Callback.h"
|
||||
#include "drivers/Timer.h"
|
||||
#include "events/mbed_events.h"
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "UDPSocket.h"
|
||||
#include "netsocket/UDPSocket.h"
|
||||
#include "Timer.h"
|
||||
#include "mbed_assert.h"
|
||||
|
|
@ -31,4 +31,3 @@ uint8_t WiFiAccessPoint::get_channel() const
|
|||
{
|
||||
return _ap.channel;
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
/* Declare __STDC_LIMIT_MACROS so stdint.h defines INT32_MAX when using C++ */
|
||||
#define __STDC_LIMIT_MACROS
|
||||
|
||||
#include "nsapi_dns.h"
|
||||
#include "netsocket/nsapi_dns.h"
|
||||
#include "netsocket/UDPSocket.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -26,7 +26,7 @@
|
|||
#include <stdint.h>
|
||||
#include "mbed_shared_queues.h"
|
||||
#include "events/EventQueue.h"
|
||||
#include "OnboardNetworkStack.h"
|
||||
#include "netsocket/OnboardNetworkStack.h"
|
||||
#include "rtos/Kernel.h"
|
||||
#include "PlatformMutex.h"
|
||||
#include "SingletonPtr.h"
|
|
@ -10,11 +10,11 @@ Target API
|
|||
|
||||
The target for this plan is to test:
|
||||
|
||||
- [Socket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/Socket.h).
|
||||
- [UDPSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/UDPSocket.h).
|
||||
- [TCPSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.h).
|
||||
- [TLSSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TLSSocket.h).
|
||||
- [DNS](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/DNS.h).
|
||||
- [Socket](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/Socket.h).
|
||||
- [UDPSocket](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/UDPSocket.h).
|
||||
- [TCPSocket](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/TCPSocket.h).
|
||||
- [TLSSocket](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/TLSSocket.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.
|
||||
|
||||
|
@ -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/>).
|
||||
|
||||
- Install lighthttpd server:
|
||||
|
||||
|
||||
```.sh
|
||||
$ sudo apt-get install lighttpd
|
||||
$ 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:
|
||||
|
||||
|
||||
```.sh
|
||||
$ sudo apt-get update
|
||||
$ 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 --webroot -w /var/www/html -d <test_server_url>
|
||||
```
|
||||
|
||||
|
||||
- Set test server to renew certificate before expiry.
|
||||
|
||||
|
||||
```.sh
|
||||
$ 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
|
||||
|
@ -177,7 +177,7 @@ PORT STATE SERVICE
|
|||
|
||||
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
|
||||
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:**
|
||||
|
||||
- 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%.
|
||||
|
||||
### UDPSOCKET_ECHOTEST_NONBLOCK
|
||||
|
@ -832,7 +832,7 @@ mode.
|
|||
**Expected result:**
|
||||
|
||||
- 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%.
|
||||
|
||||
### UDPSOCKET_ECHOTEST_CONNECT_SEND_RECV
|
||||
|
@ -1241,7 +1241,7 @@ Make an HTTP request to a closed socket.
|
|||
|
||||
### TLSSOCKET_SEND_UNCONNECTED
|
||||
|
||||
**Description:**
|
||||
**Description:**
|
||||
|
||||
Make an HTTP request to an unconnected socket.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue