Subject: Re: scopeid on NetBSD-1.5.1 branch
To: None <>
From: Feico Dillema <>
List: current-users
Date: 02/14/2001 19:25:51
On Thu, Feb 15, 2001 at 03:17:12AM +0900, wrote:
> >On several machines running netbsd-1.5.1_ALPHA, ifconfig gives
> >scopid's that do not make much sense. For example:
> >        address: 00:60:b0:c1:59:44
> >        media: Ethernet autoselect
> >        status: active
> >        inet6 3ffe:2a00:100:3008:260:b0ff:fec1:5944 prefixlen 64
> >        inet6 fe80::260:b0ff:fec1:5944%le0 prefixlen 64 scopeid 0x1
> >It looks like the scopeid shows the interface-id instead. Is my
> >source/includes messed up or do others see the same? Just checked;
> >I see the same on a machine running -current.
> 	why do you say they don't make sense?  they do make sense to me.
> 	what did you expect if the above does not make sense?
> 	scopeid for link-local addresses are indeed interface id for the 
> 	interface.  this is only because that KAME code assumes one-by-one
> 	mapping between interfaces (hardware terminology) and links
> 	(vip6 terminology), to simplify scope management.

Ah, then I misunderstood the scopid field. I assumed it indicated the
scope of the address (like node-local, link-local, site-local etc) and
expected values as in in6.h:

#define IPV6_ADDR_SCOPE_NODELOCAL       0x01
#define IPV6_ADDR_SCOPE_LINKLOCAL       0x02
#define IPV6_ADDR_SCOPE_SITELOCAL       0x05
#define IPV6_ADDR_SCOPE_ORGLOCAL        0x08    /* just used in this file */
#define IPV6_ADDR_SCOPE_GLOBAL          0x0e

Thanks for clarifying.