From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25163 invoked by alias); 31 Dec 2012 05:06:07 -0000 Received: (qmail 25142 invoked by uid 22791); 31 Dec 2012 05:06:06 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ie0-f172.google.com (HELO mail-ie0-f172.google.com) (209.85.223.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 31 Dec 2012 05:06:00 +0000 Received: by mail-ie0-f172.google.com with SMTP id c13so14571456ieb.17 for ; Sun, 30 Dec 2012 21:05:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.222.166 with SMTP id qn6mr35074905igc.47.1356930359275; Sun, 30 Dec 2012 21:05:59 -0800 (PST) Received: by 10.64.73.135 with HTTP; Sun, 30 Dec 2012 21:05:59 -0800 (PST) In-Reply-To: References: Date: Mon, 31 Dec 2012 05:06:00 -0000 Message-ID: From: cyl cyl To: eCos Users Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Re: ipv6 question X-SW-Source: 2012-12/txt/msg00055.txt.bz2 I found it. If the ip I set is a linklocal ip (fe80) , then s6_adr16[1] will change to ifp->if_index. if (sa6 && sa6->sin6_family == AF_INET6) { if (IN6_IS_ADDR_LINKLOCAL(&sa6->sin6_addr)) { if (sa6->sin6_addr.s6_addr16[1] == 0) { /* link ID is not embedded by the user */ sa6->sin6_addr.s6_addr16[1] = htons(ifp->if_index); } else if (sa6->sin6_addr.s6_addr16[1] != htons(ifp->if_index)) { return(EINVAL); /* link ID contradicts */ } So I set another IP (3ffe .....) ,and it works OK. 2012/12/24 cyl cyl : > Hello: > > In function init_net_IPv6, I set "fe80::219:dbff:fea9:f3d5" > for my eth0 ipv6 address. But _show_all_interfaces says my ip is > "fe80:1::219:dbff:fea9:f3d5". I don't know why it adds a "1" in it. > The prefix I set is "fe80:0:0:0" . > > > ipv6: fe80::219:dbff:fea9:f3d5, in6mask64: ff ff ff ff ff ff ff ff > > 0xa0b53204 - eth0 - 192.168.1.239 > 0xa0b53220 - eth0 - fe80:1::200:ff:fe6c:18f0 > 0xa0b5323c - eth0 - fe80:1::219:dbff:fea9:f3d5 > 0xa0b53274 - lo0 - ::1 > 0xa0b53290 can_send: 1 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss