Encoding a DNS Query correctly
Magnus Henoch
magnus@REDACTED
Mon Nov 16 22:11:32 CET 2009
Jarrod Roberson <jarrod@REDACTED> writes:
> 24> test:send().
> ** exception error: {badrecord,dns_rec}
> in function inet_dns:encode/1
> in call from test:send/0
You're passing a dns_query record to inet_dns:encode/1, but it expects a
dns_rec record. (If I knew the DNS protocol by heart, I'd tell you how
to build one, but for now I'll have to refer to inet_dns.hrl.)
--
Magnus Henoch, magnus@REDACTED
Erlang Training and Consulting
http://www.erlang-consulting.com/
More information about the erlang-questions
mailing list