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: Networking /


Chapter 9 - AppleTalk Filing Protocol (AFP)

This chapter describes the AppleTalk Filing Protocol (AFP) that allows a workstation on an AppleTalk network to access and manipulate files on an AFP file server, such as an AppleShare server.

Because you can use the native file system to access an AFP server from a workstation,
in most cases you should not need to use AFP directly. For example, few application developers use AFP to access an AppleShare file server because the existing File Manager commands perform most of the functions needed to access and manipulate files on an AppleShare server.

However, if you want to provide functions that are not implemented by the native file system commands or you want to manipulate files on an AFP server other than an AppleShare server, your application can use the AFP programming interface to directly access AFP to send commands to the server. For example, you can use AFP to list the contents of a directory when you need to obtain ProDOS information. You can also use AFP to retrieve or set parameters for a specific file when ProDOS is used.

This chapter describes the programming interface to the workstation portion of AFP only. It does not describe how to implement an AFP server. For information on how to implement an AFP server, see Inside AppleTalk, second edition.

Because AFP is not widely used by application program developers, this chapter provides only the AFP basics. This chapter includes "About" and "Reference" sections. It does not include a "Using" section, as do most of the other chapters in this book. This chapter is included in this book to complete the coverage of the AppleTalk protocol stack.

If you decide to use AFP, it is important to note that to implement an AFP command,
you need information in addition to the information that this chapter provides.
Inside AppleTalk, second edition, and the AppleShare 3.0 Developer's Kit version 3.0, provide information describing the AFP commands and the command block data structure required for each command. The AppleShare 3.0 Developer's Kit includes extensions to AFP not described in Inside AppleTalk.

AFP is built on top of the AppleTalk Session Protocol (ASP) and uses the services of ASP. To use AFP, you should also be familiar with ASP, which is described in the chapter "AppleTalk Session Protocol (ASP)" in this book. For an overview of AFP and how it fits within the AppleTalk protocol stack, read the chapter "Introduction to AppleTalk," which is also in this book.


Chapter Contents
About AFP
AFP Reference
Data Structures
AFP Command Block Record
XPP Parameter Block
Routines
Summary of AFP
Pascal Summary
Constants
Data Types
Command Block for AFP Read and AFP Write Commands
XPP Parameter Block for AFP
Routines
C Summary
Constants
Data Types
Command Block for AFP Read and AFP Write Commands
XPP Parameter Block for AFP
Routines
Assembly-Language Summary
Constants
XPP Driver Unit Number
AFP Control Code
AFP Command Codes
Miscellaneous
Data Structures
Parameter Block for General Command Format
Parameter Block for Login Command Format
Parameter Block for AFP Write Command Format
Command Block for the AFP Write Command
Parameter Block for AFP Read Command Format
Command Block for the AFP Read Command
Result Codes

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996