Apple Talk Protocols

 
The Apple Talk Protocol suite includes the following protocols:

 

AARP AppleTalk Address Resolution Protocol
DDP Datagram Delivery Protocol
RTMP Routing Table Maintenance Protocol
AEP AppleTalk Echo Protocol
ATP AppleTalk Transaction Protocol
NBP Name-Binding Protocol
ZIP Zone Information Protocol
ASP AppleTalk Session Protocol
PAP Printer Access Protocol
ADSP AppleTalk Data Stream Protocol
AFP AppleTalk Filing Protocol

Apple Computer developed the AppleTalk protocol suite to implement file transfer, printer sharing, and mail service among Apple systems using the LocalTalk interface built into Apple hardware. AppleTalk ports to other network media such as Ethernet by the use of LocalTalk to Ethernet bridges or by Ethernet add-in boards for Apple machines.

AppleTalk is a multi-layered protocol providing internetwork routing, transaction and data stream service, naming service, and comprehensive file and print sharing. In addition, many third-party applications exist for the AppleTalk protocols.

To extend the addressing capability of AppleTalk networks and provide compliance with the IEEE 802 standard, Apple Computer introduced AppleTalk Phase 2 in 1989. AppleTalk Phase 2 differs primarily in the range of available network layer addresses and the use of the IEEE 802.2 Logical Link Control (LLC) protocol at the Data Link Layer.

The AppleTalk protocol suite is illustrated here in relation to the OSI model:
Click the protocols on the map to see more details.

 

AARP

AARP (AppleTalk Address Resolution Protocol) maps between any two sets of addresses at any level of one or more protocol stacks. Specifically, it is used to map between AppleTalk node addresses used by the Datagram Delivery Protocol (DDP), as well as higher-level AppleTalk protocols, and the addresses of the underlying data link that is providing AppleTalk connectivity. AARP makes it possible for AppleTalk systems to run on any data link.

The AARP packet structure is shown below:

8

16 bits

Data-link header

Hardware type

Protocol type

Hardware address length

Protocol address length

Function

AARP packet structure

Hardware type
Identifier for the data-link type.

Protocol type
Identifier for the protocol family.

Hardware address length
Length in bytes of the hardware address field.

Protocol address length
Length in bytes of the protocol address field.

Function
Indicates the packet function (1=AARP request, 2=AARP response and 3-AARP probe).

Following the header are the hardware and protocol addresses according to the values of the function field.

Interested in more details about testing this protocol? click here

 

DDP

The Datagram Delivery Protocol (DDP) provides a datagram delivery and routing service to higher layer protocols. DDP frame headers can use the long or short format. Short format DDP headers carry only the source and destination service socket numbers, while long format DDP headers also carry the source and destination network and node addresses needed for routing capability. Because AppleTalk Phase 2 does not use LLAP to identify source and destination nodes, it supports only the long format DDP header for Phase 2.

Short Format Frames

The following fields are present for short format DDP frames:

Destination socket
Destination service socket address used by the frame.

Source socket
Source service socket address used by the frame.

Length
Total length of the datagram.

DDP type
Code used to indicate the higher layer protocol used.

Long Format Frames

The following additional fields are present for long format DDP frames:

Destination
Destination network/node/socket. Destination network number, node address, and socket address used by the frame, displayed in the following format: NNNN.nn (ss), where NNNN is the network number, nn is the node address and ss is the socket address.

Source
Source network/node/socket. Source network number, node address, and socket address used by the frame, in the same format as D.

Checksum
Checksum of the entire datagram beginning after the checksum field. A checksum of zero implies that the checksum is not in use.

Hop count
Number of routers encountered by the frame. After 16 hops, the protocol discards the frame.

Interested in more details about testing this protocol? click here

 

RTMP

The Routing Table Maintenance Protocol (RTMP) manages routing information for AppleTalk networks. RTMP communicates known network numbers and data concerning accessibility between networks. AppleTalk Phase 2 allows for split horizon routing where the protocol transfers only routing data about directly connected networks in an effort to reduce the traffic overhead imposed by routing updates.

Frames

RTMP frames may be one of the following types:

[request] Requests network number and local router ID.
[reply] Supplies network number and local router ID.
[data] Carries the current routing table data.
[RDR split] Requests immediate routing data using split horizon (only Phase 2).
[RDR full] Requests full table of routing data (only Phase 2).

Frame Parameters

