lwIP 2.2.1 Lightweight IP stack

Macros | Functions
mdns_out.h File Reference
`#include "lwip/apps/mdns_opts.h"`
`#include "lwip/apps/mdns_priv.h"`
`#include "lwip/netif.h"`
`#include "lwip/timeouts.h"`

## Macros
#define | QUESTION_PROBE_HOST_ANY 0x10

## Functions
err_t | mdns_create_outpacket (struct netif *netif, struct mdns_outmsg *msg, struct mdns_outpacket *outpkt)
err_t | mdns_send_outpacket (struct mdns_outmsg *msg, struct netif *netif)
void | mdns_set_timeout (struct netif *netif, u32_t msecs, sys_timeout_handler handler, u8_t *busy_flag)
void | mdns_multicast_timeout_reset_ipv4 (void *arg)
void | mdns_multicast_probe_timeout_reset_ipv4 (void *arg)
void | mdns_multicast_timeout_25ttl_reset_ipv4 (void *arg)
void | mdns_send_multicast_msg_delayed_ipv4 (void *arg)
void | mdns_send_unicast_msg_delayed_ipv4 (void *arg)
void | mdns_start_multicast_timeouts_ipv4 (struct netif *netif)
void | mdns_multicast_timeout_reset_ipv6 (void *arg)
void | mdns_multicast_probe_timeout_reset_ipv6 (void *arg)
void | mdns_multicast_timeout_25ttl_reset_ipv6 (void *arg)
void | mdns_send_multicast_msg_delayed_ipv6 (void *arg)
void | mdns_send_unicast_msg_delayed_ipv6 (void *arg)
void | mdns_start_multicast_timeouts_ipv6 (struct netif *netif)
void | mdns_prepare_txtdata (struct mdns_service *service)
err_t | mdns_send_request (struct mdns_request *req, struct netif *netif, const ip_addr_t *destination)

## Detailed Description

MDNS responder - output related functionalities

## Macro Definition Documentation

## ◆ QUESTION_PROBE_HOST_ANY

#define QUESTION_PROBE_HOST_ANY 0x10

Bitmasks outmsg generation

## Function Documentation

## ◆ mdns_create_outpacket()

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

## ◆ mdns_multicast_probe_timeout_reset_ipv4()

void mdns_multicast_probe_timeout_reset_ipv4 | ( | void * | arg | ) |

Called by timeouts when timer is passed, allows direct multicast IPv4 probe response traffic again and sends out probe response if one was pending

Parameters

  arg | pointer to netif of timeout.

## ◆ mdns_multicast_probe_timeout_reset_ipv6()

void mdns_multicast_probe_timeout_reset_ipv6 | ( | void * | arg | ) |

Called by timeouts when timer is passed, allows direct multicast IPv6 probe response traffic again and sends out probe response if one was pending

Parameters

  arg | pointer to netif of timeout.

## ◆ mdns_multicast_timeout_25ttl_reset_ipv4()

void mdns_multicast_timeout_25ttl_reset_ipv4 | ( | void * | arg | ) |

Called by timeouts when timer is passed, allows to send an answer on a QU question via multicast.

Parameters

  arg | pointer to netif of timeout.

## ◆ mdns_multicast_timeout_25ttl_reset_ipv6()

void mdns_multicast_timeout_25ttl_reset_ipv6 | ( | void * | arg | ) |

Called by timeouts when timer is passed, allows to send an answer on a QU question via multicast.

Parameters

  arg | pointer to netif of timeout.

## ◆ mdns_multicast_timeout_reset_ipv4()

void mdns_multicast_timeout_reset_ipv4 | ( | void * | arg | ) |

Called by timeouts when timer is passed, allows multicast IPv4 traffic again.

Parameters

  arg | pointer to netif of timeout.

## ◆ mdns_multicast_timeout_reset_ipv6()

void mdns_multicast_timeout_reset_ipv6 | ( | void * | arg | ) |

Called by timeouts when timer is passed, allows multicast IPv6 traffic again.

Parameters

  arg | pointer to netif of timeout.

## ◆ mdns_prepare_txtdata()

void mdns_prepare_txtdata | ( | struct mdns_service * | service | ) |

Call user supplied function to setup TXT data

Parameters

  service | The service to build TXT record for

## ◆ mdns_send_multicast_msg_delayed_ipv4()

void mdns_send_multicast_msg_delayed_ipv4 | ( | void * | arg | ) |

Called by timeouts when timer is passed, sends out delayed multicast IPv4 response.

Parameters

  arg | pointer to netif of timeout.

## ◆ mdns_send_multicast_msg_delayed_ipv6()

void mdns_send_multicast_msg_delayed_ipv6 | ( | void * | arg | ) |

Called by timeouts when timer is passed, sends out delayed multicast IPv6 response.

Parameters

  arg | pointer to netif of timeout.

## ◆ mdns_send_outpacket()

err_t mdns_send_outpacket | ( | struct mdns_outmsg * | msg,
|  | struct netif * | netif
| ) |  |

Send chosen answers as a reply

Create the packet Send the packet

## ◆ mdns_send_request()

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

Parameters

  req | The request to send
  netif | The network interface to send on
  destination | The target address to send to (usually multicast address)

## ◆ mdns_send_unicast_msg_delayed_ipv4()

void mdns_send_unicast_msg_delayed_ipv4 | ( | void * | arg | ) |

Called by timeouts when timer is passed, sends out delayed unicast IPv4 response.

Parameters

  arg | pointer to netif of timeout.

## ◆ mdns_send_unicast_msg_delayed_ipv6()

void mdns_send_unicast_msg_delayed_ipv6 | ( | void * | arg | ) |

Called by timeouts when timer is passed, sends out delayed unicast IPv6 response.

Parameters

  arg | pointer to netif of timeout.

## ◆ mdns_set_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.

Parameters

  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.

## ◆ mdns_start_multicast_timeouts_ipv4()

void mdns_start_multicast_timeouts_ipv4 | ( | struct netif * | netif | ) |

Start all multicast timeouts for IPv4 Timeouts started:

- do not multicast within one second
- do not multicast a probe response within 250ms
- send a multicast answer on a QU question if not send recently.

Parameters

  netif | network interface to start timeouts on

## ◆ mdns_start_multicast_timeouts_ipv6()

void mdns_start_multicast_timeouts_ipv6 | ( | struct netif * | netif | ) |

Start all multicast timeouts for IPv6 Timeouts started:

- do not multicast within one second
- do not multicast a probe response within 250ms
- send a multicast answer on a QU question if not send recently.

Parameters

  netif | network interface to start timeouts on