|
lwIP 2.2.1
Lightweight IP stack
|
#include "lwip/apps/mdns_out.h"#include "lwip/apps/mdns_priv.h"#include "lwip/apps/mdns_domain.h"#include "lwip/prot/dns.h"#include "lwip/prot/iana.h"#include "lwip/udp.h"#include <string.h>#include "lwip/prot/ip6.h"MDNS responder implementation - output related functionalities
| err_t mdns_create_outpacket | ( | struct netif * | netif, |
| struct mdns_outmsg * | msg, | ||
| struct mdns_outpacket * | outpkt ) |
Create packet with chosen answers as a reply
Add all selected answers / questions Add additional answers based on the selected answers
Called by timeouts when timer is passed, allows direct multicast IPv4 probe response traffic again and sends out probe response if one was pending
| arg | pointer to netif of timeout. |
Called by timeouts when timer is passed, allows direct multicast IPv6 probe response traffic again and sends out probe response if one was pending
| arg | pointer to netif of timeout. |
Called by timeouts when timer is passed, allows to send an answer on a QU question via multicast.
| arg | pointer to netif of timeout. |
Called by timeouts when timer is passed, allows to send an answer on a QU question via multicast.
| arg | pointer to netif of timeout. |
Called by timeouts when timer is passed, allows multicast IPv4 traffic again.
| arg | pointer to netif of timeout. |
Called by timeouts when timer is passed, allows multicast IPv6 traffic again.
| arg | pointer to netif of timeout. |
| void mdns_prepare_txtdata | ( | struct mdns_service * | service | ) |
Call user supplied function to setup TXT data
| service | The service to build TXT record for |
Called by timeouts when timer is passed, sends out delayed multicast IPv4 response.
| arg | pointer to netif of timeout. |
Called by timeouts when timer is passed, sends out delayed multicast IPv6 response.
| arg | pointer to netif of timeout. |
| err_t mdns_send_outpacket | ( | struct mdns_outmsg * | msg, |
| struct netif * | netif ) |
Send chosen answers as a reply
Create the packet Send the packet
| err_t mdns_send_request | ( | struct mdns_request * | req, |
| struct netif * | netif, | ||
| const ip_addr_t * | destination ) |
Send search request containing all our known data
| req | The request to send |
| netif | The network interface to send on |
| destination | The target address to send to (usually multicast address) |
Called by timeouts when timer is passed, sends out delayed unicast IPv4 response.
| arg | pointer to netif of timeout. |
Called by timeouts when timer is passed, sends out delayed unicast IPv6 response.
| arg | pointer to netif of timeout. |
| void mdns_set_timeout | ( | struct netif * | netif, |
| u32_t | msecs, | ||
| sys_timeout_handler | handler, | ||
| u8_t * | busy_flag ) |
Sets a timer that calls the handler when finished. Depending on the busy_flag the timer is restarted or started. The flag is set before return. Sys_timeout does not give us this functionality.
| netif | Network interface info |
| msecs | Time value to set |
| handler | Callback function to call |
| busy_flag | Pointer to flag that displays if the timer is running or not. |
Start all multicast timeouts for IPv4 Timeouts started:
| netif | network interface to start timeouts on |
Start all multicast timeouts for IPv6 Timeouts started:
| netif | network interface to start timeouts on |