The following parameters are present in Apple RTMP frames:

Source network/node ID
Network number and address of the system sending the RTMP [reply] or [data] frame. The network/node ID is displayed in the following format: NNNN.nn, where NNNN is the network number and nn is the node address.

Routing Table
List of known network nodes and accessibility number representing the relative routing cost to the network. The routing table displays items in the following format: NNNN(cc), where NNNN is the network number and cc is the routing cost. AppleTalk Phase 2 RTMP frames can specify a range of network numbers and a protocol version number for the first term, as follows:
NNNN-NNNN(cc) [V=x], where NNNN is the network number, cc is the routing cost in hops and x is the protocol version (2 for Phase 2).

Interested in more details about testing this protocol? click here

 

AEP

The AppleTalk Echo Protocol (AEP) provides an echo service to AppleTalk hosts. It can specify up to 585 bytes of data for an echo transaction.

AEP frames may be one of the following types:

[echo reqst] Request to echo the specified data.
[echo reply] Echo response containing echo data.

Interested in more details about testing this protocol? click here

 

ATP

The AppleTalk Transaction Protocol (ATP) provides reliable delivery service for transaction-oriented operations. ATP uses a bitmap token to handle acknowledgement and flow control and a sequence of reserved bytes for use by higher level protocols.

Frames

ATP frames may be of the following types:

[request] Requests data specified by the bitmap.
[reply] Returns requested data.
[release] Indicates end of transaction.

Frame Parameters

ATP frames contain the following parameters:

Transaction ID
Reference code used to match ATP requests with ATP replies.

Transaction bitmap
Bitmap requests a specific data frame and provides acknowledgment for received data. 1 in the bitmap indicates an outstanding request for a data segment; 0 indicates that the system satisfied the request. The bitmap position corresponds to the data segment position. The bit on the far right represents the first data segment with successive segments indicated to the left. The bitmap is 8 bits wide, permitting ATP to send up to 8 data segments per transaction request.

Sequence number
Sequence number corresponding to the data segment of the current response frame.

User bytes
Four bytes reserved for use by higher level protocols.

Control Flags
The following control flags display in upper-case when set and in lower-case when inactive:

x,X When set, exactly-once mode is set, ensuring that the current transaction is performed only once.
e, E When set, the frame is the end of a data response.
s, S When set, the bitmap status requests reuse of buffers already acknowledged.

Interested in more details about testing this protocol? click here

 

NBP

The AppleTalk Name Binding Protocol (NBP) manages the use of names on AppleTalk networks. NBP maintains a names directory that includes names registered by hosts and bound to socket addresses. After a name is registered, the AppleTalk host can perform a name lookup to find the socket address associated with the name. When the host issues a name lookup on the Internet, NBP sends a broadcast lookup to a router that generates name lookup requests to each network within the zone specified in the name.

Frames

NBP frames may be one of the following types:

[brdcast lookup] Broadcast search for the specified name.
[name lookup] Local search for the specified name.
[lookup reply] Reply to a name lookup.

Frame Parameters

NBP frames have the following parameters:

Number of names
Number of socket/name pairs contained in the message.

Transaction ID
Reference code used to match NBP replies with NBP requests.

Interested in more details about testing this protocol? click here

 

ZIP

The AppleTalk Zone Information Protocol (ZIP) manages the relationship between network numbers and zone names. AppleTalk networks primarily implement ZIP in routers that gather network number information by monitoring RTMP frames.

Frames

ZIP frames may be one of the following types:

[zonename query] Requests zone name for a network number.
[zonename reply] Supplies zone name for network number.
[zonelist query] Requests the complete list of known zones.
[zonelist reply] Supplies the complete zone list.
[get zone reqst] Requests the local zone ID.
[get zone reply] Supplies the local zone ID.
[takedown zone] Removes a zone from the zone list.
[bring up zone] Adds a zone to the zone list.
[local zone req] Requests local zones on extended networks.
[ext name reply] Zone name replies too long for one frame.
[change notify ] Alerts nodes of a zone name change.
[net info reqst] Requests network information for a zone name.
[net info reply] Supplies network range and multicast address for zones on extended nets.

Frame Parameters

Apple ZIP frames contain the following parameters:

Number
Number of networks for the request or zone information reply.

Start index
The starting zone for the zone list request.

Zone name
The name associated with the specified zone.

Multicast
Multicast address assigned to the specified zone.

Default zone
The local zone name.

