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
| 0 | qLink | long | reserved |
| 4 | qType | word | reserved |
| 6 | ioTrap | word | reserved |
| 8 | ioCmdAddr | long | reserved |
| 12 | ioCompletion | long | address of completion routine |
| 16 | ioResult | word | result code |
| 18 | cmdResult | long | reserved |
| 22 | ioVRefNum | word | reserved |
| 24 | ioRefNum | word | driver reference number |
GetMyZone
| 28 | xppSubCode | word | always zipGetZoneList for this function |
| 30 | xppTimeout | byte | retry interval in seconds |
| 31 | xppRetry | byte | retry count |
| 34 | zipBuffPtr | long | pointer to data buffer |
| 42 | zipInfoField | 70 bytes | data buffer for use by ZIP; first word set to 0 |
GetLocalZones
| 28 | xppSubCode | word | always zipGetLocalZones for this function |
| 30 | xppTimeout | byte | retry interval in seconds |
| 31 | xppRetry | byte | retry count |
| 34 | zipBuffPtr | long | pointer to data buffer |
| 38 | zipNumZones | word | number of names returned |
| 40 | zipLastFlag | byte | nonzero if no more names |
| 42 | zipInfoField | 70 bytes | data buffer for use by ZIP; first word set to 0 |
GetZoneList
| 28 | xppSubCode | word | always zipGetZoneList for this function |
| 30 | xppTimeout | byte | retry interval in seconds |
| 31 | xppRetry | byte | retry count |
| 34 | zipBuffPtr | long | pointer to data buffer |
| 38 | zipNumZones | word | number of names returned |
| 40 | zipLastFlag | byte | nonzero if no more names |
| 42 | zipInfoField | 70 bytes | data buffer for use by ZIP; first word set to 0 |
Result Codes
| noErr | 0 | No error |
| noBridgeErr | -93 | No router is available |
| reqFailed | -1096 | Request to contact router failed; retry count exceeded |
| tooManyReqs | -1097 | Too many concurrent requests |
| noDataArea | -1104 | Too many outstanding ATP calls |