Re: [Cbor] GRASP packet header extensions (CBOR question)

Toerless Eckert <tte@cs.fau.de> Fri, 19 August 2022 21:00 UTC

Return-Path: <eckert@i4.informatik.uni-erlangen.de>
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 7090CC14CF00; Fri, 19 Aug 2022 14:00:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.66
X-Spam-Level:
X-Spam-Status: No, score=-1.66 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=no autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Sunn9Priyx7k; Fri, 19 Aug 2022 14:00:41 -0700 (PDT)
Received: from faui40.informatik.uni-erlangen.de (faui40.informatik.uni-erlangen.de [131.188.34.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 42C1EC14F736; Fri, 19 Aug 2022 14:00:40 -0700 (PDT)
Received: from faui48e.informatik.uni-erlangen.de (faui48e.informatik.uni-erlangen.de [IPv6:2001:638:a000:4134::ffff:51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by faui40.informatik.uni-erlangen.de (Postfix) with ESMTPS id C30A1549EE5; Fri, 19 Aug 2022 23:00:36 +0200 (CEST)
Received: by faui48e.informatik.uni-erlangen.de (Postfix, from userid 10463) id B57B44EB7D4; Fri, 19 Aug 2022 23:00:36 +0200 (CEST)
Date: Fri, 19 Aug 2022 23:00:36 +0200
From: Toerless Eckert <tte@cs.fau.de>
To: Carsten Bormann <cabo@tzi.org>
Cc: anima@ietf.org, cbor@ietf.org
Message-ID: <Yv/59Nqh72iIVf+f@faui48e.informatik.uni-erlangen.de>
References: <Yv+miC76QMc887cJ@faui48e.informatik.uni-erlangen.de> <A303E7B3-A83F-4B04-9C6F-5143E4A0B54D@tzi.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <A303E7B3-A83F-4B04-9C6F-5143E4A0B54D@tzi.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/oV68rZjxAF_2JcQTTiOR2D-2xFs>
Subject: Re: [Cbor] GRASP packet header extensions (CBOR question)
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.39
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: Fri, 19 Aug 2022 21:00:43 -0000

On Fri, Aug 19, 2022 at 08:56:35PM +0200, Carsten Bormann wrote:
> > EXTENSION_TYPE = 0..255
> 
> There is no reason to limit this to 255.

Agreed. I just copied from MESSAGE_TYPE in GRASP.

> ➔ EXTENSION_TYPE = uint
> 
> (Do you plan to creat a registry for these?

Probably we should. Typical subdivision into stds. action, FCFS and experimental use at your own risk ranges..

> > grasp-extension = [ EXTENSION_TYPE, *any ]
> 
> This is of course possible.
> CBOR also has tags, which might be a more natural structure.

Right. Wonder what the difference would be.

> > grasp-option /= grasp-extension
> 
> This doesn’t make sense: grasp-option already is any, so adding alternatives is not going to have any effect.
> Why are you using grasp-option here in any case?
> You should be using your grasp-extension right away.

Right. I bring this up as a question at the end

> > flood-message = [M_FLOOD, session-id, initiator, ttl,
> >                +[objective, (locator-option / [])], *grasp-option ]
> 
> ➔ flood-message = [M_FLOOD, session-id, initiator, ttl,
>                +[objective, (locator-option / [])], *grasp-extension ]
> > […]
> > Questions:
> > 
> > - Is it ok. to expect the analysis to have to do two steps (e.g.: A1, A2 or B3, B4)
> >  to decide whats' next (i called that lookahead in another mail thread).
> 
> I don’t understand the question.  To find the end of +[objective, …], you look for the first element of the [M_FLOOD, …] array that doesn’t match the structure [[text…]…] that each of +[objective…] resolves to.

That pretty much what i was trying to detail in my explanation.
Aka: Do wee consider it to be "ok" to to a "doesn’t match the structure [[text…]…] "
as you so nicely summarize.

Aka: What type of matches do we think is not too complex (lookahead or whatever one wants to call it).

> > - does "grasp-option /= grasp-extension" work.
> 
> It sure “works”, but doesn’t do anything.
> 
> > I ask because previously grasp-option
> >  was "any", so logically i am not sure if CDDL expect to pick the alternative that
> >  is more specific,
> 
> No; choices are tried in sequence (“prioritized choice" [1]).

Ah!. So i would have to write:

  grasp-option = grasp-extension / any

I was afraid i would have to find a pattern that represents any without grasp-extension..

> There is no point in mixing grasp-extension up with the wild card grasp-option.

But how then would i be able to define my example C), where i have an unknown (any) list
element, and i want to make it clear in CBOR that that is still a valid M_FLOOD message,
even though there are list element(s) that are neither objectives nor well-defined extensions -
but just some stuff someone in a future spec did introduce.

Cheers
    Toerless

> Grüße, Carsten
> 

-- 
---
tte@cs.fau.de