Commit Graph

205 Commits (c40d86038c0372147c5ffb0bd98bf57330115bdd)

Author SHA1 Message Date
Cruz Monrreal fc41c3d8e3
Merge pull request #8311 from SeppoTakalo/secure_socket
Implement TLSSocket
2018-10-17 12:24:09 -05:00
Seppo Takalo 5d1cd2552b Check that MBEDTLS_ERROR_C is defined before using mbedtls_strerror().
If MBEDTLS_ERROR_C is not defined, that strerror function does not
exist, or is just dummy definition if MBEDTLS_ERROR_STRERROR_DUMMY is
defined.
2018-10-17 11:45:31 +03:00
Deepika f58e103758 Netsocket: Add required header file and namespace element instead add all 2018-10-15 10:57:21 -05:00
Cruz Monrreal 00f8ecfb7a
Merge pull request #8336 from sentinelt/socket-closed
Fix hard-fault when socket created using accept() is closed
2018-10-15 10:22:17 -05:00
Seppo Takalo 7f39bb4453 Implement TLSSocket
Provide TLSSocket implementation. This implementation allows TLSSocket
to wrap around any existing socket. Currently only TLS supported. DTLS
not yet implemented.

Design document also provided with the implementation.

Documentation submitted to Mbed OS handbook.
2018-10-15 13:31:36 +03:00
Kevin Bracey 1ef213ec89 Clean up Thread deprecation warnings
Static Thread methods and signal methods have been deprecated. Remove
all references in the main code, and most of the tests. Some tests of
the deprecated APIs themselves remain.
2018-10-12 14:57:13 +03:00
Cruz Monrreal 2a91a91313
Merge pull request #8219 from jeromecoutant/PR_EMAC_SLEEP
STM32 EMAC : lock deep sleep
2018-10-11 10:10:32 -05:00
Cruz Monrreal 21b4ecad1a
Merge pull request #8316 from michalpasztamobica/master
unittests: Add tests for netsocket classes
2018-10-10 10:11:12 -05:00
Cruz Monrreal b2f00fb416
Merge pull request #8179 from kivaisan/add_default_cellular_sim_pin
Add missing SIM PIN configuration item
2018-10-08 10:12:41 -05:00
Michal Paszta 5b4634a1fe unittests: Added tests for netsocket classes
New classes covered with unit tests: SocketAddress, EthernetInterface, EMACInterface, WiFiAccessPoint.
Also added missing namespace in front of mbed::Callback usages.
EMACInterface is covered by the EthernetInterface unit tests.
2018-10-08 14:21:01 +02:00
Sławek Piotrowski 9b89ad2fa9 Fix hard-fault when socket created using accept() is closed
When socket created  using accept() is closed by calling the close()
method, "delete this" is executed which triggers the destructor call
on TCPSocket which in turn calls close() once again. Because _stack
is already 0 this results in a hard-fault.

Add a check that skips the rest of the close() method is the _stack
is already 0.
2018-10-06 21:15:29 +02:00
jeromecoutant 79bef6e2c8 STM32 EMAC : lock deep sleep 2018-09-21 15:14:38 +02:00
Steven 9a0fc98bdc Hotfix for PR #7778
TB_SENSE_12 would have been left behind by the changes in #7778. This commit implements the changes in mbed to allow targets to provide a default network interface for Silicon Labs targets.
2018-09-19 12:30:21 +02:00
Kimmo Vaisanen 95114fe8ed Add missing SIM PIN configuration item 2018-09-19 12:24:46 +03:00
Cruz Monrreal c356f1f9d4
Merge pull request #7883 from juhaylinen/fix-netsocket-warning
netsocket: Fix compiler warning
2018-09-18 11:42:21 -05:00
Cruz Monrreal 8475477ca7
Merge pull request #7992 from SeppoTakalo/fix-tcpsocket-accept
Fix TCPSocket::accept()
2018-09-14 11:49:06 -05:00
Juha Ylinen 4ea49f5580 Fix TCPServer::accept()
Missing lock caused Mutex unlock failure
2018-09-07 10:46:25 +03:00
Cruz Monrreal 06106297a4
Merge pull request #6293 from Taiki-San/patch-1
Reduce .text footprint of the network stack
2018-09-05 10:16:04 -05:00
Seppo Takalo 451852d19f Fix TCPSocket::accept()
This one was actually always return NULL, and unsted because we only
have tests with one device.

