2013年9月6日星期五

Under Linux ipv6 set unsuccessful

Embedded development board , the kernel is 2.6.14 , has ipv6 configuration selected. After the system starts , there is a / proc/net/if_net6, playing ifconfig shows :

eth0 Link encap: Ethernet HWaddr 00:10:65:21:19:64
inet addr: 10.0.19.100 Bcast: 10.255.255.255 Mask: 255.0.0.0
inet6 addr: / 64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1
RX packets: 67289 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 33 errors: 0 dropped: 0 overruns: 0 carrier: 0
collisions: 0 txqueuelen: 1000
RX bytes: 54037834 (51.5 MiB) TX bytes: 2058 (2.0 KiB)
Interrupt: 15
execute the command ifconfig eth0 inet6 add fe80 :: 32ff: 2abe: fe63: 3eba/64 after , ip does not successfully added .
often use ping6 command prompt :
~ $ ping6 fe80 :: 210:65 ff: fe23: 1999
ping6: fe80 :: 210:65 ff: fe23: 1999: Error 0

then wrote a test file , which statement
sockfd = socket (AF_INET6, SOCK_DGRAM, IPPROTO_IP);
sockfd value of -1 is returned.

how should I analyze the problem ?
------ Solution ---------------------------------------- ----
execute the command ifconfig eth0 inet6 add fe80 :: 32ff: 2abe: fe63: 3eba/64 after , ip add no success

Tip what ?

------ Solution ------------------------------------ --------
the way to talk about what the project will use IPV6 it ? IPV4 can not you ? I use gethostbyname judge www.google.com www.baidu.com are IPV4 Yeah !
------ Solution ---------------------------------------- ----
getaddrinfo support ipv6.
------ For reference only --------------------------- ------------
resolved, lib library problems . Wrote a test program and found that implementation of inet_pton function error, suspect the system does not support the lib library , for a new fine.
------ For reference only -------------------------------------- -

being less than , but some of the projects that is required to support ipv6. .
------ For reference only -------------------------------------- -
suspect the system does not support the lib library , for a new like ?

What does it mean , what system libraries get a new way ?
------ For reference only -------------------------------------- -
Yeah , that's not very clear, you can explain it clearly !
------ For reference only -------------------------------------- -
now also doing this , you came to the situation with the same, you can make it clear that this is how to solve the problem you do !
------ For reference only -------------------------------------- -


elapsed View uclibc libraries found in the code there is a macro , __UCLIBC_HAS_IPV6__ switch, uclibc configuration interface , there are also items configured for open / close this __UCLIBC_HAS_IPV6__.
This problem mainly lies in cross-compiler support does not support IPV6 functionality after upgrading cross-compiler support IPV6 capabilities resolved.

没有评论:

发表评论