1 /* main.c - Application main entry point */
2 
3 /* We are just testing that this program compiles ok with all possible
4  * network related Kconfig options enabled.
5  */
6 
7 /*
8  * Copyright (c) 2017 Intel Corporation
9  *
10  * SPDX-License-Identifier: Apache-2.0
11  */
12 
13 #include <zephyr/logging/log.h>
14 LOG_MODULE_REGISTER(net_test, LOG_LEVEL_DBG);
15 
16 #include <zephyr/ztest.h>
17 
18 #include <zephyr/net/net_if.h>
19 #include <zephyr/net/net_pkt.h>
20 #include <zephyr/net/dummy.h>
21 #include <zephyr/net/offloaded_netdev.h>
22 
23 
24 /* Create blank dummy and offloaded APIs */
25 static struct offloaded_if_api offload_dev_api;
26 static const struct dummy_api dummy_dev_api;
27 static struct offload_context {
28 	void *none;
29 } offload_context_data = {
30 	.none = NULL
31 };
32 
33 /* Create blank dummy and offloaded net devices */
34 NET_DEVICE_INIT(dummy_dev, "dummy_dev",
35 		NULL, NULL,
36 		NULL, NULL,
37 		CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
38 		&dummy_dev_api,
39 		DUMMY_L2, NET_L2_GET_CTX_TYPE(DUMMY_L2), 0);
40 
41 NET_DEVICE_OFFLOAD_INIT(net_offload, "net_offload",
42 			NULL, NULL,
43 			&offload_context_data, NULL,
44 			CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
45 			&offload_dev_api, 0);
46 
ZTEST(net_compile_all_test,test_ok)47 ZTEST(net_compile_all_test, test_ok)
48 {
49 	zassert_true(true, "This test should never fail");
50 }
51 
52 ZTEST_SUITE(net_compile_all_test, NULL, NULL, NULL, NULL, NULL);
53