Re: Server Address from Mounted SMB Volume
Re: Server Address from Mounted SMB Volume
- Subject: Re: Server Address from Mounted SMB Volume
- From: "Herb Petschauer" <email@hidden>
- Date: Wed, 6 Feb 2008 08:13:37 -0800
The aforementioned Apple Sample (previous thread), DumpVolumeInfo will
give you a URL. You could parse the URL for the server location...
./DumpVolumeInfo -siv /Volumes/DEV/
[edited for anonymity]
Volume '/Volumes/DEV/':
PrintStatFSInfo
f_bsize = 4096 (4 KB)
f_iosize = 1044480 (1020 KB)
f_blocks = 292541641 (1115 GB)
f_bfree = 32919242 (125 GB)
f_bavail = 32919242 (125 GB)
f_files = -1
f_ffree = -1
f_fsid = 0x000000162e000005
f_owner = 501 (me)
f_type = 22 (???)
f_flags = 0x00000018
MNT_RDONLY = NO
MNT_SYNCHRONOUS = NO
MNT_NOEXEC = NO
MNT_NOSUID = YES
MNT_NODEV = YES
MNT_UNION = NO
MNT_ASYNC = NO
MNT_DONTBROWSE = NO
MNT_UNKNOWNPERMISSIONS = NO
MNT_AUTOMOUNTED = NO
MNT_JOURNALED = NO
MNT_EXPORTED = NO
MNT_LOCAL = NO
MNT_QUOTA = NO
MNT_ROOTFS = NO
MNT_DOVOLFS = NO
f_fstypename = 'smbfs'
f_mntonname = '/Volumes/DEV'
f_mntfromname = '//email@hidden/DEV'
PrintDiskIDInfo
id = '/Volumes/DEV'
url = 'smb://email@hidden/DEV'
On 05/02/2008, Michael Hanna <email@hidden> wrote:
> How do I find the network server name OR IP address from a mounted SMB
> share(in Tiger and Leopard)?
>
> I have tried a couple methods so far(mostly Carbon calls), but to no avail.
>
> Using PBHGetVolParmsSync() in Tiger and FSGetVolumeParms() in Leopard
> I can get the GetVolParmsInfoBuffer. the vMServerAdr field seems to
> only return something meaningful for AFP shares.
>
> FSGetVolumeInfo doesn't seem to return host information either.
>
> perhaps there's a BSD call/tool or Cocoa call?
>
> Michael
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden