dns-stats / compactor

Tools to capture DNS traffic and record it in C-DNS files.
Other
32 stars 12 forks source link

Collection Parameters contain non standard parameter #63

Closed huitema closed 4 years ago

huitema commented 4 years ago

I am analyzing a CDNS file produced by compressor, and I am puzzled by the value of the Collection Parameters. I printed the content in the file as:

--collection parameters
                1, [
                    0,5000,
                    1,10,
                    2,65535,
                    -1,53,
                    3,false,
                    8,"dns-stats-compactor 1.0.0"
                ]

Collection parameters is the item #1 in the BlockParameters map, and is encoded as a map. We find here items #0 (query-timeout), #1 (skew-timeout), #2 (snaplen), #3 (promisc), and #8 (generator-id). That's fine, and in line with the CDDL in the RFC. We also fine an element with code "-1" -- the map index is encoded as an N-INT of value 0.

From looking at the compactor code, I assume that this is the DNS server port. But that element is not defined in the RFC. Why does the compactor encode it?

johndickinson commented 4 years ago

See section 7.1 of RFC8618 "Implementations may choose to add additional implementation-specific entries to any map. Negative integer map keys are reserved for these values."

huitema commented 4 years ago

OK then. I will treat that as proprietary extensions and won't bother you!