Re: git: 7e5bf68495cc - main - netlink: add netlink support
- In reply to: Alexander Chernikov : "Re: git: 7e5bf68495cc - main - netlink: add netlink support"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 15 Mar 2023 20:05:47 UTC
On Thu, Mar 09, 2023 at 05:45:50PM +0000, Alexander Chernikov wrote: A> > So, really fun thing here, we also have #define NETLINK_GENERIC 0 in sys/net/if_mib.h. (And that’s exposed to userspace, and used there, so we can’t just change that.) A> > A> Wow. Thanks for pointing it out - it wasn’t defined in the kernel headers so I missed it. A> That looks like something FreeBSD-specific. Both NetBSD / OpenBSD doesn’t have it. A> It seem to provide: A> - iteration over the list of the interfaces A> - some basic interface traffic statistics A> - copy of the ’struct ifdata’ (basic interface properties and some interface traffic statistics) A> - Link-specific data (IFDATA_LINKSPECIFIC), not used by anything in base A> - Original “driver name” (IFDATA_DRIVERNAME) A> A> Most of this is already provided by either getifaddr(3) or netlink or even rtsock. I’m thinking of deprecating it in mid-term in favour of Netlink. A> A> I see the following options: A> 1) Remove usage of if_mib.h from ifconfig A> A> 2) Add compat layer: A> *) Rename NETLINK_GENERIC to NET_LINK_GENERIC (which is the right name de-facto) A> *) Add conditional define for NETLINK_GENERIC to if_mib and set it to 16 A> *) Define another tree in if_mib.c under net.link <http://net.link/>.generic16 with value 16 Let's request exp-run with NETLINK_GENERIC removed or renamed to NET_LINK_GENERIC. Very likely deprecating this name would go fairly easy. -- Gleb Smirnoff