dns 4.4.1 · OCaml Package (2024)

µDNS - an opinionated Domain Name System (DNS) library

The Domain Name System is a hierarchical and decentralized naming system used on the Internet. It associates domain names with nearly arbitrary information. Best known is the translation of easily memoizable domain names to numerical IP addresses, which are used by computers for establishing communication channels - so called address records. DNS has been deployed since 1985 on the Internet. It is a widely deployed, fault-tolerant, distributed key-value store with built-in caching mechanisms. The keys are domain names and record types, the values are record sets. Each record set has a time-to-live associated with it: the maximum time this entry may be cached. The domain name library provides operations on domain names. Hostnames are domain names with further restrictions: Only letters, digits, and hyphen are allowed. Domain name comparison is usually done ignoring the case.

A set of 13 authoritative name servers form the root zone which delegate authority for subdomains to registrars (using country codes, etc.), which delegate domains to individuals who host their Internet presence there.

The delegation mechanism utilizes the DNS protocol itself, using name server records, and start of authority records. The globally federated eMail system uses mail exchange records.

Each Internet domain has at least two authoritative name servers registered to enable fault tolerance. To keep these synchronised, a zone transfer mechanism is part of DNS. In-protocol DNS extension mechanisms include dynamic updates, authentication, and notifications, which allow arbitrary synchronized, authenticated modifications.

From a client perspective, the C library functions gethostbyname or getaddrinfo are mainly used, which receive a string (and a record type) and return a reply. A client requests a caching recursive resolver hosted close to the client - e.g. at their ISP, and awaits an answer. The recursive resolver iterates over the domain name parts, and requests the registered authoritative name servers, until the name server responsible for the requested domain name is found.

The core µDNS library includes type definitions of supported record types, decoding and encoding thereof to the binary protocol used on the Internet, also serialising and parsing of the standardized text form. The record types and their values are defined by the key type, which has for each record type a specific value type, using a generalized algebraic data type -- i.e. an address record may only contain a time-to-live and a set of IPv4 addresses. This is used to construct a map data structure.

This core µDNS library is used by various DNS components:

  • Dns_tsig implements TSIG authentication
  • Dns_server implements an authoritative server
  • Dns_client implements a client
  • Dns_zone implements a zone file parser
  • Dns_resolver implements a recursive resolver

These core libraries are pure, i.e. it is independent of network communnication, uses immutable values, and errors are explicit as Result type. Timestamps are passed in to the main handle functions. Some components, such as a secondary server, which needs to check freshness of its data in regular intervals. The logic is implemented and exposed as function, which needs to be called from a side-effecting layer.

For the client library, several side-effecting layers are implemented: dns-client.unix uses the blocking Unix API (distributed with the OCaml runtime), dns-client.lwt uses the non-blocking Lwt API, and dns-client.mirage using MirageOS interfaces. Unix command line utilities are provided in the dns-cli package.

For the server and resolver components, side-effecting implementations using MirageOS interfaces are provided in dns-server.mirage and dns-resolver.mirage. Example unikernels are provided externally, including authoritative primary and secondary servers, recursive and stub resolvers. The certificate authority Let's Encrypt implements a protocol (ACME) which automatically provisions X.509 certificates (which are trusted by common web browsers); one of the methods to produce proof of ownership is with a DNS TXT record. Together with ocaml-letsencrypt, this DNS library can be used to provision certificate signing requests for the domain where you run an authoritative server. The certificate signing request and certificate are both stored as TLSA records in DNS.

v4.4.1 - homepage

type proto = [

  1. | `Tcp
  2. | `Udp

]

The type of supported protocols. Used by Packet.encode to decide on maximum buffer length, etc.

module Rcode : sig ... end

Response code

module Soa : sig ... end

Start of authority

module Ns : sig ... end

Name server

module Mx : sig ... end

Mail exchange

module Cname : sig ... end

Canonical name

module A : sig ... end

Adress record

module Aaaa : sig ... end

Quad A record

module Ptr : sig ... end

Domain name pointer

module Srv : sig ... end

Service record

module Dnskey : sig ... end

DNS keys

module Caa : sig ... end

Certificate authority authorization

module Tlsa : sig ... end

Transport layer security authentication

module Sshfp : sig ... end

Secure shell fingerprint

module Txt : sig ... end

Text records

module Tsig : sig ... end

Transaction signature

module Edns : sig ... end

Extensions to DNS

module Rr_map : sig ... end

A map whose keys are record types and their values are the time-to-live and the record set. The relation between key and value type is restricted by the below defined GADT.

module Name_rr_map : sig ... end

Name resource record map

module Packet : sig ... end

The DNS packet.

module Tsig_op : sig ... end

Signature operations and their errors.

dns 4.4.1 · OCaml Package (2024)
Top Articles
Ari Kytsya: Biography, Wiki, Age, Height, Weight, Career, Boyfriend, Net Worth & More
Hawkview Retreat Pa Cost
Matgyn
Skyward Houston County
Faint Citrine Lost Ark
Pike County Buy Sale And Trade
Mlifeinsider Okta
Comenity Credit Card Guide 2024: Things To Know And Alternatives
Theycallmemissblue
Inevitable Claymore Wow
Bahsid Mclean Uncensored Photo
Viprow Golf
Illinois Gun Shows 2022
Telegram Scat
Cpt 90677 Reimbursem*nt 2023
List of all the Castle's Secret Stars - Super Mario 64 Guide - IGN
Northeastern Nupath
2020 Military Pay Charts – Officer & Enlisted Pay Scales (3.1% Raise)
623-250-6295
U Of Arizona Phonebook
Busted Mcpherson Newspaper
Engineering Beauties Chapter 1
Jeff Nippard Push Pull Program Pdf
kvoa.com | News 4 Tucson
Olivia Maeday
Wood Chipper Rental Menards
O'reilly's In Mathis Texas
Intel K vs KF vs F CPUs: What's the Difference?
Lilpeachbutt69 Stephanie Chavez
Blush Bootcamp Olathe
Wisconsin Volleyball Team Leaked Uncovered
Pch Sunken Treasures
Puretalkusa.com/Amac
Reading Craigslist Pa
Bitchinbubba Face
Dynavax Technologies Corp (DVAX)
Myql Loan Login
Kelly Ripa Necklace 2022
The Banshees Of Inisherin Showtimes Near Reading Cinemas Town Square
2 Pm Cdt
Firestone Batteries Prices
O'reilly's Palmyra Missouri
Emily Tosta Butt
Nimbleaf Evolution
Dyi Urban Dictionary
Ihop Deliver
German American Bank Owenton Ky
Mkvcinemas Movies Free Download
Ingersoll Greenwood Funeral Home Obituaries
Gelato 47 Allbud
Land of Samurai: One Piece’s Wano Kuni Arc Explained
32 Easy Recipes That Start with Frozen Berries
Latest Posts
Article information

Author: Chrissy Homenick

Last Updated:

Views: 5652

Rating: 4.3 / 5 (54 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Chrissy Homenick

Birthday: 2001-10-22

Address: 611 Kuhn Oval, Feltonbury, NY 02783-3818

Phone: +96619177651654

Job: Mining Representative

Hobby: amateur radio, Sculling, Knife making, Gardening, Watching movies, Gunsmithing, Video gaming

Introduction: My name is Chrissy Homenick, I am a tender, funny, determined, tender, glorious, fancy, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.