Re: [dtn] (no subject)

Felix Walter <felix.walter@tu-dresden.de> Mon, 14 January 2019 09:23 UTC

Return-Path: <felix.walter@tu-dresden.de>
X-Original-To: dtn@ietfa.amsl.com
Delivered-To: dtn@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 300A8130FB5 for <dtn@ietfa.amsl.com>; Mon, 14 Jan 2019 01:23:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.799
X-Spam-Level:
X-Spam-Status: No, score=-2.799 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, RCVD_IN_DNSWL_MED=-2.3, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UnnMfLVeR6Ov for <dtn@ietfa.amsl.com>; Mon, 14 Jan 2019 01:23:42 -0800 (PST)
Received: from mailout6.zih.tu-dresden.de (mailout6.zih.tu-dresden.de [141.30.67.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EBC46130FAE for <dtn@ietf.org>; Mon, 14 Jan 2019 01:23:41 -0800 (PST)
Received: from mail.zih.tu-dresden.de ([141.76.14.4]) by mailout6.zih.tu-dresden.de with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84_2) (envelope-from <felix.walter@tu-dresden.de>) id 1giyT5-0006iA-9z for dtn@ietf.org; Mon, 14 Jan 2019 10:23:39 +0100
Received: from kc85.inf.tu-dresden.de ([141.76.40.104]) by server-40.mailclusterdns.zih.tu-dresden.de with esmtpsa (TLSv1.2:AES128-SHA:128) (envelope-from <felix.walter@tu-dresden.de>) id 1giyT4-0007oi-UI for dtn@ietf.org; Mon, 14 Jan 2019 10:23:38 +0100
To: dtn@ietf.org
References: <CANoKrvZZhzcPXupNTtup8rjJyWA0LevVRwqmn8qijJ3qn4dLEg@mail.gmail.com>
From: Felix Walter <felix.walter@tu-dresden.de>
Openpgp: preference=signencrypt
Organization: Technische Universität Dresden
Message-ID: <a37dca09-a4ca-052c-8234-3dc0abf649e8@tu-dresden.de>
Date: Mon, 14 Jan 2019 10:23:38 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0
MIME-Version: 1.0
In-Reply-To: <CANoKrvZZhzcPXupNTtup8rjJyWA0LevVRwqmn8qijJ3qn4dLEg@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Language: en-US
X-TUD-Original-From: felix.walter@tu-dresden.de
X-TUD-Virus-Scanned: mailout6.zih.tu-dresden.de
Archived-At: <https://mailarchive.ietf.org/arch/msg/dtn/IwnIsI3t7cb6pEI4eatz7qtoYC0>
Subject: Re: [dtn] (no subject)
X-BeenThere: dtn@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Delay Tolerant Networking \(DTN\) discussion list at the IETF." <dtn.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dtn>, <mailto:dtn-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dtn/>
List-Post: <mailto:dtn@ietf.org>
List-Help: <mailto:dtn-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dtn>, <mailto:dtn-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Jan 2019 09:23:44 -0000

Hi Lucien,

Good point! I actually suggested this change at some point, not only
because a second length value is redundant, but also because it leads to
problems if you want to serialize a bundle as a stream using a CBOR
library - the first length value depends on the encoding of the length
inside the byte string header. Thus, you have to serialize the byte
string separately and then concatenate it with the length plus the rest
of the serialized bundle, either resulting in a lot of code handling
this special case or significant memory overhead.

I don't see good use cases for the CBOR indefinite-length byte strings
in a serialized bundle. It would rather lead to a lot of problems with
parsing bundles as you mentioned.

@Scott: Couldn't we simply forbid the use of that representation for the
block payload?

Felix


Am 12.01.19 um 19:16 schrieb Loiseau lucien:
> Hi,
>
> I noticed that since bpbis-10, the block data length was removed from
> the Canonical Block Header, I imagine to reuse the length given as a
> header of the CBOR byte string that constitutes the payload of the
> block.
>
> However CBOR encoding authorizes a byte string to be "indefinite" so
> that the cbor header would be -1 and then follows a series of byte
> chunk with definite size. In that case, it may be impossible to
> allocate memory for the whole payload, instead we would have to
> readjust buffer as chunks are coming in. Another limitation with a
> payload encoded as an indefinite cbor byte string is that it would be
> impossible to refuse a large bundle until we fully decoded it or hit
> the limit.
>
> Best Regards,
> Lucien
>
> _______________________________________________
> dtn mailing list
> dtn@ietf.org
> https://www.ietf.org/mailman/listinfo/dtn