Subject: [Sipping] dns query

From: [email-masked]
Date: Tue, 8 Feb 2005 12:43:02 +0530 (IST)

Hi all,

i have constructed a dns query using structures and sending to port53 of
our local dns server.

The response which i receive contains only some fields. i am not able to
retrive the ip address (the buffer length i have given is 1000 bytes,
hopefully enough!!)

how to get a full response to the query that i have made.

Also in using res_query, i am able to get the entire response for QTYPE = A
for QTYPE other than A (in integer it is 1), i am not getting any
response, Why?

Thanks and regards

_______________________________________________
Sipping mailing list  https://www1.ietf.org/mailman/listinfo/sipping
This list is for NEW development of the application of SIP
Use [email-masked] for questions on current sip
Use [email-masked] for new developments of core SIP

---

From: Jim Reid <[email-masked]>
Date: Tue, 08 Feb 2005 11:42:03 +0000

>>>>> "suganya" == suganya  <[email-masked]> writes:

    suganya> Hi all, i have constructed a dns query using structures
    suganya> and sending to port53 of our local dns server.

    suganya> The response which i receive contains only some fields. i
    suganya> am not able to retrive the ip address (the buffer length
    suganya> i have given is 1000 bytes, hopefully enough!!)

    suganya> how to get a full response to the query that i have made.

You will more than likely have got the full response already. I
suspect you are having trouble decoding the contents of the data
structures that were filled in when the call to res_query() returned.
DNS replies rarely exceed 512 bytes.

Note too that it is perfectly valid for a DNS response to have an
empty Answer, Authority and Additional Sections. Or any combination of
these.

If you want further help, I suggest you post in bind-users or
somewhere like that. If you do, be sure to show things like the code
you've written, what you were looking up, which name server you were
using, etc, etc. Without that detail, I doubt anyone can help you. You
might also want to show the output from a lookup too such as dig when
it is used to make the same sort of query as the one you've tried with
res_query().

I'd recommend that you read the chapter on the resolver library API in
the DNS & Bind book by Cricket Liu. 

    suganya> Also in using res_query, i am able to get the entire
    suganya> response for QTYPE = A for QTYPE other than A (in integer
    suganya> it is 1), i am not getting any response, Why?

The obvious explanation is that the name you're looking up doesn't
have a resource record matching the QTYPE you've asked for.