dig return values

Scott Haneda talklists at newgeo.com
Tue May 26 19:28:16 UTC 2009


On May 26, 2009, at 6:19 AM, Stephane Bortzmeyer wrote:

> On Fri, May 22, 2009 at 03:15:56PM -0700,
> Scott Haneda <talklists at newgeo.com> wrote
> a message of 32 lines which said:
>
>> I do not know, nor would I want to have to know, all the possible
>> return strings I may get back.  My needs are simple, I believe any
>> ANSWER of > 0 I would determine to be true, any timeout of any form
>> I would determine to be false.
>
> Yes, but what about an answer of NOERROR,ANCOUNT=0, for instance:
>
> dig @a.nic.fr A www.google.fr
>
> Is it an error or not?

In my case, that would not be an error, my needs are for a rather  
custom checking system.

>> Can anyone point me to docs on return codes, or is this going to  
>> amount
>> to string parsing?
>
> I do string parsing. As an example, see the script in
> <http://www.bortzmeyer.org/recuperer-zone-dns.html> (the text is in
> french but the comments in the script are in english).

Very nice, thank you for that.  This is a good start for me to see  
what many of the possible return codes are that I need.  My tool never  
gets used in production, this is just something developers are going  
to use.  I installed for them DLZ, and get a lot of "DNS is down"  
emails from the developers.  In all reality, "database has bad data"  
is more accurate.  I just need a tool to show them what is going on,  
without them having to learn all the replies dig may send back.

Thank you again for your link, most helpful.
-- 
Scott * If you contact me off list replace talklists@ with scott@ *




More information about the bind-users mailing list