Skip to content

Commit

Permalink
Sphinx: Add option to export response RRs to C-DNS
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelDol committed Apr 3, 2024
1 parent d3d423a commit 195330b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.
8 changes: 7 additions & 1 deletion data-model/dns-probe.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Last revision: 2023-09-20
# Last revision: 2024-04-02
#
# Default instance configuration.
# This configuration is always loaded before other configuration specified by given instance's ID.
Expand Down Expand Up @@ -121,6 +121,7 @@ default:
- 'query_edns_version'
- 'query_edns_udp_size'
- 'query_opt_rdata'
- 'response_answer_sections'
- 'response_additional_sections'
- 'response_size'
- 'asn' # asn-maxmind-db configuration option also needs to be set
Expand All @@ -133,6 +134,11 @@ default:
# Maximum number of C-DNS blocks in one exported C-DNS file.
cdns-blocks-per-file: 0

# If this flag is set to true, exported C-DNS files will contain full Answer and Additional RRs
# from responses in each record.
# NOTE: Won't work for traffic captured via Knot interface as this data doesn't contain full RRs.
cdns-export-response-rr: false

# Maximum number of Parquet records per file.
parquet-records-per-file: 5000000

Expand Down
13 changes: 13 additions & 0 deletions doc/Configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ DNS Probe uses local file in YAML format to load configuration at startup. Its s
| +--rw backup-remote-ip-address? <string>
| +--rw backup-remote-port? <uint16>
| +--rw cdns-blocks-per-file? <uint64>
| +--rw cdns-export-response-rr? <boolean>
| +--rw cdns-fields?* <string>
| +--rw cdns-records-per-block? <uint64>
| +--rw country-maxmind-db? <string>
Expand Down Expand Up @@ -188,6 +189,18 @@ This parameter takes effect only if ``cdns`` is set in :ref:`export-format`. It

The default value of 0 means that there is no limit.

.. _cdns-export-response-rr:

cdns-export-response-rr
^^^^^^^^^^^^^^^^^^^^^^^

:data node: ``<instance-id>/export/cdns-export-response-rr``
:default: **false**

If this flag is set to **true**, exported C-DNS files will contain full Answer and Additional RRs from responses in each record.

**NOTE:** Won't work for traffic captured via Knot interface as this data doesn't contain full RRs.

cdns-fields
^^^^^^^^^^^

Expand Down
5 changes: 4 additions & 1 deletion doc/ExportedDataSchema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ export simply copies the Entrada schema shown in the table below. C-DNS
format has its own schema defined in `RFC
8616 <https://tools.ietf.org/html/rfc8618>`_. DNS Probe tries to fill
this C-DNS schema with only the data needed for reconstructing the
Entrada schema.
Entrada schema. As of DNS Probe release *1.3.0* export to C-DNS also has
an option to export full resource records from *Answer* and *Additional*
sections of responses by enabling :ref:`cdns-export-response-rr`
configuration option.

.. table::
:align: left
Expand Down
5 changes: 5 additions & 0 deletions doc/RecordOfChanges.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ For changes in software see `version descriptions <https://gitlab.nic.cz/adam/dn
- Edition
- Segment
- Change description
* - **1.*.***
- **1.0**
- :doc:`Configuration <Configuration>`, :doc:`Exported Data Schema <ExportedDataSchema>`,
:doc:`Default YAML file <YAMLfile>`
- Add option to export full Answer and Additional RRs of responses to C-DNS files
* - **1.2.0**
- **1.0**
- :doc:`Configuration <Configuration>`, :doc:`Exported Data Schema <ExportedDataSchema>`,
Expand Down
8 changes: 7 additions & 1 deletion doc/YAMLfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It is also included in the project repository (`data-model/dns-probe.yml <https:

.. code-block:: yaml
# Last revision: 2023-09-20
# Last revision: 2024-04-02
#
# Default instance configuration.
# This configuration is always loaded before other configuration specified by given instance's ID.
Expand Down Expand Up @@ -132,6 +132,7 @@ It is also included in the project repository (`data-model/dns-probe.yml <https:
- 'query_edns_version'
- 'query_edns_udp_size'
- 'query_opt_rdata'
- 'response_answer_sections'
- 'response_additional_sections'
- 'response_size'
- 'asn' # asn-maxmind-db configuration option also needs to be set
Expand All @@ -144,6 +145,11 @@ It is also included in the project repository (`data-model/dns-probe.yml <https:
# Maximum number of C-DNS blocks in one exported C-DNS file.
cdns-blocks-per-file: 0
# If this flag is set to true, exported C-DNS files will contain full Answer and Additional RRs
# from responses in each record.
# NOTE: Won't work for traffic captured via Knot interface as this data doesn't contain full RRs.
cdns-export-response-rr: false
# Maximum number of Parquet records per file.
parquet-records-per-file: 5000000
Expand Down

0 comments on commit 195330b

Please sign in to comment.