|
Mac OS 9
|
#include <AppleTalk.h>
Data Fields | |
| QElem * | qLink |
| short | qType |
| short | ioTrap |
| Ptr | ioCmdAddr |
| ATPCompletionUPP | ioCompletion |
| OSErr | ioResult |
| long | userData |
| short | reqTID |
| short | ioRefNum |
| short | csCode |
MPPProtocolHandlerProcs and DDPSocketListenerProcs cannot be written in or called from a high-level language without the help of mixed mode or assembly glue because they use the following parameter-passing conventions:
typedef Boolean (*MPPProtocolHandlerProcPtr)(Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, short numBytesLeftToReadInPacket);
In:
=> SCCAddr1 A0.L
=> SCCAddr2 A1.L
=> MPPLocalVars A2.L
=> nextFreeByteInRHA A3.L
=> ReadPacketAndReadRestPtr A4.L
=> numBytesLeftToReadInPacket D1.W
Out:
<= Boolean Z bit of CCR
typedef Boolean (*DDPSocketListenerProcPtr)(Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, UInt8 packetDestinationNumber, short numBytesLeftToReadInPacket);
In:
=> SCCAddr1 A0.L
=> SCCAddr2 A1.L
=> MPPLocalVars A2.L
=> nextFreeByteInRHA A3.L
=> ReadPacketAndReadRestPtr A4.L
=> packetDestinationNumber D0.B
=> numBytesLeftToReadInPacket D1.W
Out:
<= Boolean Z bit of CCR
| short MPPparms::csCode |
driver reference number
| Ptr MPPparms::ioCmdAddr |
routine trap
| ATPCompletionUPP MPPparms::ioCompletion |
routine address
| short MPPparms::ioRefNum |
request transaction ID
| OSErr MPPparms::ioResult |
ATPCompletionUPP or MPPCompletionUPP
| short MPPparms::ioTrap |
queue type
| short MPPparms::qType |
next queue entry
| short MPPparms::reqTID |
Command result (ATP user bytes)
| long MPPparms::userData |
result code