blobmsg: add support for double This adds support for double floating point type to make it more JSON compatible. For type checking it also adds a stub BLOB_ATTR_DOUBLE type. If necessary, the accessor functions for blob can be added later Signed-off-by: André Gaul <andre@gaul.io> Signed-off-by: Felix Fietkau <nbd@nbd.name>
blob: improve out-of-memory handling Signed-off-by: Chen Bin <ewolfok@126.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
blob: make length variables unsigned Signed-off-by: Felix Fietkau <nbd@openwrt.org>
blob: fix handling of custom validator callback https://dev.openwrt.org/ticket/15638 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
blobmsg: allow data/length iterator/accessor functions to work on non-blobmsg elements This primarily helps with simplifying the ubus APIs. blobmsg header presence is indicated by the BLOB_ATTR_EXTENDED bit in the id_len field. This changes the format ABI, but not the API. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
blob: add a magic offset to nesting cookies to ensure that NULL is never returned as a normal value Signed-off-by: Felix Fietkau <nbd@openwrt.org>
blob: add blob_put_raw() for copying one or more blob attributes into the buffer directly Signed-off-by: Felix Fietkau <nbd@openwrt.org>
blob: add blob_buf_grow() Signed-off-by: Felix Fietkau <nbd@openwrt.org>
blob: add blob_memdup()
blob: switch to ISC license, switch blob_{get,put}_int* to _u*, add wrappers
fix more instances of uninitialized padding bytes
fill padding bytes when setting raw attribute length
explicitly zero extra buffer space added with realloc to silence valgrind warnings
blob_attr_equal: un-inline, add pointer checks
add blob_buf_free
fix off-by-one in the string validation check
blob: constify
make blob attribute checking available externally
blob: validate strings on parse
constify blob_attr_info