From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id eFTWEaijTmBeIwAA0tVLHw (envelope-from ) for ; Mon, 15 Mar 2021 00:00:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id EM6lDaijTmClTAAA1q6Kng (envelope-from ) for ; Mon, 15 Mar 2021 00:00:40 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EC1FF20A2C for ; Mon, 15 Mar 2021 01:00:39 +0100 (CET) Received: from localhost ([::1]:41960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLaf0-0007A2-Oa for larch@yhetil.org; Sun, 14 Mar 2021 20:00:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLaec-00078O-2Y for guix-devel@gnu.org; Sun, 14 Mar 2021 20:00:14 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:35330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLaeZ-0000E7-5x for guix-devel@gnu.org; Sun, 14 Mar 2021 20:00:13 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id fa1e9f63; Mon, 15 Mar 2021 00:00:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=7HLWInJl0onX hWf2tfAiY12D2Xh+LTzY6y4r5A7dOXQ=; b=PxyBy0vB9LO4V45RJrnVzMI3yYNH 98w2Yl26VizwxBsum3/mGj0OeSt52mHwaLmIBfxHrdTCfv96ojVxTGIKuKitee+7 Co6qt7XGmkAu7j6TgmkxE/mtN4/S34o/GPvGEaW59Qs4eO3ig+3Fs73g4xyPBRue 3RbaMI8WQPG/kFmrqQyDRyFMpVkpjvMHbYSjeSmL5R7K682097c3GQXPhwXKv4Ru YEhO2sHCZi+CmxcJuq1DcwOcfxhtxrpSdTgYdH3xbug//nwxAh9oFW43Eo2WIfMR XtN5sAt7Yv/8WemKD5JxZ6/z8WcuN4RkLLH1NVyovnFu4NBCvW6qOmZbEg== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id da6216e7 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 15 Mar 2021 00:00:06 +0000 (UTC) Date: Mon, 15 Mar 2021 00:59:50 +0100 From: Julien Lepiller To: Vladimir Sedach Subject: Re: Guile Netlink 1.0 released Message-ID: <20210315005950.69d7b933@tachikoma.lepiller.eu> In-Reply-To: <878s6pl48q.fsf@t510.orion.oneofus.la> References: <20210314203110.207ed0ca@tachikoma.lepiller.eu> <878s6pl48q.fsf@t510.orion.oneofus.la> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615766440; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=q3ukit1E7JONaxBRrxyQ8Kt6Yq5yai/0oWf7rxj7vkY=; b=iJJMvdf89ausnL9BaK+af1dFQe6RGh3aO1zdAaSyRdv5WxLwbwf5TEDRQKMKBJ2yuyNgsX 6CW9uGxG4EHboE6iJ9nyiebGzlb95qk8klMDlHVBbScmWQFNLXFsZH6OlDx9NQW2VYKJBR p7x7Uf37EjoDgALXj/C/0/LIzLE06PISPuZIe7g9l37XPZwPJbUTBzpHkvM9pD9i/zASIX caqADxx51ImtFxb+5U/JWK1fkRi+54MceXl6HNOx5i/eV7TX4j+YgvkEB3Wu2qHn+X7YzH L/YLDOOOV2cdu23u326p0coGuLGJn3BZ27orMK+WFgmX6Bsk6LfADnG/krZ2og== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615766440; a=rsa-sha256; cv=none; b=X/59ssB98SX5lqomUxwVqKUyaJEqkUV7n1GcYPtaEdnGdvS9A0ZfWUxoncwKdwYdz4W51W k1C9B3IrnqvX7zrd6tBnVN1ovJaO9PBLF+JNxGdUvmftNXa3CSRJDmbuZLgKj3jzN9pFt1 e4x98wYOB+8u0eIZo67CR3ZC9Tio/Glh6J8OK9hizRe1zJBRXCgGgXBojKg1aI2ojj/KTr tzBzFC7bP2xziQEm1BZSuEEazhE8i5gVFHo9BxwjFZIaEdHUnNO+hi29ujGu0mNG+jLhoR Ps+hoJil6GBoTMyVkOAlau57Hx7e+vYT9WO33wOEgxWBZDZvSEzcz4pCS3BPyg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=PxyBy0vB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=PxyBy0vB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: EC1FF20A2C X-Spam-Score: -1.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: 40RF+qsVhyh8 Thanks for the feedback Vincent and Vladimir! Le Sun, 14 Mar 2021 16:12:05 -0700, Vladimir Sedach a =C3=A9crit : > Julien Lepiller writes: > > I'm proud to announce the first release of Guile Netlink! =20 >=20 > This is great! I have been wishing for this for Guile ever since I > started using Guix. Thank you. >=20 > Vincent Legoll writes: > >> (addr-add "enp1s0" "2001:db8::1a4c/64" #:ipv6? #t) =20 > > > > what does the "ipv6?" parameter add ? This could be > > deduced from the address length, no ? =20 >=20 > IPv6 configuration is so different from IPv4 configuration that I > think it should have its own functions, not just a keyword parameter. >=20 > For example, right now you cannot assign multiple static IPv6 > addresses to the same interface (a basic IPv6 task) with > static-networking-service. Putting the conditional logic for IPv4 > versus IPv6 rules inside the same functions is an invitation for more > similar bugs. Trying to dispatch based on parsing the provided string > makes it even more confusing. Dispatching based on a keyword > parameter is not much better, and introduces the possibility of user > error ("I forgot the #:ipv6 keyword"). The high-level API is just a wrapper around the low-level API, and in rtnetlink, the only different between IPv4 and IPv6 is a family parameter in message, namely AF_INET or AF_INET6. Basically, the messages are exactly the same, except that in the IPv6 case, you use IPv6 addresses which obviously take a little bit more space, so I expect the wrappers to work the same. If you want multiple addresses on the same interface, you can simply call addr-add multiple times, one per address, and that has nothing to do with whether it is IPv6 or IPv4 (you can have multiple IPv4 addresses on the same interface). I don't think there's any reason why the procedures should be separate between IPv4 and IPv6. I like the idea of deducing IPv4 vs IPv6 from address format (not length though, as that may vary and overlap. After all, 1.1 and ::1 are valid IPv4 and IPv6 addresses of the same length ;)). But simply detecting a dot vs a colon should work well. I've always been bothered by "ip" vs "ip -6". I don't really like the idea of having to separate the address and prefix len, simply because this is the notation used by iproute2. It's also easier for consumers of the API: you pass a string that contains all the information, and don't really have to care. >=20 > -- > Vladimir Sedach > Software engineering services in Los Angeles https://oneofus.la