1 #ifndef __PROCD_UTILS_H
2 #define __PROCD_UTILS_H
4 #include <libubox/avl.h>
5 #include <libubox/blob.h>
6 #include <libubox/blobmsg.h>
14 struct blobmsg_list_node {
16 struct blob_attr *data;
19 #define blobmsg_list_simple_init(list) \
20 __blobmsg_list_init(tree, 0, sizeof(struct blobmsg_list_node))
22 #define blobmsg_list_init(list, type, field) \
23 __blobmsg_list_init(tree, offsetof(type, field), sizeof(type))
25 void __blobmsg_list_init(struct blobmsg_list *list, int offset, int len);
26 int blobmsg_list_fill(struct blobmsg_list *list, void *data, int len);
27 void blobmsg_list_free(struct blobmsg_list *list);
28 bool blobmsg_list_equal(struct blobmsg_list *l1, struct blobmsg_list *l2);