Old zone name
The previously used name for the specified zone.

New zone name
New zone name for the specified zone.

Network range
The range of network numbers associated with the specified zone display in the format: SSSS-EEEE where SSSS is the starting network number and EEEE is the ending network number.

Network/zone list
List of networks and zone names represented as follows:
NNNN = zonename, where NNNN is the network number and zonename is the zone name.

Messages

Apple ZIP [net info reply] and [change notify] frames can contain the following messages:

{invalid zone} Specified zone name does not exist.
{one zone} Specified zone is the only zone.
{use broadcast} Local network does not support multicasting, use broadcasting.

Interested in more details about testing this protocol? click here

 

ASP

The AppleTalk Session Protocol (ASP) manages sessions for higher layer protocols such as AFP. ASP issues a unique session identifier for each logical connection and continuously monitors the status of each connection. It maintains idle sessions by periodically exchanging keep alive frames in order to verify the session status.

Frames

ASP frames can be one of the following types:

[open session reqst] Requests to open an ASP session.
[close session reqst] Requests to close an ASP session.
[command call reqst] Calls to higher level protocol.
[status request] Requests server status.
[session keep alive] Maintains idle connections.
[session write reqst] Requests to perform a write operation.
[write continue req] Begins the transfer of write data.
[attention request] Send urgent data.
[close session reply] Acknowledges session close.
[command call reply] Reply from higher level protocol.
[server status reply] Reply containing server information.
[open session reply] Reply to open session request.
[session write reply] Reply to session write request.
[write continue rply] Session write data.
[attention reply] Acknowledges receipt of attention request.

Frame Parameters

Apple ASP frames can contain the following parameters:

Session ID
A reference code used to identify the session.

Sequence number
Used by command, write, and write continue frames to maintain data order.

Server session socket
The socket number in use by the server end of the connection.

Workstation session socket
Workstation session socket. The socket number in use by the workstation end of the connection.

Version number
ASP version number currently in use.

Buffer size
Buffer size available for receiving command blocks.

Messages

Apple ASP reply frames can contain the following messages:

{OK} Command completed successfully.
{xxxx bytes written} Number of bytes written for [write continue rply] frames.
{bad version number} ASP version not supported.
{buffer too small} Request buffer too small for command block.
{no more sessions} Server cannot open any more sessions.
{no servers} Server not responding.
{parameter error} ASP parameter values invalid.
{server is busy} Server too busy to open another session.
{session closed} Referenced session has been closed.
{size error} Command block larger than maximum.
{too many clients} Client number limit exceeded.
{no acknowledgement} Workstation did not acknowledge.
{unknown error} Unknown error condition.

Interested in more details about testing this protocol? click here

 

PAP

The Printer Access Protocol (PAP) manages the virtual connection to printers and other servers. PAP is used to convey connection status and coordinate data transfer.

Frames

PAP frames can be one of the following types:

[open connection rqst] Request to open a PAP connection.
[open connection rply] Reply to open connection request.
[send data request] Request to send PAP data.
[PAP data segment] Segment of PAP data transfer.
[session keep alive] Verify connection status.
[close connection req] Request to close a PAP connection.
[close connection rep] Reply to close connection request.
[send server status] Request server status.
[server status reply] Reply to server status request.

Frame Parameters

PAP frames can contain the following parameters:

Connection ID
Reference code used to identify the PAP connection.

ATP responding socket
ATP socket number used for PAP status and data transfers.

Maximum buffer size
Maximum amount of data in bytes that the protocol can send in response to each [send data request] (also known as the Flow Quantum).

Wait time
Length of time that a workstation waits for a connection.

Sequence number
Used in send data request frames to maintain data order.

EOF
End-of-file indicator. Used to indicate the end of a data transfer.

Result
Result code indicating the outcome of an [open connection rqst]:
0000 Connect OK.
FFFF Printer busy.

Status
Status message returned by status and open connection reply frames.

Interested in more details about testing this protocol? click here

 

ADSP

The AppleTalk Data Stream Protocol (ADSP) provides a data channel for the hosts. It is a connection-oriented protocol that guarantees in-sequence data delivery with flow control.

Frames

ADSP frames can be one of the following types:

