I am working on an NTP Client. A few other threads indicate that the a message containing "\x1b' + 47 * '\0" is sent to the NTP server, but none of these threads give an explanation about what this message actually means or why it is sent. I've tried looking at the NTP RFC but I was unable to find any information about it in there either.
相关问题
- IPAddress.[Try]Parse parses 192.168 to 192.0.0.168
- What would prevent code running in a Docker contai
- How to run tcp and udp on a single port at same ti
- Docker-Compose: Can't Connect to Mongo
- Make Laravel Homestead Accessible via the Internet
相关文章
- RMI Threads prevent JVM from exiting after main()
- fsc.exe is very slow because it tries to access cr
- How many times will TCP retransmit
- Writing an OS X kernel extension to implement Linu
- Virtual Box limit Bandwith on network [closed]
- Is ICMP a transport layer protocol?
- How to add negative filter in network tab of Chrom
- Chrome failing to connect to websocket server (Opc
"\x1b' + 47 * '\0"
represents a data field of 48 bytes.0x1B
followed by 47 times0
. 48 bytes is the size of an NTP UDP packet. The first byte (0x1B) specifiesLI
,VN
, andMode
.RFC 5905 NTP Specification (7.3. Packet Header Variables) specifies the message header as follows:
Setting the first byte of the data to
0x1B
or00 011 011
meansYou may also use the more recent version (
VN = 4
). This would require the first header byte to be set to0x23 (00 100 011)
.The modes are defined as
Specifying
Mode = 3
indicates the message as a client request message.Sending such a packet to port 123 of an NTP server will force the server to send a reply package.