lwIP 2.2.0
Lightweight IP stack
Loading...
Searching...
No Matches
mdns.c File Reference
#include "lwip/apps/mdns.h"
#include "lwip/apps/mdns_priv.h"
#include "lwip/apps/mdns_domain.h"
#include "lwip/apps/mdns_out.h"
#include "lwip/netif.h"
#include "lwip/udp.h"
#include "lwip/ip_addr.h"
#include "lwip/mem.h"
#include "lwip/memp.h"
#include "lwip/prot/dns.h"
#include "lwip/prot/iana.h"
#include "lwip/timeouts.h"
#include "lwip/sys.h"
#include <string.h>
#include <stdio.h>
#include "lwip/igmp.h"
#include "lwip/mld6.h"

Data Structures

struct  mdns_packet
 

Macros

#define MDNS_RESPONSE_DELAY_MAX   120
 
#define MDNS_PROBE_COUNT   3
 

Functions

struct mdns_hostnetif_mdns_data (struct netif *netif)
 
struct udp_pcbget_mdns_pcb (void)
 
err_t mdns_resp_add_netif (struct netif *netif, const char *hostname)
 
err_t mdns_resp_remove_netif (struct netif *netif)
 
err_t mdns_resp_rename_netif (struct netif *netif, const char *hostname)
 
int mdns_resp_netif_active (struct netif *netif)
 
s8_t mdns_resp_add_service (struct netif *netif, const char *name, const char *service, enum mdns_sd_proto proto, u16_t port, service_get_txt_fn_t txt_fn, void *txt_data)
 
err_t mdns_resp_del_service (struct netif *netif, u8_t slot)
 
err_t mdns_resp_rename_service (struct netif *netif, u8_t slot, const char *name)
 
err_t mdns_resp_add_service_txtitem (struct mdns_service *service, const char *txt, u8_t txt_len)
 
void mdns_search_stop (u8_t request_id)
 
err_t mdns_search_service (const char *name, const char *service, enum mdns_sd_proto proto, struct netif *netif, search_result_fn_t result_fn, void *arg, u8_t *request_id)
 
void mdns_resp_announce (struct netif *netif)
 
void mdns_resp_register_name_result_cb (mdns_name_result_cb_t cb)
 
void mdns_resp_restart_delay (struct netif *netif, uint32_t delay)
 
void mdns_resp_restart (struct netif *netif)
 
void mdns_resp_init (void)
 
void * mdns_get_service_txt_userdata (struct netif *netif, s8_t slot)
 

Detailed Description

MDNS responder implementation

Macro Definition Documentation

◆ MDNS_PROBE_COUNT

#define MDNS_PROBE_COUNT   3

Probing & announcing defines

◆ MDNS_RESPONSE_DELAY_MAX

#define MDNS_RESPONSE_DELAY_MAX   120

Delayed response defines

Function Documentation

◆ get_mdns_pcb()

struct udp_pcb * get_mdns_pcb ( void  )

Construction to access the mdns udp pcb.

Returns
udp_pcb struct of mdns

◆ mdns_resp_register_name_result_cb()

void mdns_resp_register_name_result_cb ( mdns_name_result_cb_t  cb)

Register a callback function that is called if probing is completed successfully or with a conflict.

◆ netif_mdns_data()

struct mdns_host * netif_mdns_data ( struct netif netif)

Construction to make mdns struct accessible from mdns_out.c TODO: can we add the mdns struct to the netif like we do for dhcp, autoip,...? Then this is not needed any more.

Parameters
netifThe network interface
Returns
mdns struct