$Id: TODO 2522 2006-12-01 15:40:27Z wouter $

GENERAL
- return value of region_alloc, region_create is not checked for NULL,
  which is returned when out of memory, in many places.
- Feature request by Kai: choose outgoing interface for nsd-xfer.
- Feature request by Thoman Huehn: choose outgoing interface for nsd-notify. -a
- Also Peter Hessler, Paul Wouters: choose outgoing ifc, "src: ip@port" 
	in a zone in the config file, lets xfrd zonexfr and notify.

AUTOCONF

ZONE COMPILER
- unify dns type table (name, dns type, yacc token, rdata types) prettier?
- unify dns class table (name, dns type, yacc token) prettier?
- one db file per zone (as an option?) (featurecreep)?
  req by Alex (Bit). So that after rsync, zonec is fast with many zones.
- if a zone is dropped from the config file, but not removed from the
  nsd.db. NSD refuses to start. Should skip/drop the zone.
  Redesign file format, so that you can skip a zone more easily, this
  also makes multiply db files easier.
- profile the zonec compiling speed. Speed it up. Many people complain about
  this.
- wireformat interop. testing for IPSECKEY type.

SERVER
- make sure that we dont copy anything from the query we dont want to copy, like
  funny headers etc
- From Aaron Hopkins: set O_NONBLOCK on all sockets. Now a udp raging herd of
  server can get woken up when a message arrives. One server handles the packet,
  the rest blocks on that socket and does not serve other sockets.
- From Aaron Hopkins: write tcp length and tcp data in one write operation,
  instead of multiple calls to write. Avoids Nagle algo delay in this case.
  preallocate 2 bytes in front of buffer to put them into.
- Test TCP performance (do a lot of AXFRs, different zone sizes, and compare
  time averages).
- From Aaron Hopkins: after you do select calls, do multiple read calls
  per select. This polling improves performance in high-load situations.
  Speed test to prove that it does so.
- Turn off TC bit on all error replies.
- Bug #133: print empty statistic blocks. Not sure if the feature is wanted.
- XFRD should throttle the number of notifys going out for a zone to
  x/minute. (even if updates are very often).
- Option to only notify a batch of slaves (from loads) at a time, with
  timeout between.
- Round robin selection to send notify to secondaries. So the last one
  on the notify list does not diverge.
- IXFR/AXFR/NOTIFY timeouts exponential backoff.

SECURITY
- TSIG add rfc 4635 algorithms. Bug #120 asks for SHA1 feature.

PURITY
- some data is in network order some in host order, make it clear with prefixes
  prettier?
- brush up the fuction and identifiers names
- The XFRD zone state can be split up in expired/service-possible and 
  in idle/zone-transfer-busy state flags. Is this more beautiful?
- no more #ifdefs, remove them all, but keep configure options.
- getflags on socket before setflags nonblocking.
- exponential backoff for retries xfrd and notify.

CLEANUP
- make so that startup sends SOA_INFO to xfrd just like reload does, prettier? 
- dlopen and dynlib checks can be removed from autoconf scripts.
- If presentation format NSEC3 stays, put optout-iterations into one 4byte
  datatype, easier reading and printing, avoids ugly special cases.

DOCUMENTATION

OPTIMISATIONS
- delete entire zone for AFXR during reload read in,
  now walks the tree, but could use a double linked list to speed up.
- less memory churn in deleting RRs/adding RRs: keep rrset->capacity num.
  initial read in capacity==limit, if you want to add RRs, alloc capacity*2.
- less memory churn in deleting rrsets : keep a linked list of deleted rrsets
  for reuse.
  Keep a list (based on buckets of size of the malloc) of rr arrays.
  Keep a list (based on buckets of size of malloc) of rdata arrays.
  Keep a list (buckets on size) of rdata_data allocs.
  For reuse, buckets on char size, because we know most are small anyway
  large ones can be discarded/churned.
- Look for special purpose memory allocators for NSD.
- compress dnames in ixfr queries (write_soa_buffer) (zone 2x, mname, rname).
  small gain, nasty code.
- compress dnames in tsig records, keyname, algorithname.
- compress names in packets by pointing to uncompressed_dname entries.
  After each DNAME(with uncompressed target) follows a CNAME that can be
  compressed in this way.
