change code style

This commit is contained in:
hduffddybz 2014-08-30 11:04:13 +08:00
parent 5a7d40f80e
commit 838cdbe660
3 changed files with 38 additions and 42 deletions

View File

@ -104,6 +104,7 @@ static void tcpip_init_done_callback(void *arg)
ethif->netif->mld_mac_filter = NULL;
#endif
#endif
#if LWIP_DHCP
if (ethif->flags & NETIF_FLAG_DHCP)
{
@ -175,14 +176,6 @@ int lwip_system_init(void)
netifapi_netif_set_addr(netif_default, &ipaddr, &netmask, &gw);
}
#endif
/*#if LWIP_IPV6 && LWIP_IPV6_MLD
ip6_addr_t ip6addr_group;
IP6_ADDR(&ip6addr_group, 0, 0xfe, 0x80, 0x00, 0x00);
IP6_ADDR(&ip6addr_group, 0, 0x00, 0x00, 0x00, 0x00);
IP6_ADDR(&ip6addr_group, 0, 0x00, 0x00, 0x00, 0x00);
IP6_ADDR(&ip6addr_group, 0, 0x00, 0x00, 0x00, 0x01);
netif_mld_mac_filter_fn(netif_default, &ip6addr_group, 0);
#endif*/
rt_kprintf("lwIP-%d.%d.%d initialized!\n", LWIP_VERSION_MAJOR, LWIP_VERSION_MINOR, LWIP_VERSION_REVISION);
return 0;

View File

@ -14,12 +14,13 @@
//#define LWIP_IPV6_DHCP6 1
#define LWIP_ICMP6 1
#define LWIP_IPV6_NUM_ADDRESSES 3
#endif
#ifdef RT_LWIP_IPV6_AUTOCONFIG
#define LWIP_IPV6_AUTOCONFIG 1
#endif
#endif
#ifdef RT_LWIP_IPV6_MLD
#define LWIP_IPV6_MLD 1
#endif

View File

@ -437,6 +437,7 @@ void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr)
}
FINSH_FUNCTION_EXPORT(set_if, set network interface address);
#if LWIP_IPV6
void set_if6(char* netif_name, char* ip6_addr)
{
struct netif* netif = netif_list;
@ -467,6 +468,7 @@ void set_if6(char* netif_name, char* ip6_addr)
}
}
FINSH_FUNCTION_EXPORT(set_if6, set ipv6 local address)
#endif
#if LWIP_DNS
#include <lwip/dns.h>
@ -514,11 +516,11 @@ void list_if(void)
rt_kprintf("ip address: %s\n", ipaddr_ntoa(&(netif->ip_addr)));
rt_kprintf("gw address: %s\n", ipaddr_ntoa(&(netif->gw)));
rt_kprintf("net mask : %s\n", ipaddr_ntoa(&(netif->netmask)));
#if LWIP_IPV6
rt_kprintf("link-local address: %s\n", ip6addr_ntoa(&(netif->ip6_addr[0])));
rt_kprintf("ipv6[1] address: %s\n", ip6addr_ntoa(&(netif->ip6_addr[1])));
rt_kprintf("\r\n");
#endif
netif = netif->next;
}