Re: How to find network computers, use Rendezvous?
Re: How to find network computers, use Rendezvous?
- Subject: Re: How to find network computers, use Rendezvous?
- From: "John C. Welch" <email@hidden>
- Date: Fri, 15 Oct 2004 11:16:50 -0500
Title: Re: How to find network computers, use Rendezvous?
On 10/14/04 9:19 PM, "trinko" <email@hidden> wrote:
> I'm trying to figure out the best way to find what computers are
> currently connected to the LAN. I'm also interested in knowing if
> and how to access Rendezvous from applescript. Ahyone done that?
> thanks.
Well without a definition of LAN in this specific case and what information you need, (ANY device, or actual computers), the answer is very different.
"Rendezvous" is not a magical thing you search for. It's a collection of services. You search for the services. Rendezvous also doesn’t travel across routers. This, is a good thing.
(Aside: Rendezvous is three things, but most people only care about one, namely Service Discovery)
There is in panther no *direct* way to search for a Rendezvous service via AppleScript outside of do shell script.
I've used AppleScript along with the /usr/bin/mDNS command to find services...*HOWEVER*
- mDNS is a debugging tool. This was explained to my very explicitly by pertinent Apple folks
- mDNS may not always be there in it’s present form
- mDNS doesn’t end on it’s own. It’s not designed to.
- mDNS is pretty tricky, but useable if you keep tems 1-3 in mind.
Having said that, for example, you want to find all the Macs on your local subnet who have SSH enabled. Now, this of course assume that all your SSH – enabled Macs are using Panther, since, that is, IIRC, the first version of the OS that allows you to find SSH – enabled macs via Rendezvous, you would run
mDNS -B _ssh._tcp local.
Note that trailing dot after the local, it’s important.
If you run that in terminal, you’ll see any and all boxes running SSH that are advertising via Rendezvous. You’ll note also that it doesn’t stop. You have to use ctrl-c to quit it.
If you wanted to check for remote apple events, then you’d use eppc in place of the ssh, ftp for ftp.
The way I make this work with do shell script, so that it doesn’t go into neverland is to run mDNS as a background task and dump the output to a text file..
do shell script "mDNS -B _ssh._tcp local. > ~/Desktop/SSHService.txt 2>&1 &"
I then follow it with a second do shell script...
do shell script "killall mDNS"
Which kills mDNS.
The information I get can then be parsed, and for a single computer looks like this:
Browsing for _ssh._tcplocal.
Talking to DNS SD Daemon at Mach port 3331
Timestamp A/R Flags Domain Service Type Instance Name
11:09:15.710 Add 1 local. _ssh._tcp. Aurora
It’s tedious, but it works...however, that’s how you use Rendezvous, so you have to know what you’re looking for. If you want to get a very nice picture of what is going on rendezvous-wise on your network, I highly recommend getting a copy of Rendezvous Browser, it’s a nice app that helps you find services and service names.
john
--
You can whoop those two guys easy enough. But what if they come back with a friend who’s big enough to lift you off the ground and pin you to the wall with one hand? What then, slugger? (You’re going to feel like a fucking idiot, that’s what.)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden