- .type = "interface",
- .options = network_smap_options,
- .alloc_len = sizeof(struct uci_network),
- .init_section = network_init_section,
- .add_section = network_add_section,
- .n_options = ARRAY_SIZE(network_smap_options),
+ .map = {
+ UCIMAP_OPTION(struct uci_network, test),
+ .type = UCIMAP_INT,
+ .name = "test"
+ }
+ },
+ {
+ .map = {
+ UCIMAP_OPTION(struct uci_network, aliases),
+ .type = UCIMAP_LIST | UCIMAP_SECTION | UCIMAP_LIST_AUTO,
+ .data.sm = &network_alias
+ }
+ }
+};
+
+static struct uci_sectionmap network_interface = {
+ UCIMAP_SECTION(struct uci_network, map),
+ .type = "interface",
+ .alloc = network_allocate,
+ .init = network_init_interface,
+ .add = network_add_interface,
+ .options = &network_interface_options[0].map,
+ .n_options = ARRAY_SIZE(network_interface_options),
+ .options_size = sizeof(struct my_optmap)
+};
+
+static struct uci_optmap network_alias_options[] = {
+ {
+ UCIMAP_OPTION(struct uci_alias, interface),
+ .type = UCIMAP_SECTION,
+ .data.sm = &network_interface