From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4865 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: if_nameindex/getifaddrs and dhcpcd issue Date: Thu, 10 Apr 2014 03:52:30 -0400 Message-ID: <20140410075230.GN26358@brightrain.aerifal.cx> References: <20140408111147.5f79729f@ncopa-desktop.alpinelinux.org> <20140408152559.124030b1@vostro> <20140408154537.GG26358@brightrain.aerifal.cx> <20140408190807.7dc6b184@vostro> <20140408224112.GH26358@brightrain.aerifal.cx> <20140409071714.GB21662@example.net> <20140409222041.GK26358@brightrain.aerifal.cx> <20140410073251.GM21662@example.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1397116370 32668 80.91.229.3 (10 Apr 2014 07:52:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Apr 2014 07:52:50 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4869-gllmg-musl=m.gmane.org@lists.openwall.com Thu Apr 10 09:52:44 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WY9mt-0008Te-TJ for gllmg-musl@plane.gmane.org; Thu, 10 Apr 2014 09:52:43 +0200 Original-Received: (qmail 19887 invoked by uid 550); 10 Apr 2014 07:52:43 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 19879 invoked from network); 10 Apr 2014 07:52:43 -0000 Content-Disposition: inline In-Reply-To: <20140410073251.GM21662@example.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4865 Archived-At: On Thu, Apr 10, 2014 at 09:40:22AM +0200, u-igbb@aetey.se wrote: > On Wed, Apr 09, 2014 at 06:20:41PM -0400, Rich Felker wrote: > > Does if_nameindex "work" (modulo the issues with it) on BSD linux > > emulation now, and would it fail if we switched to netlink or /proc > > based? This is not necessarily a show-stopper but it would be nice if > > we had a workaround, and it's something where we should have input > > from users running musl binaries on BSD. > > I'm not aware of which of the binaries may be calling if_nameindex. The > ones which are being used continuously are Samba and Coda servers running > on FreeBSD (for the sake of ZFS), their current production versions are > still linked to uclibc. > > Occationally I run "everything" i.e. a whole user environment in the > form of Linux binaries on NetBSD but it will take some time before this > happens and I test if_nameindex there. I think these functions are mainly useful for network-configuration utilities, not general user-facing apps. But I do want to make things work for users who want to run a complete userspace of musl-linked linux binaries on a BSD kernel. At the moment I'm leaning towards a netlink-based approach despite my moderate disgust with the netlink API simply because the alternative (/proc) does not seem as possible as I thought it was; I can't see any way to get a good parsable list of devices, including unconfigured devices and aliases/multi-addresses, from /proc. If somebody knows how and has a proposal for how it could be done, please speak up. Rich