[acknowledge/probe] Acknowledges data or requests acknowledge.
[open connect reqst] Requests an ADSP connection.
[open connect ackn] Acknowledges ADSP connection.
[open request & ackn] Acknowledges inbound connection and requests an outbound connection.
[open connect denial] Refuses an inbound connection.
[close connection] Requests to close an ADSP connection.
[forward reset] Requests to ignore specific data.
[forward reset ackn] Acknowledges forward reset of data stream.
[retransmit advise] Requests to retransmit data.

Frame Parameters

ADSP frames can contain the following parameters:

Source connection ID
Reference code used to identify the sending side of a connection.

Destination connection ID
Reference code identifying the receiving side of a connection.

Send sequence number
Sequence number used for the outbound data stream.

Receive sequence number
Sequence number used for the inbound data stream.

Receive window size
Amount of unacknowledged data that the other side of a connection can send.

Version
ADSP version in use.

Attention sequence number
Lowest byte sequence number for which the protocol can send an attention frame.

Code
Attention code supplied by attention frames.

Control flag
When set (value=1), frame is a control frame with no data.

Ack request flag
When set (value=1), sender requests an acknowledgment.

End of message flag
When set (value=1), the current frame is the end of a data message.

Attention flag
When set (value=1), the frame is an attention frame.

Interested in more details about testing this protocol? click here

 

AFP

The AppleTalk Filing Protocol (AFP) is the file sharing protocol of the AppleTalk architecture. It provides a native mode interface to Apple file system resources.

Apple files are comprised of two data structures called forks. An Apple file may be accessed by its data fork or its resource fork. The data fork holds raw file data while the resource fork contains information used by the operating system to manage icons and drivers.

Frames

AFP frames can be one of the following commands:

[lock/unlock bytes] Locks or unlocks a specified byte range.
[close volume] Closes the specified volume resource.
[close directory] Closes the specified directory.
[close fork] Closes the specified fork (file).
[copy file] Copies the specified file.
[create directory] Creates the specified directory.
[create file] Creates the specified file.
[delete file] Deletes the specified file or directory.
[list directory] Lists the specified directory.
[flush to disk] Writes data held in RAM to disk.
[flush fork] Writes data to disk for the specified fork.
[get fork params] Retrieves parameters for the specified fork.
[get server info] Retrieves server information.
[get server params] Retrieves server parameters.
[get volume params] Retrieves volume parameters.
[consumer login] Begins workstation log-in.
[login continue] Continues workstation log-in.
[logout] Workstation log-out.
[map user/group ID] Gets ID associated with user/group name.
[map user/grp name] Gets name associated with user/group ID.
[move and rename] Moves and renames a file.
[open volume] Opens the specified volume.
[open directory] Opens the specified directory.
[open fork] Opens the specified fork (file).
[read from fork] Reads from the specified fork (file).
[rename file/dir] Renames a file or directory.
[set dir params] Sets directory parameters.
[set file params] Sets file parameters.
[set fork params] Sets fork parameters.
[set volume params] Sets volume parameters.
[write to fork] Writes to the specified fork (file).
[get file/dir pars] Gets file or directory parameters.
[set file/dir pars] Sets file or directory parameters.
[change password] Changes user password.
[get user info] Retrieves user information.
[open database] Opens the desktop database.
[close database] Closes the desktop database.
[get icon] Retrieves an icon from the desktop database.
[get icon info] Retrieves icon information.
[add APPL mapping] Adds application information.
[remove APPL] Removes application information.
[get APPL mapping] Retrieves application information.
[add comment] Adds a comment to a file or directory.
[remove comment] Removes a comment from a file or directory.
[get comment] Retrieves comment text from a file/directory.
[add icon] Adds an icon for an application.

Frame Parameters

Apple AFP frames can contain the following parameters:

APPL index
Index, beginning with 1, of the first application mapping contained in the frame.

APPL tag
Tag information associated with the application mapping contained in the frame.

Attributes
Attributes of a file or directory are as follows:

Directory attributes:

Inv Invisible to workstation user.
Sys System directory.
Bk Backup is needed (dir modified).
RI Rename inhibit mode set.
DI Delete inhibit mode set.

File attributes:

Inv Invisible to workstation user.
MU Multi-user application.
RAO File resource fork already open.
DAO File data fork already open.
RO Read only mode set for both forks.
WI Cannot write to either fork.
Sys File is system file.
Bk Backup is needed (file modified).
RI Rename inhibit mode set.
DI Delete inhibit mode set.
CP Copy protect mode set.

Backup date
Date of the last time the system backed-up the volume or directory.

Bitmap
Field containing bits used to indicate the parameters present in request or reply.

