mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 10:17:30 +02:00
mdns: Clean the main mdns module from lwip dependencies
* Reduced number of include paths * Abstract the internals of mdns packet (specifics defined in mdns_networking.c) * Use ESP_IP addresses instead of lwip addresses * Original commit: espressif/esp-idf@54e329444a
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
47c7266103
commit
b0957e70fd
@ -4,11 +4,18 @@
|
||||
*
|
||||
*/
|
||||
#include <string.h>
|
||||
#include "mdns_networking.h"
|
||||
#include "esp_log.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/igmp.h"
|
||||
#include "lwip/udp.h"
|
||||
#include "lwip/mld6.h"
|
||||
#include "lwip/priv/tcpip_priv.h"
|
||||
#include "esp_system.h"
|
||||
#include "esp_event.h"
|
||||
#include "mdns_networking.h"
|
||||
#include "esp_netif_net_stack.h"
|
||||
|
||||
|
||||
extern mdns_server_t * _mdns_server;
|
||||
|
||||
/*
|
||||
@ -345,3 +352,19 @@ size_t _mdns_udp_pcb_write(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol, c
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
void* _mdns_get_packet_data(mdns_rx_packet_t *packet)
|
||||
{
|
||||
return packet->pb->payload;
|
||||
}
|
||||
|
||||
size_t _mdns_get_packet_len(mdns_rx_packet_t *packet)
|
||||
{
|
||||
return packet->pb->len;
|
||||
}
|
||||
|
||||
void _mdns_packet_free(mdns_rx_packet_t *packet)
|
||||
{
|
||||
pbuf_free(packet->pb);
|
||||
free(packet);
|
||||
}
|
||||
|
Reference in New Issue
Block a user