Subject: [dtn] "Block data length" field in BPbis

From: Felix Walter <[email-masked]>
Date: Fri, 23 Mar 2018 17:22:22 +0100

Hi,

We just had a short talk with Scott, Ed, and Rick about the "Block data
length" [1] field of the canonical block in BPbis that I would like to
forward to the list. As far as I understand it, this value is the count
of (serialized) bytes still belonging to the block, but following the
length field.

Because CBOR is used for the block-type-specific data, the length field
by itself is redundant. For example, in the payload block, it will
always be followed by a "CBOR byte string" representing the payload
data. (This contains a length as well.)
It needs to be considered in implementations that all these length
fields are variable-length themselves - however, this turned out to be
no big issue. I also see the point of having the "Block data length"
available to the parser, to be able to skip over the whole block data of
complex extension blocks without even parsing them.

Are there any further reasons for having the "Block data length"
available which I have missed? Or does anyone have a strong opinion on
whether this should be removed or kept?

By the way, the language concerning the "Block data length" should
probably be modified slightly as it refers to "[...] the aggregate
length of all remaining fields of the block, i.e., the
block-type-specific data fields.", though, this may (now) be followed by
the CRC checksum.

Felix

[1] https://tools.ietf.org/html/draft-ietf-dtn-bpbis-10#section-4.2.3