I have no idea why send data is 48 bytes 010,0,0..., someone can explain? the problem is buffer for data received, I don\'t know how big he should be, and even if I receive
Similar to my issue when trying to query the time from a self-hostet Windows-NTP-Server with the C++ library NTPClient which uses boost for the network tasks, msg[48] = { 010,0,0,0,0,0,0,0,0 };
configures the ntp.flags.mode. After comparing the network traffic of w32tm /stripchart /computer:10.159.96.65
using Wireshark, flag 27 or 11 seem to be the choices for my usecase:
Comparison of NTP network packages
tmit = ntohl(((time_t*)tempBuffer)[6]);
extracts the data from the received package. It looks like