Re: [Cbor] GRASP packet header extensions (CBOR question)
Brian E Carpenter <brian.e.carpenter@gmail.com> Fri, 19 August 2022 21:05 UTC
Return-Path: <brian.e.carpenter@gmail.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 DCE0BC14F749; Fri, 19 Aug 2022 14:05:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.107
X-Spam-Level:
X-Spam-Status: No, score=-2.107 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, RCVD_IN_DNSWL_NONE=-0.0001, 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
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 dmp1A5SgOn2D; Fri, 19 Aug 2022 14:05:56 -0700 (PDT)
Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 42FA8C14F720; Fri, 19 Aug 2022 14:05:56 -0700 (PDT)
Received: by mail-pf1-x434.google.com with SMTP id y15so1350826pfr.9; Fri, 19 Aug 2022 14:05:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=EmZuxIisuL3ILp1tTHARqfOCrumGvf6AJpNgdvRcZNU=; b=bFdJeXl2jRuIHcx5GZzg6vlBONEB7/1pKFxkQwNcQvEHSn6Rg+eIWDjBR3Fslgu9o5 jAYtp4fz4JUi81mvUfDKCycIjnocCDOOf01ZNwvjqPzzBqqaft+0R+aJq5mhNUTvw7+P MBOVtpqbxt2F06FHQUfUBO+/mCg7Zz9RHE7hUdamBGr6Nl1a4HfZOB2B70lRz+4QuQvD 3+Tqe8GH0aw0hyCq8xN/m6ZMRwOYa20ZFBf1YTfiJr1cYJSmCMu8JcscyuKs2xnPWy03 hAWIy6qWqozDa/29SnBIMKHF6Lk3FmR1KeJYR6bQjzn7aizdXMkTph9R400QMkYidiuL Puiw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=EmZuxIisuL3ILp1tTHARqfOCrumGvf6AJpNgdvRcZNU=; b=vpGeePhhbMLI1kFh2D5ajp2ygtx2Wpiv4SzKlK8YOrJmpyhNwtufxtr2rEWjURC8vy 1gEB3YPGvzQ0mUVm0WsI7SBigDCjeJ98T2Cm5MUJY+bQmuAh+qnGktStgt9QjoiMQUMo HiHChD3ZLBAoRkCWR9qNlCZoB41Zr6+MhCaiAqwm6P/Y6sMHQV4yE2KfQQfTIxIZogVN +edvfy1mNHcD4/X3XjdyBYfDfRko/PdGal8ZXWybiqupUCF1R9e9VZopl8n0K1BhxWZ8 lBiatMU0NAHPGIdkfti8BvBGdeVOqrghdctzzpj8urhZIIxhxfvJF9cOx6xxXT1vfo2A QYoQ==
X-Gm-Message-State: ACgBeo2kdRpvFKhLE2QSNAu00cByODAWE/85AUZntiNJYopCiL1QfANz iiuyx9jR/xQDHcpVg5NKI1g=
X-Google-Smtp-Source: AA6agR58ybcca4Z/hukILP8LPyxhY0vWKzP/Vih2JkV5ZPOE9QhKkVA+Gdh+0IaDIzCtljnXuL48+A==
X-Received: by 2002:aa7:8896:0:b0:52e:7cba:ffd8 with SMTP id z22-20020aa78896000000b0052e7cbaffd8mr9699264pfe.82.1660943155750; Fri, 19 Aug 2022 14:05:55 -0700 (PDT)
Received: from ?IPV6:2406:e003:1124:9301:80b2:5c79:2266:e431? ([2406:e003:1124:9301:80b2:5c79:2266:e431]) by smtp.gmail.com with ESMTPSA id 79-20020a621552000000b0052ddccd7b64sm3802441pfv.205.2022.08.19.14.05.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Aug 2022 14:05:55 -0700 (PDT)
Message-ID: <5fa4a9c7-bc0a-cba0-04fb-4cf5e7777c9e@gmail.com>
Date: Sat, 20 Aug 2022 09:05:51 +1200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0
Content-Language: en-US
To: Carsten Bormann <cabo@tzi.org>, Toerless Eckert <tte@cs.fau.de>
Cc: anima@ietf.org, cbor@ietf.org
References: <Yv+miC76QMc887cJ@faui48e.informatik.uni-erlangen.de> <A303E7B3-A83F-4B04-9C6F-5143E4A0B54D@tzi.org>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
In-Reply-To: <A303E7B3-A83F-4B04-9C6F-5143E4A0B54D@tzi.org>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/YadUbErp_7mJB67oepyBV7ugbBQ>
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:05:59 -0000
On 20-Aug-22 06:56, Carsten Bormann wrote: >> 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? The 'extension_type' terminology is confusing, because these would be new GRASP options, and they already have a registry. > >> 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. IMHO there is no need to use 'extension' at all. > >> >> 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. As I've already said off list, there is no issue in decoding because CBOR delivers the type as well as the value. If the first item is a string, we've found a GRASP objective. If it's an integer, we've found a numeric option. Anything else, it's an error. Brian > >> - 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 mailing list > CBOR@ietf.org > https://www.ietf.org/mailman/listinfo/cbor
- [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