Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Networking /


Chapter 6 - AppleTalk Transaction Protocol (ATP)

This chapter describes the AppleTalk Transaction Protocol (ATP) that you use to send
a request from one application or process to another that can satisfy the request and respond to it. Because ATP is transaction-based--that is, the response data is bound to the request data and the exchange of information is limited to the transaction--you do not incur the overhead entailed in establishing, maintaining, and breaking a connection that is associated with connection-oriented protocols, such as ADSP. However, you can transfer only a limited amount of data using ATP.

You should read this chapter if you want to write an application that requires reliable delivery of data while allowing one side of the communication to ask the other side to perform a service and return a small amount of data.

For an overview of ATP and how it fits within the AppleTalk protocol stack, read the chapter "Introduction to AppleTalk" in this book, which also introduces and defines some of the terminology used in this chapter. For complete explanation of the ATP specification, see Inside AppleTalk, second edition.


Chapter Contents
About ATP
The ATP Packet Format
The Control Information Byte
The Bitmap/Sequence Number
The Transaction ID
User Bytes
At-Least-Once and Exactly-Once Transactions
The Buffer Data Structure
ATP Flags
Using ATP
Writing a Requester ATP Application
Creating a Buffer Data Structure
Specifying the Parameters for the Send Request Function
Setting the Timeout and Retry Count Parameters
Setting the Release Timer Value
Writing a Responder ATP Application
Opening and Setting Up a Socket to Receive Requests
Responding to Requests
Canceling an ATP Function
ATP Reference
Data Structures
The Buffer Data Structure
The ATP Parameter Block
The Address Block Record
Routines
Sending an ATP Request
Opening and Closing an ATP Socket
Setting Up a Socket to Listen for Requests
Responding to Requests
Canceling Pending ATP Functions
Building a Buffer Data Structure
Summary of ATP
Pascal Summary
Constants
Data Types
The Buffer Data Structure
The Address Block Record
The ATP Parameter Block
Routines
Sending an ATP Request
Opening and Closing an ATP Socket
Setting Up a Socket to Listen for Requests
Responding to Requests
Canceling Pending ATP Functions
Building a Buffer Data Structure
C Summary
Constants
Data Types
The Buffer Data Structure
The Address Block Record
The ATP Parameter Block
Routines
Sending an ATP Request
Opening and Closing an ATP Socket
Setting Up a Socket to Listen for Requests
Responding to Requests
Canceling Pending ATP Functions
Building a Buffer Data Structure
Assembly-Language Summary
Constants
ATP Header
ATP Control Field
ATP Type Code
ATP Limits
ATP Command Codes
ATPQueue Element Standard Structure
ATP Bits
Data Structures
Buffer Data Structure (BDS)
ATP Parameter Block Common Fields
SendRequest Parameter Variant
NSendRequest Parameter Variant
OpenATPSkt Parameter Variant
CloseATPSkt Parameter Variant
GetRequest Parameter Variant
SendResponse Parameter Variant
AddResponse Parameter Variant
KillSendReq Parameter Variant
RelTCB Parameter Variant
KillGetReq Parameter Variant
KillAllGetReq Parameter Variant
RelRspCB Parameter Variant
Result Codes

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help