-struct uci_sectmap network_smap[] = {
- {
- .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),
- }
+struct uci_sectmap network_interface = {
+ .type = "interface",
+ .options = network_interface_options,
+ .alloc_len = sizeof(struct uci_network),
+ .init_section = network_init_interface,
+ .add_section = network_add_interface,
+ .n_options = ARRAY_SIZE(network_interface_options),
+};
+
+struct uci_optmap network_alias_options[] = {
+ OPTMAP_OPTION(UCIMAP_SECTION, struct uci_alias, interface, .data.sm = &network_interface),
+};
+
+struct uci_sectmap network_alias = {
+ .type = "alias",
+ .options = network_alias_options,
+ .alloc_len = sizeof(struct uci_network),
+ .init_section = network_init_alias,
+ .add_section = network_add_alias,
+ .n_options = ARRAY_SIZE(network_alias_options),
+};
+
+struct uci_sectmap *network_smap[] = {
+ &network_interface,
+ &network_alias,