Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dns-sd -P



You can look at the dns-sd source code (included in the mDNSResponder source download from Apple) to see exactly what it's doing. Basically when invoked with -P option, it takes 2 additional arguments: host name and IP address. Normally dns-sd will use your own .local hostname to register the service, but when the hostname is given it'll use that instead. And it also injects an 'A' DNS record into the local mdns, mapping the hostname to the given IP address. This lets you "proxy-register" a service that is hosted on some other machine.

In your dns-sd -P command line below, what's really happening is that it is trying to add an 'A' record mapping "localhost" into 127.0.0.1, which is getting rejected because it's not a name that ends with .local, but it still works because the SRV record for the service itself is going through with the hostname "localhost" and the DNS resolver is resolving it to 127.0.0.1 without the help of mdns. If you replace the "localhost" with "something.local.", it'll work without giving you that error message.

Hope this helps.

- Jae

p.s.) Incidentally, in a few days we are going to release a piece of open-source software we named Zeroconf-to-Zeroconf Toolkit, which will let you do what you're trying to do with the SSH tunnel and more, so you might wanna keep an eye on that.



On Jul 20, 2007, at 11:53 AM, Hamish Allan wrote:

Hi,

Is there a description anywhere of exactly how the -P option differs
from the -R for the dns-sd utility? The man page doesn't document it.

The reason I ask is that if I set up an ssh tunnel, e.g.:

$ ssh -N -L 13689:my_work_machine:3689 my_office_gateway

and then do:

$ dns-sd -R "iTunes@work" _daap._tcp . 13689

iTunes won't connect, but if I do:

$ dns-sd -P "iTunes@work" _daap._tcp . 13689 localhost 127.0.0.1

that works, even though it reports "Got a reply for localhost: Error -65538".

Any clues gratefully appreciated.

Thanks,
Hamish
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bonjour-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/bonjour-dev/jae% 40cs.columbia.edu


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Bonjour-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/bonjour-dev/email@hidden

This email sent to email@hidden
References: 
 >dns-sd -P (From: "Hamish Allan" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.