[ntp:hackers] Running out of Recvbufs

Danny Mayer mayer at ntp.isc.org
Sat Dec 3 12:14:42 PST 2005


David L. Mills wrote:
> Danny,
> 
> Sorry; my grad students concluded this was the wrong way to write an I/O
> system. They concluded the right way was as separate modules for each
> operating system and not the threaded weeds we have today. I'm not
> saying they are right or wrong, just that an attempt to fix weeds and
> harmonize the result is beyond the capability of grad students. I'm not
> happy with that result.
> 
> Dave
> 
Dave,

Thankfully they didn't write separate modules for each O/S. It would
have been a maintenance nightmare. The right way is to move the O/S
specific configuration to the configure file, keep the actual code
conditionals very limited and write functions to handle pieces that need
conditionals. I've been getting rid of the conditional code as best as I
can without doing a complete rewrite. For a great model I look at the
BIND 9 code, though that admittedly was written by some of the smartest
programmers on the planet. The BIND 9 code has very few macros.

I've probably reworked most of the I/O code but there are still parts
that should get cleaned up. I believe Paul's Eventlib code is pretty
clean but it would take quite a bit of work to integrate it with NTP
just because the design would need changes to take advantage of it.

Danny


More information about the hackers mailing list