sockaddr_(in|in6) compatiblity

Lukasz Stelmach Lukasz.Stelmach at telmark.waw.pl
Tue Mar 9 04:12:41 PST 2004


Greetings All.

Tell me please is it normal what i get?

1. I open socket AF_INET6/SOCK_DGRAM... OK
2. bind it to ::ffff:127.0.0.1/53...    OK
3. recvfrom() data from the socket...   OK
4. *from (the 5th parameter to recvfrom) gets filled in like it was
 a sockaddr_in (ipv4) structure which means that senders address
 is in sin6_flowinfo instead of sin6_addr. Now this makes somehow
 more difficult to use inet_ntop since first one has to check sin6_family
 and decide wether to pass sin6_addr or sin6_flowinfo as an address
 to print.

Did I miss something in manual?

Cheers.
-- 
|/       |_,  _   .-  --,  Już z każdej strony pełzną, potworne żądze
|__ |_|. | \ |_|. ._' /_.         Będę uprawiał nierząd, za pieniąze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040309/2fb7aa3f/attachment.bin


More information about the freebsd-questions mailing list