Subject: [Cbor] Experience of using CDDL

From: Jim Hague <[email-masked]>
Date: Tue, 25 Apr 2017 15:11:20 +0100

After watching the recording of the WG in Chicago, we thought that
perhaps a quick description of our experiences using CDDL with
https://datatracker.ietf.org/doc/draft-ietf-dnsop-dns-capture-format/
might be of interest.

The above draft describes a file format C-DNS for space-efficient
recording of DNS query/response traffic. In parallel with the draft we
have also been developing tools to capture traffic to C-DNS and convert
C-DNS to PCAP.

The motivation for using CDDL was primarily twofold:
The main goal for using CDDL was to provide a format description of the
C-DNS format. A subsidiary goal was getting some validation that the
file format written by our tool is actually the format described in the
draft.

We found CDDL admirably answered both requirements. The tooling is a bit
rough, but just about good enough, though we still find locating a
validation fail a little challenging.

Draft 09 appeared late in the process. We've added annotations for bstr
.size, flag .bits and limited value checking. This value checking is
only for constant items (file format ID and version) where the value of
the item could be regarded as part of the syntax of the file. I
personally explicitly don't want to go in a direction of semantic checks
on the DNS content; as noted our primary goal was to describe the
format, and I greatly fear semantic checks would greatly obfuscate the
format description for little benefit. So what's in the current draft is
fine for our needs. And if the CDDL specification had been significantly
longer and more complex, I'm not sure we'd have adopted it.
-- 
Jim Hague - [email-masked]          Never trust a computer you can't lift.