2018-05-04 14:42:54 +00:00
|
|
|
#ifndef ESP_MDNS_NETWORKING_H_
|
|
|
|
#define ESP_MDNS_NETWORKING_H_
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MDNS Server Networking -- private include
|
2019-06-06 02:57:29 +00:00
|
|
|
*
|
2018-05-04 14:42:54 +00:00
|
|
|
*/
|
|
|
|
#include "mdns.h"
|
|
|
|
#include "mdns_private.h"
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Queue RX packet action
|
|
|
|
*/
|
|
|
|
esp_err_t _mdns_send_rx_action(mdns_rx_packet_t * packet);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Start PCB
|
|
|
|
*/
|
2019-08-31 17:06:54 +00:00
|
|
|
esp_err_t _mdns_pcb_init(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol);
|
2018-05-04 14:42:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Stop PCB
|
|
|
|
*/
|
2019-08-31 17:06:54 +00:00
|
|
|
esp_err_t _mdns_pcb_deinit(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol);
|
2018-05-04 14:42:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief send packet over UDP
|
|
|
|
*
|
|
|
|
* @param server The server
|
|
|
|
* @param data byte array containing the packet data
|
|
|
|
* @param len length of the packet data
|
|
|
|
*
|
|
|
|
* @return length of sent packet or 0 on error
|
|
|
|
*/
|
2019-08-31 17:06:54 +00:00
|
|
|
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);
|
2018-05-04 14:42:54 +00:00
|
|
|
|
2021-06-29 08:02:44 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets data pointer to the mDNS packet
|
|
|
|
*/
|
|
|
|
void* _mdns_get_packet_data(mdns_rx_packet_t *packet);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Gets data length of c
|
|
|
|
*/
|
|
|
|
size_t _mdns_get_packet_len(mdns_rx_packet_t *packet);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Free the mDNS packet
|
|
|
|
*/
|
|
|
|
void _mdns_packet_free(mdns_rx_packet_t *packet);
|
|
|
|
|
2018-05-04 14:42:54 +00:00
|
|
|
#endif /* ESP_MDNS_NETWORKING_H_ */
|