Merge branch 'bugfix/esp_netif_early_fixes' into 'master'

esp-netif: fixed early issues on esp-netif

See merge request espressif/esp-idf!6792
This commit is contained in:
Ivan Grokhotkov 2019-11-22 20:19:20 +08:00
commit 719c8eb627
7 changed files with 50 additions and 5 deletions

View File

@ -22,6 +22,10 @@
#include "esp_netif_types.h"
#include "esp_netif_defaults.h"
#ifdef __cplusplus
extern "C" {
#endif
//
// Note: tcpip_adapter legacy API has to be included by default to provide full compatibility
// for applications that used tcpip_adapter API without explicit inclusion of tcpip_adapter.h
@ -736,4 +740,8 @@ size_t esp_netif_get_nr_of_ifs(void);
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* _ESP_NETIF_H_ */

View File

@ -15,6 +15,10 @@
#ifndef _ESP_NETIF_DEFAULTS_H
#define _ESP_NETIF_DEFAULTS_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Macros to assemble master configs with partial configs from netif, stack and driver
//
@ -85,4 +89,8 @@ extern const esp_netif_inherent_config_t _g_esp_netif_inherent_sta_config;
extern const esp_netif_inherent_config_t _g_esp_netif_inherent_ap_config;
extern const esp_netif_inherent_config_t _g_esp_netif_inherent_eth_config;
#ifdef __cplusplus
}
#endif
#endif //_ESP_NETIF_DEFAULTS_H

View File

@ -16,6 +16,11 @@
#define _ESP_NETIF_IP_ADDR_H_
#include <machine/endian.h>
#ifdef __cplusplus
extern "C" {
#endif
#if BYTE_ORDER == BIG_ENDIAN
#define esp_netif_htonl(x) ((uint32_t)(x))
#else
@ -95,4 +100,8 @@ typedef struct _ip_addr {
uint8_t type;
} esp_ip_addr_t;
#ifdef __cplusplus
}
#endif
#endif //_ESP_NETIF_IP_ADDR_H_

View File

@ -15,6 +15,10 @@
#ifndef _ESP_NETIF_NET_STACK_H_
#define _ESP_NETIF_NET_STACK_H_
#ifdef __cplusplus
extern "C" {
#endif
//
// Network stack API: This ESP-NETIF API are supposed to be called only from internals of TCP/IP stack
//
@ -76,4 +80,8 @@ void esp_netif_free_rx_buffer(void *esp_netif, void* buffer);
* @}
*/
#ifdef __cplusplus
}
#endif
#endif //_ESP_NETIF_NET_STACK_H_

View File

@ -17,6 +17,10 @@
#include "esp_netif_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief station list info element
*/
@ -59,4 +63,9 @@ esp_err_t esp_netif_get_sta_list(const wifi_sta_list_t *wifi_sta_list, esp_netif
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif //_ESP_NETIF_STA_LIST_H_

View File

@ -15,6 +15,10 @@
#ifndef _ESP_NETIF_TYPES_H_
#define _ESP_NETIF_TYPES_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Definition of ESP-NETIF based errors
*/
@ -198,4 +202,8 @@ struct esp_netif_config {
*/
typedef esp_err_t (*esp_netif_receive_t)(esp_netif_t *esp_netif, void *buffer, size_t len, void *eb);
#ifdef __cplusplus
}
#endif
#endif // _ESP_NETIF_TYPES_H_

View File

@ -5015,13 +5015,8 @@ void mdns_debug_packet(const uint8_t * data, size_t len)
}
_mdns_dbg_printf("\n");
} else if (type == MDNS_TYPE_AAAA) {
<<<<<<< HEAD
ip6_addr_t ip6;
memcpy(&ip6, data_ptr, MDNS_ANSWER_AAAA_SIZE);
=======
esp_ip6_addr_t ip6;
memcpy(&ip6, data_ptr, sizeof(esp_ip6_addr_t));
>>>>>>> mdns: update mdns to use esp-netif for mdns supported services such as STA, AP, ETH
_mdns_dbg_printf(IPV6STR "\n", IPV62STR(ip6));
} else if (type == MDNS_TYPE_A) {
esp_ip4_addr_t ip;