Thanks for the response. But I still seem to be having
problems.
First, I tried using the same interface index
"rdata_array[0].interfaceIndex" to the Query function
that was passed to my Resolve function, but it didn't
seem to affect anything.
Second, I tried the dns-sd program, but I also had a
few problems.
First, I couldn't figure out how to build dns-sd on OS
X Panther without building and installing a new
mDNSResponder. I'm assuming I don't want to clobber my
existing Rendezvous system built into the Mac.
dns-sd.c requires the latest dns_sd.h, so the easiest way to build it
on OS X is:
gcc dns-sd.c -o dns-sd -I../mDNSShared
Second, I went to my Linux box on the same internal
network which I did build dns-sd. But I'm not totally
sure if I entered the parameters correctly. The <FQDN>
parameter was the one I understood the least.
FQDN stands for fully qualified domain name.
But, first, I typed in,
./dns-sd -Q "Mytest._http._tcp.local." 1 1
but the client just hung there. I tried running my
test server both locally on the Linux box, and on my
Mac.
Worried that maybe I messed up my server code, I tried
querying an existing service. I know the Apple
filesharing was on from my Mac so I tried:
./dns-sd -Q "macbox._afpovertcp._tcp.local." 1 1
But this test just hung there too.
Ah, now I see what the problem is.
What you wnat to do is get the IP address for the given host. In DNS
terms, this corresponds to looking up the "A" record, where the left
hand side is the hostname and the right hand side is the IP address.
But the query you're doing is not for the host, it's for the service
record (Mytest._http._tcp.local, macbox._afpovertcp._tcp.local, etc.).
The query you should be doing is just for the hostname plus domain, e.g.
./dns-sd -Q "macbox.local"
On a side note, I noticed the API functions for
DNSServiceAddRecord and DNSServiceRegisterRecord. I am
currently not using any of those. I just want the IP
address from the name I resolved. Am I expected to use
these functions because I don't know what I would
enter as parameters to these?
No, those functions are pretty special-purpose. You don't need to
call them to do this.
Roger.
_______________________________________________
rendezvous mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/rendezvous
Do not post admin requests to the list. They will be ignored.