• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to identify the server from which a volume was mounted?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to identify the server from which a volume was mounted?


  • Subject: Re: How to identify the server from which a volume was mounted?
  • From: Quinn <email@hidden>
  • Date: Thu, 2 Jul 2009 09:11:01 +0100

At 5:16 -0700 1/7/09, Jerry Krinock wrote:
How can I get the server name, to display to the user?

There's no really good way to do this. The server name, as returned by GetAliasInfo, only really applies to AppleShare servers. Other server types don't necessarily support this name in any meaningful way.


Generally I'd recommend you get the server URL using FSCopyURLForVolume and proceed from there.

P.S. Again, if Alias Manager can't, maybe statfs(2) can do this. If I call statfs() upon a file on an afp volume, the mntfromname field of the returned struct is a C string, for example:

  afp_2lZ2Za000bB10000oM0000VU-1.2e00002e

I'd bet that those characters would identify the server if someone could explain how to decode it.

Nah, don't go there. For non-local volumes the format of the mntfromname string is complete private to the VFS plug-in. If you mount an SMB server, you'll see a completely different format.


S+E
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to identify the server from which a volume was mounted?
      • From: Jerry Krinock <email@hidden>
References: 
 >Re: How to identify the server from which a volume was mounted? (From: Quinn <email@hidden>)
 >Re: How to identify the server from which a volume was mounted? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: How to get the tcp statistics counter "tcps_rcvbadsum"
  • Next by Date: Re: How to get the tcp statistics counter "tcps_rcvbadsum"
  • Previous by thread: Re: How to identify the server from which a volume was mounted?
  • Next by thread: Re: How to identify the server from which a volume was mounted?
  • Index(es):
    • Date
    • Thread