We will add the testcase for this soon
2018-09-05 12:00:59 +03:00
Martin Kojtal 44925d8527
Merge pull request #7579 from u-blox/ublox_odin_driver_os_5_v3.0.0_rc1
Updated ODIN drivers to v3.0.0 RC1
2018-09-03 09:25:32 +02:00
Seppo Takalo 1ef04796ee On KW24D and NCS36510 default to smaller Nanostack configuration
These boards do not fit the full Nanostack, so we need to select
6LoWPAN-ND as a default.
2018-09-01 12:37:46 -05:00
Ammad Rehmat b934632653 Access Point API 2018-08-31 11:33:30 +05:00
Taiki 758f6d2e83 Switch the IPv4 parser to the one recently introduced in libservice. Return a bool value on wether parsing of the IPv4 address string was successful 2018-08-28 14:00:54 +02:00
Seppo Takalo c5064a8e33 Fix *MeshInterface::get_default_instance()
This was returning object, instead of pointer.
Also it was trying to call lowpan(reference), instad of lowpan(ptr).
2018-08-28 11:02:58 +03:00
Juha Ylinen b8b39ac3ab netsocket: Fix compiler warning
[Warning] InternetSocket.h@237,10: 'InternetSocket::_factory_allocated' will be initialized after [-Wreorder]
[Warning] InternetSocket.h@236,23:   'volatile unsigned int InternetSocket::_pending' [-Wreorder]
[Warning] InternetSocket.cpp@22,1:   when initialized here [-Wreorder]
2018-08-24 13:26:53 +03:00
Steven 1cfddb73b7 Fix stack size for LwIP on EFM32GG11
Typo in the config file made the LwIP stack way too small on EFM32GG11 STK3701 target. Additionally, the EMAC thread stack was slightly too small when debug printing is on.
2018-08-19 14:39:58 +02:00
Martin Kojtal 88a7416941 nsapi: astyle block fix 2018-08-06 09:59:08 +01:00
Martin Kojtal b46aa6108d netsocket: astyle fix 2018-08-03 13:34:33 +01:00
Cruz Monrreal 63f62165d8
Merge pull request #7565 from OpenNuvoton/nuc472_emac_rst
Nuvoton: Fix NUC472 SD-Host HW IP reset definition
2018-07-31 11:44:01 -05:00
cyliangtw 2fcbcf1789
Initialized return value of numaker_emac link-out 2018-07-31 12:01:43 +08:00
Seppo Takalo 96a90c2f2f Allow legacy TCPServer::accept() to override inherited Socket::accept() 2018-07-24 18:06:04 +03:00
cyliangtw 7ea02d95a3 Add error handling for getting null tx buffer 2018-07-20 18:23:54 +08:00
Steven Cooreman da377c6ed3 Add EFM32GG11 Ethernet driver 2018-07-11 18:13:04 +02:00
Cruz Monrreal 93233c4f5d
Merge pull request #7364 from 0xc0170/fix_storage_rtos
Fix storage rtos types - remove including internal header file
2018-07-05 14:29:46 -05:00
Tero Jääskö 2e89fa22a5 netsocket: dns: make dns-cache-size:0 remove whole DNS cache code
Setting ""nsapi.dns-cache-size": 0" still left some of the DNS
caching code in. Add crude #if to remove all of it.
This allows one to save 429 bytes of flash and 48 bytes of RAM on
ARMC5 builds.
2018-06-29 18:17:19 +03:00
Martin Kojtal 4d8baa7451 emac targets: fix thread cb type 2018-06-29 08:35:20 +01:00
Cruz Monrreal cb000ceeab
Merge pull request #7336 from SeppoTakalo/fix_udp_filtering
Fix connected UDPSocket filtering
2018-06-28 10:06:52 -05:00
Martin Kojtal 82b490b0cf kinetis: fix rtos storage type for thread 2018-06-28 15:11:00 +01:00
jeromecoutant 6391b7f2fa TARGET_STM_EMAC astyle 2018-06-27 15:00:51 +02:00
Seppo Takalo f2c0c4e248 Fix connected UDPSocket filtering
Was dropping all packets from connected peer
2018-06-26 17:01:19 +03:00
Seppo Takalo 1ca9ccda73 Filter incoming UDP packets based on connected peer address. 2018-06-20 12:38:07 +03:00
Seppo Takalo e7cb4752fa Fix small issues from the review 2018-06-20 12:38:07 +03:00
Seppo Takalo 2b60e42756 Close Doxygen group at the end of file 2018-06-20 12:38:07 +03:00
Seppo Takalo 96ef8e345d Move string allocation to a point where get_ip_address() is called
This saves RAM/stack on typical socket usage where human readable
format is not exchanged so often.
2018-06-20 12:38:07 +03:00
Seppo Takalo 407b2f275d Move accept() to abstract socket class and implement in TCPSocket
Deprecate TCPServer in favor of just TCPSocket::accept()
2018-06-20 12:38:07 +03:00
Seppo Takalo cdbe43c0d5 Refactor Sockets by moving functions up into common base.
* Move IP Socket stuff to InternetSocket class which is inherited by TCP/UDP
* Implement sendto() and recvfrom() on TCP socket
* Implement connect() call on UDP
* Implement send() and recv() calls on UDP socket
2018-06-20 12:38:06 +03:00
Cruz Monrreal e8005f6d72
Merge pull request #7206 from mikaleppanen/k64f_async_powerup
K64f non-blocking powerup
2018-06-19 21:49:37 -05:00
Cruz Monrreal 2bb686ff1e
Merge pull request #7245 from SeppoTakalo/fix-default-interface
Fix default interface selection by using correct macro names.
2018-06-19 08:46:28 -05:00
Martin Kojtal 0658544cb6
Merge pull request #7207 from mikaleppanen/dns_singletons
Change DNS global class definitions to singletons
2018-06-19 14:14:21 +02:00
Seppo Takalo 384fc7e778 Fix typo: WifiInterface -> WiFiInterface and add missing return.
Default WiFiInterface did not even build. And when it was fixed to build,
it was always returning NULL.
2018-06-19 10:47:12 +03:00