mdns_networking.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef ESP_MDNS_NETWORKING_H_
  7. #define ESP_MDNS_NETWORKING_H_
  8. /*
  9. * MDNS Server Networking -- private include
  10. *
  11. */
  12. #include "mdns.h"
  13. #include "mdns_private.h"
  14. /**
  15. * @brief Queue RX packet action
  16. */
  17. esp_err_t _mdns_send_rx_action(mdns_rx_packet_t *packet);
  18. bool mdns_is_netif_ready(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol);
  19. /**
  20. * @brief Start PCB
  21. */
  22. esp_err_t _mdns_pcb_init(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol);
  23. /**
  24. * @brief Stop PCB
  25. */
  26. esp_err_t _mdns_pcb_deinit(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol);
  27. /**
  28. * @brief send packet over UDP
  29. *
  30. * @param server The server
  31. * @param data byte array containing the packet data
  32. * @param len length of the packet data
  33. *
  34. * @return length of sent packet or 0 on error
  35. */
  36. size_t _mdns_udp_pcb_write(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol, const esp_ip_addr_t *ip, uint16_t port, uint8_t *data, size_t len);
  37. /**
  38. * @brief Gets data pointer to the mDNS packet
  39. */
  40. void *_mdns_get_packet_data(mdns_rx_packet_t *packet);
  41. /**
  42. * @brief Gets data length of c
  43. */
  44. size_t _mdns_get_packet_len(mdns_rx_packet_t *packet);
  45. /**
  46. * @brief Free the mDNS packet
  47. */
  48. void _mdns_packet_free(mdns_rx_packet_t *packet);
  49. #endif /* ESP_MDNS_NETWORKING_H_ */