Date: Thu, 16 Mar 2017 13:14:22 +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: <31a86179-6d43-f5c4-ad1b-36bdacfdffc8@yandex.ru> In-Reply-To: <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> References: <201703161002.v2GA2jk4070303@repo.freebsd.org> <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FGVocNFiN8Xo95IEhPqCwm2fuRQiR2c7h Content-Type: multipart/mixed; boundary="Q4RBQMPA6KpaKgPWNCBd8ascw48848TBG"; 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: <31a86179-6d43-f5c4-ad1b-36bdacfdffc8@yandex.ru> Subject: Re: svn commit: r315405 - head/sys/compat/linuxkpi/common/include/linux References: <201703161002.v2GA2jk4070303@repo.freebsd.org> <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> In-Reply-To: <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> --Q4RBQMPA6KpaKgPWNCBd8ascw48848TBG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 16.03.2017 13:12, Andrey V. Elsukov wrote: > 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 >> >> Log: >> Add helper function similar to ip_dev_find() to the LinuxKPI to look= up >> 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); >=20 > Hi Hans, >=20 > There are at least two IPv6-specific functions to this task: > in6ifa_ifwithaddr() and in6ifa_ifpwithaddr(). Sorry, it is only in6ifa_ifwithaddr(). --=20 WBR, Andrey V. Elsukov --Q4RBQMPA6KpaKgPWNCBd8ascw48848TBG-- --FGVocNFiN8Xo95IEhPqCwm2fuRQiR2c7h 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/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAljKZX4ACgkQAcXqBBDI oXqONQf+Pfden/TafSPBkH7iakBG+4yRT2VYTs0z2/pNSFq0/ZmZVlvDRoBaRBeG o1B7OUpG7Vuuua+VHNc/YB2dhZnTIvag2b6AYNvj/WXcbPyp1Mk4PYhK87HYb3pN t1mIHHKacNYZ/cHu+oDblcBtqVOd2r9O15PDzjDjctyNSOOmdLo7ADOoXQJql9Ck 5TwTLm1n5IZqFsRXgbhcUMC3yl9YAe7U+jlSg8zOYdvth8NWNnPK8aHVtU5Ew9eZ PruMQTbeegdQGOVPdV2/YmF96KWp0iundQyKlroUWOt0NgKMI3QVh3o7VmzXJgpX GwrCNl6jy5MqQDJCFQjU6cIbMkN+VA== =s6Nq -----END PGP SIGNATURE----- --FGVocNFiN8Xo95IEhPqCwm2fuRQiR2c7h--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?31a86179-6d43-f5c4-ad1b-36bdacfdffc8>