Commit Graph

12 Commits (a628eba212556a652b3b478c6b73312ced70e83d)

Author SHA1 Message Date
Martin Kojtal f1f64266c0
Merge pull request #8600 from KariHaapalehto/wisuninterface_created
Wi-SUN interface implementation.
2018-11-22 10:55:58 +01:00
Martin Kojtal eec4e1329a nanostack interface: fix coding style 2018-11-15 07:20:12 +00:00
Kari Haapalehto 4440612d42 This is a initial version of Wi-Sun interface implementation.
To get Wi-Sun mesh network working, also nanostack with Wi-Sun support
is needed. ws_empty_functions.c and ws_management_api.h are temporary
included here, so that wisun_tasklet will compiled without problems.
They will replaced with the official versions with next nanostack release.
2018-10-31 15:48:33 +02:00
Deepika a47c6b8139 Nanostack: Add required header file and namespace element instead add all 2018-10-15 10:57:21 -05:00
Juha Ylinen b8a7e25e84 Nanostack: Fix return code for unsupported socket options 2018-08-20 16:30:19 +03:00
Juha Ylinen 942b77255b Nanostack: fix error code
Return NSAPI_ERROR_NO_MEMORY if socket->open() fails
2018-08-03 12:13:21 +03:00
Kevin Bracey e06923c64a Make Nanostack C++ constructor initialise Nanostack
Nanostack object constructor didn't actually initialise Nanostack.
Nanostack initialisation was deferred until an interface was actually
attached to the stack, which generally happened at first interface
connect.

Not normally a problem, unless you're trying to make direct Nanostack
setup calls prior to connect - some applications do this, and were
relying on ThreadInterface::initialise to do Nanostack
initialisation.

Unfortunately in 5.9 ThreadInterface::initialise no longer does
initialise Nanostack immediately, because the mesh interfaces were
aligned and integrated with the Ethernet interfaces, which did
initialisation on connect().

Make the Nanostack object constructor initialise Nanostack (as the LWIP
constructor does for lwIP), so calling Nanostack::get_instance() is the
5.9 API for Nanostack initialisation.

For future work, APIs like ns_file_system_set_root_path should be
exposed as methods of Nanostack, so everything happens with a single
Nanostack::get_instance().file_system_set_root_path().
2018-06-08 13:00:58 +03:00
Kevin Bracey f3ec0dacd5 Add NetworkInterface::get_default_instance()
Provide an initial framework to make it easier to find a default network
interface.
2018-05-23 12:25:17 +03:00
Mika Leppänen 1c01f5dda4 Corrected defects
- Changed call_in/call methods of the stack to callback provided by the stack
- Specified what are limitations for operations that are made in callback
- Added pure virtual class DNS that defines DNS operations
- Added cancel operation and unique ID to DNS request used in cancel
- Added DNS configuration options to netsocket/mbed_lib.json for retries,
  response wait time and cache size
- Changed host name to use dynamic memory in DNS query list and cache,
  set maximum length for the name to 255 bytes.
- Added mutex to asynchronous DNS
- Reworked retries: there is now total retry count and a server specific count
- Ignores invalid incoming UDP socket messages (DNS header is not valid), and retries DNS query
- Reworked DNS module asynchronous operation functions
- Corrected other review issues (nothrow new, missing free, missing mutex unlock etc.)
2018-05-23 12:24:10 +03:00
Mika Leppänen b7e8400c2c Added non-blocking DNS functionality to network interface
- Added non-blocking DNS interface to network interface and
  network stack.
- Added caching of DNS replies.
- Added a network stack function to get DNS addresses from stack.
- Added call and call_in hooks to onboard network stack to
  allow calling functions from onboard stack context.
- Added support to call and call_in functions to LWIP and
  Nanostack.
- Disabled LWIP DNS translator with the exception of DNS
  address storage used in DNS address get.
2018-05-23 12:24:10 +03:00
Kevin Bracey 3c83c62ff7 Nanostack EMAC implementation
Make Nanostack an OnboardNetworkInterface, implementing
add_ethernet_interface so it can use EMAC drivers.

Can now be used via EthernetInterface, and be the system's default
network stack.

Legacy support for NanostackEthernetInterface retained. Some
restructuring of mesh interface code to fit into the
OnboardNetworkStack:::Interface system.
2018-05-23 12:24:04 +03:00
Seppo Takalo f0bf771502 Get rid of FEATURE_NANOSTACK
Allow FEATURE_NANOSTACK still to be defined in the build so
that we don't break any builds.
2018-04-27 14:38:44 +03:00