7 #include <array-size/array-size.h>
12 struct interface_config net1 = {
13 .hwaddr = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 },
14 .method = CONFIG_METHOD_DHCP,
17 struct interface_config net2 = {
18 .hwaddr = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x56 },
19 .method = CONFIG_METHOD_STATIC,
21 .address = "192.168.0.2/24",
22 .gateway = "192.168.0.1",
26 struct interface_config *interface_configs[] = { &net1, &net2 };
27 const char *dns_servers[] = { "192.168.1.1", "192.168.1.2" };
29 struct config test_config = {
30 .autoboot_enabled = true,
32 .interfaces = interface_configs,
33 .n_interfaces = ARRAY_SIZE(interface_configs),
34 .dns_servers = dns_servers,
35 .n_dns_servers = ARRAY_SIZE(dns_servers),
40 struct config_storage storage;
45 static int load(struct config_storage *st __attribute__((unused)),
46 struct config *config)
48 memcpy(config, &test_config, sizeof(test_config));
52 static struct test_storage st = {
58 struct config_storage *create_test_storage(void *ctx __attribute__((unused)))