Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Mar 2004 13:12:38 +0100
From:      Lukasz Stelmach <Lukasz.Stelmach@telmark.waw.pl>
To:        freebsd-questions@FreeBSD.ORG
Subject:   sockaddr_(in|in6) compatiblity
Message-ID:  <20040309121237.GA33848@tygrys.k.telmark.waw.pl>

next in thread | raw e-mail | index | archive | help

--UlVJffcvxoiEqYs2
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.
--=20
|/       |_,  _   .-  --,  Ju=BF z ka=BFdej strony pe=B3zn=B1, potworne =BF=
=B1dze
|__ |_|. | \ |_|. ._' /_.         B=EAd=EA uprawia=B3 nierz=B1d, za pieni=
=B1ze

--UlVJffcvxoiEqYs2
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFATbS1NdzY8sm9K9wRAiUCAJ0Rr8KNpSRoiH5hgB8TFHyDGSP3+gCdFVTQ
2dRVaX6ihDbMV4cxuFpPBhM=
=cuzr
-----END PGP SIGNATURE-----

--UlVJffcvxoiEqYs2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040309121237.GA33848>