+static void
+proto_shell_parse_addr_list(struct interface *iface, struct blob_attr *attr,
+ bool v6, bool external)
+{
+ struct device_addr *addr;
+ struct blob_attr *cur;
+ int rem;
+
+ blobmsg_for_each_attr(cur, attr, rem) {
+ if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING) {
+ DPRINTF("Ignore wrong address type: %d\n", blobmsg_type(cur));
+ continue;
+ }
+
+ addr = proto_parse_ip_addr_string(blobmsg_data(cur), v6, v6 ? 32 : 128);
+ if (!addr) {
+ DPRINTF("Failed to parse IP address string: %s\n", (char *) blobmsg_data(cur));
+ continue;
+ }
+
+ if (external)
+ addr->flags |= DEVADDR_EXTERNAL;
+
+ vlist_add(&iface->proto_addr, &addr->node);
+ }
+}
+
+