JINMEI Tatuya / $B?@L@C#:H(B a �crit :
>
> First of all, please tell us the OS you're using and its version. The
> API spec about the sin6_scope_id field are still quite vague, so the
> situation may differ among different OSes (and their versions).
>
I use a red hat Linux 7.2 (kernel 2.4).
>
> Secondly, I in fact do not understand your question...what did you
> mean by "the kernel doesn't fill that field up"? Are you talking
> about the receive side?
I'm talking about the receive side(destination). If I don't fill up the
sin6_scope_id field with the interface index, the connect() call doesn't work.
Why can't the kernel fill that field for the user? Maybe it could but I have
some problem....
Here's how I set up the address for the destination. I let the kernel bind the
source address:
bzero((char *)&sock6,sizeof(struct sockaddr_in6));
sock6.sin6_family=AF_INET6;
sock6.sin6_port = htons(current->portno);
for(k=0;k<4;k++)
sock6.sin6_addr.s6_addr32[k]= target->host6.s6_addr32[k];
sock6.sin6_flowinfo=0;
sock6.sin6_scope_id=if_nametoindex(target->device);
.....
where target->device is the name of the interface in string format ("eth0").
....?
Seb Peterson
---------------------------------------------------------------------
The IPv6 Users Mailing List
Unsubscribe by sending "unsubscribe users" to [EMAIL PROTECTED]