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 4 - Zone Information Protocol (ZIP)


Summary of ZIP

Pascal Summary

Constants

CONST
   {csCode for .XPP extended calls}
   xCall             =     246;

   {.XPP driver unit and reference number}
   xppUnitNum        =     40;      
   xppRefNum         =     -41; 
   
   {routine selectors}
   zipGetLocalZones  =      5;      {routine selector for local zone names}
   zipGetZoneList    =      6;      {routine selector for internet zone list}
   zipGetMyZone      =      7;      {routine selector for node's zone name}

Data Types

The XPP Parameter Block for ZIP

TYPE XPPParamBlock = 
      PACKED RECORD
         qLink:               QElemPtr;   {reserved}
         qType:               Integer;    {reserved}
         ioTrap:              Integer;    {reserved}
         ioCmdAddr:           Ptr;        {reserved}
         ioCompletion:        ProcPtr;    {completion routine}
         ioResult:            OSErr;      {result code}
         cmdResult:           LongInt;    {reserved}
         ioVRefNum:           Integer;    {reserved}
         ioRefNum:            Integer;    {driver reference number}
         csCode:              Integer;    {primary command code}


         CASE XPPPrmBlkType OF
            xCallParam
               xppSubCode:    Integer;    {secondary command code}
               xppTimeout:    Byte;       {timeout period for .XPP}
               xppRetry:      Byte;       {retry count}
               filler1:       Integer;    {reserved}
               zipBuffPtr:    Ptr;        {returned zone names}
               zipNumZones:   Integer;    {number of zones returned}
               zipLastFlag:   Byte;       {nonzero when all zone }
                                          { names have been returned}
               filler2:       Byte;       {reserved}
               zipInfoField:  PACKED ARRAY[1..70] OF Byte;
                                          {reserved for use by .XPP}
      END;
      XPPParmBlkPtr = ^XPPParamBlock;

Routines

Obtaining Zone Information

FUNCTION GetMyZone(thePBptr: XPPParmBlkPtr; async: Boolean): OSErr;
FUNCTION GetLocalZones(thePBptr: XPPParmBlkPtr; async: Boolean): OSErr;
FUNCTION GetZoneList(thePBptr: XPPParmBlkPtr; async: Boolean): OSErr;

C Summary

Constants

/*MPP parameter constants*/
#define MPPioCompletion MPP.ioCompletion
#define MPPioResult MPP.ioResult
#define MPPioRefNum MPP.ioRefNum
#define MPPcsCode MPP.csCode
enum {                              /*.XPP csCode*/
   xCall             =     246};    /*csCode for .XPP extended calls*/

enum {                              /*.XPP driver unit and reference */
                                    /* numbers*/
   xppUnitNum        =     40,      /*XPP unit number */
   xppRefNum         =     -41};    /*XPP reference number */

enum {                        /*XPP routine selectors*/
   zipGetLocalZones  =  5,    /*routine selector for local zone names*/
   zipGetZoneList    =  6,    /*routine selector for internet zone list*/
   zipGetMyZone      =  7};   /*routine selector for node's zone name*/

Data Types

The XPP Parameter Block for ZIP

#define XPPPBHeader
   QElem          *qLink;           /*reserved*/\
   short          qType;            /*reserved*/\
   short          ioTrap;           /*reserved */\
   Ptr            ioCmdAddr;        /*reserved*/\
   ProcPtr        ioCompletion;     /*completion routine*/\
   OSErr          ioResult;         /*result code*/\
   long           cmdResult;        /*reserved*/\
   short          ioVRefNum;        /*reserved*/\
   short          ioRefNum;         /*driver reference number*/
   short          csCode;           /*primary command code*/
typedef struct {
   XPPPBHeader 
      short       xppSubCode;       /*secondary command code*/
      char        xppTimeout;       /*retry interval in seconds*/
      char        xppRetry;         /*retry count*/
      short       filler1;
      Ptr         zipBuffPtr;       /*pointer to buffer of 578 bytes*/
      short       zipNumZones;      /*number of zone names in response*/
      char        zipLastFlag;      /*nonzero if no more zones*/
      char        filler2;          /*filler*/
      char        zipInfoField[70]; /*initial call, set first word to 0*/
}XCallParam;

Routines

Obtaining Zone Information

pascal OSErr GetMyZone(XPPParmBlkPtr thePBptr, Boolean async);
pascal OSErr GetLocalZones(XPPParmBlkPtr thePBptr, Boolean async);
pascal OSErr GetZoneList(XPPParmBlkPtr thePBptr, Boolean async);

Assembly-Language Summary

Constants

XPP csCode

xCall             EQU      246   ;csCode for XPP extended calls

XPP Driver Unit Reference Number

xppUnitNum        EQU      9     ;XPP unit number

XPP xCall Subcodes for ZIP Commands

ZGetMyZone        EQU      7     ;selector for GetMyZone command
ZGetZoneList      EQU      8     ;selector for GetZoneList command
ZGetLocalZones    EQU      9     ;selector for GetLocalZones command

Data Structures

XPP Parameter Block Common Fields for ZIP Routines
0qLinklongreserved
4qTypewordreserved
6ioTrapwordreserved
8ioCmdAddrlongreserved
12ioCompletionlongaddress of completion routine
16ioResultwordresult code
18cmdResultlongreserved
22ioVRefNumwordreserved
24ioRefNumworddriver reference number

GetMyZone
28xppSubCodewordalways zipGetZoneList for this function
30xppTimeoutbyteretry interval in seconds
31xppRetrybyteretry count
34zipBuffPtrlongpointer to data buffer
42zipInfoField70 bytesdata buffer for use by ZIP; first word set to 0

GetLocalZones
28xppSubCodewordalways zipGetLocalZones for this function
30xppTimeoutbyteretry interval in seconds
31xppRetrybyteretry count
34zipBuffPtrlongpointer to data buffer
38zipNumZoneswordnumber of names returned
40zipLastFlagbytenonzero if no more names
42zipInfoField70 bytesdata buffer for use by ZIP; first word set to 0

GetZoneList
28xppSubCodewordalways zipGetZoneList for this function
30xppTimeoutbyteretry interval in seconds
31xppRetrybyteretry count
34zipBuffPtrlongpointer to data buffer
38zipNumZoneswordnumber of names returned
40zipLastFlagbytenonzero if no more names
42zipInfoField70 bytesdata buffer for use by ZIP; first word set to 0

Result Codes
noErr0No error
noBridgeErr-93No router is available
reqFailed-1096Request to contact router failed; retry count exceeded
tooManyReqs-1097Too many concurrent requests
noDataArea-1104Too many outstanding ATP calls


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996