From: Simon Wright <simon@pushface.org>
Subject: Re: Sockets, Streams, and Element_Arrays: Much confusion
Date: Sun, 01 Jan 2023 16:11:22 +0000 [thread overview]
Message-ID: <lyfscup74l.fsf@pushface.org> (raw)
In-Reply-To: torkt0$14bv$1@gioia.aioe.org
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> Well decoding NTP query from Stream_Element_Array takes 2 statements
> (extracting two big-endian 32-bit numbers). You can check the
> implementation here:
>
> http://www.dmitry-kazakov.de/ada/components.htm#17.17
>
> which is under-zero brained (:-)) compared to dealing with definition
> of record layout and bit orders you suggest.
It's obviously OK to use just the fields of interest in the received
packet.
But this strikes me as something I would have questioned at review:
Data : Stream_Element_Array (1..NTP_Packet_Size) :=
( 1 => 2#1110_0011#, -- LI, Version, Mode
2 => 0, -- Stratum, or type of clock
3 => 0, -- Polling Interval
4 => 16#EC#, -- Peer Clock Precision
13 => 49,
14 => 16#4E#,
15 => 49,
16 => 52,
others => 0
);
next prev parent reply other threads:[~2023-01-01 16:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-31 12:11 Sockets, Streams, and Element_Arrays: Much confusion Mark Gardner
2022-12-31 13:11 ` Dmitry A. Kazakov
2022-12-31 13:50 ` Mark Gardner
2022-12-31 14:16 ` Dmitry A. Kazakov
2022-12-31 15:18 ` Jeffrey R.Carter
[not found] ` <de32dc82-ba42-4b27-a140-ddab9587219fn@googlegroups.com>
2022-12-31 22:49 ` Jeffrey R.Carter
2022-12-31 22:55 ` Dmitry A. Kazakov
2022-12-31 17:39 ` Simon Wright
2022-12-31 19:36 ` Mark Gardner
2022-12-31 20:16 ` Dmitry A. Kazakov
2022-12-31 23:41 ` Simon Wright
2023-01-01 9:48 ` Dmitry A. Kazakov
2023-01-01 16:11 ` Simon Wright [this message]
2023-01-01 16:17 ` Niklas Holsti
2023-01-05 7:55 ` Daniel Norte de Moraes
2023-01-05 10:35 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox