{"id":"dns-message-validate","version":"1.0.0","description":"Validate DNS message hex structure: counts, names, compression, and OPT records.","supported_operations":["validate dns message wire structure","check dns packet section counts","is this dns hex structurally valid","find a truncated dns message","check dns compression pointer safety","accept or reject a dns message shape","בדיקת מבנה של הודעת די אן אס"],"unsupported_operations":["return the parsed questions and records","repair a malformed dns message","check dnssec or authenticate the sender","explain individual header flag names"],"semantics":["A lowercase even-length hex string within the byte cap is checked as one RFC 1035 message. Syntax that is not hex throws invalid_input. A message past a declared cap throws limit_exceeded before the structural walk when the cap is visible up front.","A structurally illegal message returns valid false, a snake_case reason, the decoded byte length, zero section counts, and the byte offset of the failure. Reasons include truncated_header, truncated_name, truncated_record, truncated_rdata, truncated_opt, trailing_bytes, reserved_label, bad_pointer, forward_pointer, compression_loop, opt_name, opt_section and multiple_opt.","A non-zero header Z is valid. The TC bit alone does not make a complete message invalid. Unknown type, class, opcode and RCODE values are valid. OPT framing follows RFC 6891 Section 6.","On success, reason and offset are null and the section counts are the header counts. opt_count is 0 or 1.","Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity."],"limits":{"max_message_bytes":512,"max_hex_chars":1024,"max_records":32,"max_name_octets":255,"max_label_octets":63,"max_pointer_hops":16,"max_rdata_bytes":489,"max_opt_options":16},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["message_hex"],"properties":{"message_hex":{"type":"string","minLength":0,"maxLength":1024,"pattern":"^([0-9a-f]{2})*$"}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","message_bytes","question_count","answer_count","authority_count","additional_count","opt_count","offset"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"minLength":1},"message_bytes":{"type":"integer","minimum":0,"maximum":512},"question_count":{"type":"integer","minimum":0,"maximum":32},"answer_count":{"type":"integer","minimum":0,"maximum":32},"authority_count":{"type":"integer","minimum":0,"maximum":32},"additional_count":{"type":"integer","minimum":0,"maximum":32},"opt_count":{"type":"integer","minimum":0,"maximum":1},"offset":{"type":["integer","null"],"minimum":0,"maximum":512}}},"examples":[{"input":{"message_hex":"03e50800000000010000000000000100010000000000040a010034"},"output":{"valid":true,"reason":null,"message_bytes":27,"question_count":0,"answer_count":1,"authority_count":0,"additional_count":0,"opt_count":0,"offset":null}},{"input":{"message_hex":"0000000000000000000000010000290200000080000000"},"output":{"valid":true,"reason":null,"message_bytes":23,"question_count":0,"answer_count":0,"authority_count":0,"additional_count":1,"opt_count":1,"offset":null}},{"input":{"message_hex":"00"},"output":{"valid":false,"reason":"truncated_header","message_bytes":1,"question_count":0,"answer_count":0,"authority_count":0,"additional_count":0,"opt_count":0,"offset":1}}],"execute_url":"/v1/tools/dns-message-validate/versions/1.0.0/execute"}