Commit graph

25 commits

Author SHA1 Message Date
Jacob Siverskog
4436338588 blob/blobmsg: Perform explicit casts from void* to avoid compilation errors when using libubox from C++.
Signed-off by: Jacob Siverskog <jacob@teenageengineering.com>
2014-05-09 14:33:39 +02:00
Felix Fietkau
aa01be8ed0 blob: make length variables unsigned
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-27 16:29:31 +02:00
Felix Fietkau
58aec3c59a 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>
2014-03-12 20:18:12 +01:00
Felix Fietkau
458c3937bc 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>
2013-10-16 01:22:02 +02:00
Felix Fietkau
be458596bd blob: add blob_put_raw() for copying one or more blob attributes into the buffer directly
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-10-04 16:55:45 +02:00
Felix Fietkau
ef9b6b92df blob/blobmsg: add null pointer checks to the *_for_each_attr functions, fix formatting
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-07-29 14:44:11 +02:00
Felix Fietkau
5ad190fccf utils: move endian swap helpers and __packed definition to utils.h
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-11 21:46:41 +01:00
Felix Fietkau
b786f85267 blob: add blob_buf_grow()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-10 20:43:33 +01:00
Felix Fietkau
8a89e7f388 blob/blobmsg: use 32 bit load/store for 64 bit access, unaligned attributes cause data corruption on ARM
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-23 02:41:20 +01:00
Felix Fietkau
9d8f2dd47b blob.h: fix endian check
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-02 17:49:12 +01:00
Felix Fietkau
5cfe2696f0 blob: add blob_memdup() 2012-06-01 20:54:20 +02:00
Felix Fietkau
a654d2f42b blob: switch to ISC license, switch blob_{get,put}_int* to _u*, add wrappers 2011-11-10 09:05:33 +01:00
Felix Fietkau
51711be625 fix more instances of uninitialized padding bytes 2011-10-06 17:57:13 +02:00
Felix Fietkau
309d7d456f fill padding bytes when setting raw attribute length 2011-10-06 17:14:44 +02:00
Felix Fietkau
591a1e349f fix reads beyond the end of the buffer when iterating over blob attributes 2011-10-03 12:36:46 +02:00
Felix Fietkau
34a6d05f9a blob_attr_equal: un-inline, add pointer checks 2011-09-05 06:25:51 +02:00
Felix Fietkau
b1c320132e add blob_attr_equal() for comparing attributes 2011-09-05 06:09:32 +02:00
Felix Fietkau
bdf717425a add blob_buf_free 2011-07-29 19:38:30 +02:00
Felix Fietkau
932914c1b1 rename blob_get_int* to blob_get_u* 2011-02-06 21:36:04 +01:00
Felix Fietkau
cad5bea36d blob: constify 2011-01-31 03:50:36 +01:00
Felix Fietkau
f2b9272e0b make blob attribute checking available externally 2011-01-31 03:46:37 +01:00
Felix Fietkau
34b9f56464 remove blob_buf::priv 2011-01-29 18:00:01 +01:00
Felix Fietkau
71f0be5e11 add blobmsg validation function 2011-01-23 19:55:41 +01:00
Felix Fietkau
d110a016e3 constify blob_attr_info 2010-12-05 23:31:33 +01:00
Felix Fietkau
e82d74f898 Initial import 2010-10-13 21:29:08 +02:00