Re: [Cbor] GRASP packet header extensions (CBOR question)
Carsten Bormann <cabo@tzi.org> Fri, 19 August 2022 18:56 UTC
Return-Path: <cabo@tzi.org>
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 0D34BC14F742; Fri, 19 Aug 2022 11:56:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.905
X-Spam-Level:
X-Spam-Status: No, score=-1.905 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham 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 XP57gVeJIe9G; Fri, 19 Aug 2022 11:56:43 -0700 (PDT)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::15]) (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 565AFC14F73A; Fri, 19 Aug 2022 11:56:40 -0700 (PDT)
Received: from [192.168.217.149] (p5089abf5.dip0.t-ipconnect.de [80.137.171.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4M8WFH6Z31zDCc0; Fri, 19 Aug 2022 20:56:35 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <Yv+miC76QMc887cJ@faui48e.informatik.uni-erlangen.de>
Date: Fri, 19 Aug 2022 20:56:35 +0200
Cc: anima@ietf.org, cbor@ietf.org
X-Mao-Original-Outgoing-Id: 682628195.46153-f16c89a8f905631c0932e8b688859125
Content-Transfer-Encoding: quoted-printable
Message-Id: <A303E7B3-A83F-4B04-9C6F-5143E4A0B54D@tzi.org>
References: <Yv+miC76QMc887cJ@faui48e.informatik.uni-erlangen.de>
To: Toerless Eckert <tte@cs.fau.de>
X-Mailer: Apple Mail (2.3608.120.23.2.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/OEPn-FE9OPldk4mXx8J-fHTI1-M>
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 18:56:48 -0000
> In GRASP (RFC8990] we define the GRASP message structure as follows: > > message-structure = [MESSAGE_TYPE, session-id, ?initiator, *grasp-option] > > MESSAGE_TYPE = 0..255 > session-id = 0..4294967295 ; up to 32 bits > grasp-option = any > > Then we've defined a few MESSAGE_TYPEs of which the one we are primarily > interested in now is: > > flood-message = [M_FLOOD, session-id, initiator, ttl, > +[objective, (locator-option / [])]] > > (its also the most difficult one). > > objective = [ objective-name, objective-flags, loop-count, ?objective-value ] > objective-name = text > objective-value = any > […] > So now the question is how we want to generically as possible extend the header. > Our specific first goal is a signature extension, but hopefully we don't > need to discuss this here (in this thread), as its not a CBOR/CDDL encoding question. > > Brians suggestion, if i understand him right would be something like this: > > EXTENSION_TYPE = 0..255 There is no reason to limit this to 255. ➔ EXTENSION_TYPE = uint (Do you plan to creat a registry for these? > grasp-extension = [ EXTENSION_TYPE, *any ] This is of course possible. CBOR also has tags, which might be a more natural structure. > 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. > > 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. > - 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]). [1]: https://www.rfc-editor.org/rfc/rfc8610.html#appendix-A There is no point in mixing grasp-extension up with the wild card grasp-option. Grüße, Carsten
- [Cbor] GRASP packet header extensions (CBOR quest… Toerless Eckert
- Re: [Cbor] GRASP packet header extensions (CBOR q… Carsten Bormann
- Re: [Cbor] GRASP packet header extensions (CBOR q… Toerless Eckert
- Re: [Cbor] GRASP packet header extensions (CBOR q… Brian E Carpenter
- Re: [Cbor] GRASP packet header extensions (CBOR q… Carsten Bormann
- Re: [Cbor] GRASP packet header extensions (CBOR q… Brian E Carpenter
- Re: [Cbor] GRASP packet header extensions (CBOR q… Toerless Eckert
- Re: [Cbor] [Anima] GRASP packet header extensions… Carsten Bormann
- Re: [Cbor] GRASP packet header extensions (CBOR q… Brian E Carpenter
- Re: [Cbor] [Anima] GRASP packet header extensions… Brian E Carpenter
- [Cbor] CDDL sockets (was: Re: [Anima] GRASP packe… Toerless Eckert
- Re: [Cbor] [Anima] GRASP packet header extensions… Toerless Eckert
- Re: [Cbor] CDDL sockets (was: Re: [Anima] GRASP p… Derek Atkins
- Re: [Cbor] [Anima] CDDL sockets (was: Re: GRASP p… Toerless Eckert
- Re: [Cbor] CDDL sockets (was: Re: [Anima] GRASP p… Carsten Bormann
- Re: [Cbor] [Anima] CDDL sockets (was: Re: GRASP p… Toerless Eckert
- Re: [Cbor] [Anima] CDDL sockets (was: Re: GRASP p… Carsten Bormann
- Re: [Cbor] [Anima] GRASP packet header extensions… Brian E Carpenter