This repository has been archived on 2024-05-23. You can view files and clone it, but cannot push or open issues or pull requests.
dns-toy/bin/main.ml
2023-06-14 16:35:14 +02:00

10 lines
340 B
OCaml

open Dnstoy
let () =
let response = Network.send_request "8.8.8.8" "www.example.com" in
print_endline (Utils.get_bytecode response);
let response', dns_header = Response.parse_header response in
let dns_question = Response.parse_question response' in
Debug.print_dns_header dns_header;
Debug.print_dns_question dns_question
;;