Re: DNS lookup for SMB
Re: DNS lookup for SMB
- Subject: Re: DNS lookup for SMB
- From: Aalok <email@hidden>
- Date: Wed, 12 Jul 2006 19:31:00 +0530
Thanks buddy, it worked!!
two questions.
1) when i do nmblookup i get output like
querying beomedia on 192.168.2.255
192.168.2.105 beomedia<00>
is there anyway to get only 192.168.2.105??
2) Is there any cocoa api which does this? I mean what if I do not
want to use NSTask?
regards,
aalok
On 7/12/06, Sherm Pendley <email@hidden> wrote:
On Jul 12, 2006, at 8:51 AM, Aalok wrote:
> I have one smb drive mounted. I have done it thru finder using
> "smb://media/BM-SHARE$"
> Now I want to have the IP address of "media". How do I get it
> programatically? I have tried NameAndAddress example given in
> Networking help but it doesn't give me the ip address of mounted smb.
> Though it works for other internet URLs.
>
> I have tried NSHost also but it also doesn't work.
>
> Any clue how to get this done?
Sounds like your LAN might be using WINS or NetBIOS for name
resolution instead of DNS. Try using the nmblookup command-line tool
- if that works for you, you could run it with NSTask.
Details: <http://developer.apple.com/documentation/Darwin/Reference/
ManPages/man1/nmblookup.1.html>
Or locally at "man 1 nmblookup".
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
--
Tata Consultacy Services
Voice:- (091) 9850984395
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden