Marco Zecchini
/
Example_RTOS
Rtos API example
Embed:
(wiki syntax)
Show/hide line numbers
mdns.h
Go to the documentation of this file.
00001 /** 00002 * @file 00003 * MDNS responder 00004 */ 00005 00006 /* 00007 * Copyright (c) 2015 Verisure Innovation AB 00008 * All rights reserved. 00009 * 00010 * Redistribution and use in source and binary forms, with or without modification, 00011 * are permitted provided that the following conditions are met: 00012 * 00013 * 1. Redistributions of source code must retain the above copyright notice, 00014 * this list of conditions and the following disclaimer. 00015 * 2. Redistributions in binary form must reproduce the above copyright notice, 00016 * this list of conditions and the following disclaimer in the documentation 00017 * and/or other materials provided with the distribution. 00018 * 3. The name of the author may not be used to endorse or promote products 00019 * derived from this software without specific prior written permission. 00020 * 00021 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 00022 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00023 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 00024 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00025 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 00026 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00027 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00028 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 00029 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 00030 * OF SUCH DAMAGE. 00031 * 00032 * This file is part of the lwIP TCP/IP stack. 00033 * 00034 * Author: Erik Ekman <erik@kryo.se> 00035 * 00036 */ 00037 #ifndef LWIP_HDR_MDNS_H 00038 #define LWIP_HDR_MDNS_H 00039 00040 #include "lwip/apps/mdns_opts.h" 00041 #include "lwip/netif.h" 00042 00043 #if LWIP_MDNS_RESPONDER 00044 00045 enum mdns_sd_proto { 00046 DNSSD_PROTO_UDP = 0, 00047 DNSSD_PROTO_TCP = 1 00048 }; 00049 00050 #define MDNS_LABEL_MAXLEN 63 00051 00052 struct mdns_host; 00053 struct mdns_service; 00054 00055 /** Callback function to add text to a reply, called when generating the reply */ 00056 typedef void (*service_get_txt_fn_t)(struct mdns_service *service, void *txt_userdata); 00057 00058 void mdns_resp_init(void); 00059 00060 err_t mdns_resp_add_netif(struct netif *netif, const char *hostname, u32_t dns_ttl); 00061 err_t mdns_resp_remove_netif(struct netif *netif); 00062 00063 err_t mdns_resp_add_service(struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_userdata); 00064 err_t mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, u8_t txt_len); 00065 void mdns_resp_netif_settings_changed(struct netif *netif); 00066 00067 #endif /* LWIP_MDNS_RESPONDER */ 00068 00069 #endif /* LWIP_HDR_MDNS_H */
Generated on Sun Jul 17 2022 08:25:28 by 1.7.2