[ntp:questions] Reference implementation 4.2.4p6 receive() swapping bytes..?

regan_russell at hotmail.com regan_russell at hotmail.com
Sat Mar 7 01:53:26 UTC 2009

Hi there,

In ntp_config.c I have added my own modifiers on the server line so
that if talking to one of my own servers I flag it as such, in the
peer structure I add a flag to indicate own of my category of time
servers, I added code to ntp_crypto.c and ntp_protocol.c and have my
own crypto type and shove my own stuff into extension fields. All the
stuff I am doing works but...

This is my problem..

In the receive() function I am getting packets with the xmit, rec,
orig fields and semi-randomly in different byte order.
I chased this down from process_packet() but stopped there. There is
almost a pattern to it..It is almost deterministic...

host order
host order
network order
network order
host order
host order
host order
network order
network order

What is going on...? Have I broken something..? Is there something I
am simply just not getting..?
Both pen and paper and programmatically (logging) I can determine
ordering similar to the above..

Its driving me nuts.. any ideas anyone..?



More information about the questions mailing list