2 * blob.c - uci <-> blobmsg conversion layer
3 * Copyright (C) 2012-2013 Felix Fietkau <nbd@openwrt.org>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License version 2.1
7 * as published by the Free Software Foundation
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
17 #include <libubox/blobmsg.h>
20 struct uci_blob_param_info {
21 enum blobmsg_type type;
24 struct uci_blob_param_list {
26 const struct blobmsg_policy *params;
27 const struct uci_blob_param_info *info;
28 const char * const *validate;
31 const struct uci_blob_param_list *next[];
34 int uci_to_blob(struct blob_buf *b, struct uci_section *s,
35 const struct uci_blob_param_list *p);
36 bool uci_blob_check_equal(struct blob_attr *c1, struct blob_attr *c2,
37 const struct uci_blob_param_list *config);
38 bool uci_blob_diff(struct blob_attr **tb1, struct blob_attr **tb2,
39 const struct uci_blob_param_list *config,
40 unsigned long *diff_bits);