Skip to content

DNS Protocol Library

Encoder Decoder

Simple C++ library designed for encoding and decoding of DNS protocol packets. It doesn’t provide any functionality related to network (listening for packets, sending packets, etc.). Library is strictly focused on handling of DNS protocol packets - mapping of raw (wire) data to C++ structures (classes) and vice versa.

  • RFC 1035 DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION
  • RFC 2915 The Naming Authority Pointer (NAPTR) DNS Resource Record
  • RFC 3596 DNS Extensions to Support IP Version 6
  • Memory check with valgrind
    valgrind --leak-check=full ./unittests
  • Lint with cppcheck
    cppcheck --enable=all *cpp
  • Fake server tested against
    Codenomicon DNS suite
  1. Install cmake tools

    sudo apt install cmake
  2. Create Build directory

    mkdir build && cd build
  3. Generate build artifacts

    cmake ../src
  4. Build binaries

    make
  5. Run unittests

    ./unittests