AppleShare IP 6.3 Developer’s Kit
AppleTalk Filing Protocol
Update to Inside Macintosh: Networking, Chapter 9
Technical Publications © Apple Computer, Inc. 1999
Apple Computer, Inc. Helvetica and Palatino are registered © 1997-1999 Apple Computer, Inc. trademarks of Linotype-Hell AG All rights reserved. and/or its subsidiaries. No part of this publication may be ITC Zapf Dingbats is a registered reproduced, stored in a retrieval trademark of International Typeface system, or transmitted, in any form Corporation. or by any means, mechanical, QuickView™ is licensed from Altura electronic, photocopying, recording, Software, Inc. or otherwise, without prior written Simultaneously published in the permission of Apple Computer, Inc., United States and Canada. except to make a backup copy of any documentation provided on CD-ROM. Even though Apple has reviewed this The Apple logo is a trademark of manual, APPLE MAKES NO Apple Computer, Inc. WARRANTY OR REPRESENTATION, Use of the “keyboard” Apple logo EITHER EXPRESS OR IMPLIED, WITH (Option-Shift-K) for commercial RESPECT TO THIS MANUAL, ITS purposes without the prior written QUALITY, ACCURACY, consent of Apple may constitute MERCHANTABILITY, OR FITNESS trademark infringement and unfair FOR A PARTICULAR PURPOSE. AS A competition in violation of federal RESULT, THIS MANUAL IS SOLD “AS and state laws. IS,” AND YOU, THE PURCHASER, ARE No licenses, express or implied, are ASSUMING THE ENTIRE RISK AS TO granted with respect to any of the ITS QUALITY AND ACCURACY. technology described in this book. IN NO EVENT WILL APPLE BE LIABLE Apple retains all intellectual FOR DIRECT, INDIRECT, SPECIAL, property rights associated with the INCIDENTAL, OR CONSEQUENTIAL technology described in this book. DAMAGES RESULTING FROM ANY This book is intended to assist DEFECT OR INACCURACY IN THIS application developers to develop MANUAL, even if advised of the applications only for Apple-labeled possibility of such damages. or Apple-licensed computers. THE WARRANTY AND REMEDIES Every effort has been made to ensure SET FORTH ABOVE ARE EXCLUSIVE that the information in this manual is AND IN LIEU OF ALL OTHERS, ORAL accurate. Apple is not responsible for OR WRITTEN, EXPRESS OR IMPLIED. typographical errors. No Apple dealer, agent, or employee is Apple Computer, Inc. authorized to make any modification, 1 Infinite Loop extension, or addition to this warranty. Cupertino, CA 95014 Some states do not allow the exclusion or 408-996-1010 limitation of implied warranties or Apple, the Apple logo, and liability for incidental or consequential Macintosh are trademarks of Apple damages, so the above limitation or Computer, Inc., registered in the exclusion may not apply to you. This United States and other countries. warranty gives you specific legal rights, Adobe, Acrobat, and PostScript are and you may also have other rights trademarks of Adobe Systems which vary from state to state. Incorporated or its subsidiaries and may be registered in certain jurisdictions.
Contents
Listings and Tables v
Preface About This Manual vii Conventions Used in This Manual vii For More Information viii
Chapter 1 AppleTalk Filing Protocol (AFP) 11 About AFP 12 AFP Reference 14 Data Structures 14 DSParamBlock Structure 14 PB Control and PB Status Codes 17 AFPInsRemSMBParam Structure 18 AFPSrvrInfo Structure 19 DSGetStatusPB Structure 20 DSOpenPB Structure 21 DSWritePB Structure 22 DSXPortInfo Structure 22 GetVolSessInfoPB Structure 23 GetVolSessInfoRec Structure 24 User Authentication Constants 25 AFP Gestalt Constants 26 Routines 27 NAFPCommandAsync Function 32 NAFPCommandSync Function 32 NAFPCommandImmediate Function 33 Completion Routine 34 Summary of AFP 34 Pascal Summary 34 Constants 34 Data Types 35
iii
Routines 40 C Summary 40 Constants 40 Data Types 41 Routines 47 Assembly-Language Summary 47 Constants 47 Miscellaneous 48 Data Structures 48 Result Codes 53
Index IN-1
iv
Listings and Tables
Figure 1-1 The .AFPTranslator driver 13 Table 1-1 PB control codes 17 Table 1-2 PB status codes 18 Table 1-3 AFP command codes 28
v
vi
PREFACE
About This Manual
This document describes the .AFPTranslater driver, which was implemented for AppleShare IP in order to provide transport independence for the AppleTalk Filing Protocol. The .AFPTranslator driver accepts Hierarchical File System (HFS) and AFP commands from applications and sends them to the data stream interface or the .XPP driver depending on the transport protocol that the command uses. This document replaces Chapter 9 of Inside Macintosh: Networking.
Conventions Used in This Manual 0
The Courier font is used to indicate server control calls, code, and text that you type. Terms that are defined in the glossary appear in boldface at first mention in the text. This guide includes special text elements to highlight important or supplemental information:
Note Text set off in this manner presents sidelights or interesting points of information.
IMPORTANT Text set off in this manner—with the word Important— presents important information or instructions.