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 7 - Datagram Delivery Protocol (DDP) / DDP Reference
Data Structures


MPP Parameter Block

The DDP POpenSkt, PCloseSkt, and PWriteDDP functions use the following variant record of the MPP parameter block, defined by the MPPParamBlock data type, to pass information to and receive it from the .MPP driver.

This section defines the fields that are common to all of the DDP functions that use the MPP parameter block. (The BuildDDPwds procedure does not use the MPP parameter block.) The fields that are used for specific functions only are defined in the descriptions of the functions to which they apply. This section does not define reserved fields, which are used either internally by the .MPP driver or not at all.

TYPE MPPParamBlock = 
PACKED RECORD
   qLink:               QElemPtr;   {reserved}
   qType:               Integer;    {reserved}
   ioTrap:              Integer;    {reserved}
   ioCmdAddr:           Ptr;        {reserved}
   ioCompletion:        ProcPtr;    {completion routine}
   ioResult:            OSErr;      {result code}
   ioNamePtr:           StringPtr;  {reserved}
   ioVRefNum:           Integer;    {reserved}
   ioRefNum:            Integer;    {driver reference number}
   csCode:              Integer;    {primary command code}
   CASE MPPParmType OF
      OpenSktParm,
      CloseSktParm,
      WriteDDPParm:
      (
         socket:        Byte;       {socket number}
         checksumFlag:  Byte;       {checksum flag}
         listener:      Ptr;        {For POpenSkt, pointer to socket }
                                    { listener routine. For PWriteDDP, }
                                    { pointer to write-data structure.}
Field Description
ioCompletion
A pointer to a completion routine that you can provide. When you execute the POpenSkt function asynchronously, DDP calls your completion routine when it completes execution of the function. Specify NIL for this field if you do not wish to provide a completion routine. If you execute the POpenSkt function synchronously, it ignores the ioCompletion field.
ioResult
The result of the function. When you execute the function asynchro-
nously, the function sets this field to 1 and returns a function result of noErr as soon as the function begins execution. When the function completes execution, it sets the ioResult field to the actual result code.
ioRefNum
The .MPP driver reference number. The MPW interface fills in
this field.
csCode
The command code of the MPP command to be executed. The MPW interface fills in this field.
socket
The number of the socket to be opened, closed, or from which to send data.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996