1 /* main.c - mDNS responder */
2 
3 /*
4  * Copyright (c) 2017 Intel Corporation.
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  */
8 
9 #include <zephyr/logging/log.h>
10 LOG_MODULE_REGISTER(net_mdns_responder_sample, LOG_LEVEL_DBG);
11 
12 #include <zephyr/kernel.h>
13 #include <zephyr/net/net_core.h>
14 
15 #include "net_sample_common.h"
16 
17 extern void service(void);
18 
19 /*
20  * Note that mDNS support requires no application interaction with zephyr,
21  * beyond optional runtime hostname configuration calls and setting
22  * CONFIG_MDNS_RESPONDER=y.
23  *
24  * The service() function provides an echo server to make it possible to
25  * verify that the IP address resolved by mDNS is the system that this
26  * code is running upon.
27  */
main(void)28 int main(void)
29 {
30 	init_vlan();
31 
32 	wait_for_network();
33 
34 	LOG_INF("Waiting mDNS queries...");
35 	service();
36 	return 0;
37 }
38