ask for json in dns_record
This commit is contained in:
parent
9ec05b3aba
commit
b9015b2c55
1 changed files with 2 additions and 2 deletions
|
@ -18,14 +18,14 @@ let dns_question (question : Types.dns_question) =
|
||||||
question.class_
|
question.class_
|
||||||
;;
|
;;
|
||||||
|
|
||||||
let dns_record (record : Types.dns_record) =
|
let dns_record ?(json = false) (record : Types.dns_record) =
|
||||||
Printf.sprintf
|
Printf.sprintf
|
||||||
"{ \"name\": \"%s\", \"type_\": %d, \"class_\": %d, \"ttl\": %d, \"data\": \"%s\" }"
|
"{ \"name\": \"%s\", \"type_\": %d, \"class_\": %d, \"ttl\": %d, \"data\": \"%s\" }"
|
||||||
(Bytes.to_string record.name)
|
(Bytes.to_string record.name)
|
||||||
record.type_
|
record.type_
|
||||||
record.class_
|
record.class_
|
||||||
record.ttl
|
record.ttl
|
||||||
(Utils.get_bytecode ~json:true record.data)
|
(Utils.get_bytecode ~json record.data)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
let dns_packet (record : Types.dns_packet) =
|
let dns_packet (record : Types.dns_packet) =
|
||||||
|
|
Reference in a new issue