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 /
Chapter 10 - Link-Access Protocol (LAP) Manager / LAP Manager Reference
Routines / Adding and Removing AppleTalk Transition Queue Entries


LAPAddATQ

The LAPAddATQ function adds an entry to the AppleTalk Transition Queue.

FUNCTION LAPAddATQ (theATQEntry: ATQEntryPtr): OSErr;
theATQEntry
A pointer to a record of type ATQEntry to be added to the AppleTalk Transition Queue.
DESCRIPTION
You use the LAPAddATQ function to add an entry for your application to the AppleTalk Transition Queue. Before you call the LAPAddATQ function, you must create an AppleTalk Transition Queue entry record of type ATQEntry that defines your entry. "The AppleTalk Transition Queue Entry" on page 10-25 describes the ATQEntry record. You provide a pointer to this record as the value of the theATQEntry parameter when you call the LAPAddATQ function.

In the CallAddr field of the AppleTalk Transition Queue entry record, you provide a pointer to a routine that the LAP Manager is to call when an AppleTalk transition event occurs. The LAP Manager calls your routine to notify you when any of the following events occurs:

SPECIAL CONSIDERATIONS
You must allocate nonrelocatable memory for the ATQEntry record and not alter or manipulate this memory until you remove the AppleTalk Transition Queue entry from the transition queue using the LAPRmvATQ function.

When LAP Manager calls your transition event handler routine, the LAP Manager passes parameters to your routine using the C stack calling conventions, and expects your routine to return a result in register D0. If you write your transition event handler routine in Pascal, you must use an assembly glue code routine. For a sample glue code routine, see "Writing a Transition Event Handler Routine Using Pascal" beginning on page 10-10.

ASSEMBLY-LANGUAGE INFORMATION
From assembly language, you add an AppleTalk Transition Queue entry by placing a routine selector in the D0 register, placing a pointer to your AppleTalk Transition Queue entry in the A0 register, and executing a JSR instruction to an offset past the start of the LAP Manager. The start of the LAP Manager is contained in the global variable LAPMgrPtr ($B18). The offset to the LAP Manager routines is given by the constant LAPMgrCall (2).
Registers on entry
D023
A0Pointer to AppleTalk Transition Queue entry
Registers on exit
D0Result code

RESULT CODES
noErr0No error
SEE ALSO
"Adding an Entry to the AppleTalk Transition Queue" on page 10-7 describes the process of creating an AppleTalk Transition Queue entry and adding it to the queue.

For the details of each transition, see "How the LAP Manager Calls Your Transition Event Handler Routine" beginning on page 10-8.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996