# Programming with AppleTalk 1991 — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1)

## Transcribed source material

Machine transcriptions and image descriptions; uncertain copy may be marked [illegible]. Verify against the linked originals. Historical rights remain with the original owners.

These are transcribed excerpts, not the full publications. Open the originals for remaining pages.

### Image 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1#scan-65f87a922ff53ede1d54c7a75ac8ca0ad98ad3c786be0c238288efd511be72ed)

Programming with AppleTalk

Transcribed text:

SERIES EDITOR SCOTT KNASTER

Macintosh Inside Out

Programming
WITH
AppleTalk®

MICHAEL PEIRCE

Image description: A book cover with a pink background, a green downward-pointing triangle labeled Macintosh Inside Out, large black and white title lettering over blue and orange color blocks, and the author name in spaced capitals at the bottom.

Reading notes: Series editor name is printed as SCOTT KNASTER in the top band; the word EDITOR is partly cut by the green triangle, so reading order there is approximate. The letters WITH are set in a curved arc and are split across the title, so their reading order is inferred from layout.

Printed product names: AppleTalk · Macintosh Inside Out

Languages: English

[Original Image 1](https://www.vintageapple.net/files/eadb747be3556d107abd807036c10502a3150f70bc75cd40118ab911a12d1744/6575461e0a823ea0fabaf3bc.webp)

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1#scan-5ae9509de5d72d56eaf5d22d48df1822033be005ce2a708cd6ab1d051c2d4ab2)

Programming with AppleTalk

Transcribed text:

SERIES EDITOR
Macintosh Inside Out
SCOTT KNASTER
Programming
WITH
AppleTalk®
MICHAEL PEIRCE

Image description: Book cover with pink background, a green downward triangle reading 'Macintosh Inside Out', a large black title 'Programming' over a blue tilted square, and 'AppleTalk' in white letters on an orange gradient band, with the author name 'MICHAEL PEIRCE' at the bottom.

Reading notes: Series editor line 'SCOTT KNASTER' is printed in the top band; reading order of top band items is approximate. Small 'WITH' text is set along an arc and is read as a separate element. Wear marks and scuffs on the left side of the cover; no text affected.

Printed product names: AppleTalk · Macintosh Inside Out

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/c6bdcbe5f9683301cdeab5deb9dfa5d95ba962e96978bdda304021ad9d6fe23e/Programming_with_AppleTalk_1991.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1#scan-60058ab227b92e6cc9a28322982b5ff66ccc77038b72f9c19ac843c0227d7d53)

Image description: The image is a blank white page with no visible artwork, layout elements, or text.

Reading notes: No visible text found; the page appears entirely blank.

[Original PDF page 2](https://www.vintageapple.net/files/c6bdcbe5f9683301cdeab5deb9dfa5d95ba962e96978bdda304021ad9d6fe23e/Programming_with_AppleTalk_1991.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1#scan-b19e03d616a32497f4d291d5ed7ed1a67e86bcd219c4a5e90bc14bf7d774e90f)

Image description: The image is a entirely blank white page with no visible artwork, layout, or markings.

Reading notes: No visible text found; image appears blank white.

[Original PDF page 3](https://www.vintageapple.net/files/c6bdcbe5f9683301cdeab5deb9dfa5d95ba962e96978bdda304021ad9d6fe23e/Programming_with_AppleTalk_1991.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1#scan-2685a04a48e5af7b50b90ae470728291c023061da5abc8b4071a0c35f9ccf7ed)

Programming with Apple Talk®

Transcribed text:

Programming with   Apple Talk®
Michael   Peirce
• ~
Addison-Wesley Publishing Company, Inc.
Reading, Massachusetts   Menlo   Park,   California   New York
Don Mills, Ontario   Wokingham, England   Amsterdam   Bonn
Sydney   Singapore   Tokyo   Madrid   San Juan
Paris   Seoul   Milan   Mexico City   Taipei

Printed product names: Apple Talk

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/c6bdcbe5f9683301cdeab5deb9dfa5d95ba962e96978bdda304021ad9d6fe23e/Programming_with_AppleTalk_1991.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1#scan-012efe9169ea4086a12cb575334568638da2f28256809f12a7c5bee4cc83c8aa)

Transcribed text:

Many of the designations used by manufacturers and sellers to distinguish their
products are claimed as trademarks. Where those designations appear in this book
and Addison-Wesley was aware of a trademark claim, the designations have been
printed in initial capital letters.
Library of Congress Cataloging-in-Publication Data
Peirce, Michael, 1961-
Programming with AppleTalk   I   Michael Peirce.
p.   cm. -   (Macintosh inside out)
Includes index.
ISBN   0-201-57780-1
1. Macintosh (Computer)-Programming. 2. AppleTalk. 3. Local
area networks (Computer networks)   I.   Title. II.   Series.
QA76.8.M3P45   1991
005.7'1369-dc20   91-4321
CIP
Copyright © 1991 by Michael   Peirce
All rights reserved. No part of this publication may be reproduced, stored in a
retrieval system, or transmitted,   in   any form, or by any means, electronic,
mechanical, photocopying, recording, or otherwise, without the prior written
consent of the publisher. Printed in the   United   States of America. Published
simultaneously in Canada.
The author and publisher have taken care in preparation of this book, but make no
expressed or implied warranty of any kind and assume no responsibility for errors
or omissions. No liability is assumed for incidental or consequential damages in
connection with or arising out of the use of the information or programs contained
herein.
Sponsoring Editor: Rachel Guichard
Technical Reviewer:   Peter   Helme
Cover Design: Ronn Campisi
Set in   10.5-point   Palatino by Total Concept Associates
123 4 5 6   7   8 9-MW-95 94 93 92 91
First Printing, August 1991

Reading notes: Headline ambiguous: the book title 'Programming with AppleTalk' appears only in the cataloging block, not as a clear primary heading

Printed dates: 1961 · 1991 · August 1991

Languages: English

[Original PDF page 5](https://www.vintageapple.net/files/c6bdcbe5f9683301cdeab5deb9dfa5d95ba962e96978bdda304021ad9d6fe23e/Programming_with_AppleTalk_1991.pdf#page=5)

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1#scan-791a93648ae78024312a96c684d18136d3dc29f6337422ec39b97b23507ac5c8)

Image description: The image is a blank white page with no visible artwork, layout, or text.

Reading notes: No visible text found in the image; transcript and printed fields left empty.

[Original PDF page 6](https://www.vintageapple.net/files/c6bdcbe5f9683301cdeab5deb9dfa5d95ba962e96978bdda304021ad9d6fe23e/Programming_with_AppleTalk_1991.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1#scan-aba61daa52e96f4b7974a07d859e4e28964f402bbe886c609e9de5dd7fb7c6e9)

Transcribed text:

Contents
Foreword   by   Scott   Knaster   xiii
Acknowledgments   xv
Introduction   xvii
~   PART   ONE   Basic Networking on the Macintosh   1
1.   ·Networking   on the Macintosh   3
The Macintosh Communications Environment   3
AppleTalk Networking   4
The AppleTalk Protocol Stack   5
The Physical Layer   6
The Data Link Layer   7
The Network Layer   7
The Transport Layer   7
The Session Layer   7
The Presentation Layer   8
The Application Layer   8
Summary   8
2. AppleTalk Programming Issues   9
Using   the Various AppleTalk   Protocols   9
Link Access Protocols   10
Datagram Delivery Protocol   10
vii

Languages: English

[Original PDF page 7](https://www.vintageapple.net/files/c6bdcbe5f9683301cdeab5deb9dfa5d95ba962e96978bdda304021ad9d6fe23e/Programming_with_AppleTalk_1991.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1#scan-2d55a8e6c27baccca0b4f5ef2fa3da2e75cab53d9016bd081ec68b843b4575a3)

Transcribed text:

viii   ~   Contents
Routing Table Maintenance Protocol   11
AppleTalk Echo Protocol   11
AppleTalk Transaction Protocol   11
Name Binding Protocol   12
Zone   Information Protocol   12
AppleTalk   Session   Protocol   12
Printer Access Protocol   13
AppleTalk Data   Stream   Protocol   13
AppleTalk Filing Protocol   13
Intemetworking   13
Repeaters   14
Routers·   14
Gateways   15
The   Preferred   AppleTalk Interface   15
AppleTalk Transport Media   16
LocalTalk   16
Ethernet   17
Token Ring   18
Summary   18
~   PART   TWO   A Practical Guide to AppleTalk Programming   21
3. Synchronous and Asynchronous Operations   23
Using   Synchronous Calls   23
Using   Asynchronous Calls   24
Polling for Completion of Asynchronous Calls   24
Using   Completion Routines with Asynchronous Calls   29
Summary   33
4. AppleTalk Memory Management   35
Using   Parameter   Blocks with Synchronous Calls   35
Using   Parameter   Blocks with Asynchronous Calls   37
Parameter Block Integrity   37
Reuse of Parameter Blocks   38
Other   Types of AppleTalk Storage   38
Additional AppleTalk Storage Management Considerations   39
Avoiding Heap Fragmentation   39
Non-Application Storage Management   40
Summary   42

Reading notes: Table of contents text contains irregular spacing and a few garbled characters such as 'Intemetworking' and 'Routers·'

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/c6bdcbe5f9683301cdeab5deb9dfa5d95ba962e96978bdda304021ad9d6fe23e/Programming_with_AppleTalk_1991.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1#scan-8f0d18996b564e2d44df22098ae63e2a17f0ce7c996b2cf4efd19a350b32871f)

Transcribed text:

5. Name Binding Protocol   43
Network Addresses   43
NBPNames   45
Wildcards in   NBP   Names   46
Using   Name Binding   Protocol   47
Registering a Name on the Network   47
Looking   Up   a Name on the Network   48
Confirming a Name on the Network   49
~   Contents   ix
Detailed Descriptions of Important NBP Routines   50
PRegisterName   50
PLookupName   52
NBPSetEntity   53
NBPSetNTE   53
NBPExtract   54
NBPRemove   54
PConfirm   55
Summary   56
6. Zone Information   Protocol   57
Using   ZIP   in   Phase   1 AppleTalk Networks   58
Getting the Local   Zone   Name   58
Getting the   Zone   List   59
Using   ZIP   in   Phase   2 AppleTalk Networks   61
Getting the Local   Zone   Name   62
Getting the   Zone   List   64
Getting the List of Local Zones   66
Detailed Descriptions of Important   ZIP   Routines   66
GetMyZone   67
GetZoneList   68
GetLocalZones   69
Summary   71
7. AppleTalk Transaction   Protocol   73
The Mechanics of ATP Transactions   74
The Buffer Data Structure   77
Using   AppleTalk Transaction   Protocol   78
Making a Request   78
Using   PNSendRequest Rather than   PSendRequest   81
Receiving a Request   81
Sending   a Response   82
Aborting   ATP   Calls   83

Reading notes: Source is a table of contents with page numbers; no advertised products, prices, or dates are present

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/c6bdcbe5f9683301cdeab5deb9dfa5d95ba962e96978bdda304021ad9d6fe23e/Programming_with_AppleTalk_1991.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1#scan-2468239263a106329fb968e827e8e27ce5b4f1bfcdfd59a4e6849619f81361a5)

Transcribed text:

x   ..,..   Contents
Detailed Descriptions of Important ATP Routines   84
PSendRequest   B4
PNSendRequest   B6
PGetRequest   BB
PSendResponse   B9
POpenATPSocket   90
PCloseATPSocket   91
PKillSendRequest   92
PKillGetRequest   92
Summary   93
8. AppleTalk Data Stream Protocol   95
ADSP   Connections   95
Making an   ADSP   Connection   96
Using   a   Connection   Listener to Open a   Session   101
Sending Data   Over   a Connection   104
How   ADSP   Decides When to Transmit Data   106
The Structure of the Data Stream   106
Using   dspRead and dspWrite   107
Using   dspStatus   109
Attention Messages   109
Detailed Descriptions of Important   ADSP   Routines   111
dsplnit   111
dspOptions   112
dspOpen   114
dspNewCID   121
dspClose   122
dspCUnit   123
dspCLListen   124
dspCLDeny   125
dspCLRemove   127
dspStatus   12B
dsp   Write   129
dspRead   130
dspAttention   132
dspReset   133
Summary   134
9. Miscellaneous AppleTalk Interfaces   135
Opening the AppleTalk Drivers   135
Opening the   .MPP   Driver   135
Opening the   .XPP   Driver   136
Opening the   .DSP   driver   137

Reading notes: Source is a table of contents with page numbers; no headline or advertised products present. Page numbers and some characters appear garbled (e.g., 'dsplnit', 'B4', 'BB').

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/c6bdcbe5f9683301cdeab5deb9dfa5d95ba962e96978bdda304021ad9d6fe23e/Programming_with_AppleTalk_1991.pdf#page=10)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/1#scan-6b7892d1f3448cdfb2c1514a8f8474458027703c9b3e927915d56c85937a59b3)

Transcribed text:

PSelfSend   137
PGetAppleTalklnfo   138
..._   Contents   xi
lsSel/SendOn   routine using PGetAppleTalklnfo   141
AreWeAServer routine using PGetAppleTalklnfo   142
GetNetRange using PGetAppleTalklnfo   143
GetOurAddr using PGetAppleTalklnfo   144
GetRouterAddr using PGetAppleTalklnfo   145
GetMaxs using PGetAppleTalklnfo   146
The Transition Queue   147
Inserting an Entry into the Transition Queue   148
The Transition Handling Routine   149
The Chooser   151
The Chooser   User   Interface   151
Basic Operation of a Chooser Interface   151
Configuring a Chooser Interface   155
Summary   160
..._   PART THREE   AppleTalk   Programming   Examples   161
10.   NameTool: An AppleTalk MPW Tool for   Using   NBP   Lookups   163
Goals for NameTool   163   •
How to   Use   NameTool   164
The Help Option   164
The Zone, Name, and Type Options   164
The Interval and Timeout Options   165
General Comments About NameTool   165
Sample of the NameTool Output   166
The Structure of NameTool   167
The Header   Section   of NameTool   168
The General Routines   170
The AppleTalk Routines   173
The Main Routine   187
Summary   189
11. RemoteSyslnfo:   An   RDEV/INIT Example   Program   191
Goals for RemoteSyslnfo   191
How to   Use   RemoteSyslnfo   192
The Structure of RemoteSyslnfo   193
The   Source   Code Structure of RemoteSyslnfo   194
The Common   Unit   195
The Example INIT   198

Reading notes: Source text shows OCR-style character substitutions (e.g., 'lsSel/SendOn', 'Klnfo' rendered as 'Info'); spelling reproduced as printed. Text is a table of contents excerpt with page numbers and section headings; reading order is list-based rather than prose.

Printed product names: AppleTalk · PSelfSend · NameTool · Chooser

Languages: English

[Original PDF page 11](https://www.vintageapple.net/files/c6bdcbe5f9683301cdeab5deb9dfa5d95ba962e96978bdda304021ad9d6fe23e/Programming_with_AppleTalk_1991.pdf#page=11)

[Next transcribed scans](https://www.vintageapple.net/transcripts/media/va-programming-with-appletalk-1991-b4218e/2.md)
