So I feel that the next code should do the same:
const char* fullname = "machost._afpovertcp._tcp.local.";
//const char* fullname = "_afpovertcp._tcp.local";
printf("looking for %s\n", fullname);
DNSServiceErrorType err;
DNSServiceRef client = NULL;
err =
DNSServiceQueryRecord(&client,0,0,fullname,ns_t_ptr,ns_c_in,query_reply
,NULL);
if (err != kDNSServiceErr_NoError) {
printf("register returned failure:%d\n", err);
}
DNSServiceProcessResult(client);
DNSServiceRefDeallocate(client);
The DNSServiceQueryRecord gives a result for a query
:_afpovertcp._tcp.local. (as found in the comment)
(it actually returns an rrtype = 12 not a rrtype = 1)
But it doesn't work for a single service name. (e.g: machost.....) it
seems.
The documentation states to use QueryRecord if you have shared
services. I am working on a service that could be available multiple
times and the rendezvous based client can select on of them (you can
make some algorithms which to pick)
On Nov 1, 2004, at 8:56 PM, Olger Warnier wrote:
Hi List,
I found quite an extensive discussion on the use of
DNSServiceQueryRecord
and the callback found in:
Subject: DNSServiceQueryRecord (was Re: FreeBSD and Solaris)
From: Eric Wing <email@hidden>
Date: Thu, 15 Jul 2004 20:50:15 -0700 (PDT)
it is:
http://lists.apple.com/archives/rendezvous-dev/2004/Jul/msg00095.html
But it ends with the remark that the callback doesn't seem to work.
On a linux system, I have a situation like that:
When I use DNSServiceResolve(...) and call the DNSServiceProcessResult
(direct or with a select() loop), the service gets resolved and a
hostname
+ port number is available.
But I'd like to use the DNSServiceQueryRecord instead with a seperate
select() loop to make it possible keep shared services.
Using DNSServiceQueryRecord with and call the DNSServiceProcessResult
(again direct of with a select() loop), nothing happens.
I use exact the same servicename,type and domain for both and for the
rrtype and rrclass = 1;
In order to use the DNSServiceQueryRecord, do I need to do some
initialization or something ? Or to make my question a bit more
generic.
Someone has any suggestions what could solve this ?
Kind Regards,
Olger
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Rendezvous-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/rendezvous-dev/
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Rendezvous-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/rendezvous-dev/email@hidden
This email sent to email@hidden