Subject: scope id querry

From: Arun Prasad <[email-masked]>
Date: Fri, 11 Oct 2002 16:15:29 +0100

Hi all,
    Some doubts on the socket api for Ipv6.
* When a IPV6 packet is received throught the interface "recvmsg", how to get  the
    "zone_id" or "scope_id"  for the received Ipv6 Addr. When the "recvmsg"
    interface is called we get a structure in6_pktinfo, which has the ipv6 address and
    "ipi6_ifindex".... Does this "ipi6_ifindex" serve as "zone_id".

Please clarify.

Thanks
-arun

--
****************************************************************
V.ARUN PRASAD
HCL Technologies Ltd.,
Networking Technologies Lab,
Ground Floor, Block - 1, Chandamama Building,
184 to 188,190,192 & 196, NSK Road,
Vadapalani,
Chennai - 600 026

Phone: Off: +91-44-3728366/67/69, +91-44-3728156/57 Extn. 1133
Fax: +91-44-4806640
****************************************************************

--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [email-masked]
--------------------------------------------------------------------

---

From: [email-masked]
Date: Wed, 16 Oct 2002 12:14:38 +0900

>    "ipi6_ifindex".... Does this "ipi6_ifindex" serve as "zone_id".

	sockaddr_in6 (which includes sin6_scope_id) will be available
	at the address specified by msg_name member in struct msghdr.

itojun

---

From: JINMEI Tatuya / 神明達哉<[email-masked]>
Date: Wed, 16 Oct 2002 17:06:12 +0900

>>>>> On Fri, 11 Oct 2002 16:15:29 +0100, 
>>>>> Arun Prasad <[email-masked]> said:

>     "ipi6_ifindex".... Does this "ipi6_ifindex" serve as "zone_id".

Not really (at least technically).  ipi6_ifindex specifies the
"interface ID" of the receiving interface.  The "zone ID" depends on
the address type (i.e. link-local, site-local, global, etc), and, in
general, interface IDs are different from zone IDs for wider scope
types.  However, interface scope is the narrowest one, so you can get
the zone ID for any type of scope from the interface ID.

For further information, see draft-ietf-ipngwg-scoping-arch-04.txt.

Section 1.3 of the KAME IMPLEMENTATION notes may also give you hints.
The latest one is available at:
http://orange.kame.net/dev/cvsweb.cgi/kame/IMPLEMENTATION?rev=1.315

					JINMEI, Tatuya
					Communication Platform Lab.
					Corporate R&D Center, Toshiba Corp.
					[email-masked]
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [email-masked]
--------------------------------------------------------------------

---

From: Arun Prasad <[email-masked]>
Date: Wed, 16 Oct 2002 16:01:58 +0100

hello,

itojun

Above is one of the replies I received..... Taking both ur reply and itojun's reply
can I take that "sin6_scope_id" present in the fromAddr returned ( from recvfrom
call) as the zone identifier ( and getting the zone from the scope type of the
fromAddr) ??

Thanks
-arun