resolved: implement query coalescing
authorDaniel Mack <daniel@zonque.org>
Mon, 30 Nov 2015 11:47:11 +0000 (12:47 +0100)
committerDaniel Mack <daniel@zonque.org>
Tue, 8 Dec 2015 15:51:41 +0000 (16:51 +0100)
commit0afa57e2e7645f3a550729e4daadda419de179c5
treeaf362af7fe917831d3740ac4d2c826f33d98b1d3
parenta9da14e1e97ff774761966c2e1d83b0c6750b367
resolved: implement query coalescing

Implement dns_transaction_make_packet_mdns(), a special version of
dns_transaction_make_packet() for mDNS which differs in many ways:

a) We coalesce queries of currently active transaction on the scope.
   This is possible because mDNS actually allows many questions in a
   to be sent in a single packet and it takes some burden from the
   network.

b) Both A and AAAA query keys are broadcast on both IPv4 and IPv6
   scopes, because other hosts might only respond on one of their
   addresses but resolve both types.

c) We discard previously sent packages (t->sent) so we can start over
   and coalesce pending transactions again.
src/resolve/resolved-dns-transaction.c