Resolving LAN's IP (with AFP?) 
Author Message
 Resolving LAN's IP (with AFP?)

Hi!
Any idea how to resolve an IP adress of a LAN? I would like a methode that
returns the name of a computer, even if the computer isn't mounted as a
server just like the Finder does (CMD+K)
Ex.:

192.168.1.2 ---> "Computer of Mr X"
192.168.1.3 ---> "Mrs' Y Computer"
...

The name of the computer is the one you can see in "system preferences>
Share"

Thx!



Wed, 10 Aug 2005 18:26:47 GMT  
 Resolving LAN's IP (with AFP?)
Try the MBS plugin.. There's AFP support there.  Right Christian?

Quote:
> Hi!
> Any idea how to resolve an IP adress of a LAN? I would like a methode that
> returns the name of a computer, even if the computer isn't mounted as a
> server just like the Finder does (CMD+K)
> Ex.:

> 192.168.1.2 ---> "Computer of Mr X"
> 192.168.1.3 ---> "Mrs' Y Computer"
> ...

> The name of the computer is the one you can see in "system preferences>
> Share"

> Thx!

--
Charlie Boisseau


Wed, 10 Aug 2005 20:12:02 GMT  
 Resolving LAN's IP (with AFP?)

Quote:

> Try the MBS plugin.. There's AFP support there.  Right Christian?

Well, for looking on a server's volume list and mounting volumes. But
for this, I'm not sure.

You may try using the Rendezvous classes to get this names, if it's
using Mac OS X 10.2.

Mfg
Christian

--
Three thousand functions in one REALbasic plug-in. The MBS Plugin.

<http://www.monkeybreadsoftware.de/realbasic/plugins.html>



Thu, 11 Aug 2005 00:10:58 GMT  
 Resolving LAN's IP (with AFP?)
Ops... I clicked the wrong button in entourage :-/ I replied to Charlie and
not to the newsgroup.. Sorry about that... My message was:

I have the MBS plugin, and it's a really good one. But the AFP functions
cannot resolve Ips... I think... With MBS you can mount a server with a
given user name and password and list the server's hard drives (if you don't
mount it as a "guest")

Am I wrong?

And now my message is :-> :

Quote:
>You may try using the Rendezvous classes to get this names, if it's
>using Mac OS X 10.2.

Ok, I'll try that...


Thu, 11 Aug 2005 00:27:05 GMT  
 Resolving LAN's IP (with AFP?)

Quote:

> I have the MBS plugin, and it's a really good one. But the AFP functions
> cannot resolve Ips... I think...

Correct.
You can dig on the web for the AFP protocol and it should no be too
difficult to try all possible IPs on the a certain port to ask them just
for their name.

Quote:
> With MBS you can mount a server with a given user name and password and
> list the server's hard drives (if you don't mount it as a "guest")

Correct.

Mfg
Christian

--
Three thousand functions in one REALbasic plug-in. The MBS Plugin.

<http://www.monkeybreadsoftware.de/realbasic/plugins.html>



Thu, 11 Aug 2005 02:28:20 GMT  
 Resolving LAN's IP (with AFP?)
 >> I have the MBS plugin, and it's a really good one. But the AFP functions

Quote:
>> cannot resolve Ips... I think...

> Correct.
> You can dig on the web for the AFP protocol and it should no be too
> difficult to try all possible IPs on the a certain port to ask them just
> for their name.

Yes, it's easy to find valid IPs, I only have to scan IPs between
192.168.1.0-255 on the port 548 to find AFP servers (even server that aren't
mounted) and on the port 80 to find routers.
Now the problem is: how to find servers' names? I have been looking for
infos about the AFP protocol on apple's developer site... Haven't found
anything useful yet. I'll search again... And againg... :-)


Thu, 11 Aug 2005 17:01:42 GMT  
 Resolving LAN's IP (with AFP?)
I've found this example on apple's dev. site:
ftp://ftp.apple.com/developer/Sample_Code/Networking/CFMRendezvousSam...

If you launch the compiled app, then press "c" and "r", it'll list every AFP
server with their name.
But the example is written in C, and I don't know what to do to use it with
RB. Any idea someone?

Quote:
> Hi!
> Any idea how to resolve an IP adress of a LAN? I would like a methode that
> returns the name of a computer, even if the computer isn't mounted as a
> server just like the Finder does (CMD+K)
> Ex.:

> 192.168.1.2 ---> "Computer of Mr X"
> 192.168.1.3 ---> "Mrs' Y Computer"
> ...

