|
@@ -154,8 +154,8 @@ static int lwip_netdev_set_addr_info(struct netdev *netif, ip_addr_t *ip_addr, i
|
|
|
#ifdef RT_LWIP_DNS
|
|
|
static int lwip_netdev_set_dns_server(struct netdev *netif, uint8_t dns_num, ip_addr_t *dns_server)
|
|
|
{
|
|
|
- extern void set_dns(uint8_t dns_num, char* dns_server);
|
|
|
- set_dns(dns_num, ipaddr_ntoa(dns_server));
|
|
|
+ extern void dns_setserver(uint8_t dns_num, const ip_addr_t *dns_server);
|
|
|
+ dns_setserver(dns_num, dns_server);
|
|
|
return ERR_OK;
|
|
|
}
|
|
|
#endif /* RT_LWIP_DNS */
|
|
@@ -168,6 +168,7 @@ static int lwip_netdev_set_dhcp(struct netdev *netif, rt_bool_t is_enabled)
|
|
|
}
|
|
|
#endif /* RT_LWIP_DHCP */
|
|
|
|
|
|
+#ifdef FINSH_USING_MSH
|
|
|
#ifdef RT_LWIP_USING_PING
|
|
|
extern int lwip_ping_recv(int s, int *ttl);
|
|
|
extern err_t lwip_ping_send(int s, ip_addr_t *addr, int size);
|
|
@@ -258,6 +259,7 @@ void lwip_netdev_netstat(struct netdev *netif)
|
|
|
#endif
|
|
|
}
|
|
|
#endif /* RT_LWIP_TCP || RT_LWIP_UDP */
|
|
|
+#endif /* FINSH_USING_MSH */
|
|
|
|
|
|
const struct netdev_ops lwip_netdev_ops =
|
|
|
{
|
|
@@ -277,6 +279,7 @@ const struct netdev_ops lwip_netdev_ops =
|
|
|
NULL,
|
|
|
#endif /* RT_LWIP_DHCP */
|
|
|
|
|
|
+#ifdef FINSH_USING_MSH
|
|
|
#ifdef RT_LWIP_USING_PING
|
|
|
lwip_netdev_ping,
|
|
|
#else
|
|
@@ -286,6 +289,7 @@ const struct netdev_ops lwip_netdev_ops =
|
|
|
#if defined (RT_LWIP_TCP) || defined (RT_LWIP_UDP)
|
|
|
lwip_netdev_netstat,
|
|
|
#endif /* RT_LWIP_TCP || RT_LWIP_UDP */
|
|
|
+#endif /* FINSH_USING_MSH */
|
|
|
};
|
|
|
|
|
|
static int netdev_add(struct netif *lwip_netif)
|