hmurray at megapathdsl.net
Mon Apr 10 17:43:44 UTC 2017
The basic idea is to simplify things. In the new world, there is only one
DNS thread. To do a lookup, the main thread starts a worker thread with a
pointer to a peer structure. The worker thread returns the return code and
answer in global storage and self destructs. Maybe it raises a signal to
wakeup the main thread. When it notices that the answer is ready, the main
thread processes it including freeing the answer.
Do we want a configure option to build/run without DNS lookups? Even if we
don't, we should probably structure the code to support that.
The pool code already scans the peer list and does DNS lookups. We can piggy
back on that.
So we need a dummy peer block for the server case. The peer structure
already has room for a name - the pool case needs it. We'll have to add a
The pool case makes another peer slot for each address it adds. For the
server case, there is only one address. I think we can reuse the same peer
block. It needs a flag to indicate that the IP Address is valid.
My plan is to delete ntp_intres, ntp_worker, and work_thread,
then add a new module to fill in the gaps.
close_all_except is in libntp/ntp_worker.c
where should it live? Or can we get rid of it?
It's only called from ntpdmain.
These are my opinions. I hate spam.
More information about the devel