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

From: Carsten Bormann <[email-masked]>
Date: Wed, 9 Jun 2021 11:29:56 +0200

I just had occasion to check RFC 8992 (should have done that earlier, ouch).

Apart from this nice piece of CDDL, repeated all over the place (yes, the rest is missing each time):

     objective-flags /=          ; as in the GRASP specification

… I find:

     prefval /= pref6val
     pref6val = [version6, length, ?prefix]
     version6 = 6
     length = 0..128             ; requested or offered prefix length
     prefix = bytes .size 16     ; offered prefix in binary format

     prefval /= pref4val
     pref4val = [version4, length4, ?prefix4]
     version4 = 4
     length4 = 0..32             ; requested or offered prefix length
     prefix4 = bytes .size 4     ; offered prefix in binary format

Maybe we should supply some CDDL in draft-ietf-cbor-network-addresses so people don’t start to copy the above whenever they need a prefix.

Grüße, Carsten

---

From: Brian Carpenter <[email-masked]>
Date: Wed, 9 Jun 2021 22:21:09 +1200

You'll note that 8992 is Informational. If it proves useful, I'd be glad to
see it updated, not necessarily compatibly. And yes, +1 to your suggestion.

Regards,
    Brian Carpenter
    (via tiny screen & keyboard)

On Wed, 9 Jun 2021, 21:30 Carsten Bormann, <[email-masked]> wrote:

> Maybe we should supply some CDDL in draft-ietf-cbor-network-addresses so
> people don’t start to copy the above whenever they need a prefix.
>
> Grüße, Carsten
>
> _______________________________________________
> CBOR mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cbor
>

---

From: Carsten Bormann <[email-masked]>
Date: Wed, 9 Jun 2021 13:17:05 +0200

On 9. Jun 2021, at 12:21, Brian Carpenter <[email-masked]> wrote:
> 
> You'll note that 8992 is Informational. If it proves useful, I'd be glad to see it updated, not necessarily compatibly.

I’m just lamenting that I should have paid attention.

Interestingly, the draft was approved with no ART AD review (back in 2017), which is possible for informational: https://datatracker.ietf.org/doc/rfc8992/ballot/
More reason to pay attention earlier.  
(I’m not asking for YANG doctors here: as you said, the document does its job.)

Grüße, Carsten

---

From: Carsten Bormann <[email-masked]>
Date: Wed, 9 Jun 2021 13:18:21 +0200

> Maybe we should supply some CDDL in draft-ietf-cbor-network-addresses so people don’t start to copy the above whenever they need a prefix.

Like this…

start = ipv6-address-or-prefix / ipv4-address-or-prefix

ipv6-address-or-prefix = #6.54(ip-address-or-prefix<128, 16>)
ipv4-address-or-prefix = #6.52(ip-address-or-prefix<32, 4>)

ip-address-or-prefix<L,S> = ip-address<S> / ip-prefix<L, S>

ip-address<S> = bytes .size S
ip-prefix<L, S> = [0..L, bytes .size (uint .le S)]

(I wish we had a .times!  
No I won’t cobble that together out of three .plus — or maybe we should?)

Or, if you like to repeat yourself superfluously saying the same thing twice redundantly again all over:

start = ipv6-address-or-prefix / ipv4-address-or-prefix

ipv6-address-or-prefix = #6.54(ipv6-address / ipv6-prefix)
ipv4-address-or-prefix = #6.52(ipv4-address / ipv4-prefix)

ipv6-prefix = [ipv6-prefix-length, ipv6-prefix-bytes]
ipv4-prefix = [ipv4-prefix-length, ipv4-prefix-bytes]

ipv6-prefix-length = 0..128
ipv4-prefix-length = 0..32

ipv6-prefix-bytes = bytes .size (uint .le 16)
ipv4-prefix-bytes = bytes .size (uint .le 4)

ipv6-address = bytes .size 16
ipv4-address = bytes .size 4

Grüße, Carsten

---

From: Michael Richardson <[email-masked]>
Date: Wed, 09 Jun 2021 10:13:08 -0400

> Maybe we should supply some CDDL in draft-ietf-cbor-network-addresses
    > so people don’t start to copy the above whenever they need a prefix.

I dont object.... but don't we need #include first :-)

---

From: Carsten Bormann <[email-masked]>
Date: Wed, 9 Jun 2021 16:16:37 +0200

> I dont object.... but don't we need #include first :-)

I’m hacking something that would give us an

RFC8992.prefval

but in that specific case that was the variant I wanted to avoid :-)

Grüße, Carsten

---

From: Christian Amsüss <[email-masked]>
Date: Tue, 22 Jun 2021 09:21:25 +0200

> I dont object.... but don't we need #include first :-)

If there are useful CDDL definitions to be had around this, it probably
makes sense either way -- until we have #include people can copy them
out from a standards-track document (rather than the defective CDDL from
the informative 8992), and when there is #include ... I suppose includes
will even work from pre-include documents?

> but in that specific case that was the variant I wanted to avoid :-)

Am I reading this right that you're trying to avoid importing from 8922
but would prefer to import from draft-ietf-cbor-network-addresses?

BR
c

-- 
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom