Re: [Cbor] I-D Action: draft-ietf-cbor-network-addresses-04.txt

Brian E Carpenter <> Sun, 25 April 2021 21:12 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C87A33A103C; Sun, 25 Apr 2021 14:12:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id ITQ0kz8K57AC; Sun, 25 Apr 2021 14:12:32 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4864:20::630]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 771C83A103A; Sun, 25 Apr 2021 14:12:32 -0700 (PDT)
Received: by with SMTP id g16so10986869plq.3; Sun, 25 Apr 2021 14:12:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HJ0+l7gQn64dYW9XkdG1+2WkbNdYSAUovAqsre8/Ydg=; b=V0Jc7U8H6dkXLEWlLATjVUKgajJkqnESTrmANbGL61zi8rbKQrksc0sqbXnA43A1rq d5F9Lj2x+wuMDNbnRYEjey+uoSKwdxRb74AjuScapd6X9/N/QgsFWDerMD7mk4dUfkTH SJDJIUlDXIS2OLuxG+le6ksSB3HtWiIwhIZLlel3MEnPy75udZojPefMlvqlJF6lGfxf +Xc2+wTNd31MXd/hUmGZoXxnhFfgRksJYiqqKMb68s2Ia8B7fniQb8NMOVHDDXbZkzUC K2NTUkMXZ1AOYS0uOLHxxnfav17G25l5RLDAQE5lnkkmAAX2DpHR8FUqH13aWf/6TS9f 5H3g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HJ0+l7gQn64dYW9XkdG1+2WkbNdYSAUovAqsre8/Ydg=; b=UCM222SMrFSj/qCco3A3IzEBMaHmf40zjzSwlwfgh8eMgXVUuBcMbX5ySexw3TmCZd tt49b2ieXVuYfXCfCsrsFMCIZBb7TTyUDl1NqDUFaiDL43XBL+gSI23Yp/uqGydhuxBL lfYo3fRMyI8GnaVq7MNBYLIH8yswyDAQ+HWs26Hs/BAKegitIdPmAmJ/2y3rxgwROJox VmhgNgXfwd3oE/m7ooxWSh7z/53YXu3KPiLMAnlkp86Ow1MQPxTBGn7wftUKpUBOZGSd w5b5sVY9FBlYyLS+AAHRGg9utI4XMH+Nv2U6wYrke8pe3xssFU1IMJ9jMAIozXXhHbHL nCcg==
X-Gm-Message-State: AOAM533RuOOmocqJ4dmw9lBh0yIUWW2rPvSEH5xa7w1xNFlZ++EEl5HN Cl3wvHIyYhWEHlNb08Tl2+dHC0AWMJkBXQ==
X-Google-Smtp-Source: ABdhPJxezWvecQjvb0mLTdgVDwjXkxl5s+/AUByH6bSbqdrHqm3sWyd5UtiSuYNj3wwsgf9CzFpx/g==
X-Received: by 2002:a17:902:7c17:b029:ec:bfde:23e2 with SMTP id x23-20020a1709027c17b02900ecbfde23e2mr15074008pll.33.1619385150828; Sun, 25 Apr 2021 14:12:30 -0700 (PDT)
Received: from [] ([]) by with ESMTPSA id 23sm9533124pgo.53.2021. (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Apr 2021 14:12:30 -0700 (PDT)
To: Carsten Bormann <>, Ole Troan <>
Cc: Michael Richardson <>,,
References: <12496.1619216560@localhost> <> <>
From: Brian E Carpenter <>
Message-ID: <>
Date: Mon, 26 Apr 2021 09:12:24 +1200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1
MIME-Version: 1.0
In-Reply-To: <>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
Archived-At: <>
Subject: Re: [Cbor] I-D Action: draft-ietf-cbor-network-addresses-04.txt
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 25 Apr 2021 21:12:37 -0000

On 26-Apr-21 03:30, Carsten Bormann wrote:
>> - for 261 I would at least include those arguments and make it clear when to use or the other
> Sounds good to me.
>> - so you don’t want to support the commonly used shortcut of specifying both and address and a prefix in one?
> That is a valid point.
> But I think the data should indicate whether they are just a prefix or an address and a prefix.
>> - in ip agnostic code I often find I just need an IP address instead of having to care if it’s 4 or 6. It would therefore be nice with a general IP address and ip prefix type too. 

This is very dependent on the context where you are using the address. Sometimes you need to be address-family independent and sometimes not. It can also be programming-language dependent. And it can be API dependent (who are you passing the address to?). So I think this will have to be handled by the parser of the decoded CBOR, not by the CBOR tagging.
> If I understand this right, we already have that.  One type with two different tags…

Yes, and how you cast it into a particular language's type(s) is not a CBOR issue.

> (CBOR doesn’t have “types” [except for the “major types” on the representation level].  You are free to construct your own types in your implementation, e.g. construct a “Boolean” type from “true” and “false”.  In your case, the “IP address and prefix” type would include values with either tag 52 or 54.  We could define recommended CDDL types, like we did in Section 5 of RFC 8746...)

Sure. But in GRASP we ended up with 
  ipv4-address = bytes .size 4
  ipv6-address = bytes .size 16
which wouldn't suit every case. 


> Grüße, Carsten
> --------------------------------------------------------------------
> IETF IPv6 working group mailing list
> Administrative Requests:
> --------------------------------------------------------------------