Commit graph

6 commits

Author SHA1 Message Date
Vincent Ambo
90dd824606 feat(lisp/dns): Support CNAME & NS record RDATAs 2020-01-27 00:47:53 +00:00
Vincent Ambo
3f9546197e feat(lisp/dns): Export struct fields 2020-01-26 20:34:03 +00:00
Vincent Ambo
4c109f66b6 feat(lisp/dns): Introduce enum for DNS types & decode RDATA
Adds some of the most common DNS types in the enum (others TBD), and
starts decoding RDATA for TXT and A.
2020-01-26 20:29:30 +00:00
Vincent Ambo
1440fc0dd7 feat(lisp/dns): Implement qname compression parsing
Implements support for the compresion scheme used in binary DNS
messages.

This makes it possible to decode messages entirely, but not yet
actually resolve the labels to their "real" values.

All qnames are stored with file-offsets pointing at the position at
which their reading started, which enables the implementation of a
function to resolve pointers internally.
2020-01-26 18:27:35 +00:00
Vincent Ambo
cefb60f20c refactor(lisp/dns): Introduce structured QNAME representation
Adds a struct that represents QNAMEs, tracks the stream offset at
which the QNAME parsing began and makes it possible to resolve
pointers inside of the QNAME.

Note that resolving pointers needs to happen *after* the call to
lisp-binary currently. It might be possible to implement this inside
of lisp-binary in the future by switching on the top two bits of the
qname field, but since this is happening *inside* of a reader function
I'm not currently sure how to implement it.
2020-01-26 02:51:29 +00:00
Vincent Ambo
7ef14db936 feat(lisp/dns): Check in initial DNS message implementation
This uses lisp-binary to define serialisation types for the DNS
messages defined by RFC 1035.

Currently the compression scheme used for QNAMEs is not supported,
hence deserialisation of even simple records fails after the header
and question sections are read.
2020-01-26 01:20:45 +00:00