Why is the DHCP server not compatible with TCPIP_ADAPTER_IF_ETH?
Posted: Wed Oct 03, 2018 7:42 pm
Hi,
I'm trying to run the DHCP server on the ethernet interface. It looks like the code in tcpip_adapter_lwip.c specifically prohibits using the DHCP server on anything else other than TCPIP_ADAPTER_IF_AP. This code:
----------------------------------------------------------------------------------------------------
esp_err_t tcpip_adapter_dhcps_start(tcpip_adapter_if_t tcpip_if)
{
TCPIP_ADAPTER_IPC_CALL(tcpip_if, 0, 0, 0, tcpip_adapter_dhcps_start_api);
/* only support ap now */
if (tcpip_if != TCPIP_ADAPTER_IF_AP || tcpip_if >= TCPIP_ADAPTER_IF_MAX) {
ESP_LOGD(TAG, "dhcp server invalid if=%d", tcpip_if);
return ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS;
}
----------------------------------------------------------------------------------------------------
Why is this being done? It looks to me that the only thing preventing the ethernet port from running the DHCP server is this type of soft prevention. Can we get some official DHCP server support for the ethernet port?
Thanks,
Marco
I'm trying to run the DHCP server on the ethernet interface. It looks like the code in tcpip_adapter_lwip.c specifically prohibits using the DHCP server on anything else other than TCPIP_ADAPTER_IF_AP. This code:
----------------------------------------------------------------------------------------------------
esp_err_t tcpip_adapter_dhcps_start(tcpip_adapter_if_t tcpip_if)
{
TCPIP_ADAPTER_IPC_CALL(tcpip_if, 0, 0, 0, tcpip_adapter_dhcps_start_api);
/* only support ap now */
if (tcpip_if != TCPIP_ADAPTER_IF_AP || tcpip_if >= TCPIP_ADAPTER_IF_MAX) {
ESP_LOGD(TAG, "dhcp server invalid if=%d", tcpip_if);
return ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS;
}
----------------------------------------------------------------------------------------------------
Why is this being done? It looks to me that the only thing preventing the ethernet port from running the DHCP server is this type of soft prevention. Can we get some official DHCP server support for the ethernet port?
Thanks,
Marco