[ds6] Re: (usagi-users 03345) Bind on an AF_INET6 socket issue
Rémi Denis-Courmont
courmisch at via.ecp.fr
Tue May 10 10:19:05 CEST 2005
Le Lundi 9 Mai 2005 18:49, Bellino, Phil a écrit :
> When I do a bind on these addresses, the "fe80::2a0:9cff:fe00:436"
> always fails to bind with the bind error of "ENODEV".
>
> I do remember reading somewhere on the web that a bind can not be
> done on a Link-Local address.
>
> Does anyone know if this is true and if so, what is the explanation
> behind it?
To bind to link-local scoped address, you must specify the interface in
the socket address.
They are two easy way to achieve that, either :
addr.sin6_scope_id = if_nametoindex("eth0");
or get the socket address from getaddrinfo() and specify
"fe80::2a0:9cff:fe00:436%eth0" as hostname.
--
Rémi Denis-Courmont
http://www.simphalempin.com/home/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.deepspace6.net/archive/ds6/attachments/20050510/0404a348/attachment.bin
More information about the ds6
mailing list