diff --git a/network-query.rkt b/network-query.rkt index b42da85..fc14111 100644 --- a/network-query.rkt +++ b/network-query.rkt @@ -172,6 +172,7 @@ s (udp-address server-host-name server-port))) (define subscription-id (list s (dns-message-id query))) + (define start-time (current-inexact-milliseconds)) (list (send-message req) (send-message (set-timer subscription-id (* timeout 1000) #t)) (subscribe subscription-id @@ -183,6 +184,9 @@ (k 'no-answer))] [(dns-reply reply-message source (== s)) ;; TODO: maybe receive only specifically from the queried IP address? + (write `(,q --> ,(dns-message-answers reply-message) from ,server-ip in + ,(inexact->exact (round (- (current-inexact-milliseconds) start-time))) + ms)) (newline) (if (not (= (dns-message-id reply-message) (dns-message-id query))) w (transition w