Re: [Cbor] Supporting IPv6 Link-Local with scope (was Re: Éric Vyncke's Discuss on draft-ietf-cbor-network-addresses-09: (with DISCUSS and COMMENT))

Thiago Macieira <thiago.macieira@intel.com> Wed, 06 October 2021 15:06 UTC

Return-Path: <thiago.macieira@intel.com>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 33E143A1D51 for <cbor@ietfa.amsl.com>; Wed, 6 Oct 2021 08:06:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.895
X-Spam-Level:
X-Spam-Status: No, score=-1.895 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6JLl3GX_6skc for <cbor@ietfa.amsl.com>; Wed, 6 Oct 2021 08:06:17 -0700 (PDT)
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1BC233A1D4C for <cbor@ietf.org>; Wed, 6 Oct 2021 08:06:15 -0700 (PDT)
X-IronPort-AV: E=McAfee;i="6200,9189,10129"; a="225906727"
X-IronPort-AV: E=Sophos;i="5.85,352,1624345200"; d="scan'208";a="225906727"
Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2021 08:06:14 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.85,352,1624345200"; d="scan'208";a="712978330"
Received: from irsmsx605.ger.corp.intel.com ([163.33.146.138]) by fmsmga006.fm.intel.com with ESMTP; 06 Oct 2021 08:06:11 -0700
Received: from tjmaciei-mobl5.localnet (10.251.18.211) by IRSMSX605.ger.corp.intel.com (163.33.146.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 6 Oct 2021 16:06:10 +0100
From: Thiago Macieira <thiago.macieira@intel.com>
To: <cbor@ietf.org>
Date: Wed, 6 Oct 2021 08:06:07 -0700
Message-ID: <22079392.Pxy2DhZOLy@tjmaciei-mobl5>
Organization: Intel Corporation
In-Reply-To: <1fcf3889-57d1-83f5-2913-51ae9155130b@gmail.com>
References: <163344085669.17315.998599560097016034@ietfa.amsl.com> <24367.1633460118@localhost> <1fcf3889-57d1-83f5-2913-51ae9155130b@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-Originating-IP: [10.251.18.211]
X-ClientProxiedBy: fmsmsx603.amr.corp.intel.com (10.18.126.83) To IRSMSX605.ger.corp.intel.com (163.33.146.138)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/WmqruzPCnLUZwxvEK3tyZkMAMbc>
Subject: Re: [Cbor] =?utf-8?q?Supporting_IPv6_Link-Local_with_scope_=28was_Re?= =?utf-8?q?=3A_=C3=89ric_Vyncke=27s_Discuss_on_draft-ietf-cbor-network-add?= =?utf-8?q?resses-09=3A_=28with_DISCUSS_and_COMMENT=29=29?=
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Oct 2021 15:06:22 -0000

On Tuesday, 5 October 2021 17:44:45 PDT Brian E Carpenter wrote:
> Correct, but the name can also change (I forget the magic command on Linux,
> but it exists). In socket calls such as connect() you need the interface
> index, and the conversion from interface id to interface index is a bit
> system-dependent but typically involves getaddrinfo(). The only safe
> assumption is that they're both dynamic, but which you need depends on
> the exact use case.

Actually, the front-end API is if_nametoindex(). The low-level one involves 
either a SIOCGIFINDEX or open a netlink socket and querying with RTM_GETLINK.

> I suggest that we should be able to support both formats. Since CBOR is
> typed, that's easy enough.

Agreed. That avoid a conversion that might need to be undone on the other 
side. The other side may want to display something to the user and therefore 
may want to have the "nice" interface name.

Not that "wlp0s20f3" is nice, for me. I've had this laptop for 3 months and 
have yet to memorise that.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering