From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: Getting local IP addresses from emacs Date: Fri, 08 Nov 2019 22:22:32 +0100 Message-ID: References: <87imnu5cif.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="20081"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 08 22:23:27 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iTBj4-00057C-G7 for ged-emacs-devel@m.gmane.org; Fri, 08 Nov 2019 22:23:26 +0100 Original-Received: from localhost ([::1]:60652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTBj3-0003Lf-83 for ged-emacs-devel@m.gmane.org; Fri, 08 Nov 2019 16:23:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57753) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTBiH-0003JO-1z for emacs-devel@gnu.org; Fri, 08 Nov 2019 16:22:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iTBiG-0004bi-2L for emacs-devel@gnu.org; Fri, 08 Nov 2019 16:22:36 -0500 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:36139) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iTBiF-0004bI-Sw for emacs-devel@gnu.org; Fri, 08 Nov 2019 16:22:36 -0500 Original-Received: by mail-wm1-x32b.google.com with SMTP id c22so7635914wmd.1 for ; Fri, 08 Nov 2019 13:22:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version; bh=wi0xRzRLbdnMQqt+ykZIo0Au2G+RMsIxQOgxO6RH338=; b=pihgq89qgoGmXHMo+wY7xAUbidCCHikpoBxzdsHTXTxENb2AV76+xLzanmc94WWml4 SuVD10m49oVrgsh1o50dDZl5qqtyh3Bp/C0CLzDT5Uc1m7KISSbF448tzCwMzyO+Gc4m jeXGnHyi9l7xkC5IT9jBPQhxpYCAdRGGhVan0T+e4axjMfHL7Ip+M+39hyO+XRAOdmXT 2nuFGl0LaAOtSwX4/xeX3CbT4g999MRYCbm+frZp4/zmXWKT5YF/Nlh7xXl+yRDrOjOf Jj22bIctSoM2wFqT5nUqaQgenPx0PUBaHz3q3tlnCgfDFPJ1CYpW36Gncp6DXlUqgiOV F+hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=wi0xRzRLbdnMQqt+ykZIo0Au2G+RMsIxQOgxO6RH338=; b=c4PZ6l7DEzYGX0YQd8GlRdkPcAW6GK8+4tnzi0rwneSPFPfGhSwxGEQkDo4eFfIreP tOlQjfR+sIJDD6rlCC4m5UCuL1tMHCxroWj66VERalD0l709PaeH6AcahS9a8JBAhUFH aloVc7EFLOQAsnjSwAZJ3F04FJho2Bh+zexJ00T42UpWvtfJC/Bo96nbK21W2bs89fz3 yFTct76QY57nybNazDwEObxjQ3v4KafXJrJZ51QyYlaQczGwCIDdGwe0cxvB2b5Vl2Is 2+IJLAN9++ehSPY0+aq1hGIobhsRSp8nmX9UfyiJUrmNwublEJek4KLfsxN8dKOSETna 1I0Q== X-Gm-Message-State: APjAAAV6dTL9vrqCNome5I0agZEN8Sgj6smHHHCURdUC4EoUEfcY1nfT 9QUKVOTBHdUNMYCrNtEaaWvuQcaV X-Google-Smtp-Source: APXvYqy2E2iSLhTIgMCCLJodMlXE80qoqYT6SyZmouwCCeG/WHDzmhkZbDC/1q0UINtdHTtl+eWzWw== X-Received: by 2002:a1c:96c9:: with SMTP id y192mr10511782wmd.8.1573248154195; Fri, 08 Nov 2019 13:22:34 -0800 (PST) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:a9a5:5569:1a7e:61f4]) by smtp.gmail.com with ESMTPSA id t29sm9939925wrb.53.2019.11.08.13.22.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 13:22:33 -0800 (PST) Gmane-Reply-To-List: yes In-Reply-To: <87imnu5cif.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 08 Nov 2019 21:39:04 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:242005 Archived-At: >>>>> On Fri, 08 Nov 2019 21:39:04 +0100, Lars Ingebrigtsen said: Lars> Robert Pluim writes: >> I was thinking of reworking 'network-interface-list' to use >> 'getifaddrs' instead of the ioctls it does now, which would get all >> the interfaces, and (optionally) return the netmask/broadcast >> info. Lars> Sounds like a good idea to me. >> The only issue there is that the returned interface names would >> no longer be unique. Lars> Under what circumstances wouldn't the names be unique? You get one entry per address, but the name is always that of the underlying interface, so on your typical IPv4/v6 dual stack machine you get stuff like: ("lo0" . [0 0 0 0 0 0 0 1 0]) ("lo0" . [127 0 0 1 0])