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
[-- Attachment #1 --] 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 [-- Attachment #2 --] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div dir='auto'><div id="message" dir="auto"></div>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.<div dir="auto"><br></div><div dir="auto">That should match your requirements.<br id="br3"><br id="br3"><br id="br3"><div id="signature" dir="auto"><div>Roy Marples<br></div></div><div id="content" dir="auto"><br><div class="zmail_extra_hr" style="border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204); height: 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="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>> <br>> Then you can maintain a list of current vlans and take action accordingly. <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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18b772ae647.bd4beee8172897.5493704673952375764>
