RT-Thread/rt-thread — pull request #327 by hduffddybz (2014-08-27 07:07:02+00:00)
Title: add ipv6 support

# When you try to use ipv6 on rt-thread, you should do

## 1、Change the SConscript file in components/net directory , use RT_USING_LWIP_HEAD to reply RT_USING_LWIP_141 or other.

## 2、In rtconfig.h file, add the macro #define RT_LWIP_IPV6 1（support ipv6）, if you want to set the ipv6 address automatically , you should add the macro #define RT_LWIP_IPV6_AUTOCONFIG 1. But firstly you should get a router which should support ipv6(such as HIWIFI and other openwrt router).

## 3、if you want to set ipv6 address manually, you can use setif() function in your application files. For example, you want to set the "e0" device for "4006::1", you can use set_if6("e0", "4006::1") after network initialize;

# Doing all of this, you can begin to use ipv6.

# How to test ipv6 function??

## 1、(Ping)You can use "ping6 + linklocal_address + scope id" or "ping6 + ipv6 address" to ping board. In Linux Distributions, you can use "ping6 fe80::200:eff:fe12:3456%eth1"("fe80::200:eff:fe12:3456"is linklocal address of board)("eth1" is computer's link-local address scope id. In Windows 7 and Windows XP you can find scope id through ipconfig command ); And "ping6 4006:e024:680:c6e:200:eff:fe12:3456" is also supported.("4006:e024:680:c6e:200:eff:fe12:3456" is ipv6 address of board).

## 2、（BSD Socket API & netconn API）Please see the example in "apps/ipv6" directory, It contains the example of tcp server, tcp client, udp server, udp client written in BSD Socket API, and tcp echo server, udp echo server written in Netconn API. And I also write some ipv6 network debugging tools on linux platform， you can see here https://github.com/hduffddybz/IPV6_SOCKET