Summary of the LAP Manager
Pascal Summary
Constants
CONST
{Transition Queue transition types}
ATTransOpen = 0; {AppleTalk has been opened}
ATTransClose = 2; {AppleTalk is about to close}
ATTransClosePrep = 3; {permission to close AppleTalk}
ATTransCancelClose = 4; {cancel the ClosePrep transition}
{To use the following six constants, you must first declare them in your }
{ application. They are not included in the MPW interface files.}
ATTransNetworkTransition = 5; {change in network connection for }
{ Apple Remote Access (ARA)}
ATTransNameChangeTellTask = 6; {flagship name change}
ATTransNameChangeAskTask = 7; {permission to change flagship }
{ name}
ATTransCancelNameChange = 8; {cancel flagship name change}
ATTransCableChange = 'rnge'; {change in cable range}
ATTransSpeedChange = 'sped'; {change in CPU speed}
Data Types
AppleTalk Transition Queue Entry
TYPE ATQEntry =
RECORD
qLink: ATQEntryPtr; {next queue entry}
qType: Integer; {reserved}
CallAddr: ProcPtr; {pointer to your routine}
END;
ATQEntryPtr = ^ATQEntry;
Routines
Adding and Removing AppleTalk Transition Queue Entries
FUNCTION LAPAddATQ(theATQEntry: ATQEntryPtr): OSErr;
FUNCTION LAPRmvATQ(theATQEntry: ATQEntryPtr): OSErr;
Notifying Routines When Your Application-Defined Transition Occurs
PROCEDURE ATEvent(event: LongInt; infoPtr: Ptr);
FUNCTION ATPreFlightEvent(event: LongInt; cancel: LongInt; infoPtr: Ptr):
OSErr;
C Summary
Constants
/*LAP Manager parameter constants*/
#define LAPprotType LAP.protType
#define LAPwdsPointer LAP.LAPptrs.wdsPointer
#define LAPhandler LAP.LAPptrs.handler
enum { /*AppleTalk Transition Queue */
/* transition types*/
ATTransOpen = 0, /*AppleTalk has opened*/
ATTransClose = 2, /*AppleTalk is about to close*/
ATTransClosePrep = 3, /*permission to close AppleTalk*/
ATTransCancelClose = 4, /*cancel ClosePrep transition*/
/*To use the following six constants, you must first define them in */
/* your application. They are not defined in the MPW interface files.*/
ATTransNetworkTransition = 5, /*change in network connection */
/* for ARA*/
ATTransNameChangeTellTask = 6, /*flagship name change*/
ATTransNameChangeAskTask = 7, /*permission to change */
/* flagship name*/
ATTransCancelNameChange = 8, /*cancel flagship name change*/
ATTransCableChange = 'rnge', /*change in cable range*/
ATTransSpeedChange = 'sped', /*change in CPU speed*/
};
Data Types
AppleTalk Transition Queue Entry
struct ATQEntry {
struct ATQEntry *qLink; /*reserved*/
short qType; /*reserved*/
ProcPtr CallAddr; /*pointer to your routine*/
};
typedef struct ATQEntry ATQEntry;
typedef ATQEntry *ATQEntryPtr;
Routines
Adding and Removing AppleTalk Transition Queue Entries
pascal OSErr LAPAddATQ(ATQEntryPtr theATQEntry);
pascal OSErr LAPRmvATQ(ATQEntryPtr theATQEntry);
Notifying Routines When Your Application-Defined Transition Occurs
pascal void ATEvent(long event, Ptr infoPtr);
pascal OSErr ATPreFlightEvent(long event, long cancel, Ptr
infoPtr);
Assembly-Language Summary
Constants
;routine selectors to attach and detach an 802.2 protocol handler
L802Attach EQU 21 ;attach an 802.2 protocol handler
L802Detach EQU 22 ;detach an 802.2 protocol handler
;miscellaneous LAP Manager values
LAPMgrPtr EQU $B18 ;entry point for LAP Manager
LAPMgrCall EQU 2 ;offset to LAP routines
LAddAEQ EQU 23 ;LAPAddATQ routine selector
LRmvAEQ EQU 24 ;LAPRmvATQ routine selector
Data Structures
AppleTalk Transition Queue Entry Data Structure
| 0 | AeQQLink | long | next queue entry |
| 4 | AeQQType | word | reserved |
| 6 | AeQCallAddr | long | pointer to your transition event handler routine |
Result Codes
| noErr | 0 | No error, or unrecognized event code |
| qErr | -1 | Queue element not found |