Request count
Maximum number of files to return for list directory requests.

Creation date
Date that the system created the file or directory.

File creator
ID string of the application or device that created a file.

Destination directory ID
Destination directory ID for a file copy or move.

Data fork length
Length of the file.

Destination volume ID
Destination volume ID for a file copy or move.

Directory bitmap
Field with bits that indicate which directory parameters are present in AFP frames.

Directory ID
Identifier associated with the specified directory.

Desktop database reference number
Reference number used to access the desktop database.

File bitmap
Bits that indicate which file parameters are present in AFP frames.

Free bytes
Number of bytes free on the volume.

Open fork reference number
Reference code used to access the open fork.

Group ID
Group ID used for authentication.

Group name
Group name used for authentication.

Icon tag
Tag information associated with the specified icon.

Icon size
Size of the specified icon, in bytes.

Icon type
Type code identifying the specified icon.

Long name
Long file name (maximum 31 characters).

Machine type
Type of AFP server in use.

Maximum reply size
Maximum number of bytes this protocol returns for list directory requests.

Access mode
Open mode attributes for a fork, represented as follows:

R Allows everyone read access.
W Allows everyone write access.
Deny-R Denies read access if the file is open.
Deny-W Denies write access if the file is open.

Modification date
Date the system last modified the file or directory.

New line character
Character used to indicate a new line (CR, LF) for read data.

New line mask
Value used to mask data for comparison to the new line character.

Offset
Starting file offset for write commands.

Offspring count
Number of files returned for list directory requests.

Owner ID
ID of the file or directory.

Volume password
Password required for access to the volume.

Parent directory ID
ID of the parent directory.

ProDOS information
ProDOS file type and Aux type for use by ProDOS workstations.

Resource fork length
Length of the file resource fork, in bytes.

Source directory ID
Source directory ID for a file copy or move.

Short name
Short file name (maximum 12 characters).

Signature
Identifies the volume type, as follows:

1 Flat, no support for directories.
2 Fixed directory ID.
3 Variable directory ID.

Source volume ID
Source volume ID for a file copy.

Start index
Start index, beginning with 1, of the requested file list for list directory commands and replies.

Total bytes
Total number of bytes on the volume.

User authentication method
Type of user authentication in effect.

User ID
User ID number used for authentication.

User name
User name used for authentication.

Version
Version number of AFP in use.

Volume bitmap
Field with bits that indicate which volume parameters are present in AFP frames.

Volume ID
Identifier associated with the specified volume.

Volumes
Number of volumes contained on the server.

Messages

AFP [get server params] replies contain a listing in the format: VolName(P,II), where VolName is a list of the volume names, P indicates password-protection and II indicates Apple II configuration information present.

The following status and error messages may be displayed for AFP replies:

Status Error Message
{OK} Command completed successfully.
{Object locked} Specified object locked.
{Volume locked} Specified volume locked.
{Icon type error} Icon size mismatch.
{Directory not found} Specified directory does not exist.
{Can't rename} Cannot rename volume or root directory.
{Server going down} The server is no longer active on the network.
{Too many open files} Open file limit exceeded.
{Object type error} Specified object invalid for operation.
{Call not supported} AFP call unsupported by this version.
{User not authorized} User has insufficient access rights.
{Session closed} Specified session ID has been closed.
{Byte range overlap} Lock conflicts with existing lock.
{Range not locked} Attempt to unlock an unlocked byte range.
{Parameter error} Specified parameters invalid for operation.
{Object not found} Specified object does not exist.
{Object exists} Specified object already exists.
{No server} AFP server is not responding.
{No more locks} Number of server locks exceeded.
{Miscellaneous error} General command error.
{Lock error} Byte range already locked by another user.
{Item not found} Specified item not found.
{Flat volume} Volume does not support directories.
{File busy} Specified file is currently open.
{EOF error} End of fork reached unexpectedly.
{Disk full} Volume is out of disk space.
{Directory not empty} Attempt to delete a non-empty directory.
{Deny conflict} Specified deny rights conflict.
{Cannot move} Cannot move directory to a descendent directory.
{Bitmap error} Invalid bitmap specified for object.
{Bad version number} Specified version number is invalid.
{Bad User Authentic} User authentication failed.
{Continue Authentic} Authentication not completed.
{Access denied} User does not have permission for operation.

Interested in more details about testing this protocol? click here

 
Additional Information