tungd / elixir-dns

DNS library for Elixir
BSD 3-Clause "New" or "Revised" License
114 stars 37 forks source link

Documentation of the server for more record types #44

Open bortzmeyer opened 2 years ago

bortzmeyer commented 2 years ago

If record types like NS are quite straightforward, there is apparently no documentation for a server wishing to reply to types like SOA which are not so obvious (and the error messages from the Erlang DNS library are unhelpful). Add an example like:

    result =
      case query.type do
        :a -> {127, 0, 0, 1}
    :aaaa -> {8193, 3512, 2989, 56495, 0, 0, 65535, 1}
        :cname -> 'your.domain.example'
        :txt -> ['General value', 'Other value']
    :ns -> 'ns1.op.example'
    :soa -> {'me.example', 'root.me.example', 1, 1800, 1800, 1800, 86400}
        _ -> nil
      end
bortzmeyer commented 2 years ago

Also:

:hinfo -> {'My CPU', 'My OS'}
:mx -> {10, 'mail.example.net'}  # Untested