esp-idf/components/esp_netif/lwip/esp_netif_lwip_orig.h
David Cermak 5b471a1848 esp_netif/lwip: Implement basic support for vanilla-lwip (2.1.3-REL)
* Reference lwip-2.1.3-REL vanilla lwip version
* Use inherent NETIF callbacks instead of dhcp/ipv6/autoip
2022-05-18 17:10:42 +02:00

48 lines
1.2 KiB
C

/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_netif_lwip_internal.h"
#if defined(CONFIG_ESP_NETIF_TCPIP_LWIP_ORIG) || defined(CONFIG_ESP_NETIF_TCPIP_LWIP)
/**
* @brief Sets one extended lwip netif callbacks for all esp-netif
*/
void set_lwip_netif_callback(void);
void remove_lwip_netif_callback(void);
void esp_netif_internal_dhcpc_cb(struct netif *netif);
void esp_netif_internal_nd6_cb(struct netif *netif, uint8_t index);
static inline void dhcp_set_cb(struct netif *netif, void (*cb)(struct netif*)) { }
static inline void nd6_set_cb(struct netif *netif, void (*cb)(struct netif *netif, u8_t ip_index)) { }
void dns_clear_servers(bool keep_fallback);
#if ESP_GRATUITOUS_ARP
void netif_set_garp_flag(struct netif *netif);
void netif_unset_garp_flag(struct netif *netif);
#endif // ESP_GRATUITOUS_ARP
#else // !CONFIG_ESP_NETIF_TCPIP_LWIP_ORIG and !CONFIG_ESP_NETIF_TCPIP_LWIP
static inline void set_lwip_netif_callback(void) { }
static inline void remove_lwip_netif_callback(void) { }
static inline void netif_unset_garp_flag(struct netif *netif) {}
#endif // CONFIG_ESP_NETIF_TCPIP_LWIP_ORIG or CONFIG_ESP_NETIF_TCPIP_LWIP