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> Thu, 07 October 2021 18:42 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 287FB3A0896 for <cbor@ietfa.amsl.com>; Thu, 7 Oct 2021 11:42:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 35E-PyeU6CYD for <cbor@ietfa.amsl.com>; Thu, 7 Oct 2021 11:42:11 -0700 (PDT)
Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 15AE93A0D23 for <cbor@ietf.org>; Thu, 7 Oct 2021 11:42:10 -0700 (PDT)
X-IronPort-AV: E=McAfee;i="6200,9189,10130"; a="206455376"
X-IronPort-AV: E=Sophos;i="5.85,355,1624345200"; d="scan'208";a="206455376"
Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 11:42:09 -0700
X-IronPort-AV: E=Sophos;i="5.85,355,1624345200"; d="scan'208";a="458894494"
Received: from hnandak1-mobl.amr.corp.intel.com (HELO tjmaciei-mobl5.localnet) ([10.209.114.147]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 11:42:09 -0700
From: Thiago Macieira <thiago.macieira@intel.com>
To: cbor@ietf.org
Date: Thu, 07 Oct 2021 11:42:09 -0700
Message-ID: <2283051.vNV1qas7Uu@tjmaciei-mobl5>
Organization: Intel Corporation
In-Reply-To: <4397.1633631514@localhost>
References: <163344085669.17315.998599560097016034@ietfa.amsl.com> <MWHPR1101MB222228806BD87376FC6CC290B5B19@MWHPR1101MB2222.namprd11.prod.outlook.com> <4397.1633631514@localhost>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/nAzOvQ4hcF28XWrMb2AwQGrleYQ>
Subject: 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))
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: Thu, 07 Oct 2021 18:42:17 -0000

On Thursday, 7 October 2021 11:31:54 PDT Michael Richardson wrote:
>     > - Is "false" for a prefix length a better choice than using either -1
>     > or null?
> We've gone for null.

false, null, 0, -1 and an empty string all have the same length and meaning 
for interfaces indices and names. Null makes the purpose clear (information 
absent) and the distinction between that and 0 might be important somewhere.

Like C++ std::optional<PointerType>: a disengaged optional is different from a 
an engaged optional containing a null pointer. One of those may convey "an 
error occurred" whereas the other says "success, information not applicable". 
Though I'd suggest using undefined for errors in CBOR, instead of null. So 
maybe a null interface is "valid, but missing", an undefined interface is 
"invalid, error" and a zero/empty interface is "not applicable in this 
context" (such as all non-link-local cases).

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