@@ -106,7 +106,7 @@ static void _udp_pcb_main_deinit(void)
106106static esp_err_t _udp_join_group (mdns_if_t if_inx , mdns_ip_protocol_t ip_protocol , bool join )
107107{
108108 struct netif * netif = NULL ;
109- esp_netif_t * tcpip_if = mdns_netif_get_esp_netif (if_inx );
109+ esp_netif_t * tcpip_if = mdns_priv_get_esp_netif (if_inx );
110110
111111 if (!esp_netif_is_netif_up (tcpip_if )) {
112112 // Network interface went down before event propagated, skipping IGMP config
@@ -207,7 +207,7 @@ static void _udp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *pb, const ip
207207 struct netif * netif = NULL ;
208208 bool found = false;
209209 for (i = 0 ; i < MDNS_MAX_INTERFACES ; i ++ ) {
210- netif = esp_netif_get_netif_impl (mdns_netif_get_esp_netif (i ));
210+ netif = esp_netif_get_netif_impl (mdns_priv_get_esp_netif (i ));
211211 if (s_interfaces [i ].proto && netif && netif == ip_current_input_netif ()) {
212212#if LWIP_IPV4
213213 if (packet -> src .type == IPADDR_TYPE_V4 ) {
@@ -231,7 +231,7 @@ static void _udp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *pb, const ip
231231
232232}
233233
234- bool mdns_is_netif_ready (mdns_if_t netif , mdns_ip_protocol_t ip_proto )
234+ bool mdns_priv_if_ready (mdns_if_t netif , mdns_ip_protocol_t ip_proto )
235235{
236236 return s_interfaces [netif ].ready &&
237237 s_interfaces [netif ].proto & (ip_proto == MDNS_IP_PROTOCOL_V4 ? PROTO_IPV4 : PROTO_IPV6 );
@@ -245,7 +245,7 @@ static bool _udp_pcb_is_in_use(void)
245245 int i , p ;
246246 for (i = 0 ; i < MDNS_MAX_INTERFACES ; i ++ ) {
247247 for (p = 0 ; p < MDNS_IP_PROTOCOL_MAX ; p ++ ) {
248- if (mdns_is_netif_ready (i , p )) {
248+ if (mdns_priv_if_ready (i , p )) {
249249 return true;
250250 }
251251 }
@@ -273,7 +273,7 @@ static void _udp_pcb_deinit(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol)
273273 */
274274static esp_err_t _udp_pcb_init (mdns_if_t tcpip_if , mdns_ip_protocol_t ip_protocol )
275275{
276- if (mdns_is_netif_ready (tcpip_if , ip_protocol )) {
276+ if (mdns_priv_if_ready (tcpip_if , ip_protocol )) {
277277 return ESP_ERR_INVALID_STATE ;
278278 }
279279
@@ -305,7 +305,7 @@ typedef struct {
305305/**
306306 * @brief Start PCB from LwIP thread
307307 */
308- static err_t _mdns_pcb_init_api (struct tcpip_api_call_data * api_call_msg )
308+ static err_t mdns_priv_if_init_api (struct tcpip_api_call_data * api_call_msg )
309309{
310310 mdns_api_call_t * msg = (mdns_api_call_t * )api_call_msg ;
311311 msg -> err = _udp_pcb_init (msg -> tcpip_if , msg -> ip_protocol ) == ESP_OK ? ERR_OK : ERR_IF ;
@@ -315,7 +315,7 @@ static err_t _mdns_pcb_init_api(struct tcpip_api_call_data *api_call_msg)
315315/**
316316 * @brief Stop PCB from LwIP thread
317317 */
318- static err_t _mdns_pcb_deinit_api (struct tcpip_api_call_data * api_call_msg )
318+ static err_t mdns_priv_if_deinit_api (struct tcpip_api_call_data * api_call_msg )
319319{
320320 mdns_api_call_t * msg = (mdns_api_call_t * )api_call_msg ;
321321 _udp_pcb_deinit (msg -> tcpip_if , msg -> ip_protocol );
@@ -328,32 +328,32 @@ static err_t _mdns_pcb_deinit_api(struct tcpip_api_call_data *api_call_msg)
328328 * - _mdns prefixed
329329 * - commented in mdns_networking.h header
330330 */
331- esp_err_t _mdns_pcb_init (mdns_if_t tcpip_if , mdns_ip_protocol_t ip_protocol )
331+ esp_err_t mdns_priv_if_init (mdns_if_t tcpip_if , mdns_ip_protocol_t ip_protocol )
332332{
333333 mdns_api_call_t msg = {
334334 .tcpip_if = tcpip_if ,
335335 .ip_protocol = ip_protocol
336336 };
337- tcpip_api_call (_mdns_pcb_init_api , & msg .call );
337+ tcpip_api_call (mdns_priv_if_init_api , & msg .call );
338338 return msg .err ;
339339}
340340
341- esp_err_t _mdns_pcb_deinit (mdns_if_t tcpip_if , mdns_ip_protocol_t ip_protocol )
341+ esp_err_t mdns_priv_if_deinit (mdns_if_t tcpip_if , mdns_ip_protocol_t ip_protocol )
342342{
343343 mdns_api_call_t msg = {
344344 .tcpip_if = tcpip_if ,
345345 .ip_protocol = ip_protocol
346346 };
347- tcpip_api_call (_mdns_pcb_deinit_api , & msg .call );
347+ tcpip_api_call (mdns_priv_if_deinit_api , & msg .call );
348348 return msg .err ;
349349}
350350
351- static err_t _mdns_udp_pcb_write_api (struct tcpip_api_call_data * api_call_msg )
351+ static err_t mdns_priv_if_write_api (struct tcpip_api_call_data * api_call_msg )
352352{
353353 void * nif = NULL ;
354354 mdns_api_call_t * msg = (mdns_api_call_t * )api_call_msg ;
355- nif = esp_netif_get_netif_impl (mdns_netif_get_esp_netif (msg -> tcpip_if ));
356- if (!nif || !mdns_is_netif_ready (msg -> tcpip_if , msg -> ip_protocol ) || _pcb_main == NULL ) {
355+ nif = esp_netif_get_netif_impl (mdns_priv_get_esp_netif (msg -> tcpip_if ));
356+ if (!nif || !mdns_priv_if_ready (msg -> tcpip_if , msg -> ip_protocol ) || _pcb_main == NULL ) {
357357 pbuf_free (msg -> pbt );
358358 msg -> err = ERR_IF ;
359359 return ERR_IF ;
@@ -364,7 +364,7 @@ static err_t _mdns_udp_pcb_write_api(struct tcpip_api_call_data *api_call_msg)
364364 return err ;
365365}
366366
367- 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 )
367+ size_t mdns_priv_if_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 )
368368{
369369 struct pbuf * pbt = pbuf_alloc (PBUF_TRANSPORT , len , PBUF_RAM );
370370 if (pbt == NULL ) {
@@ -392,25 +392,25 @@ size_t _mdns_udp_pcb_write(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol, c
392392 .ip = & ip_add_copy ,
393393 .port = port
394394 };
395- tcpip_api_call (_mdns_udp_pcb_write_api , & msg .call );
395+ tcpip_api_call (mdns_priv_if_write_api , & msg .call );
396396
397397 if (msg .err ) {
398398 return 0 ;
399399 }
400400 return len ;
401401}
402402
403- void * _mdns_get_packet_data (mdns_rx_packet_t * packet )
403+ void * mdns_priv_get_packet_data (mdns_rx_packet_t * packet )
404404{
405405 return packet -> pb -> payload ;
406406}
407407
408- size_t _mdns_get_packet_len (mdns_rx_packet_t * packet )
408+ size_t mdns_priv_get_packet_len (mdns_rx_packet_t * packet )
409409{
410410 return packet -> pb -> len ;
411411}
412412
413- void _mdns_packet_free (mdns_rx_packet_t * packet )
413+ void mdns_priv_packet_free (mdns_rx_packet_t * packet )
414414{
415415 pbuf_free (packet -> pb );
416416 mdns_mem_free (packet );
0 commit comments