> The name of the computer is the one you can see in "system preferences>
> Share"

> Thx!



Fri, 12 Aug 2005 19:03:11 GMT  
 Resolving LAN's IP (with AFP?)

Quote:

> But the example is written in C, and I don't know what to do to use it with
> RB. Any idea someone?

Months ago I built this into the MBS Plugin...

Mfg
Christian

--
Three thousand functions in one REALbasic plug-in. The MBS Plugin.

<http://www.monkeybreadsoftware.de/realbasic/plugins.html>



Fri, 12 Aug 2005 19:29:17 GMT  
 Resolving LAN's IP (with AFP?)

Quote:
>> But the example is written in C, and I don't know what to do to use it with
>> RB. Any idea someone?

> Months ago I built this into the MBS Plugin...

Ok... But you previously wrote this:

Quote:
>> I have the MBS plugin, and it's a really good one. But the AFP functions
>> cannot resolve Ips... I think...

> Correct.

So in the end, can I resolve LAN IPs with MBS like apple's example does?
Thx a lot for your help


Fri, 12 Aug 2005 20:34:08 GMT  
 Resolving LAN's IP (with AFP?)

Quote:

> So in the end, can I resolve LAN IPs with MBS like apple's example does?

Not sure. You can use Rendezvous if all your Macs have Mac OS X 10.2,
but if not, you must do it yourself.

Mfg
Christian

--
Three thousand functions in one REALbasic plug-in. The MBS Plugin.

<http://www.monkeybreadsoftware.de/realbasic/plugins.html>



Sat, 13 Aug 2005 00:46:16 GMT  
 Resolving LAN's IP (with AFP?)

Quote:

> Organization: T-Online
> Newsgroups: comp.lang.basic.realbasic
> Date: Mon, 24 Feb 2003 17:46:16 +0100
> Subject: Re: Resolving LAN's IP (with AFP?)


>> So in the end, can I resolve LAN IPs with MBS like apple's example does?

> Not sure. You can use Rendezvous if all your Macs have Mac OS X 10.2,
> but if not, you must do it yourself.

you might be able to pull this off with a bit of applescript, something
like:

on run{ipAddress}
    try
        set compAddress to "eppc://" & ipAddress
        set remoteFinder to application "Finder" of machine compAddress
        tell remoteFinder
            set compName computer name
        end tell
    on error
        return "ERROR"
    end try
    return compName
end run

The computer name function is in a scripting addition, not an application,
so you can't link to it directly. Instead, link to the finder on the remote
mac and tell it to use the scripting addition

I'm not networked with other macs right now to test this syntax. It would
require that tcp/ip program linking be enabled in the Sharing control panel
of each of the remote macs. I don't know the minimum OS/ Open transport/
Applescript versions that suppport it or which scripting addition is
required.

Best of luck!
Brian



Wed, 17 Aug 2005 03:22:19 GMT  
 Resolving LAN's IP (with AFP?)
AppleScript display a window and ask a password :(
Even when I type the password, the script does not return anything (and
there is no "ERROR" returned)...
I'll try to change a bit the AS code... thx a lot!
Quote:
> you might be able to pull this off with a bit of applescript, something
> like:

> on run{ipAddress}
>   try
>       set compAddress to "eppc://" & ipAddress
>       set remoteFinder to application "Finder" of machine compAddress
>       tell remoteFinder
>           set compName computer name
>       end tell
>   on error
>       return "ERROR"
>   end try
>   return compName
> end run

> The computer name function is in a scripting addition, not an application,
> so you can't link to it directly. Instead, link to the finder on the remote
> mac and tell it to use the scripting addition

> I'm not networked with other macs right now to test this syntax. It would
> require that tcp/ip program linking be enabled in the Sharing control panel
> of each of the remote macs. I don't know the minimum OS/ Open transport/
> Applescript versions that suppport it or which scripting addition is
> required.

> Best of luck!
> Brian



Thu, 18 Aug 2005 19:13:20 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. resolving IP adresses

2. Resolving hostname to IP number

3. Tcl: DNS required for resolving 'localhost'?

4. LAN or NOT LAN

5. Usage of compile ?compile >mark <mark <resolve >resolve

6. Page length doesn't work - RESOLVED (if not solved)

7. resolving multiple orig's

8. CA-5.2 print problen on LAN's

9. pgf90 can't resolve Lapack routine name?

10. Pythonwin can't resolve WMI instances

11. vim5 + python: can't resolve symbol

12. Q: Problem loading packages: can't resolve TCL references

 

 
Powered by phpBB® Forum Software