LAPWrite
LAPWrite Send a frame to another node
#include <AppleTalk.h> AppleTalk Manager
OSErr LAPWrite( abRecord, async);
ATLAPRecHandle abRecord; handle to an ATLAPRec
Boolean async; 0=await completion; 1=immediate return
returns Error Code; 0=no error
LAPWrite is part of the AppleTalk alternate interface. It is recommended
that you use the preferred call, PWriteLAP instead.
LAPWrite sends a frame to another node.
abRecord is a handle to an ATLAPRec structure. The relevant fields are as
follows:
Out-In Name Type Size Offset Description
¨ abOpcode ABCallType 1 0 Always tLAPWrite
¨ abResult short 2 2 Result code
Æ abUserReference long 2 4 For your use
Æ lapAddress.dstNodeID char 1 8 Destination node ID
Æ lapAddress.lapProtType ABByte 1 10 ALAP protocol type
Æ lapReqCount short 2 12 Length of frame data
Æ lapDataPtr Ptr 4 16 Pointer to buffer
async is a Boolean value. Use FALSE for normal ( synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O.
Returns: an operating system Error Code. It will be one of:
noErr (0) No error
ddpLenErr (-92) ALAP data length too big
lapProtErr (-94) Invalid ALAP protocol type
excessCollsns (-95) Unable to contact destination node; packet not sent

Notes: LAPReqCount and lapDataPtr specify the length and location of the data to
send. The lapAddress.lapProtType field indicates the ALAP protocol type of
the frame and the lapAddress.dstNodeID indicates the node ID of the node to
which the frame should be sent.
The first two bytes of an ALAP frame's data must contain the length in
bytes of that data, including the length bytes themselves.