From b9015b2c55179afa83c36403a1befa1015bbfc2c Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 19 Jun 2023 22:33:05 +0200 Subject: [PATCH] ask for json in dns_record --- lib/debug.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/debug.ml b/lib/debug.ml index 8fe99c3..3c127da 100644 --- a/lib/debug.ml +++ b/lib/debug.ml @@ -18,14 +18,14 @@ let dns_question (question : Types.dns_question) = question.class_ ;; -let dns_record (record : Types.dns_record) = +let dns_record ?(json = false) (record : Types.dns_record) = Printf.sprintf "{ \"name\": \"%s\", \"type_\": %d, \"class_\": %d, \"ttl\": %d, \"data\": \"%s\" }" (Bytes.to_string record.name) record.type_ record.class_ record.ttl - (Utils.get_bytecode ~json:true record.data) + (Utils.get_bytecode ~json record.data) ;; let dns_packet (record : Types.dns_packet) =