esp_netif_loopback_mock.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2020 Espressif Systems (Shanghai) CO LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. // http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. // Unless required by applicable law or agreed to in writing, software
  9. // distributed under the License is distributed on an "AS IS" BASIS,
  10. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. // See the License for the specific language governing permissions and
  12. // limitations under the License.
  13. #include "esp32_compat.h"
  14. // mock the types to decouple from lwip
  15. typedef void * esp_netif_t;
  16. typedef enum { DHCP_MOCK } esp_netif_dhcp_status_t;
  17. typedef tcpip_adapter_ip_info_t esp_netif_ip_info_t;
  18. typedef ip6_addr_t esp_ip6_addr_t;
  19. esp_err_t esp_netif_get_ip_info(esp_netif_t *esp_netif, esp_netif_ip_info_t *ip_info)
  20. {
  21. return ESP_ERR_NOT_SUPPORTED;
  22. }
  23. esp_err_t esp_netif_dhcpc_get_status(esp_netif_t *esp_netif, esp_netif_dhcp_status_t *status)
  24. {
  25. return ESP_ERR_NOT_SUPPORTED;
  26. }
  27. const char *esp_netif_get_ifkey(esp_netif_t *esp_netif)
  28. {
  29. return NULL;
  30. }
  31. esp_err_t esp_netif_get_ip6_linklocal(esp_netif_t *esp_netif, esp_ip6_addr_t *if_ip6)
  32. {
  33. return ESP_ERR_NOT_SUPPORTED;
  34. }