|
|
## Subpages
|
|
|
|
|
|
* [DNS query processing](query-processing)
|
|
|
|
|
|
## Current problems
|
|
|
|
|
|
1. API suggests that it can add to sections out-of-order, but it can't (*_add_rrset always puts rrset to current section, whatever it is)
|
|
|
2. Some parts of code use knot_packet_t, some raw wire this leads to multiple implementation of the same thing
|
|
|
3. Packet parsing is mixed with interpretation (f.e. parsing packet during transfer)
|
|
|
4. Each major feature implements its own packet parsing, rrset writing, response creating
|
|
|
* This leads to a ctrl+c/+v code that is hard to refactor
|
|
|
* Packet checks are slightly different every time, sometime things are checked sometimes not
|
|
|
5. Packet is built (sometimes) and then copied to the output wire while it could be done in-place
|
|
|
6. Duplicated functionality with knot_wire_* and unclear purpose of the knot_response* and knot_query* functions.
|
|
|
7. rrsets pointers in packet are separated, this triples any refactoring
|
|
|
8. packet compression is done via two different structures and strangely so
|
|
|
|
|
|
## Proposed services
|
|
|
|
|
|
**The merge request !147 is more up-to-date.**
|
|
|
|
|
|
Knot library should provide following vertically integrated APIs:
|
|
|
|
|
|
1. wire API (working with flags, compression pointers, byteorder conversions...)
|
|
|
2. packet API (create, parse/write qname and rrsets, sections...)
|
|
|
* name compression API
|
|
|
* edns API
|
|
|
* tsig API
|
|
|
3. processing API (building blocks for queries and answers)
|
|
|
* regular query processing
|
|
|
* notify processing
|
|
|
* axfr/ixfr processing
|
|
|
* ddns processing |