Unify method of enabling secure TLS sockets in samples by using TLS
overlay config file instead of standalone config files.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Avoid having not-necessarily board specific configs in a separate file.
Instead, have a single project file with appropriate overlay configs.
Board specific configurations can be added in future if needed.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
It is no longer necessary to set the KCONFIG_ROOT variable when the
KConfig file is in the application root directory.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
If user enables VLAN support, then the sample application will
create two extra VLAN network interfaces for testing purposes.
The application can be compiled like this for VLAN support:
cmake -DBOARD=qemu_x86 -DOVERLAY_CONFIG=overlay-vlan.conf ..
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add support for VLANs which are disabled by default.
The application can be configured to use the VLANs by setting
the IP addresses properly in config file. The VLAN support in
this sample application is only meant for testing multiple network
interface handling.
The application can be compiled like this for VLAN support:
cmake -DBOARD=qemu_x86 -DOVERLAY_CONFIG=overlay-vlan.conf ..
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add support for VLANs which are disabled by default.
The application can be configured to use the VLANs by setting
the IP addresses properly in config file. The VLAN support in
this sample application is only meant for testing multiple network
interface handling.
The application can be compiled like this for VLAN support:
cmake -DBOARD=qemu_x86 -DOVERLAY_CONFIG=overlay-vlan.conf ..
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If user enables VLAN support, then the sample application will
create two extra VLAN network interfaces for testing purposes.
The application can be compiled like this for VLAN support:
cmake -DBOARD=qemu_x86 -DOVERLAY_CONFIG=overlay-vlan.conf ..
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
New shell implementation is on the way. For now old one and all
references are kept to be gradually replaced by new shell.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The return of memset is never checked. This patch explicitly ignore
the return to avoid MISRA-C violations.
The only directory excluded directory was ext/* since it contains
only imported code.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
With the new Kconfig preprocessor (described in
https://github.com/torvalds/linux/blob/master/Documentation/kbuild/
kconfig-macro-language.txt), the syntax for expanding environment
variables is $(FOO) rather than $FOO.
$(FOO) is a general preprocessor variable expansion, which falls back to
environment variables if the variable isn't set (like in Make). It can
also be used in prompts, 'comment's, etc.
The old syntax will probably be supported forever in Kconfiglib for
backwards compatibility, but might as well make it consistent now that
people might start using the preprocessor more.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Add a prj conf file for the TI cc3220sf_launchxl board
to enable socket offload to the simplelink WiFi driver.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Refactor IPv6 address lifetime timer setting in net_if_addr to support
longer lifetime than 24 days.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This removes these network sample applications
samples/net/coaps_client
samples/net/coaps_server
as they are using low level mbedtls APIs. You should use
preferably socket based or net-app based applications.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Payload variable can hold max 64 bytes but value of size can be more
than that. Memsetting using value of size can overrun payload array.
Fixes coverity issue.
Coverity-CID: 187823
Fixes: #9638
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This removes these network sample applications
samples/net/mbedtls_sslclient
samples/net/mbedtls_dtlsserver
samples/net/mbedtls_dtlsclient
as they are using low level mbedtls APIs. You should use
preferably the samples/net/sockets/echo_[server|client] applications
instead, or as a last option use net-app based applications
in samples/net/echo_[server|client] if needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Due to a change in the company name, the LwM2M copyrights need
to be changed from "Open Source Foundries Limited" ->
"Foundries.io".
Signed-off-by: Michael Scott <mike@foundries.io>
Per: http://pubs.opengroup.org/onlinepubs/009695399/functions/socket.html
"Upon successful completion, socket() shall return a non-negative
integer, the socket file descriptor."
The test in prepare_fds() however fails if socket fd is
zero (non-negative), which should be a valid value.
This was found while testing the SimpleLink socket offload driver,
which can return a zero-valued socket fd, per the POSIX spec.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Move to more generic tracing hooks that can be implemented in different
ways and do not interfere with the kernel.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit contains several fixes for DTLS implementation, proposed in
a post-merge review of #9338.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Instead of having one delayed_work struct / IP address, use
only one delayed_work struct for lifetime timer. This saves
over 20 bytes / allocated address struct.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Prepend the text 'cmake_minimum_required(VERSION 3.8.2)' into the
application and test build scripts.
Modern versions of CMake will spam users with a deprecation warning
when the toplevel CMakeLists.txt does not specify a CMake
version. This is documented in bug #8355.
To resolve this we include a cmake_minimum_required() line into the
toplevel build scripts. Additionally, cmake_minimum_required is
invoked from within boilerplate.cmake. The highest version will be
enforced.
This patch allows us to afterwards change CMake policy CMP000 from OLD
to NEW which in turn finally rids us of the verbose warning.
The extra boilerplate is considered more acceptable than the verbosity
of the CMP0000 policy.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This finishes refactor of splitting off net_config library name from
net_app library, started in c60df1311, c89a06dbc. This commit makes
sure that Kconfig options are prefixed with CONFIG_NET_CONFIG_
instead of CONFIG_NET_APP_, and propagates these changes thru the
app configs in the tree.
Also, minor dependency, etc. tweaks are made.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Add DTLS support to socket echo_client and echo_server samples.
Additionally, move TLS-related configs to overlay-tls.conf config file,
to align with other examples.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This will make adding properties to symbols in the base Zephyr Kconfig
files work the same as before.
I didn't actually spot any such cases, so this is just to play it safe.
It also makes the sample Kconfig symbols appear at the top in the
menuconfig interface, which might be nice.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
These are no longer required. Kconfiglib expands references to
environment variables directly.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Some reST syntax errors and doc edits got missed during the review
of PR #561 causing problems in the generated HTML.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The application does nothing useful, it just enables Link Layer
Discovery Protocol support which starts to send LLDP network packets
to ethernet network interface. Note that the LLDP packets are only
sent to those network interfaces that claim to support LLDP.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
- Remove NET_LOG / NET_BUF_LOG settings, instead just enable SYS_LOG
- Simplify by also removing SYS_LOG_SHOW_COLOR, INIT_STACKS and
NET_STATISTICS. These can be enabled by user if wanted/needed.
Signed-off-by: Michael Scott <mike@foundries.io>
Allow user to configure a program that is executed after the
network interface is created and IP address is setup.
This can be used e.g., to start wireshark to capture
the network traffic of the interface.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Default value 2 was not enough for mcast addresses table.
Core stack adding mcast addresses on various reasons. Also
coaps_client trying to create mcast context for some purpose.
mcast address is not in lookup table, so binding fails. Add
CoAP sample related mcast address to table and then bind the
context.
Fixes#9131
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Let's add an overlay file to enable using the WNC-M14A2A LTE-M
modem with the LwM2M client.
Also, update documentation for it's use.
Signed-off-by: Michael Scott <mike@foundries.io>
Adding IPv4 autoconf sample application that can be used to
test IPv4 autoconf functionality.
Signed-off-by: Matthias Boesl <matthias.boesl@gmail.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This app will not fit in the 96b_nitrogen board with ECC enabled.
"real-ld: region `SRAM' overflowed by 68 bytes". Disable the feature
explicitly since a subsequent patch will auto-enable it for all
combined Bluetooth Host-Controller builds.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Thread registers multiple unicast and multicast adresses by default. As
they are exchanged with Zephyr interface, we need enough buffers to
store them all.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit adds TLS support to socket echo_client/echo_server samples.
Credentials used are the same as in the non-socket versions of these
samples, therefore they can be easily tested with net-tools utils.
Maximum payload size for the client was sligtly reduced to fit the
encrypted data within 1280 bytes.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add CA certificates to http_get and big_http_download samples. Use
socket options to configure TLS connection - TLS certificates are now
validated.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Refactor the prj*conf files so that there is only one master
prj.conf and several overlay conf files that add / change
only minor subset of functionality.
Use the overlay files like so:
cmake -DBOARD=nrf52840_pca10056 \
-DOVERLAY_CONFIG=overlay-ot.conf ..
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The logic for error checking after net_pkt_pull was inverted -
build_pkt_reply would exit in case net_pkt_pull succeeded. In result no
responses were sent by echo_server.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
If -fno-strict-overflow compiler flag is disabled, then this warning
is printed:
samples/net/throughput_server/src/server.c:157:6: \
error: assuming signed overflow does not occur when assuming \
that (X + c) >= X is always true [-Werror=strict-overflow]
if (new_print > curr) {
Fixes#8924
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Refactor the prj*conf files so that there is only one master
prj.conf and several overlay conf files that add / change
only minor subset of functionality.
Use the overlay files like so:
cmake -DBOARD=nrf52840_pca10056 \
-DOVERLAY_CONFIG=overlay-ot.conf ..
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If echo-server receives a IPv6 packet with large header (e.g HBHO)
build_reply_pkt() function failed to remove IPv6 header. Reason is
net_buf_pull() doesn't work if header length is more than one
fragment. net_pkt_pull() solves the issue.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>