lwip: remove netif_reg_addr_change_cb

This commit is contained in:
Wu Jian Gang 2016-09-02 18:18:22 +08:00
parent 507472343d
commit ef23607a67
2 changed files with 1 additions and 13 deletions

View file

@ -315,14 +315,6 @@ netif_add(struct netif *netif,
return netif;
}
typedef int (*netif_addr_change_cb_t)(struct netif *netif);
static netif_addr_change_cb_t g_netif_addr_change_cb = NULL;
void netif_reg_addr_change_cb(void *cb)
{
g_netif_addr_change_cb = (netif_addr_change_cb_t)cb;
}
#if LWIP_IPV4
/**
* Change IP address configuration for a network interface (including netmask
@ -341,9 +333,6 @@ netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *
netif_set_gw(netif, gw);
/* set ipaddr last to ensure netmask/gw have been set when status callback is called */
netif_set_ipaddr(netif, ipaddr);
if (g_netif_addr_change_cb){
g_netif_addr_change_cb(netif);
}
}
#endif /* LWIP_IPV4*/

View file

@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <stdio.h>
#include <string.h>
@ -53,8 +54,6 @@ void tcpip_adapter_init(void)
IP4_ADDR(&esp_ip[TCPIP_ADAPTER_IF_AP].gw, 192, 168 , 4, 1);
IP4_ADDR(&esp_ip[TCPIP_ADAPTER_IF_AP].netmask, 255, 255 , 255, 0);
}
netif_reg_addr_change_cb(tcpip_adapter_addr_change_cb);
}
esp_err_t tcpip_adapter_start(tcpip_adapter_if_t tcpip_if, uint8_t *mac, struct ip_info *info)