Description
Exposes deterministic hooks for DNS protocol tests, not application use.
Example:
Flyology.IO.DNS.Testing.Use_Deterministic_Transaction_IDs (16#1234#);
Post_Close_Receive_Waits
function Post_Close_Receive_Waits return Natural
Return receive waits attempted after the UDP socket was closed. The value is zero in a normal production build.
Return value
Number of invalid post-close receive waits
Reset_Receive_Waits
procedure Reset_Receive_Waits
Reset the receive-wait observations collected by a test-hooks build. A normal production build compiles this operation to a no-op.
Use_Deterministic_Transaction_IDs
procedure Use_Deterministic_Transaction_IDs (First : Natural)
Select a process-global deterministic transaction-ID sequence. Concurrent resolver calls must be stopped while changing this test mode.
Parameters
- First
First identifier in the deterministic sequence
Use_OS_Transaction_IDs
procedure Use_OS_Transaction_IDs
Restore the process-global production OS-entropy mode.
Validate_Response
procedure Validate_Response
(Packet : Ada.Streams.Stream_Element_Array;
Expected_ID : Natural;
Expected_Name : String;
For_IPv6 : Boolean := False)
Exercise the production response parser without network I/O.
Parameters
- Packet
Wire-format DNS response
- Expected_ID
Expected transaction identifier
- Expected_Name
Expected canonical question name
- For_IPv6
Parse an AAAA response when True, otherwise A
Raised exceptions
- Flyology
.IO.DNS.Malformed_Response Packet validation fails