From owner-svn-src-head@freebsd.org Thu Mar 16 10:16:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13540D0E2A5; Thu, 16 Mar 2017 10:16:09 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward4o.cmail.yandex.net (forward4o.cmail.yandex.net [IPv6:2a02:6b8:0:1a72::289]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 87549193F; Thu, 16 Mar 2017 10:16:08 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp3j.mail.yandex.net (smtp3j.mail.yandex.net [95.108.130.68]) by forward4o.cmail.yandex.net (Yandex) with ESMTP id B905F20F8E; Thu, 16 Mar 2017 13:16:05 +0300 (MSK) Received: from smtp3j.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3j.mail.yandex.net (Yandex) with ESMTP id 9C9AE6240932; Thu, 16 Mar 2017 13:16:02 +0300 (MSK) Received: by smtp3j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ae4tlM1JFd-G2Nm8aP2; Thu, 16 Mar 2017 13:16:02 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1489659362; bh=QmzomWQAwp/LdjgcSOVWkvcczklvkWnJgx5pAl7d1Zw=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=TZmXt0YWgn0ziyyFbtR7riHmVR53ppKEAxipmAhH2rt5S3fjFv7UH6Hbe+ByU7tjM 5D/e5thtDEMkapGDzgS+c1gpXt+Qe0/kypf9Hi81kzL5ko2w3BvUlxorGP6mDha5JJ puOUEChSDBm8KnMIG7MWeSKG1lm/2VHQAJ8MQ3yw= Authentication-Results: smtp3j.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0 Subject: Re: svn commit: r315405 - head/sys/compat/linuxkpi/common/include/linux To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201703161002.v2GA2jk4070303@repo.freebsd.org> <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: <31a86179-6d43-f5c4-ad1b-36bdacfdffc8@yandex.ru> Date: Thu, 16 Mar 2017 13:14:22 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <554fb619-815d-2530-8df2-8df6e8e27030@yandex.ru> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FGVocNFiN8Xo95IEhPqCwm2fuRQiR2c7h" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2017 10:16:09 -0000 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" To: Hans Petter Selasky , 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--