[OPT_IP6PREFIX] = { .name = "ip6prefix", .type = BLOBMSG_TYPE_ARRAY },
};
-static const union config_param_info proto_ip_attr_info[__OPT_MAX] = {
+static const struct uci_blob_param_info proto_ip_attr_info[__OPT_MAX] = {
[OPT_IPADDR] = { .type = BLOBMSG_TYPE_STRING },
[OPT_IP6ADDR] = { .type = BLOBMSG_TYPE_STRING },
[OPT_IP6PREFIX] = { .type = BLOBMSG_TYPE_STRING },
};
-const struct config_param_list proto_ip_attr = {
+const struct uci_blob_param_list proto_ip_attr = {
.n_params = __OPT_MAX,
.params = proto_ip_attributes,
.info = proto_ip_attr_info,
ADDR_PREFERRED,
ADDR_VALID,
ADDR_OFFLINK,
+ ADDR_CLASS,
__ADDR_MAX
};
[ADDR_PREFERRED] = { .name = "preferred", .type = BLOBMSG_TYPE_INT32 },
[ADDR_VALID] = { .name = "valid", .type = BLOBMSG_TYPE_INT32 },
[ADDR_OFFLINK] = { .name = "offlink", .type = BLOBMSG_TYPE_BOOL },
+ [ADDR_CLASS] = { .name = "class", .type = BLOBMSG_TYPE_STRING },
};
static struct device_addr *
else if (addr->preferred_until > addr->valid_until)
goto error;
}
+
+ if ((cur = tb[ADDR_CLASS]))
+ addr->pclass = strdup(blobmsg_get_string(cur));
}
return addr;