components/tcpip_adapter: Allow to set different hostname for each interface

This commit is contained in:
Liu Han
2016-12-07 15:37:59 +08:00
committed by Wu Jian Gang
parent fb70126bc8
commit 315b3f979f
4 changed files with 82 additions and 110 deletions

View File

@@ -98,7 +98,7 @@ typedef struct {
typedef enum {
TCPIP_ADAPTER_IF_STA = 0, /**< ESP32 station interface */
TCPIP_ADAPTER_IF_AP, /**< ESP32 soft-AP interface */
TCPIP_ADAPTER_IF_ETH, /**< ESP32 ethernet interface */
TCPIP_ADAPTER_IF_ETH, /**< ESP32 ethernet interface */
TCPIP_ADAPTER_IF_MAX
} tcpip_adapter_if_t;
@@ -126,7 +126,7 @@ typedef enum{
} tcpip_adapter_option_id_t;
/**
* @brief Initialize tcpip adpater
* @brief Initialize tcpip adapter
*
* This will initialize TCPIP stack inside.
*/
@@ -411,12 +411,12 @@ esp_interface_t tcpip_adapter_get_esp_if(void *dev);
*/
esp_err_t tcpip_adapter_get_sta_list(wifi_sta_list_t *wifi_sta_list, tcpip_adapter_sta_list_t *tcpip_sta_list);
#define TCPIP_HOSTNAME_MAX_SIZE 31
#define TCPIP_HOSTNAME_MAX_SIZE 32
/**
* @brief Set the hostname to the interface
*
* @param[in] tcpip_if: the interface which we will set the hostname
* @param[in] hostname: the host name for set the interfce
* @param[in] hostname: the host name for set the interface, the max length of hostname is 32 bytes
*
* @return ESP_OK:success
* ESP_ERR_TCPIP_ADAPTER_IF_NOT_READY:interface status error
@@ -428,7 +428,7 @@ esp_err_t tcpip_adapter_set_hostname(tcpip_adapter_if_t tcpip_if, const char *ho
* @brief Get the hostname from the interface
*
* @param[in] tcpip_if: the interface which we will get the hostname
* @param[in] hostname: the host name from the interfce
* @param[in] hostname: the host name from the interface
*
* @return ESP_OK:success
* ESP_ERR_TCPIP_ADAPTER_IF_NOT_READY:interface status error