Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ahupowerdns committed Apr 1, 2018
1 parent c6382f0 commit e2950ae
Show file tree
Hide file tree
Showing 18 changed files with 1,079 additions and 645 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "tdns/ext/simplesocket"]
path = tdns/ext/simplesocket
url = https://github.com/ahupowerdns/simplesocket.git
650 changes: 5 additions & 645 deletions README.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions auth.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<meta charset="utf-8" emacsmode="-*- markdown -*-">
**A warm welcome to DNS**

<link rel="stylesheet" href="https://casual-effects.com/markdeep/latest/apidoc.css?">

Note: this page is part of the
'[hello-dns](https://powerdns.org/hello-dns/)' documentation effort.

# Authoritative servers

Expand Down
662 changes: 662 additions & 0 deletions basic.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions basic.md.html
3 changes: 3 additions & 0 deletions dnssec.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<meta charset="utf-8" emacsmode="-*- markdown -*-">
**A warm welcome to DNS**
Note: this page is part of the
'[hello-dns](https://powerdns.org/hello-dns/)' documentation effort.

# DNSSEC
For now, see [this page](https://ds9a.nl/dnssec/).

<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="ext/markdeep.min.js"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>

3 changes: 3 additions & 0 deletions meta.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<meta charset="utf-8" emacsmode="-*- markdown -*-">
**A warm welcome to DNS**
Note: this page is part of the
'[hello-dns](https://powerdns.org/hello-dns/)' documentation effort.

# The why and what of these documents
There are now between 1500 and 3000 pages of RFC documents describing DNS,
Expand Down Expand Up @@ -52,3 +54,4 @@ urge to write 'standardese' here.


<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="ext/markdeep.min.js"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>

16 changes: 16 additions & 0 deletions non-ietf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<meta charset="utf-8" emacsmode="-*- markdown -*-">
**A warm welcome to DNS**

<link rel="stylesheet" href="https://casual-effects.com/markdeep/latest/apidoc.css?">

Note: this page is part of the
'[hello-dns](https://powerdns.org/hello-dns/)' documentation effort.

# Non-IETF DNS standards

* RPZ
* RRL
* DNSCrypt
* Curvedns

<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="ext/markdeep.min.js"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>
1 change: 1 addition & 0 deletions non-ietf.md.html
16 changes: 16 additions & 0 deletions privacy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<meta charset="utf-8" emacsmode="-*- markdown -*-">
**A warm welcome to DNS**

<link rel="stylesheet" href="https://casual-effects.com/markdeep/latest/apidoc.css?">

Note: this page is part of the
'[hello-dns](https://powerdns.org/hello-dns/)' documentation effort.

# Privacy
TBC

* DNS over TLS
* DNS over HTTPS
* Query name minimization

<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="ext/markdeep.min.js"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>
1 change: 1 addition & 0 deletions privacy.md.html
24 changes: 24 additions & 0 deletions rare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<meta charset="utf-8" emacsmode="-*- markdown -*-">
**A warm welcome to DNS**

<link rel="stylesheet" href="https://casual-effects.com/markdeep/latest/apidoc.css?">

Note: this page is part of the
'[hello-dns](https://powerdns.org/hello-dns/)' documentation effort.

# Rare
DNS is currently described in over 150 RFCs. Not all of these are
operational, and it is uncertain if all of them should be.

This page is a menu of things that are specified, but not in wide
production.

Standards listed here could be omitted from 2018 implementations
without causing operational problems, but this may change in the future.

Applicable to authoritative servers:

* TKEY
* SIG(0)

<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="ext/markdeep.min.js"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>
1 change: 1 addition & 0 deletions rare.md.html
3 changes: 3 additions & 0 deletions resolver.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<meta charset="utf-8" emacsmode="-*- markdown -*-">
**A warm welcome to DNS**

Note: this page is part of the
'[hello-dns](https://powerdns.org/hello-dns/)' documentation effort.

# Resolver
Writing a modern resolver is the hardest part of DNS. A fully standards
compliant DNS resolver is not a resolver that can be used in practice.
Expand Down
16 changes: 16 additions & 0 deletions tdns/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
CXXFLAGS:=-std=gnu++14 -Wall -O2 -MMD -MP -ggdb -Iext/simplesocket

PROGRAMS = tdns

all: $(PROGRAMS)

clean:
rm -f *~ *.o *.d test $(PROGRAMS)

#check: mtests
# ./mtests

-include *.d

tdns: tdns.o ext/simplesocket/comboaddress.o ext/simplesocket/sclasses.o ext/simplesocket/swrappers.o
g++ -std=gnu++14 $^ -o $@
38 changes: 38 additions & 0 deletions tdns/dns.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#pragma once
struct dnsheader {
unsigned id :16; /* query identification number */
#if BYTE_ORDER == BIG_ENDIAN
/* fields in third byte */
unsigned qr: 1; /* response flag */
unsigned opcode: 4; /* purpose of message */
unsigned aa: 1; /* authoritative answer */
unsigned tc: 1; /* truncated message */
unsigned rd: 1; /* recursion desired */
/* fields in fourth byte */
unsigned ra: 1; /* recursion available */
unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
unsigned ad: 1; /* authentic data from named */
unsigned cd: 1; /* checking disabled by resolver */
unsigned rcode :4; /* response code */
#elif BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
/* fields in third byte */
unsigned rd :1; /* recursion desired */
unsigned tc :1; /* truncated message */
unsigned aa :1; /* authoritative answer */
unsigned opcode :4; /* purpose of message */
unsigned qr :1; /* response flag */
/* fields in fourth byte */
unsigned rcode :4; /* response code */
unsigned cd: 1; /* checking disabled by resolver */
unsigned ad: 1; /* authentic data from named */
unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
unsigned ra :1; /* recursion available */
#endif
/* remaining bytes */
unsigned qdcount :16; /* number of question entries */
unsigned ancount :16; /* number of answer entries */
unsigned nscount :16; /* number of authority entries */
unsigned arcount :16; /* number of resource entries */
};

static_assert(sizeof(dnsheader) == 12, "dnsheader size must be 12");
1 change: 1 addition & 0 deletions tdns/ext/simplesocket
Submodule simplesocket added at 9829ce
Loading

0 comments on commit e2950ae

Please sign in to comment.