Date: Thu, 16 Mar 2017 13:12:59 +0300 From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: Hans Petter Selasky <hselasky@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315405 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> In-Reply-To: <201703161002.v2GA2jk4070303@repo.freebsd.org> References: <201703161002.v2GA2jk4070303@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --q7qo8E6FmxwV90bnIG02VND4bJUatVeis Content-Type: multipart/mixed; boundary="W5CP8EXkPoWhRPUJQxaxloO0HGD5pkHVo"; protected-headers="v1" From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: Hans Petter Selasky <hselasky@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> Subject: Re: svn commit: r315405 - head/sys/compat/linuxkpi/common/include/linux References: <201703161002.v2GA2jk4070303@repo.freebsd.org> In-Reply-To: <201703161002.v2GA2jk4070303@repo.freebsd.org> --W5CP8EXkPoWhRPUJQxaxloO0HGD5pkHVo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 16.03.2017 13:02, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Mar 16 10:02:45 2017 > New Revision: 315405 > URL: https://svnweb.freebsd.org/changeset/base/315405 >=20 > Log: > Add helper function similar to ip_dev_find() to the LinuxKPI to looku= p > a network device by its IPv6 address in the given VNET. > =20 > +static inline struct net_device * > +ip6_dev_find(struct vnet *vnet, struct in6_addr addr) > +{ > + struct sockaddr_in6 sin6; > + struct ifaddr *ifa; > + struct ifnet *ifp; > + > + memset(&sin6, 0, sizeof(sin6)); > + sin6.sin6_addr =3D addr; > + sin6.sin6_len =3D sizeof(sin6); > + sin6.sin6_family =3D AF_INET6; > + CURVNET_SET_QUIET(vnet); > + ifa =3D ifa_ifwithaddr((struct sockaddr *)&sin6); Hi Hans, There are at least two IPv6-specific functions to this task: in6ifa_ifwithaddr() and in6ifa_ifpwithaddr(). --=20 WBR, Andrey V. Elsukov --W5CP8EXkPoWhRPUJQxaxloO0HGD5pkHVo-- --q7qo8E6FmxwV90bnIG02VND4bJUatVeis Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAljKZSwACgkQAcXqBBDI oXqFugf/Ypx3siCCUwuPguTz70FGSVszLWp3LJop3r4dHgNSiazCDWJuqp8AUtL/ ho2c3WYik9FccrG7jquD5e2ETwZPK8whS7vkXKyNu6g+QvihJeBIAOWBUEp+ollc IoU4ftnv91aPRJmcH1jDHC4XD9ZaaEL0s6i4ISg85jCY8G79+lMjk7JWfyOScFd0 D4hqrvE/tQhPLO7MVRXHCss4DJ2tO56JNpbgmpJGoyI5Va5APlVoLBhoCCujQd82 P2ciOuBRc/Z6m1ZUTtJ/lyzhePZqMisX8yosSIog+0jf6T2JcCpKB4USikA7QcvT JKcdYzvjX8Mh1Gx6WYBKN35+b8XmiQ== =kyaQ -----END PGP SIGNATURE----- --q7qo8E6FmxwV90bnIG02VND4bJUatVeis--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?554fb619-815d-2530-8df2-8df6e8e27030>