| 
									
										
										
										
											2022-10-11 16:31:57 +02:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2022-08-08 16:39:13 +02:00
										 |  |  |  * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD | 
					
						
							| 
									
										
										
										
											2022-10-11 16:31:57 +02:00
										 |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: Apache-2.0 | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2018-05-04 16:42:54 +02:00
										 |  |  | #ifndef ESP_MDNS_NETWORKING_H_
 | 
					
						
							|  |  |  | #define ESP_MDNS_NETWORKING_H_
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  |  * MDNS Server Networking -- private include | 
					
						
							| 
									
										
										
										
											2019-06-06 10:57:29 +08:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2018-05-04 16:42:54 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | #include "mdns.h"
 | 
					
						
							|  |  |  | #include "mdns_private.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief  Queue RX packet action | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2022-10-11 16:31:57 +02:00
										 |  |  | esp_err_t _mdns_send_rx_action(mdns_rx_packet_t *packet); | 
					
						
							| 
									
										
										
										
											2018-05-04 16:42:54 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-08-08 16:39:13 +02:00
										 |  |  | bool mdns_is_netif_ready(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-04 16:42:54 +02:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @brief  Start PCB | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2019-08-31 19:06:54 +02:00
										 |  |  | esp_err_t _mdns_pcb_init(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol); | 
					
						
							| 
									
										
										
										
											2018-05-04 16:42:54 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief  Stop PCB | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2019-08-31 19:06:54 +02:00
										 |  |  | esp_err_t _mdns_pcb_deinit(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol); | 
					
						
							| 
									
										
										
										
											2018-05-04 16:42:54 +02: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 | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2022-10-11 16:31:57 +02: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 16:42:54 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-29 10:02:44 +02:00
										 |  |  | /**
 | 
					
						
							|  |  |  |  * @brief  Gets data pointer to the mDNS packet | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2022-10-11 16:31:57 +02:00
										 |  |  | void *_mdns_get_packet_data(mdns_rx_packet_t *packet); | 
					
						
							| 
									
										
										
										
											2021-06-29 10:02:44 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @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 16:42:54 +02:00
										 |  |  | #endif /* ESP_MDNS_NETWORKING_H_ */
 |