PWriteLAP
PWriteLAP Send a frame to another node
#include <AppleTalk.h> AppleTalk Manager
OSErr PWriteLAP( thePBptr, async);
MPPPBPtr thePBptr; pointer to an LAPparms structure
Boolean async; 0=await completion; 1=immediate return
returns Error Code; 0=no error
PWriteLAP sends a frame to another node
thePBptr iis a pointer to an LAPparms structure.
Out-In Name Type Size Offset Description
Æ csCode short 2 26 always writeLAP
Æ wdsPointer Ptr 4 30 write data structure
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
ddpLengthErr (-92) Packet length exceeds maximum
lapProtErr (-94) Invalid ALAP protocol type
excessCollsns (-95) No CTS received after 32 RTS's

Notes: The frame data and destination of the frame are described by the write data
structure pointed to by wdsPointer. The first two data bytes of an ALAP
frame sent to another computer using the AppleTalk Manager must
indicate the length of the frame in bytes. The ALAP protocol type must be in
the range 1 to 127.
Most programs will never need to call ALAP, because higher- level
protocols will automatically call ALAP as necessary. If you do want to send a
frame directly via ALAP, call the PWriteLAP function. There is no
PReadLAP function. If you want to read ALAP frames, you must call
PAttachPH to add your protocol handler to the node's protocol handler
table. The ALAP module will examine every incoming frame and call your
protocol handler for each frame received with the correct ALAP protocol.
When your program no longer wants to receive frames with a particular
ALAP protocol type value, it can call PDetachPH to remove the
corresponding protocol handler from the protocol handler table.