...
/* Démarrage du client DHCP si nécessaire */
#if LWIP_DHCP
{ err = dhcp_start(&netif_local);
LWIP_DEBUGF(NETIF_DEBUG, ("dhcp_start...............%s\n", (err ==
ERR_OK)?"OK":"ERROR"));
}
#endif /* LWIP_DHCP */
...
/* wait */
...
/* Si le Client DHCP est initialisé... */
#if LWIP_DHCP
if (netif_local.dhcp!=NULL)
{ /* Si on a bien obtenu un bail d'adresse... */
if (netif_local.ip_addr.addr != 0) /*<< HERE I CHECK THE IP GET BY DHCP
*/
{ /* Récupération des adresses IP des serveurs DNS si nécessaire */
if (dns0==0x00000000) dns0 =
netif_local.dhcp->offered_dns_addr[0].addr;
if (dns1==0x00000000) dns1 =
netif_local.dhcp->offered_dns_addr[1].addr;
}
}
#endif /* LWIP_DHCP *