Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 2 - File Manager / File Manager Reference
Data Structures


Volume Mounting Information Records

The File Manager remote mounting functions store the mounting information in a variable-sized structure called a volume mounting information record, defined by the VolMountInfoHeader data type.

TYPE VolMountInfoHeader =        {volume mounting information}
RECORD
   length:           Integer;    {length of mounting information}
   media:            VolumeType; {type of volume}
   {volume-specific, variable-length location data}
END;
Field Description
length
The length of the VolMountInfoHeader structure (that is,
the total length of the structure header described here plus the variable-length location data). The length of the record is flexible
so that non-Macintosh file systems can store whatever information they need for volume mounting.
media
The volume type of the remote volume. The value AppleShareMediaType (a constant that translates to 'afpm') represents an AppleShare volume. If you are adding support for
the programmatic mounting functions to a non-Macintosh file system, you should register a four-character identifier for your volumes with Macintosh Developer Technical Support at Apple Computer, Inc.
The only volumes that currently support the programmatic mounting functions are AppleShare servers, which use a volume mounting record of type AFPVolMountInfo.

TYPE AFPVolMountInfo    =        {AFP volume mounting information}
RECORD
   length:           Integer;    {length of mounting information}
   media:            VolumeType; {type of volume}
   flags:            Integer;    {reserved; must be set to 0}
   nbpInterval:      SignedByte; {NBP retry interval}
   nbpCount:         SignedByte; {NBP retry count}
   uamType:          Integer;    {user authentication method}
   zoneNameOffset:   Integer;    {offset to zone name}
   serverNameOffset: Integer;    {offset server name}
   volNameOffset:    Integer;    {offset to volume name}
   userNameOffset:   Integer;    {offset to user name}
   userPasswordOffset:
                     Integer;    {offset to user password}
   volPasswordOffset:
                     Integer;    {offset to volume password}
   AFPData:          PACKED ARRAY[1..144] OF CHAR;
                                 {standard AFP mounting info}
   {optional volume-specific, variable-length data}
END;
Field Description
length
The length of the AFPVolMountInfo structure (that is, the total length of the structure header described here plus the variable-
length location data).
media
The volume type of the remote volume. The value AppleShareMediaType (a constant that translates to 'afpm') represents an AppleShare volume.
flags
Reserved; set this field to 0. If bit 0 is set, no greeting message from the server is displayed.
nbpInterval
The NBP retransmit interval, in units of 8 ticks.
npbCount
The NBP retransmit count. This field specifies the total number of times a packet should be transmitted, including the first transmission.
uamType
The access-control method used by the remote volume. AppleShare uses four methods, defined by constants:
               CONST
                  kNoUserAuthentication   = 1;  {no password}
                  kPassword               = 2;  {8-byte password}
                  kEncryptPassword        = 3;  
                                       {encrypted 8-byte password}
                  kTwoWayEncryptPassword  = 6;  
                                       {two-way random encryption}
zoneNameOffset
The offset in bytes from the beginning of the record to the entry in the AFPData field containing the name of the AppleShare zone.
serverNameOffset

The offset in bytes from the beginning of the record to the entry in the AFPData field containing the name of the AppleShare server.
volNameOffset
The offset in bytes from the beginning of the record to the entry in the AFPData field containing the name of the volume.
userNameOffset
The offset in bytes from the beginning of the record to the entry in the AFPData field containing the name of the user.
userPasswordOffset

The offset in bytes from the beginning of the record to the entry in the AFPData field containing the user's password.
volPasswordOffset

The offset in bytes from the beginning of the record to the entry
in the AFPData field containing the volume's password. Some versions of the AppleShare software do not pass the information
in this field to the server.
AFPData
The actual volume mounting information, offsets to which are contained in the preceding six fields. To mount an AFP volume, you must fill in the record with at least the zone name, server name, user name, user password, and volume password. You can lay out the data in any order within this data field, as long as you specify the correct offsets in the offset fields.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996