[ntp:questions] Re: This is tougher than I thought?
hmurray at suespammers.org
Wed Jan 25 09:44:59 UTC 2006
In article <1138114236.831110.128690 at g49g2000cwa.googlegroups.com>,
"Axonn" <axonnus at gmail.com> writes:
>Thanks for answering, David, Danny, Maarten...
>David: I think you just saved my life since that code is really helpful
>and is pretty much exactly what I need. I can port it to VC++ or use it
>directly from VB. Thank you a lot!!!
>Danny: wasn't thinking at re-inventing the wheel anyway. But I didn't
>find any ready-to-use tools until David showed me that. I wouldn't have
>imagined NTP is such a big thing but I like it. I would study it more
>but I got a software to finish and priorities to set. I just wanted a
>piece of mind from you experts in this matters. And you really saved me
>of a lot of hours of dirt digging probably.
I haven't figured out what you really want to do, but since you
seem determined to write your own low level networking code,
I'll toss in my 2 cents...
Rolling your own NTP is not a simple problem. I'll break it down into
1) Selecting the servers to use.
2) Sending/receiving a few packets.
3) Deciding when to send them.
4) Using the data in the answers to keep the local clock accurate.
5) Making sure you don't do anything abusive.
The second part is easy, but I think that's the one you are focused
on. Please think about the other parts before you write any code to
fling packets around.
The last part is one of my hot buttons. It's fairly easy to shoot
yourself in the foot by screwing up the retransmission heuristics.
With networks, it's possible to cause problems for other people.
I'd call the following report required reading for anybody thinking
about writing networking code. Note that it happened with something
as simple as NTP.
Flawed Routers Flood University of Wisconsin Internet Time Server
If you poke around on the pool project you will find that abusive
clients are a serious problem. A big chunk of traffic comes from
a few clients.
I will also repeat the suggestion of running ntpd on your
system and letting it keep the local system time accurate. Then your
code would just use the system time. Please try it for a while.
You might learn something, especially if you keep an eye
on the NTP statistics.
The suespammers.org mail server is located in California. So are all my
other mailboxes. Please do not send unsolicited bulk e-mail or unsolicited
commercial e-mail to my suespammers.org address or any of my other addresses.
These are my opinions, not necessarily my employer's. I hate spam.
More information about the questions