This API is meant to work with pre-allocated net_pkt.
It assumes net_pkt's buffer cursor is at the right position where to
create the IPv4 header. Once done, the cursor will be placed right
after the newly created IPv4 header.
Finalizing assumes the same.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
These ones would support linearizing non-contiguous area, however
requiring a bit more complex type as an "accessor".
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Adding a cursor into net_pkt. This is used to read/write data in a much
simpler way, for pre-allocated buffers in net_pkt. This avoids API users
to deal with net_buf below directly.
However, to be used - as for the new allocators - it will require deep
net stack core and API changes.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
These struct net_pkt allocators will give the possibility to allocate at
once the net_pkt and the buffer associated with, taking care of the
header space and MTU relevantly.
This enables to use the variable length allocator from net_buf. However,
it is not yet the default and is set as experimental.
As it is provided in parallel to existing allocators, it has to keep a
slab per-direction and thus a pointer in net_pkt, as well as appdata,
appdatalen etc... Resulting in "bloating" net_pkt. This will be solved
when, finally, former allocators will be removed.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
All as static inline functions to let the compiler check the types
etc... And use ARG_UNUSED() always where relevant.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
I already did a bunch of POSIX API related work, and integration of
BSD Sockets API, etc. with full POSIX subsystem will require further
more work.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
During recent refactoring of mbedTLS generic config file, a regression
slipped in that prevented MBEDTLS_PEM_PARSE_C from being set, even
though the option was selected in Kconfig. The reason for this is the
fact that this config has dependency to MBEDTLS_X509_CRT_PARSE_C but it
was moved above the line where MBEDTLS_X509_CRT_PARSE_C was actually
set. Therefore, this dependency was never satisfied.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The net-app API is removed. Users should use the BSD socket API
for application development.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
spi,flash has been superseded by jedec,spi-nor so remove it.
atmel,at24 belongs in mtd rather than slave, so move it.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Change compatible, move the JEDEC ID from Kconfig to DTS, convert DTS
size from bytes to bits, remove unreferenced DTS properties. Remove DTS
fixups.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
All Particle mesh devices have an on-board 32 Mibit JEDEC-compatible
flash from GigaDevice. Add bindings to access it.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Use auto-generated device tree macros in LPS25HB driver to avoid
usage of dts.fixup code for it.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Use auto-generated device tree macros in LSM6DS0 driver to avoid
usage of dts.fixup code for it.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Use the new DT_<COMPAT>_<INSTANCE>_<PROP> defines to instantiate
devices. This commit adds also ability to define individual pin
locations on SoC series that support the feature. Definitions of GPIO
pins assigned to a given location have been moved from soc_pinmap.h file
to board DTS file.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Previously, only led0 was enabled.
This allows the samples/basic/disco sample to build/run for
this board.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Convert usb_dc_stm32 driver GPIO disconnect to use new defines so we
can remove the dts_fixup.h code for it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We have moved GPIO info to DT so the Kconfig symbols for GPIO lines
aren't used anymore. We can just remove them.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Move IRQ number encoding out of dts_fixup.h and into the dtsi files.
For now just change devices on the dw_intc.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
1. Fix trailing comment for DT_USBHS_MAXIMUM_SPEED
2. Fix missed CONFIG_USB_HS_BASE_ADDRES that should be
DT_USB_HS_BASE_ADDRESS
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Reorganize the entry page so it's not as jarring of a landing by
reorganizing the content a bit in the rest of the toctree.
This makes it easier to read more progressively without having to jump
around as much.
Signed-off-by: Marti Bolivar <marti@foundries.io>
As example of echo_async_select added recently shows, we no longer
need to define a logger unconditionally in each source file. These
samples are intended to show Zephyr compatibility with POSIX sockets
API, so the less there're differences between Zephyr vs POSIX
ifdefs, the better.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Previously, the net_app layer handled DNS support as a part of
network initialization. With the move to BSD-socket APIs,
we need to add support for DNS to the LwM2M library.
Signed-off-by: Michael Scott <mike@foundries.io>
The LwM2M library has moved from the network application library
APIs to BSD socket APIs. Let's make the needed changes in the
LwM2M sample to follow those changes.
Signed-off-by: Michael Scott <mike@foundries.io>
This commit resets the firmware status to IDLE after a bad
download attempt. Previously, the firmware object would stay
in an odd state and any further attempts to download firmware
would return an error.
Signed-off-by: Michael Scott <mike@foundries.io>
We can save some resources by removing the periodic service thread
and replacing it by queuing the services to the work queue.
Before (reel_board using BT + DTLS)
Memory region Used Size Region Size %age Used
FLASH: 289464 B 1 MB 27.61%
SRAM: 75620 B 256 KB 28.85%
IDT_LIST: 136 B 2 KB 6.64%
After
Memory region Used Size Region Size %age Used
FLASH: 289576 B 1 MB 27.62%
SRAM: 74596 B 256 KB 28.46%
IDT_LIST: 136 B 2 KB 6.64%
Signed-off-by: Michael Scott <mike@foundries.io>
Now that the security data can be loaded into and used from the
security / server objects, we can add support for LwM2M bootstrap.
This is a mode where initially a connection can be made to a server
which can update several LwM2M (including security and server
data) and then trigger a "bootstrap complete". Once this happens
the client will start it's connection process over but now with
the new information.
Signed-off-by: Michael Scott <mike@foundries.io>
In order to support bootstrap mode, we need to store server data
in the security / server objects. Once the connection to the
bootstrap server is made, it will clear these objects and add
new server connection data.
Signed-off-by: Michael Scott <mike@foundries.io>
For bootstrap support, we need to store connection credentials
in the security object. This way the client can start a connection
at index 0 and after bootstrapping, move to the next connection.
Let's add the needed fields and a config item to set the key length.
Signed-off-by: Michael Scott <mike@foundries.io>
Update the parsing functions for JSON used by the JSON data
formatter and enable it in the LwM2M engine.
Signed-off-by: Michael Scott <mike@foundries.io>
The JSON formatter is currently not enabled for incoming WRITE
operations. To update the code in the formatter and not litter
the input context with extra data, let's allow formatters to
store their own user data.
Signed-off-by: Michael Scott <mike@foundries.io>
net_app contexts save the remote address and we use this during
observe notifications and pending handling. If we move to another
network layer such as sockets, then the remote address becomes
harder to reference. Let's save it as a part of the client
context.
Signed-off-by: Michael Scott <mike@foundries.io>
As part of the migration from net_app APIs to socket APIs, let's
stop referencing the net_pkt fragments throughout the LwM2M library.
Establish a msg_data flat buffer inside lwm2m_message and use that
instead.
NOTE: As a part of this change we remove the COAP_NET_PKT setting.
The COAP library reverts to COAP_SOCK behavior.
This doesn't mean we use sockets in LwM2M (yet), it only means we
use the socket-compatible COAP library which parses flat buffers
instead of net_pkt fragments.
Signed-off-by: Michael Scott <mike@foundries.io>
Currently, this will select the needed configs for LwM2M and net_pkt.
During the migration to socket APIs, the net_pkt selections will change
to socket-based selects.
Signed-off-by: Michael Scott <mike@foundries.io>
This board is unmaintained and unsupported. It is not known to work and
has lots of conditional code across the tree that makes code
unmaintainable.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Force Operation Mode Strap Override register to disable NANDTree. This
is due to some users reporting PHY entering NANDTree.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Boot PHY initialization timeout, caching mechanism fixes and networking
buffer descriptors moved to no cache section. Enabled cache management
in networking driver and manual barriers.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>