Date: Sat, 28 Oct 2023 17:43:02 +0100 From: Roy Marples <roy@marples.name> To: <eugen@freebsd.org> Cc: <freebsd-net@freebsd.org> Subject: =?UTF-8?Q?Re:_=C2=A0netif_userland_API?= Message-ID: <18b772ae647.bd4beee8172897.5493704673952375764@marples.name> In-Reply-To: <847fa0cf-db1e-45b3-3a0a-37dd647dabc9@freebsd.org> References: <f889550b-191d-efdd-4346-7b5b060ee53a@freebsd.org> <18b77179746.d0c6d171174837.5548971766419580308@marples.name> <847fa0cf-db1e-45b3-3a0a-37dd647dabc9@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
------=_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 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>= <meta content=3D"text/html;charset=3DUTF-8" http-equiv=3D"Content-Type"></h= ead><body ><div style=3D'font-size:10pt;font-family:Verdana,Arial,Helvetica= ,sans-serif;'><div dir=3D'auto'><div id=3D"message" dir=3D"auto"></div>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.<div dir=3D"auto"><br></div><div dir=3D"auto">That should m= atch your requirements.<br id=3D"br3"><br id=3D"br3"><br id=3D"br3"><div id= =3D"signature" dir=3D"auto"><div>Roy Marples<br></div></div><div id=3D"cont= ent" dir=3D"auto"><br><div class=3D"zmail_extra_hr" style=3D"border-top-wid= th: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204); hei= ght: 0px; margin-top: 10px; margin-bottom: 10px; line-height: 0px;"></div><= br> ---- On Sat,28 Oct 2023 15:29:01 +0100 <b> eugen@freebsd.org </b> wrote= ----<br><br><blockquote style=3D"border: 0px; padding: 0px; margin: 0px;">= <div>28.10.2023 23:21, Roy Marples wrote: <br> <br>> What you would do is open a route socket, then call getifaddrs and= then listen on the route socket for new interfaces. <br>>=20 <br>> Then you can maintain a list of current vlans and take action acco= rdingly. <br> <br>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. <br>Efficiently and scalable. Not making thousands of reads (syscalls) from= routing sockets <br>and not syncing with the kernel. <br> <br>Eugene <br> <br></div></blockquote></div></div></div></div><br></body></html> ------=_Part_1231041_886273848.1698511382087--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18b772ae647.bd4beee8172897.5493704673952375764>