zephyr/subsys/net
Benjamin Lindqvist 660ad9791b net: lwm2m: Pack TLV integers more efficiently
Prior to this commit, the LwM2M stack would TLV-encode integers
depending on their internal storage size. An integer with value 5 stored
in an int8_t would be encoded with length 1, but an integer stored in an
int32_t would be encoded as "00 00 00 05" with length 4.

This commit checks if the value is castable to a smaller int and encodes
it as such if so. This is cascading, so even a 64 bit integer with value
5 will be encoded with length 1.

Note that this does not seem to be required by the specification, but
this is how Anjay and the other LwM2M stack seem to do it.

Signed-off-by: Benjamin Lindqvist <benjamin.lindqvist@endian.se>
2020-10-26 11:31:28 +02:00
..
ip net: icmpv6: Store ll addresses to pkt when sending error msg 2020-10-23 09:29:27 +03:00
l2 net: openthread: Add Kconfigs to change values in Zephyr port 2020-10-21 16:09:56 +03:00
lib net: lwm2m: Pack TLV integers more efficiently 2020-10-26 11:31:28 +02:00
buf.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
CMakeLists.txt
hostname.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
Kconfig
Kconfig.hostname
Kconfig.template.log_config.default.net
Kconfig.template.log_config.net