ADC Home > Reference Library > Technical Notes > Legacy Documents > Networking >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Link Access Protocol Q&As

CONTENTS

This Technical Note contains a collection of archived Q&As relating to a specific topic--questions sent the Developer Support Center (DSC) along with answers from the DSC engineers. Current Q&A's can be found on the Macintosh Technical Q&A's web site.

[Oct 01 1990]






AppleTalk and VBL task using self-send mode

Date Written: 5/18/92

Last reviewed: 6/14/93

To make all AppleTalk calls asynchronously, I have to split the VBL task in pieces:

  • Setselfsend
  • check its async finish
  • StartLookup
  • check its async finish
  • Restoreselfsend
  • check its async finish

This means that while the selfsend is set to true, other software will be confused when they do a lookup. Also, when the Macintosh is doing I/O on the network, the VBL will set and restore the selfsend flag. Will other AppleTalk calls fail if the SelfSend flag Is set to true, or does selfsend only work on PLookupName?

Your method of splitting up the steps of a lookup to yourself during a VBL task using self-send mode is correct, except you needn't bother restoring the state of self-send since you are giving up time to other processes between calls to your VBL task.

Self-send mode is a global setting and may affect any AppleTalk calls. When the LAP manager is preparing to send a packet, it checks the destination node. If the destination node is its own node address or the broadcast address, then it sends the packet to itself before putting the packet out on the wire. This usually only affects NBP lookup packets because they are sent to the broadcast address. Most other AppleTalk protocols do not broadcast.

Programs using self-send should follow these guidelines:

  • If self-send is only needed for a brief period of time, then you should turn self-send on with PSetSelfSend (saving the current setting returned in oldSelfFlag), make the call(s) that require self-send, and then restore self-send to its previous state.
  • If self-send is needed for an extended period of time (for example, for the life of your application) where your program will give up time to other programs, then you should turn self-send on and leave it on (don't restore it to its previous state). Since other programs running on your system (that aren't well behaved) may turn off self-send at any time, programs that require self-send mode should periodically call PSetSelfSend to make sure self-send stays on. Apple's system software has no compatibility problems with self-send - that is, it doesn't care if it's on or off - so leaving it on won't hurt anything.

Back to top

How to tell if LAP Manager is present

Date Written: 12/12/91

Last reviewed: 2/3/92

What's the recommended technique for telling whether the user has turned off AppleTalk?

The best way to determine whether AppleTalk has been turned off is to use the AppleTalk Transition Queue to alert you to .MPP closures. (This is one of the reasons why the AppleTalk Transition Queue was implemented.) The AppleTalk Transition Queue is available only in AppleTalk version 53 or later, and is documented in the AppleTalk chapter of Inside Macintosh Volume VI, starting on page 32-17. There's also a code snippet, Transition Queue, in the Snippets folder on the Developer CD Series disc.

Back to top

AppleTalk AOpen and AClose codes 7 & 8

Date Written: 11/1/91

Last reviewed: 11/27/91

What are AppleTalk messages 7 and 8? They're documented in lapequ.a as:

    AOpen      EQU         7       ; Open an ATlk

but what should the adev do with them and what parameters are passed?

The AOpen and AClose messages are sent when the .MPP driver is opened and closed, respectively. When the AppleTalk driver is closed, a shutdown message is not sent. Instead, the LAP Manager determines whether an adev is version 3 or greater and, if true, assumes that the adev can respond to the AClose message and sends the message. Conversely, when the .MPP driver is re-opened while the adev is active, the AOpen message is sent to the adev (assuming that the adev is version 3 or greater).

An important note on this matter is that if you modify your adev to version 3, additional selectors must be supported. These new selectors will be documented in a forthcoming Technote.

Back to top

Downloadables

Acrobat gif

Acrobat version of this Note (48K)

Download


Back to top


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.