From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4830 Path: news.gmane.org!not-for-mail From: Justin Cormack Newsgroups: gmane.linux.lib.musl.general Subject: Re: if_nameindex/getifaddrs and dhcpcd issue Date: Tue, 8 Apr 2014 11:07:47 +0100 Message-ID: References: <20140408111147.5f79729f@ncopa-desktop.alpinelinux.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1396951686 31945 80.91.229.3 (8 Apr 2014 10:08:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2014 10:08:06 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4834-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 08 12:08:01 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 1WXSwi-00077B-DY for gllmg-musl@plane.gmane.org; Tue, 08 Apr 2014 12:08:00 +0200 Original-Received: (qmail 15647 invoked by uid 550); 8 Apr 2014 10:07:59 -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 15639 invoked from network); 8 Apr 2014 10:07:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=specialbusservice.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=EU9ESB2V6Y4geJDAuY0rzzK/XfEvm2jdkJ5NOa8BrGI=; b=CUR0hFqjDHX4YFHGqQVzqoBtH3Ecy4DkZn5lOkW6aPdvdhvRc1T9hMTcNxtTslgrKR nvZDEXQL0Uvd3UQoJJHmd0xhaFyjma5BAlVsGPeI0Fp4dSC+nkBE/Jk0/ygQrakaMtkq vfhQA6ZP1TNTk2agkEfUAvwq4IqStdkKyp34M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=EU9ESB2V6Y4geJDAuY0rzzK/XfEvm2jdkJ5NOa8BrGI=; b=a1ET06NCt8mcbzLB0RPkPM/za4P0zmRfe9KmAHcUqWPDmK+NXf8SyPDz4JZEELtTGh RUPgo8R4o7DpCXg0J3jNQOIN/JKeYW0B2q7IuMa9RSmj4rWQkAV/u8xKVY0GkY7b7OaC aWdLgfMl0qmhAl+bOlJ9miYYKo1hi0WiHbSMEd3KS77G57h9tOJPNYhQ6BxWdyOvQ+Zh TQvUK3L3ga+JKStlIz8gOiLugYHeUM/+2fKypaiwFB3FM7ehNO8E9mKmJN74hOPfXJhE mdwkrnII6p1u0uF3RGxjvJPOqXf9Cmk/lvwEa3UwUTwepyAA6wwPEF0F3T/C21NPOYlO GYuQ== X-Gm-Message-State: ALoCoQmveJZRpEYsZwzNFj22dboobDaZzok7MhGnKsCzHD5p3xqkBuCFtq83tTe5hdBtct4BO9Gw X-Received: by 10.182.196.3 with SMTP id ii3mr2456500obc.11.1396951667353; Tue, 08 Apr 2014 03:07:47 -0700 (PDT) In-Reply-To: <20140408111147.5f79729f@ncopa-desktop.alpinelinux.org> Xref: news.gmane.org gmane.linux.lib.musl.general:4830 Archived-At: On Tue, Apr 8, 2014 at 10:11 AM, Natanael Copa wrote: > (snip) I am not sure that it is appropriate that a netlink implementation, which is the only way to do the enumeration correctly in the potential absense of /proc, should go into Musl. I would be more inclined to implement a new library to do netlink stuff that provides compatible interfaces (you could use libnetlink too). The glibc implementation is 723 lines of code, and it is probably hard to make the implementation a lot smaller, but you could make a full netlink library in not much more as it is complicated but uniform (I wrote a partly complete one in 1000 lines of Lua). However I can see no reason why dhcp on a specified interface needs to enumerate interfaces at all, and it only needs to read ipv4 addresses, unless it is implementing dhcp6 too, maybe it does now. Again dhcp6 needs netlink, the Musl ipv6 parts for getifaddrs already use /proc which is definitely unreliable for early boot config in a distro in my view. Justin