Subject: Re: how to use DNS or libc/minires.c in cygwin
From: "andy wang" <[email-masked]>
To: [email-masked]
Cc: "Pierre A. Humblet" <[email-masked]>
Date: Wed, 20 Dec 2006 21:24:34 -0500
List-Id: <cygwin.cygwin.com>

Hi, All!

I found another domain name to test and got the right answer.

$ ./a.exe
Minires: search "_sip._udp.yalin.tw" type 33
Minires: /etc/resolv.conf: OK
Minires: resolv.conf nameserver 192.168.1.1
Minires: server "192.168.1.1"
Minires: key SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Minires: value SearchList, error 0 (Windows), size 1
Minires: getdomainname ""
Minires: query "_sip._udp.yalin.tw" type 33
Minires: open sockfd 3: OK
Minires: sendto: server 0101a8c0 sockfd 3 OK
Minires: answer 188 from 0101a8c0. Error 0. Count 1.
go in
dump answer
Host name from SRV record is sip.yalin.tw
Port from SRV record is 5060

Which is the same as using dig on Linux
[ypwang@G-M ypwang]$ dig SRV _sip._udp.yalin.tw
; <<>> DiG 9.2.2 <<>> SRV _sip._udp.yalin.tw
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29705
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;_sip._udp.yalin.tw.            IN      SRV

;; ANSWER SECTION:
_sip._udp.yalin.tw.     86400   IN      SRV     0 0 5060 sip.yalin.tw.

;; AUTHORITY SECTION:
yalin.tw.               86400   IN      NS      yalin.tw.
yalin.tw.               86400   IN      NS      ns1.everydns.net.

;; ADDITIONAL SECTION:
yalin.tw.               86400   IN      A       140.113.131.105

;; Query time: 3638 msec
;; SERVER: 202.99.16.1#53(202.99.16.1)
;; WHEN: Thu Dec 21 10:32:03 2006
;; MSG SIZE  rcvd: 128

It seems that the orginal site "_rvp._tcp.lucent.com" has no SRV record.

Cheers,
Andy

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/