From nobody Sat Oct 28 16:43:02 2023 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SHlhV6l9cz501sm for ; Sat, 28 Oct 2023 16:43:06 +0000 (UTC) (envelope-from roy@marples.name) Received: from sender11-of-o52.zoho.eu (sender11-of-o52.zoho.eu [31.186.226.238]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SHlhV3463z3TmF; Sat, 28 Oct 2023 16:43:06 +0000 (UTC) (envelope-from roy@marples.name) Authentication-Results: mx1.freebsd.org; none ARC-Seal: i=1; a=rsa-sha256; t=1698511383; cv=none; d=zohomail.eu; s=zohoarc; b=AN7dWwjTQDMcpF8hhT1ife5cFk1csvlwlFnV1CmgqjymxQzVF2uQMXzok33IMiV4yibXaWM/JDsmRwRiJoWEvJK66Nk/8HJ0iBpqFnb/T0uv87Hr4jkZkpKPSdLpAo/guW+FgddTcF5VXWCj44Iy/eXPzOg2hTpTgrTSrkVjjnw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1698511383; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=R425c2Rl0l7MbdyERN9x3LZ8gZdxBZH5NNKIjlz5iWM=; b=BjWy63HjVm2gukslo7FBMex1cLzm7uIEaCYasANsXb2ryBAubAilTJI2LeXiKLwmfajPrl9LVbCRru6f819tV6uNSIeji0dPUKGguahmHz9zB7/ignLHKHoxWRxM9BKbhwCEqJY4XyxhcRsjdCiHIrSowcvKC9BY8OOvCNjvk00= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=marples.name; spf=pass smtp.mailfrom=roy@marples.name; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1698511383; s=zmail; d=marples.name; i=roy@marples.name; h=Date:Date:From:From:To:To:Cc:Cc:Message-Id:Message-Id:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Reply-To; bh=R425c2Rl0l7MbdyERN9x3LZ8gZdxBZH5NNKIjlz5iWM=; b=ODjuDPLZqaFx6nzhCfX8f/+AbMES1BoIoy9ZoENq6SyLwkhvER5AVh4BEVPKYLnc tqwvDXbH5T5uRJJ919vhdGcE3Sgp8OeEKLbYaEETEiedhPes+S7UB8hNeTMW21G8lPv ws31jNbF48vRfQ9Fq8yh7BjwN4HmPDOD6FRCgz4M= Received: from mail.zoho.eu by mx.zoho.eu with SMTP id 1698511382092453.3294036479638; Sat, 28 Oct 2023 18:43:02 +0200 (CEST) Date: Sat, 28 Oct 2023 17:43:02 +0100 From: Roy Marples To: Cc: Message-Id: <18b772ae647.bd4beee8172897.5493704673952375764@marples.name> In-Reply-To: <847fa0cf-db1e-45b3-3a0a-37dd647dabc9@freebsd.org> References: <18b77179746.d0c6d171174837.5548971766419580308@marples.name> <847fa0cf-db1e-45b3-3a0a-37dd647dabc9@freebsd.org> Subject: =?UTF-8?Q?Re:_=C2=A0netif_userland_API?= List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1231041_886273848.1698511382087" Importance: Normal User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:2639, ipnet:31.186.226.0/24, country:US] X-Rspamd-Queue-Id: 4SHlhV3463z3TmF ------=_Part_1231041_886273848.1698511382087 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Using netlink rather than route on a modern FreeBSD kernel may allow you do do the same thing but install a kernel filter on the socket just to receive interface changes.That should match your requirements.Roy Marples ---- On Sat,28 Oct 2023 15:29:01 +0100 eugen@freebsd.org wrote ----28.10.2023 23:21, Roy Marples wrote: > What you would do is open a route socket, then call getifaddrs and then listen on the route socket for new interfaces. > > Then you can maintain a list of current vlans and take action accordingly. I'd like to be able to make a couple of system calls only to get a list of pre-created vlans for a moment. Efficiently and scalable. Not making thousands of reads (syscalls) from routing sockets and not syncing with the kernel. Eugene ------=_Part_1231041_886273848.1698511382087 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =
Usin= g netlink rather than route on a modern FreeBSD kernel may allow you do do = the same thing but install a kernel filter on the socket just to receive in= terface changes.

That should m= atch your requirements.


Roy Marples

<= br> ---- On Sat,28 Oct 2023 15:29:01 +0100 eugen@freebsd.org wrote= ----

=
28.10.2023 23:21, Roy Marples wrote:

> What you would do is open a route socket, then call getifaddrs and= then listen on the route socket for new interfaces.
>=20
> Then you can maintain a list of current vlans and take action acco= rdingly.

I'd like to be able to make a couple of system calls only to get a list= of pre-created vlans for a moment.
Efficiently and scalable. Not making thousands of reads (syscalls) from= routing sockets
and not syncing with the kernel.

Eugene


------=_Part_1231041_886273848.1698511382087--