remove debug stuff, there is probably an issue somewhere in code, either in the parser or the name decompression, since i don't have the same result as in the tutorial, but i dont think its *that* bad
This commit is contained in:
parent
f6aaf8f84d
commit
b87c8913fe
1 changed files with 5 additions and 9 deletions
|
@ -58,15 +58,11 @@ let parse_record reader =
|
||||||
; data =
|
; data =
|
||||||
(let raw_data = Bytes.sub data record_len data_len in
|
(let raw_data = Bytes.sub data record_len data_len in
|
||||||
match type_ with
|
match type_ with
|
||||||
| v when v = DNSType.ns ->
|
| t when t = DNSType.ns ->
|
||||||
print_endline "aaaaaaaaaaaaa";
|
fst
|
||||||
let r1, r2 =
|
(decode_name
|
||||||
decode_name
|
{ reader with pointer = reader.pointer + offset_name + record_len })
|
||||||
{ reader with pointer = reader.pointer + offset_name + record_len }
|
| t when t = DNSType.a -> String.to_bytes (get_ip raw_data)
|
||||||
in
|
|
||||||
Printf.printf "%s - %d\n" (String.of_bytes r1) r2;
|
|
||||||
r1
|
|
||||||
| v when v = DNSType.a -> String.to_bytes (get_ip raw_data)
|
|
||||||
| _ -> raw_data)
|
| _ -> raw_data)
|
||||||
} )
|
} )
|
||||||
;;
|
;;
|
||||||
|
|
Reference in a new issue