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 With Open Transport / Part 1 - Open Transport Essentials
Chapter 12 - Introduction to AppleTalk


About AppleTalk Protocols Under Open Transport

Each of the AppleTalk protocols implements a different set of functions and services, and your choice of which protocol to use depends primarily on your application's needs. For example, if you need a connection-oriented transactionless protocol to exchange data with another endpoint, ADSP is your most likely choice. Open Transport supports most AppleTalk protocols and provides protocol-specific options for various Open Transport functions. Which functions to use with which AppleTalk protocol, and which options are permitted for each, are discussed in this book in the specific chapter for each AppleTalk protocol.

You use most AppleTalk protocols by specifying them explicitly when opening an endpoint. ADSP, ATP, and PAP fall into this category. Because DDP is the network delivery protocol for AppleTalk, you can specify it explicitly or, more often, you use it implicitly when you choose other higher-level AppleTalk protocols.

You don't use NBP and ZIP explicitly with endpoints: NBP-configured mapper providers access NBP to register and delete an application's name as a network-visible entity and to look up other endpoint names on the network; AppleTalk service providers use a subset of ZIP functions to provide applications with information about zones and the current AppleTalk environment.

Note
In order to exchange data and share resources, nodes must be running the same protocol, but they do not all have to be running Open Transport. For example, if one endpoint is using ADSP to send data to an endpoint on another computer, the other endpoint must also be running ADSP, although it does not have to be the Open Transport ADSP implementation.
Open Transport implements two connection-oriented transactionless AppleTalk protocols that you can use to send and receive data: ADSP and PAP. As discussed in "Introduction to Open Transport" the decision of which protocol to use is typically based on whether it maintains a connection and uses discrete transactions or sends a stream of data.

Open Transport also implements two connectionless AppleTalk protocols that you can use to send and receive data: ATP and DDP. ATP is a transaction-based protocol and sends request transactions and receives replies; DDP does not send transactions, instead it sends individual packets of data, called datagrams, and expects no reply.

The AppleTalk protocols that Open Transport supports for endpoints are shown in Table 12-4.

Table 12-4 Open Transport support for AppleTalk endpoint protocols
 Connectionless  Connection-oriented
TransactionlessDDPADSP
PAP
Transaction-based< /EM>ATP 

In general, applications use ADSP for symmetrical data exchange between two peer endpoints and PAP for printing data. PAP is a client of ATP, so it takes advantage of ATP's reliable data delivery services. Because DDP underlies all AppleTalk data delivery, all AppleTalk protocols ultimately use DDP for data transport.

AppleTalk Addressing and the Name Binding Protocol (NBP)

Because AppleTalk assigns node IDs dynamically whenever a node joins the network or is rebooted, a node's address on an AppleTalk network can change from time to time. Applications cannot assume that the physical address of an AppleTalk endpoint is stable, and therefore a reliable mapping of user names to physical addresses is very important for AppleTalk.

The Name-Binding Protocol (NBP) is an AppleTalk protocol that maintains this mapping, and you can access this information through a mapper provider configured for NBP. Because AppleTalk supports dynamic name registration, NBP mapper providers can use the Open Transport name registration and deletion functions as well as the other mapper functions.

In order for you to make the name of your AppleTalk endpoint visible to other applications on a network, you must register its name. There are various ways of doing this: for example, using the OTBind function or opening a mapper provider. In either case, Open Transport uses NBP to associate the endpoint's name with its physical address. Once your application is registered, it is a network-visible entity that other applications can locate.

Through mapper library functions, AppleTalk applications can

See "Mappers" for information about how to use Open Transport mapper providers and "AppleTalk Service Providers" for information about how to use NBP mapper providers to identify and locate endpoints on a network. The two methods of registering a name are discussed in greater detail in "Registering Your Endpoint's Name".

The AppleTalk Service Provider

An AppleTalk service provider is an Open Transport provider that gives applications access to information and services that are specific to the AppleTalk protocol stack. Applications use an AppleTalk service provider to obtain zone names and to get information about the current AppleTalk environment for a given machine.

