Re: [dtn] DTN BPv7 test bundles and CRCs

Felix Walter <felix.walter@d3tn.com> Mon, 25 March 2019 11:49 UTC

Return-Path: <felix.walter@d3tn.com>
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 8E299120401 for <dtn@ietfa.amsl.com>; Mon, 25 Mar 2019 04:49:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_PASS=-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 ObY-IM76K718 for <dtn@ietfa.amsl.com>; Mon, 25 Mar 2019 04:49:03 -0700 (PDT)
Received: from smtp.innovailable.eu (smtp.innovailable.eu [176.9.147.117]) by ietfa.amsl.com (Postfix) with ESMTP id 3611C120407 for <dtn@ietf.org>; Mon, 25 Mar 2019 04:49:03 -0700 (PDT)
Received: from [141.76.40.100] (unknown [141.76.40.100]) by smtp.innovailable.eu (Postfix) with ESMTPSA id 540493B4B1C1 for <dtn@ietf.org>; Mon, 25 Mar 2019 12:49:01 +0100 (CET)
From: Felix Walter <felix.walter@d3tn.com>
To: dtn@ietf.org
References: <CY4PR1301MB2039A571321298DB5E470C959F420@CY4PR1301MB2039.namprd13.prod.outlook.com>
Openpgp: preference=signencrypt
Autocrypt: addr=felix.walter@d3tn.com; prefer-encrypt=mutual; keydata= mQINBFs/Zv4BEADqucEGBvcOsXVDOW14nFaSiKATfrchZVxDi+sF3MWTCSUodBktoWLVPi57 1gPMln97sVNRadt7e/MfF+5AtvjSAZoaIjC6zvqwdrwbQRj6Sgg9/sDqUKGCxwVRvIMh2Gov s/wSzECj7uUlCCcfVJ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BQkDwmcAAAoJEBecjMeWTPJeDeAQAKGEWCzWAVpvKYCX5Nfbu5qZcYNJ6lrn lFVTYW+dcKqs9n7wfEg983tP/Ek8OmHAE3Puzl3gWu0+wswfvU7mPMg6mUKV135Ua4YbWCq8 HaTRUSwU2Mbq6PyDwlsaK7hOG4LCSl+FBe1gFM+ZZrwxk4Qw+XpOZ6NvexSzKusHMEN46c3Z nYqwFvfE6IFUMLhe8+XHXz05IhGexEYIpaBuYA6A5Vq77FmKMQHo7u4MF3L0/KSutHoY76w9 nY2VlTjuS3Wn0suLEKiKbsuhxOb02ANRsn1UGqhrcSPIWjb1PCDkzcbp0nKkX0ZeDy6kEHyn Qb+9ODTalKuuSTpwEs7YUyVE1ooqoyCXR+/ts1TbjPxd1UX0DS6hJNt2gS3i5XjELj+RfX6p o1zaN7w5bHRZ8Qbeyg8iKnYB4qNsAeWnjkL6DL+EOuYiLLMni39B8vcGvJhybCKhUma1jPz7 jA3thtMWLp0uO3t/kpZgiZxup+hph/9C9qQZdgCmc6vc4Eps5n9eCnKupraaALoq/2qdE3gl Scu84FrMyO53GiS+zSJt7o54N5qYKm5tWfTHttv2/r2FI2Om3cogj8oeOJOmhPOTZEPAFave wrnTo6vT/V3M2eLwxslAe4ZBvs5ziXwmH0ihOB0ApmcbW2WH3V08zF/8GLpzAbpUB0KdHlTl Q3M9
Organization: D3TN GmbH
Message-ID: <b390b76b-55c8-fa38-4eb0-3f6573d30eaf@d3tn.com>
Date: Mon, 25 Mar 2019 12:49:00 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3
MIME-Version: 1.0
In-Reply-To: <CY4PR1301MB2039A571321298DB5E470C959F420@CY4PR1301MB2039.namprd13.prod.outlook.com>
Content-Type: multipart/alternative; boundary="------------68613CCE2EA6883B7AF85CF3"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/dtn/4F-69TyOMzpAxvQDW12BaG4TcjQ>
Subject: Re: [dtn] DTN BPv7 test bundles and CRCs
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, 25 Mar 2019 11:51:02 -0000

Hi Brian,

This sounds really useful! I agree that it would be very good to have
some example bundles provided. We have Python as well as C code for our
interpretation of the BPbis CRC section available with µPCN v0.6.0 [1].
The Python implementation can be found in tools/bundle7/crc.py, the C
implementation in components/bundle7/src/crc.c.

Please note that in this version the used CRC-32 variant is still the
PKZIP/Ethernet CRC-32 as specified in draft-ietf-dtn-bpbis-10. For using
CRC32-C (Castagnoli), the table in the C file needs to be re-generated
with the corresponding polynomial. This can be done using the Python
code which includes parameters for a lot of CRC variants.

Felix

[1] https://upcn.eu/

--
Dipl.-Ing. Felix Walter
Chief Technology Officer
D3TN GmbH
 
E-Mail: felix.walter@d3tn.com
Web: https://d3tn.com

Address:
D3TN GmbH
Leon-Pohle-Str. 2
01219 Dresden

Commercial Register: District Court Dresden
Register Number: HRB 34957
VAT ID No.: DE303348407
Managing Directors: Marius Feldmann, Paul Seidler


On 22.03.19 16:45, Brian Sipos wrote:
> To anyone who has been prototyping Bundle Protocol version 7 (BPbis)
> agents,
> I'm spending a little time on a Wireshark dissector to examine and
> troubleshoot bundles and the only trouble I've run into is in
> verifying the CRCs. The BPbis spec is not very helpful in determining
> exactly what CRC implementation to use only because the ITU
> specification itself doesn't provide CRC test vectors.
>
> I'm doing prototyping in Python and dissecting in C language, so there
> is even a disparity between what CRC algorithms are available and how
> well they are documented. This seems like such an easy use/build
> decision to use COTS CRC function but I'm struggling to find
> implementations to match what BPbis requires.
>
> I think there would be a lot of value to have some test/representative
> bundles in an appendix which include blocks with different CRC types
> and different block sizes. Some CRC implementations pad out
> octet-sequences to a multiple of the CRC size and some apparently do
> something else. The problem is in the CRC implementations not being
> very clear about their parameters but having a few encoded test
> bundles to work with would go a long way to ensuring compatibility of
> implementations.
>
> Thanks for any advice,
> Brian S.
>
> _______________________________________________
> dtn mailing list
> dtn@ietf.org
> https://www.ietf.org/mailman/listinfo/dtn