So that it's possible to register ARP entries manually. Needed for DHCP
server implementation, which in unicast mode needs to reply to an IP
address that is not registered on the peer interface yet (hence no ARP
reply will be sent). It's needed to add an ARP entry manually in that
case, as hardware address is already known at that point.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add new kconfig CONFIG_LWM2M_QUEUE_MODE_NO_MSG_BUFFERING.
When enabled and device is sleeping, Reqistration Update
message is skipped and messages from send operation and
notifications are sent right away.
Reqistration update message is also skipped when
lwm2m_engine resumes from pause state.
Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
L2 PPP is not able to handle the carrier being lost gracefully,
nor is it able to gracefully close the PPP connection when
net_if_down() is called.
This patch refactors the L2 PPP module to use the carrier state
to either properly close or simply terminate the PPP connection.
Additionally, it ensures that the PPP session is closed properly
before calling ppp->stop().
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Get TLS_DTLS_CID_STATUS and TLS_DTLS_PEER_CID_VALUE utilize
mbedtls_ssl_get_peer_cid, which expects that mbedtls_ssl_setup
has been done.
Signed-off-by: Markus Lassila <markus.lassila@nordicsemi.no>
User is able to tweak the socket service dispatcher thread
priority in order to get better performance from the system
if needed. By default the dispatcher thread runs in lowest
application thread priority (K_LOWEST_APPLICATION_THREAD_PRIO).
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The thread name output field was a bit too short in "net sockets"
command, so make it 25 char long.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The "net sockets" command was not checking if there is any
sockets in the system before trying to access them.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The channel extraction from string directly uses the end variable with
limited data type, this causes issue if an invalid channel that exceeds
the data is given as an input e.g., 300, which would end up as a valid
channel 44.
Use an intermediate variable with type that can hold all possible
combinations (valid and invalid) and only after validation assign that
to the end type.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
For none and WPA-PSK MFP isn't applicable, it was only introduced in
WPA2-PSK (RSN) and later.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Various network shell commands like ping need floating
point support from libc so select the CONFIG_REQUIRES_FLOAT_PRINTF
option for it.
Fixes#67601
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The place where TF-M places its non-secure api header files has changed
Therefore changing it for for all applications that use it.
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
This commit adds a function that updates the hostname displayed by the
net backend. It is called by the network stack when the hostname is
updated.
Signed-off-by: Gerhard Jörges <joerges@metratec.com>
If user has not supplied address pointer when calling accept(),
then we would not be able to figure out the used socket domain
properly. But as there is now SO_DOMAIN option supported, use
that to get the correct socket domain.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The getsockopt() will return the address domain of the given
socket like AF_INET or AF_INET6.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Made the definition of in_addr all_routers conditional to remove
compiler warning:
warning: 'all_routers' defined but not used [-Wunused-const-variable=]
The warning occurs when igmpv3 is enabled.
Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
This commit adds a new function the net_buf's API that allow an user
to match the net_buf's content with a data without copying it to a
temporary buffer.
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
gcc prints this warning message
'strncat' specified bound 1 equals source length [-Wstringop-overflow=]
58 | strncat(fd, "C", 1);
There was no error in the code but avoid the warning by not using
strncat().
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The socket service provides a similar functionality as what
initd provides in Linux. It listens user registered sockets
for any activity and then launches a k_work for it. This way
each application does not need to create a thread to listen
a blocking socket.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
According to the POSIX specification, null pointer
is a valid value for the `address` argument
of the `accept` function.
This commit adds a check to prevent a null pointer
dereference inside `z_impl_zsock_accept`.
Signed-off-by: Mirko Covizzi <mirko.covizzi@nordicsemi.no>
A problem occurred while running PTP on a multi-port target
(RENESAS RZT2M) with two ports enabled. Announce messages on the
switched devices master port always contained local clock information
instead information from received on the slave port from the better
GM clock. Depending on the BMCA config this turned into having more
than one GM in the system.
Sending always the locally stored GM information helped to overcome
this issue.
Signed-off-by: Manuel Schappacher <manuel.schappacher@hs-offenburg.de>
Provision of configurable parameter for generating unblock event
ahead of TWT slot. Host application depending upon latencies can
configure this to wakeup rpu ahead of the TWT slot.
Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
ARM GCC version 12.2.0 (Zephyr SDK 0.16.4) generates the following build
warning from the strncpy call in "wifi_utils_parse_scan_bands":
warning: '__builtin_strncpy' output truncated before terminating nul
copying as many bytes from a string as its length
To resolve this warning, pass the maximum length of the temporary
parse_str buffer to strncpy. This also has the benefit of correctly null
terminating parse_str, since we already verify the
scan_bands_str is properly null terminated with the strlen() check in
this function. We can therefore remove the line adding a null terminator
to parse_str as well.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This was missed in earlier that tried to fix all string comparisons to
use case insensitive comparison.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
The help text was incorrect, we return -ETIMEDOUT instead
of -ECONNRESET when retransmission timeout occurs.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
In AP mode maintain the database of connected stations based on the
Wi-Fi management events and dump the list.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
These are helpful to track clients being added and deleted.
Applications can actions based on these events.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
These events communicate the status of AP mode operations (enable or
disable) with few pre-defined enumerations.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Update the example of scan -c argument.
Default value for max channels is set to 3,
So, update the example according to that.
Add closing bracket in -s.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
Adding a callback for handling lwm2m messages with prefixed paths defined
by the gateway object. If CONFIG_LWM2M_GATEWAY_OBJ_SUPPORT is set,
each path is checked for the prefix stored in the object instances of the
gateway object 25. If prefixes match the msg is passed to the gw_msg_cb.
Signed-off-by: Simon Walz <simon.walz@autosen.com>
__bswap_ in zephyr/sys/byteorder.h conflicts with __bswap_ in host's
byteswap.h. byteswap.h from host compiler used in posix_native_64 boards
causes a compilation issue.
This commit renames __bswap_ to BSWAP_ to prevent collision.
Before this commit a compilation error can be created by adding #include
<byteswap.h> to samples/net/sockets/echo/src/socket_echo.c
This does not change external API to byteorder.h, but does change
internal implementation which some other source files depend on.
Replaced manual byteswap operations in devmem_service.c with APIs from
byteorder.h which automatically converts to CPU endianess when necessary.
Fixes#44324
Signed-off-by: Jonathan Hamberg <jonathanhamberg@gmail.com>
Add a function callback that is called when the TCP connection
is closed. This is only available if doing network tests.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>