The AppleTalk service provider is able to provide information about zones by implementing a subset of the Zone Information Protocol (ZIP). AppleTalk service provider functions allow applications to query routers for information about

ZIP is implemented primarily in AppleTalk internet routers, each of which maintains a zone information table that maps the relationships between zone names and network numbers for AppleTalk networks.

See "AppleTalk Service Providers" for information about how to use AppleTalk service providers.

Datagram Delivery Protocol (DDP)

The Datagram Delivery Protocol (DDP) is a connectionless transactionless protocol that transfers data between sockets as discrete packets, or datagrams, with each packet carrying its destination socket address. DDP attempts to deliver any packet with a valid address but does not inform the sender when it cannot deliver a packet, and it cannot request the sender to retransmit lost or damaged packets. This level of service is referred to as best-effort delivery. DDP does not include support to ensure that all sent packets are received at the destination or that those packets that are received are in the correct order. Higher-level protocols that use the services of DDP provide for reliable delivery of data. DDP uses whichever link-access protocol the user selects; that is, DDP can send its datagrams through any type of data link and transport media, provided the network hardware is compatible with Open Transport.

For real-time applications, or applications such as games that do not require reliable delivery of data, or diagnostic tools that retransmit at regular intervals to estimate averages, DDP suffices. DDP involves less overhead and provides faster performance than higher-level protocols.

See "Datagram Delivery Protocol (DDP)" for information about how to use DDP under Open Transport.

AppleTalk Data Stream Protocol (ADSP)

The AppleTalk Data Stream Protocol (ADSP) is a connection-oriented transactionless protocol that supports sessions over which applications can exchange full-duplex streams of data. In addition to ensuring reliable delivery of data, ADSP provides a peer-to-peer connection; that is, both ends of the connection can exert equal control over the exchange of data. ADSP also provides an application with a means of sending expedited attention messages to pass control information between the two communicating applications without disrupting the main flow of data.

ADSP appears to its clients to maintain an open pipeline between the two entities at either end. Either entity can write a stream of bytes to the pipeline or read data bytes from the pipeline. However, because ADSP, like all other higher-level AppleTalk protocols, is a client of DDP, the data is actually sent as packets. This allows ADSP to correct transmission errors in a way that would not be possible for a true data stream connection. Thus, ADSP retains many of the advantages of a transaction-based protocol while providing to its clients a connection-oriented full-duplex data stream.

See "AppleTalk Data Stream Protocol (ADSP)" for information about how to use ADSP under Open Transport.

AppleTalk Transaction Protocol (ATP)

The AppleTalk Transaction Protocol (ATP) is a connectionless transaction-based protocol that allows two endpoints to execute request-and-response transactions. Either ATP endpoint can request another ATP endpoint to perform an action; the other ATP endpoint then carries out the action and transmits a response reporting the outcome. ATP provides reliable delivery of data by ensuring that data packets are delivered in the correct sequence and by retransmitting any packets that are lost.

ATP is useful if your application sends small amounts of data and can tolerate a minor degree of performance degradation. Games that are based on request-and-response dialogs can make efficient use of ATP.

See "AppleTalk Transaction Protocol (ATP)" for information about how to use ATP under Open Transport.

Printer Access Protocol (PAP)

The Printer Access Protocol (PAP) is an asymmetrical connection-oriented transactionless protocol that enables communication between client and server endpoints, allowing multiple connections at both ends. PAP uses ATP packets to transport the data once a connection is open to the server.

PAP is the protocol that ImageWriter and LaserWriter printers in the AppleTalk environment use for direct printing--that is, when a workstation sends a print job directly to a printer connected to the network instead of using a print spooler. Open Transport PAP provides a single protocol implementation for all AppleTalk printers that is integrated into the AppleTalk protocol stack.

See "Printer Access Protocol (PAP)" for information about how to use PAP under Open Transport.


Subtopics
AppleTalk Addressing and the Name Binding Protocol (NBP)
The AppleTalk Service Provider
Datagram Delivery Protocol (DDP)
AppleTalk Data Stream Protocol (ADSP)
AppleTalk Transaction Protocol (ATP)
Printer Access Protocol (PAP)

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998