|
This Technical Note documents the enhanced features of Macintosh File Sharing
version 7.6.1.
[Feb 01 1995]
|
Introduction
Macintosh File Sharing 7.6.1 supports a subset of the AppleShare File Server
4.0.2 server features. This Technical Note tells how to identify Macintosh File
Sharing 7.6.1, lists the server control calls supported by Macintosh File
Sharing 7.6.1, documents behavior differences in the supported server control
calls, documents the new rule File Sharing uses to determine what volumes to
share, and documents how to determine why a busy volume cannot be unmounted.
All other documentation for the AppleShare and File Sharing API can be found in
the AppleShare API SDK (AppleShare 3.0 Developer's Kit) on the Mac OS Software
Developer's Kit CD-ROM. Macintosh File Sharing 7.6.1 is installed as part of
System 7.5 Update.
Back to top
Identifying Enhanced Macintosh File Sharing
Macintosh File Sharing 7.6.1 has the server type of MFSType ($0000) and has the
server version $003E. It can be identified using the server control call
SCServerVersion as shown here.
enum
{
kNewFileSharingVersion = 0x3e /* File Sharing 7.6.1's version number */
};
Boolean HasEnhancedFileSharing(void)
{
SCParamBlockRec scPB;
Boolean result;
result = false;
/* Make sure the ServerDispatch trap (A094) is available */
if ( TrapAvailable(ServerDispatch) )
{
scPB.versionPB.scCode = SCServerVersion;
scPB.versionPB.scExtNamePtr = NULL;
if ( SyncServerDispatch(&scPB) == noErr )
{
/* See if server is file sharing with */
/* a server version => kNewFileSharingVersion */
result = ( (scPB.versionPB.scServerType == MFSType) &&
(scPB.versionPB.scServerVersion >= kNewFileSharingVersion) )
}
}
return ( result );
|
Back to top
Server Control Calls Supported
Macintosh File Sharing 7.6.1 supports the following server control calls:
SCCancelShutDown
SCDisconnect
SCGetExpFldr
SCGetSetupInfo
SCPollServer
SCServerVersion
SCSetSetupInfo
SCShutDown
SCStartServer
SCSendMessage
SCGetServerStatus
SCDisconnectVolUsers
SCGetUserNameRec
SCGetUserMountInfo
SCSetCopyProtect
SCClrCopyProtect
SCWakeServer
SCSleepServer
Macintosh File Sharing 7.6.1 does not support the following server control
calls which are supported by AppleShare 3.0 and does not support any of the
internal server control calls used by AppleShare Pro or AppleShare 4.0:
SCInstallServerEventProc
SCRemoveServerEventProc
SCGetServerEventProc
Of the server control calls that are supported, some behave differently with
Macintosh File Sharing 7.6.1 than they do on an AppleShare File Server. The
sections that follow explain those differences.
SCDisconnect
The SCDisconnect call does not send disconnect attention messages under
Macintosh File Sharing. SCDisconnect was supported by older versions of File
Sharing, but the scFlags and scMessagePtr fields in the parameter block were
ignored. Some program failed to initialize those fields, so Macintosh File
Sharing 7.6.1 must ignore them to prevent address and bus errors.
SCGetSetupInfo
The SCGetSetupInfo call now supports the scMaxVolumes , scMaxExpFolders , and
scCurMaxSession fields in the parameter block, and in the setup information
record (SetupInfoRec ), SILoginMsg is supported. However, the SCGetSetupInfo
call still does not use the following fields of the setup information record:
SIVolInfoLocation
SIVolInfoVisible
SIUserInfoLocation
SIUserInfoVisible
SIShutDownMins
SISpare
SCSetSetupInfo
The SCSetSetupInfo call now supports the SILoginMsg in the setup information
record (SetupInfoRec ). However, the SCSetSetupInfo call still does not use the
following fields of the setup information record:
SIVolInfoLocation
SIVolInfoVisible
SIUserInfoLocation
SIUserInfoVisible
SIShutDownMins
SISpare
SCShutDown
The SCShutDown call does not send shutdown attention messages under Macintosh
File Sharing. SCShutDown was supported by older versions of File Sharing, but
the scFlags and scMessagePtr fields in the parameter block were ignored. Some
program failed to initialize those fields, so Macintosh File Sharing 7.6.1 must
ignore them to prevent address and bus errors.
Back to top
What Volumes Are Shared?
Audio CDs are Never Shared
Because a shared Audio CD has never made sense, Macintosh File Sharing 7.6.1
never shares Audio CDs. Audio CDs are identified by File Sharing by the file
system ID of the Audio CD Access file system, $4A48.
bDontShareIt Volume Attribute Bit
Foreign file systems can now tell Macintosh File Sharing to never share their
volumes by setting the bDontShareIt volume attribute bit (bit 21 in the
vMAttrib field of GetVolParmsInfoBuffer ) returned in response to a
PBHGetVolParms request (HFSDispatch , selector $30). Network foreign file
systems should always set the bDontShareIt bit.
Back to top
New error code for PBUnmount
When you try to unmount a volume that has one or more files open,
PBUnmount will fail because the volume is busy. In the past, the error
result returned by PBUnmount when this happened was always
fBsyErr (-47). To distinguish between the volume being busy because
files are open by the local user vs. remote users, Macintosh File Sharing 7.6.1
now returns two error codes: fBsyErr if all files are open only by a
local user; afpFileBusy (-5010) if any files are open by remote
users.
Back to top
References
Inside Macintosh: Files, Chapter 2, PBHGetVolParms
Mac OS SDK CD-ROM, AppleShare API SDK (AppleShare 3.0 Developer's Kit),
Server Control Calls and Server Event Handling
FL 35 - Determining Which File System Is Active
Back to top
Downloadables
|
Acrobat version of this Note (56K)
|
Download
|
Back to top
|