AppleTalk.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:78k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       AppleTalk.h
  3.  
  4.      Contains:   AppleTalk Interfaces.
  5.  
  6.      Version:    Technology: System 8.5
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1985-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __APPLETALK__
  18. #define __APPLETALK__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __OSUTILS__
  23. #include "OSUtils.h"
  24. #endif
  25. #if PRAGMA_ONCE
  26. #pragma once
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #if PRAGMA_IMPORT
  32. #pragma import on
  33. #endif
  34. #if PRAGMA_STRUCT_ALIGN
  35.     #pragma options align=mac68k
  36. #elif PRAGMA_STRUCT_PACKPUSH
  37.     #pragma pack(push, 2)
  38. #elif PRAGMA_STRUCT_PACK
  39.     #pragma pack(2)
  40. #endif
  41. enum {
  42.                                                                 /* Driver unit numbers (ADSP is dynamic) */
  43.     mppUnitNum                  = 9,                            /* MPP unit number */
  44.     atpUnitNum                  = 10,                           /* ATP unit number */
  45.     xppUnitNum                  = 40                            /* XPP unit number */
  46. };
  47. enum {
  48.                                                                 /* Driver refNums (ADSP is dynamic) */
  49.     mppRefNum                   = -10,                          /* MPP reference number */
  50.     atpRefNum                   = -11,                          /* ATP reference number */
  51.     xppRefNum                   = -41                           /* XPP reference number */
  52. };
  53. enum {
  54.                                                                 /* .MPP csCodes */
  55.     lookupReply                 = 242,                          /* This command queued to ourself */
  56.     writeLAP                    = 243,                          /* Write out LAP packet */
  57.     detachPH                    = 244,                          /* Detach LAP protocol handler */
  58.     attachPH                    = 245,                          /* Attach LAP protocol handler */
  59.     writeDDP                    = 246,                          /* Write out DDP packet */
  60.     closeSkt                    = 247,                          /* Close DDP socket */
  61.     openSkt                     = 248,                          /* Open DDP socket */
  62.     loadNBP                     = 249,                          /* Load NBP command-executing code */
  63.     lastResident                = 249,                          /* Last resident command */
  64.     confirmName                 = 250,                          /* Confirm name */
  65.     lookupName                  = 251,                          /* Look up name on internet */
  66.     removeName                  = 252,                          /* Remove name from Names Table */
  67.     registerName                = 253,                          /* Register name in Names Table */
  68.     killNBP                     = 254,                          /* Kill outstanding NBP request */
  69.     unloadNBP                   = 255,                          /* Unload NBP command code */
  70.     setSelfSend                 = 256,                          /* MPP: Set to allow writes to self */
  71.     SetMyZone                   = 257,                          /* Set my zone name */
  72.     GetATalkInfo                = 258,                          /* get AppleTalk information */
  73.     ATalkClosePrep              = 259                           /* AppleTalk close query */
  74. };
  75. enum {
  76.                                                                 /* .ATP csCodes */
  77.     nSendRequest                = 248,                          /* NSendRequest code */
  78.     relRspCB                    = 249,                          /* Release RspCB */
  79.     closeATPSkt                 = 250,                          /* Close ATP socket */
  80.     addResponse                 = 251,                          /* Add response code | Require open skt */
  81.     sendResponse                = 252,                          /* Send response code */
  82.     getRequest                  = 253,                          /* Get request code */
  83.     openATPSkt                  = 254,                          /* Open ATP socket */
  84.     sendRequest                 = 255,                          /* Send request code */
  85.     relTCB                      = 256,                          /* Release TCB */
  86.     killGetReq                  = 257,                          /* Kill GetRequest */
  87.     killSendReq                 = 258,                          /* Kill SendRequest */
  88.     killAllGetReq               = 259                           /* Kill all getRequests for a skt */
  89. };
  90. enum {
  91.                                                                 /* .XPP csCodes */
  92.     openSess                    = 255,                          /* Open session */
  93.     closeSess                   = 254,                          /* Close session */
  94.     userCommand                 = 253,                          /* User command */
  95.     userWrite                   = 252,                          /* User write */
  96.     getStatus                   = 251,                          /* Get status */
  97.     afpCall                     = 250,                          /* AFP command (buffer has command code) */
  98.     getParms                    = 249,                          /* Get parameters */
  99.     abortOS                     = 248,                          /* Abort open session request */
  100.     closeAll                    = 247,                          /* Close all open sessions */
  101.     xCall                       = 246                           /* .XPP extended calls */
  102. };
  103. enum {
  104.                                                                 /* Transition Queue transition types */
  105.     ATTransOpen                 = 0,                            /*AppleTalk has opened*/
  106.     ATTransClose                = 2,                            /*AppleTalk is about to close*/
  107.     ATTransClosePrep            = 3,                            /*Is it OK to close AppleTalk ?*/
  108.     ATTransCancelClose          = 4                             /*Cancel the ClosePrep transition*/
  109. };
  110. enum {
  111.     afpByteRangeLock            = 1,                            /*AFPCall command codes*/
  112.     afpVolClose                 = 2,                            /*AFPCall command codes*/
  113.     afpDirClose                 = 3,                            /*AFPCall command codes*/
  114.     afpForkClose                = 4,                            /*AFPCall command codes*/
  115.     afpCopyFile                 = 5,                            /*AFPCall command codes*/
  116.     afpDirCreate                = 6,                            /*AFPCall command codes*/
  117.     afpFileCreate               = 7,                            /*AFPCall command codes*/
  118.     afpDelete                   = 8,                            /*AFPCall command codes*/
  119.     afpEnumerate                = 9,                            /*AFPCall command codes*/
  120.     afpFlush                    = 10,                           /*AFPCall command codes*/
  121.     afpForkFlush                = 11,                           /*AFPCall command codes*/
  122.     afpGetDirParms              = 12,                           /*AFPCall command codes*/
  123.     afpGetFileParms             = 13,                           /*AFPCall command codes*/
  124.     afpGetForkParms             = 14,                           /*AFPCall command codes*/
  125.     afpGetSInfo                 = 15,                           /*AFPCall command codes*/
  126.     afpGetSParms                = 16,                           /*AFPCall command codes*/
  127.     afpGetVolParms              = 17,                           /*AFPCall command codes*/
  128.     afpLogin                    = 18,                           /*AFPCall command codes*/
  129.     afpContLogin                = 19,                           /*AFPCall command codes*/
  130.     afpLogout                   = 20,                           /*AFPCall command codes*/
  131.     afpMapID                    = 21,                           /*AFPCall command codes*/
  132.     afpMapName                  = 22,                           /*AFPCall command codes*/
  133.     afpMove                     = 23,                           /*AFPCall command codes*/
  134.     afpOpenVol                  = 24,                           /*AFPCall command codes*/
  135.     afpOpenDir                  = 25,                           /*AFPCall command codes*/
  136.     afpOpenFork                 = 26,                           /*AFPCall command codes*/
  137.     afpRead                     = 27,                           /*AFPCall command codes*/
  138.     afpRename                   = 28,                           /*AFPCall command codes*/
  139.     afpSetDirParms              = 29,                           /*AFPCall command codes*/
  140.     afpSetFileParms             = 30,                           /*AFPCall command codes*/
  141.     afpSetForkParms             = 31,                           /*AFPCall command codes*/
  142.     afpSetVolParms              = 32,                           /*AFPCall command codes*/
  143.     afpWrite                    = 33,                           /*AFPCall command codes*/
  144.     afpGetFlDrParms             = 34,                           /*AFPCall command codes*/
  145.     afpSetFlDrParms             = 35,                           /*AFPCall command codes*/
  146.     afpDTOpen                   = 48,                           /*AFPCall command codes*/
  147.     afpDTClose                  = 49,                           /*AFPCall command codes*/
  148.     afpGetIcon                  = 51,                           /*AFPCall command codes*/
  149.     afpGtIcnInfo                = 52,                           /*AFPCall command codes*/
  150.     afpAddAPPL                  = 53,                           /*AFPCall command codes*/
  151.     afpRmvAPPL                  = 54,                           /*AFPCall command codes*/
  152.     afpGetAPPL                  = 55,                           /*AFPCall command codes*/
  153.     afpAddCmt                   = 56,                           /*AFPCall command codes*/
  154.     afpRmvCmt                   = 57,                           /*AFPCall command codes*/
  155.     afpGetCmt                   = 58,                           /*AFPCall command codes*/
  156.     afpAddIcon                  = 192                           /*Special code for ASP Write commands*/
  157. };
  158. enum {
  159.     xppLoadedBit                = 5,                            /* XPP bit in PortBUse */
  160.     scbMemSize                  = 192,                          /* Size of memory for SCB */
  161.     xppFlagClr                  = 0                             /* Cs for AFPCommandBlock */
  162. };
  163. enum {
  164.     xppFlagSet                  = 128                           /* StartEndFlag & NewLineFlag fields. */
  165. };
  166. enum {
  167.     lapSize                     = 20,
  168.     ddpSize                     = 26,
  169.     nbpSize                     = 26,
  170.     atpSize                     = 56
  171. };
  172. enum {
  173.     atpXOvalue                  = 32,                           /*ATP exactly-once bit */
  174.     atpEOMvalue                 = 16,                           /*ATP End-Of-Message bit */
  175.     atpSTSvalue                 = 8,                            /*ATP Send-Transmission-Status bit */
  176.     atpTIDValidvalue            = 2,                            /*ATP trans. ID valid bit */
  177.     atpSendChkvalue             = 1                             /*ATP send checksum bit */
  178. };
  179. enum {
  180.     zipGetLocalZones            = 5,
  181.     zipGetZoneList              = 6,
  182.     zipGetMyZone                = 7
  183. };
  184. enum {
  185.     LAPMgrPtr                   = 0x0B18                        /*Entry point for LAP Manager*/
  186. };
  187. enum {
  188.     LAPMgrCall                  = 2,                            /*Offset to LAP routines*/
  189.     LAddAEQ                     = 23,                           /*LAPAddATQ routine selector*/
  190.     LRmvAEQ                     = 24                            /*LAPRmvATQ routine selector*/
  191. };
  192. #define MPPioCompletion MPP.ioCompletion
  193. #define MPPioResult MPP.ioResult
  194. #define MPPioRefNum MPP.ioRefNum
  195. #define MPPcsCode MPP.csCode
  196. #define LAPprotType LAP.protType
  197. #define LAPwdsPointer LAP.u.wdsPointer
  198. #define LAPhandler LAP.u.handler
  199. #define DDPsocket DDP.socket
  200. #define DDPchecksumFlag DDP.checksumFlag
  201. #define DDPwdsPointer DDP.u.wdsPointer
  202. #define DDPlistener DDP.u.listener
  203. #define NBPinterval NBP.interval
  204. #define NBPcount NBP.count
  205. #define NBPntQElPtr NBP.nbpPtrs.ntQElPtr
  206. #define NBPentityPtr NBP.nbpPtrs.entityPtr
  207. #define NBPverifyFlag NBP.parm.verifyFlag
  208. #define NBPretBuffPtr NBP.parm.Lookup.retBuffPtr
  209. #define NBPretBuffSize NBP.parm.Lookup.retBuffSize
  210. #define NBPmaxToGet NBP.parm.Lookup.maxToGet
  211. #define NBPnumGotten NBP.parm.Lookup.numGotten
  212. #define NBPconfirmAddr NBP.parm.Confirm.confirmAddr
  213. #define NBPnKillQEl NBPKILL.nKillQEl
  214. #define NBPnewSocket NBP.parm.Confirm.newSocket
  215. #define ATPioCompletion ATP.ioCompletion
  216. #define ATPioResult ATP.ioResult
  217. #define ATPuserData ATP.userData
  218. #define ATPreqTID ATP.reqTID
  219. #define ATPioRefNum ATP.ioRefNum
  220. #define ATPcsCode ATP.csCode
  221. #define ATPatpSocket ATP.atpSocket
  222. #define ATPatpFlags ATP.atpFlags
  223. #define ATPaddrBlock ATP.addrBlock
  224. #define ATPreqLength ATP.reqLength
  225. #define ATPreqPointer ATP.reqPointer
  226. #define ATPbdsPointer ATP.bdsPointer
  227. #define ATPtimeOutVal SREQ.timeOutVal
  228. #define ATPnumOfResps SREQ.numOfResps
  229. #define ATPretryCount SREQ.retryCount
  230. #define ATPnumOfBuffs OTH1.u.numOfBuffs
  231. #define ATPbitMap OTH1.u.bitMap
  232. #define ATPrspNum OTH1.u.rspNum
  233. #define ATPbdsSize OTH2.bdsSize
  234. #define ATPtransID OTH2.transID
  235. #define ATPaKillQEl KILL.aKillQEl
  236. enum {
  237.     tLAPRead                    = 0,
  238.     tLAPWrite                   = 1,
  239.     tDDPRead                    = 2,
  240.     tDDPWrite                   = 3,
  241.     tNBPLookup                  = 4,
  242.     tNBPConfirm                 = 5,
  243.     tNBPRegister                = 6,
  244.     tATPSndRequest              = 7,
  245.     tATPGetRequest              = 8,
  246.     tATPSdRsp                   = 9,
  247.     tATPAddRsp                  = 10,
  248.     tATPRequest                 = 11,
  249.     tATPResponse                = 12
  250. };
  251. typedef SInt8                           ABCallType;
  252. enum {
  253.     lapProto                    = 0,
  254.     ddpProto                    = 1,
  255.     nbpProto                    = 2,
  256.     atpProto                    = 3
  257. };
  258. typedef UInt8                           ABProtoType;
  259. typedef Byte                            ABByte;
  260. struct LAPAdrBlock {
  261.     UInt8                           dstNodeID;
  262.     UInt8                           srcNodeID;
  263.     ABByte                          lapProtType;
  264.     UInt8                           filler;                     /*    Filler for proper byte alignment*/
  265. };
  266. typedef struct LAPAdrBlock              LAPAdrBlock;
  267. typedef struct ATQEntry                 ATQEntry;
  268. typedef ATQEntry *                      ATQEntryPtr;
  269. typedef CALLBACK_API_C( long , ATalkTransitionEventProcPtr )(long eventCode, ATQEntryPtr qElem, void *eventParameter);
  270. typedef STACK_UPP_TYPE(ATalkTransitionEventProcPtr)             ATalkTransitionEventUPP;
  271. typedef ATalkTransitionEventUPP         ATalkTransitionEvent;
  272. struct ATQEntry {
  273.     struct ATQEntry *               qLink;                      /*next queue entry*/
  274.     short                           qType;                      /*queue type*/
  275.     ATalkTransitionEventUPP         CallAddr;                   /*your routine descriptor*/
  276. };
  277. /* 
  278.     Real definition of EntityName is 3 PACKED strings of any length (32 is just an example). No
  279.     offests for Asm since each String address must be calculated by adding length byte to last string ptr.
  280.     In Pascal, String(32) will be 34 bytes long since fields never start on an odd byte unless they are 
  281.     only a byte long. So this will generate correct looking interfaces for Pascal and C, but they will not
  282.     be the same, which is OK since they are not used. 
  283. */
  284. struct EntityName {
  285.     Str32Field                      objStr;
  286.     Str32Field                      typeStr;
  287.     Str32Field                      zoneStr;
  288. };
  289. typedef struct EntityName               EntityName;
  290. typedef EntityName *                    EntityPtr;
  291. struct AddrBlock {
  292.     UInt16                          aNet;
  293.     UInt8                           aNode;
  294.     UInt8                           aSocket;
  295. };
  296. typedef struct AddrBlock                AddrBlock;
  297. struct RetransType {
  298.     UInt8                           retransInterval;
  299.     UInt8                           retransCount;
  300. };
  301. typedef struct RetransType              RetransType;
  302. struct BDSElement {
  303.     short                           buffSize;
  304.     void *                          buffPtr;
  305.     short                           dataSize;
  306.     long                            userBytes;
  307. };
  308. typedef struct BDSElement               BDSElement;
  309. typedef BDSElement                      BDSType[8];
  310. typedef BDSElement *                    BDSPtr;
  311. typedef char                            BitMapType;
  312. struct ATLAPRec {
  313.     ABCallType                      abOpcode;
  314.     SInt8                           filler;                     /*    Filler for proper byte alignment*/
  315.     short                           abResult;
  316.     long                            abUserReference;
  317.     LAPAdrBlock                     lapAddress;
  318.     short                           lapReqCount;
  319.     short                           lapActCount;
  320.     void *                          lapDataPtr;
  321. };
  322. typedef struct ATLAPRec                 ATLAPRec;
  323. typedef ATLAPRec *                      ATLAPRecPtr;
  324. typedef ATLAPRecPtr *                   ATLAPRecHandle;
  325. struct ATDDPRec {
  326.     ABCallType                      abOpcode;
  327.     SInt8                           filler;                     /*    Filler for proper byte alignment*/
  328.     short                           abResult;
  329.     long                            abUserReference;
  330.     short                           ddpType;
  331.     short                           ddpSocket;
  332.     AddrBlock                       ddpAddress;
  333.     short                           ddpReqCount;
  334.     short                           ddpActCount;
  335.     void *                          ddpDataPtr;
  336.     short                           ddpNodeID;
  337. };
  338. typedef struct ATDDPRec                 ATDDPRec;
  339. typedef ATDDPRec *                      ATDDPRecPtr;
  340. typedef ATDDPRecPtr *                   ATDDPRecHandle;
  341. struct ATNBPRec {
  342.     ABCallType                      abOpcode;
  343.     SInt8                           filler;                     /*    Filler for proper byte alignment*/
  344.     short                           abResult;
  345.     long                            abUserReference;
  346.     EntityPtr                       nbpEntityPtr;
  347.     void *                          nbpBufPtr;
  348.     short                           nbpBufSize;
  349.     short                           nbpDataField;
  350.     AddrBlock                       nbpAddress;
  351.     RetransType                     nbpRetransmitInfo;
  352. };
  353. typedef struct ATNBPRec                 ATNBPRec;
  354. typedef ATNBPRec *                      ATNBPRecPtr;
  355. typedef ATNBPRecPtr *                   ATNBPRecHandle;
  356. struct ATATPRec {
  357.     ABCallType                      abOpcode;
  358.     SInt8                           filler1;                    /*    Filler for proper byte alignment*/
  359.     short                           abResult;
  360.     long                            abUserReference;
  361.     short                           atpSocket;
  362.     AddrBlock                       atpAddress;
  363.     short                           atpReqCount;
  364.     void *                          atpDataPtr;
  365.     BDSPtr                          atpRspBDSPtr;
  366.     BitMapType                      atpBitMap;
  367.     SInt8                           filler2;                    /*    Filler for proper byte alignment*/
  368.     short                           atpTransID;
  369.     short                           atpActCount;
  370.     long                            atpUserData;
  371.     Boolean                         atpXO;
  372.     Boolean                         atpEOM;
  373.     short                           atpTimeOut;
  374.     short                           atpRetries;
  375.     short                           atpNumBufs;
  376.     short                           atpNumRsp;
  377.     short                           atpBDSSize;
  378.     long                            atpRspUData;
  379.     void *                          atpRspBuf;
  380.     short                           atpRspSize;
  381. };
  382. typedef struct ATATPRec                 ATATPRec;
  383. typedef ATATPRec *                      ATATPRecPtr;
  384. typedef ATATPRecPtr *                   ATATPRecHandle;
  385. struct AFPCommandBlock {
  386.     UInt8                           cmdByte;
  387.     UInt8                           startEndFlag;
  388.     short                           forkRefNum;
  389.     long                            rwOffset;
  390.     long                            reqCount;
  391.     UInt8                           newLineFlag;
  392.     char                            newLineChar;
  393. };
  394. typedef struct AFPCommandBlock          AFPCommandBlock;
  395. typedef union MPPParamBlock             MPPParamBlock;
  396. typedef union ATPParamBlock             ATPParamBlock;
  397. typedef union XPPParamBlock             XPPParamBlock;
  398. typedef MPPParamBlock *                 MPPPBPtr;
  399. typedef ATPParamBlock *                 ATPPBPtr;
  400. typedef XPPParamBlock *                 XPPParmBlkPtr;
  401. typedef CALLBACK_API( void , MPPCompletionProcPtr )(MPPPBPtr thePBptr);
  402. /*
  403.     WARNING: MPPCompletionProcPtr uses register based parameters under classic 68k
  404.              and cannot be written in a high-level language without 
  405.              the help of mixed mode or assembly glue.
  406. */
  407. typedef CALLBACK_API( void , ATPCompletionProcPtr )(ATPPBPtr thePBptr);
  408. /*
  409.     WARNING: ATPCompletionProcPtr uses register based parameters under classic 68k
  410.              and cannot be written in a high-level language without 
  411.              the help of mixed mode or assembly glue.
  412. */
  413. typedef CALLBACK_API( void , XPPCompletionProcPtr )(XPPParmBlkPtr thePBptr);
  414. /*
  415.     WARNING: XPPCompletionProcPtr uses register based parameters under classic 68k
  416.              and cannot be written in a high-level language without 
  417.              the help of mixed mode or assembly glue.
  418. */
  419. typedef CALLBACK_API( void , AttnRoutineProcPtr )(short sessRefnum, short attnBytes);
  420. /*
  421.     WARNING: AttnRoutineProcPtr uses register based parameters under classic 68k
  422.              and cannot be written in a high-level language without 
  423.              the help of mixed mode or assembly glue.
  424. */
  425. typedef REGISTER_UPP_TYPE(MPPCompletionProcPtr)                 MPPCompletionUPP;
  426. typedef REGISTER_UPP_TYPE(ATPCompletionProcPtr)                 ATPCompletionUPP;
  427. typedef REGISTER_UPP_TYPE(XPPCompletionProcPtr)                 XPPCompletionUPP;
  428. typedef REGISTER_UPP_TYPE(AttnRoutineProcPtr)                   AttnRoutineUPP;
  429. struct WDSElement {
  430.     short                           entryLength;
  431.     Ptr                             entryPtr;
  432. };
  433. typedef struct WDSElement               WDSElement;
  434. struct NTElement {
  435.     AddrBlock                       nteAddress;                 /*network address of entity*/
  436.     SInt8                           filler;
  437.     SInt8                           entityData[99];             /*Object, Type & Zone*/
  438. };
  439. typedef struct NTElement                NTElement;
  440. struct NamesTableEntry {
  441.     Ptr                             qNext;                      /*ptr to next NTE*/
  442.     NTElement                       nt;
  443. };
  444. typedef struct NamesTableEntry          NamesTableEntry;
  445. typedef CALLBACK_API( Boolean , MPPProtocolHandlerProcPtr )(Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, short numBytesLeftToReadInPacket);
  446. typedef CALLBACK_API( Boolean , DDPSocketListenerProcPtr )(Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, UInt8 packetDestinationNumber, short numBytesLeftToReadInPacket);
  447. typedef STACK_UPP_TYPE(MPPProtocolHandlerProcPtr)               MPPProtocolHandlerUPP;
  448. typedef STACK_UPP_TYPE(DDPSocketListenerProcPtr)                DDPSocketListenerUPP;
  449. /*
  450.     MPPProtocolHandlerProcs and  DDPSocketListenerProcs cannot be written 
  451.     in or called from a high-level language without the help of mixed mode 
  452.     or assembly glue because they use the following parameter-passing conventions:
  453.     typedef Boolean (*MPPProtocolHandlerProcPtr)(Ptr SCCAddr1, Ptr SCCAddr2, 
  454.             Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, 
  455.             short numBytesLeftToReadInPacket);
  456.         In:
  457.             =>  SCCAddr1                    A0.L
  458.             =>  SCCAddr2                    A1.L
  459.             =>  MPPLocalVars                A2.L
  460.             =>  nextFreeByteInRHA           A3.L
  461.             =>  ReadPacketAndReadRestPtr    A4.L
  462.             =>  numBytesLeftToReadInPacket  D1.W
  463.         Out:
  464.             <=  Boolean                     Z bit of CCR
  465.     typedef Boolean (*DDPSocketListenerProcPtr)(Ptr SCCAddr1, Ptr SCCAddr2, 
  466.             Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, 
  467.             UInt8 packetDestinationNumber, short numBytesLeftToReadInPacket);
  468.         In:
  469.             =>  SCCAddr1                    A0.L
  470.             =>  SCCAddr2                    A1.L
  471.             =>  MPPLocalVars                A2.L
  472.             =>  nextFreeByteInRHA           A3.L
  473.             =>  ReadPacketAndReadRestPtr    A4.L
  474.             =>  packetDestinationNumber     D0.B
  475.             =>  numBytesLeftToReadInPacket  D1.W
  476.         Out:
  477.             <=  Boolean                     Z bit of CCR
  478. */
  479. struct MPPparms {
  480.     QElem *                         qLink;                      /*next queue entry*/
  481.     short                           qType;                      /*queue type*/
  482.     short                           ioTrap;                     /*routine trap*/
  483.     Ptr                             ioCmdAddr;                  /*routine address*/
  484.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  485.     OSErr                           ioResult;                   /*result code*/
  486.     long                            userData;                   /*Command result (ATP user bytes)*/
  487.     short                           reqTID;                     /*request transaction ID*/
  488.     short                           ioRefNum;                   /*driver reference number*/
  489.     short                           csCode;                     /*Call command code*/
  490. };
  491. typedef struct MPPparms                 MPPparms;
  492. struct LAPparms {
  493.     QElem *                         qLink;                      /*next queue entry*/
  494.     short                           qType;                      /*queue type*/
  495.     short                           ioTrap;                     /*routine trap*/
  496.     Ptr                             ioCmdAddr;                  /*routine address*/
  497.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  498.     OSErr                           ioResult;                   /*result code*/
  499.     long                            userData;                   /*Command result (ATP user bytes)*/
  500.     short                           reqTID;                     /*request transaction ID*/
  501.     short                           ioRefNum;                   /*driver reference number*/
  502.     short                           csCode;                     /*Call command code*/
  503.     UInt8                           protType;                   /*ALAP protocol Type */
  504.     UInt8                           filler;
  505.     union {
  506.         void *                          wdsPointer;             /*-> write data structure*/
  507.         MPPProtocolHandlerUPP           handler;                /*-> protocol handler routine*/
  508.     }                                 u;
  509. };
  510. typedef struct LAPparms                 LAPparms;
  511. struct DDPparms {
  512.     QElem *                         qLink;                      /*next queue entry*/
  513.     short                           qType;                      /*queue type*/
  514.     short                           ioTrap;                     /*routine trap*/
  515.     Ptr                             ioCmdAddr;                  /*routine address*/
  516.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  517.     OSErr                           ioResult;                   /*result code*/
  518.     long                            userData;                   /*Command result (ATP user bytes)*/
  519.     short                           reqTID;                     /*request transaction ID*/
  520.     short                           ioRefNum;                   /*driver reference number*/
  521.     short                           csCode;                     /*Call command code*/
  522.     UInt8                           socket;                     /*socket number */
  523.     UInt8                           checksumFlag;               /*check sum flag */
  524.     union {
  525.         void *                          wdsPointer;             /*-> write data structure*/
  526.         DDPSocketListenerUPP            listener;               /*->write data structure or -> Listener*/
  527.     }                                 u;
  528. };
  529. typedef struct DDPparms                 DDPparms;
  530. union NBPPtrs {
  531.     Ptr                             ntQElPtr;
  532.     Ptr                             entityPtr;
  533. };
  534. typedef union NBPPtrs                   NBPPtrs;
  535. union LookupConfirmParams {
  536.     UInt8                           verifyFlag;
  537.     struct {
  538.         void *                          retBuffPtr;
  539.         short                           retBuffSize;
  540.         short                           maxToGet;
  541.         short                           numGotten;
  542.     }                                 Lookup;
  543.     struct {
  544.         AddrBlock                       confirmAddr;
  545.         UInt8                           newSocket;
  546.         SInt8                           filler;                 /*    Filler for proper byte alignment*/
  547.     }                                 Confirm;
  548. };
  549. typedef union LookupConfirmParams       LookupConfirmParams;
  550. struct NBPparms {
  551.     QElem *                         qLink;                      /*next queue entry*/
  552.     short                           qType;                      /*queue type*/
  553.     short                           ioTrap;                     /*routine trap*/
  554.     Ptr                             ioCmdAddr;                  /*routine address*/
  555.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  556.     OSErr                           ioResult;                   /*result code*/
  557.     long                            userData;                   /*Command result (ATP user bytes)*/
  558.     short                           reqTID;                     /*request transaction ID*/
  559.     short                           ioRefNum;                   /*driver reference number*/
  560.     short                           csCode;                     /*Call command code*/
  561.     UInt8                           interval;                   /*retry interval */
  562.     UInt8                           count;                      /*retry count */
  563.     NBPPtrs                         nbpPtrs;
  564.     LookupConfirmParams             parm;
  565. };
  566. typedef struct NBPparms                 NBPparms;
  567. struct SetSelfparms {
  568.     QElem *                         qLink;                      /*next queue entry*/
  569.     short                           qType;                      /*queue type*/
  570.     short                           ioTrap;                     /*routine trap*/
  571.     Ptr                             ioCmdAddr;                  /*routine address*/
  572.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  573.     OSErr                           ioResult;                   /*result code*/
  574.     long                            userData;                   /*Command result (ATP user bytes)*/
  575.     short                           reqTID;                     /*request transaction ID*/
  576.     short                           ioRefNum;                   /*driver reference number*/
  577.     short                           csCode;                     /*Call command code*/
  578.     UInt8                           newSelfFlag;                /*self-send toggle flag */
  579.     UInt8                           oldSelfFlag;                /*previous self-send state */
  580. };
  581. typedef struct SetSelfparms             SetSelfparms;
  582. struct NBPKillparms {
  583.     QElem *                         qLink;                      /*next queue entry*/
  584.     short                           qType;                      /*queue type*/
  585.     short                           ioTrap;                     /*routine trap*/
  586.     Ptr                             ioCmdAddr;                  /*routine address*/
  587.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  588.     OSErr                           ioResult;                   /*result code*/
  589.     long                            userData;                   /*Command result (ATP user bytes)*/
  590.     short                           reqTID;                     /*request transaction ID*/
  591.     short                           ioRefNum;                   /*driver reference number*/
  592.     short                           csCode;                     /*Call command code*/
  593.     void *                          nKillQEl;                   /*ptr to i/o queue element to cancel */
  594. };
  595. typedef struct NBPKillparms             NBPKillparms;
  596. struct GetAppleTalkInfoParm {
  597.     QElem *                         qLink;                      /*next queue entry*/
  598.     short                           qType;                      /*queue type*/
  599.     short                           ioTrap;                     /*routine trap*/
  600.     Ptr                             ioCmdAddr;                  /*routine address*/
  601.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  602.     OSErr                           ioResult;                   /*result code*/
  603.     long                            userData;                   /*Command result (ATP user bytes)*/
  604.     short                           reqTID;                     /*request transaction ID*/
  605.     short                           ioRefNum;                   /*driver reference number*/
  606.     short                           csCode;                     /*Call command code*/
  607.                                                                 /*max. concurrent NBP requests*/
  608.     short                           version;                    /*requested info version*/
  609.     void *                          varsPtr;                    /*pointer to well known MPP vars*/
  610.     void *                          DCEPtr;                     /*pointer to MPP DCE*/
  611.     short                           portID;                     /*port number [0..7]*/
  612.     long                            configuration;              /*32-bit configuration word*/
  613.     short                           selfSend;                   /*non zero if SelfSend enabled*/
  614.     short                           netLo;                      /*low value of network range*/
  615.     short                           netHi;                      /*high value of network range*/
  616.     long                            ourAdd;                     /*our 24-bit AppleTalk address*/
  617.     long                            routerAddr;                 /*24-bit address of (last) router*/
  618.     short                           numOfPHs;                   /*max. number of protocol handlers*/
  619.     short                           numOfSkts;                  /*max. number of static sockets*/
  620.     short                           numNBPEs;                   /*max. concurrent NBP requests*/
  621.     void *                          nTQueue;                    /*pointer to registered name queue*/
  622.     short                           LAlength;                   /*length in bytes of data link addr*/
  623.     void *                          linkAddr;                   /*data link address returned*/
  624.     Ptr                             zoneName;                   /*zone name returned*/
  625. };
  626. typedef struct GetAppleTalkInfoParm     GetAppleTalkInfoParm;
  627. struct ATalkClosePrepParm {
  628.     QElem *                         qLink;                      /*next queue entry*/
  629.     short                           qType;                      /*queue type*/
  630.     short                           ioTrap;                     /*routine trap*/
  631.     Ptr                             ioCmdAddr;                  /*routine address*/
  632.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  633.     OSErr                           ioResult;                   /*result code*/
  634.     long                            userData;                   /*Command result (ATP user bytes)*/
  635.     short                           reqTID;                     /*request transaction ID*/
  636.     short                           ioRefNum;                   /*driver reference number*/
  637.     short                           csCode;                     /*Call command code*/
  638.     Ptr                             appName;                    /*pointer to application name in buffer*/
  639. };
  640. typedef struct ATalkClosePrepParm       ATalkClosePrepParm;
  641. union MPPParamBlock {
  642.     MPPparms                        MPP;                        /*General MPP parms*/
  643.     LAPparms                        LAP;                        /*ALAP calls*/
  644.     DDPparms                        DDP;                        /*DDP calls*/
  645.     NBPparms                        NBP;                        /*NBP calls*/
  646.     SetSelfparms                    SETSELF;
  647.     NBPKillparms                    NBPKILL;
  648.     GetAppleTalkInfoParm            GAIINFO;
  649.     ATalkClosePrepParm              ATALKCLOSE;
  650. };
  651. struct XPPPrmBlk {
  652.     QElem *                         qLink;
  653.     short                           qType;
  654.     short                           ioTrap;
  655.     Ptr                             ioCmdAddr;
  656.     XPPCompletionUPP                ioCompletion;
  657.     OSErr                           ioResult;
  658.     long                            cmdResult;
  659.     short                           ioVRefNum;
  660.     short                           ioRefNum;
  661.     short                           csCode;
  662.     short                           sessRefnum;                 /*Offset to session refnum */
  663.     UInt8                           aspTimeout;                 /*Timeout for ATP */
  664.     UInt8                           aspRetry;                   /*Retry count for ATP */
  665.     short                           cbSize;                     /*Command block size */
  666.     Ptr                             cbPtr;                      /*Command block pointer */
  667.     short                           rbSize;                     /*Reply buffer size */
  668.     Ptr                             rbPtr;                      /*Reply buffer pointer */
  669.     short                           wdSize;                     /*Write Data size*/
  670.     Ptr                             wdPtr;                      /*Write Data pointer*/
  671.     UInt8                           ccbStart[296];              /*CCB memory allocated for driver afpWrite max size(CCB)=296 all other calls=150*/
  672. };
  673. typedef struct XPPPrmBlk                XPPPrmBlk;
  674. struct ASPGetparmsBlk {
  675.     QElem *                         qLink;
  676.     short                           qType;
  677.     short                           ioTrap;
  678.     Ptr                             ioCmdAddr;
  679.     XPPCompletionUPP                ioCompletion;
  680.     OSErr                           ioResult;
  681.     long                            cmdResult;
  682.     short                           ioVRefNum;
  683.     short                           ioRefNum;
  684.     short                           csCode;
  685.     short                           aspMaxCmdSize;              /*For SPGetParms*/
  686.     short                           aspQuantumSize;
  687.     short                           numSesss;
  688. };
  689. typedef struct ASPGetparmsBlk           ASPGetparmsBlk;
  690. struct ASPAbortPrm {
  691.     QElem *                         qLink;
  692.     short                           qType;
  693.     short                           ioTrap;
  694.     Ptr                             ioCmdAddr;
  695.     XPPCompletionUPP                ioCompletion;
  696.     OSErr                           ioResult;
  697.     long                            cmdResult;
  698.     short                           ioVRefNum;
  699.     short                           ioRefNum;
  700.     short                           csCode;
  701.     Ptr                             abortSCBPtr;                /*SCB pointer for AbortOS */
  702. };
  703. typedef struct ASPAbortPrm              ASPAbortPrm;
  704. struct ASPOpenPrm {
  705.     QElem *                         qLink;
  706.     short                           qType;
  707.     short                           ioTrap;
  708.     Ptr                             ioCmdAddr;
  709.     XPPCompletionUPP                ioCompletion;
  710.     OSErr                           ioResult;
  711.     long                            cmdResult;
  712.     short                           ioVRefNum;
  713.     short                           ioRefNum;
  714.     short                           csCode;
  715.     short                           sessRefnum;                 /*Offset to session refnum */
  716.     UInt8                           aspTimeout;                 /*Timeout for ATP */
  717.     UInt8                           aspRetry;                   /*Retry count for ATP */
  718.     AddrBlock                       serverAddr;                 /*Server address block */
  719.     Ptr                             scbPointer;                 /*SCB pointer */
  720.     AttnRoutineUPP                  attnRoutine;                /*Attention routine pointer*/
  721. };
  722. typedef struct ASPOpenPrm               ASPOpenPrm;
  723. typedef ASPOpenPrm *                    ASPOpenPrmPtr;
  724. struct AFPLoginPrm {
  725.     QElem *                         qLink;
  726.     short                           qType;
  727.     short                           ioTrap;
  728.     Ptr                             ioCmdAddr;
  729.     XPPCompletionUPP                ioCompletion;
  730.     OSErr                           ioResult;
  731.     long                            cmdResult;
  732.     short                           ioVRefNum;
  733.     short                           ioRefNum;
  734.     short                           csCode;
  735.     short                           sessRefnum;                 /*Offset to session refnum */
  736.     UInt8                           aspTimeout;                 /*Timeout for ATP */
  737.     UInt8                           aspRetry;                   /*Retry count for ATP */
  738.     short                           cbSize;                     /*Command block size */
  739.     void *                          cbPtr;                      /*Command block pointer */
  740.     short                           rbSize;                     /*Reply buffer size */
  741.     void *                          rbPtr;                      /*Reply buffer pointer */
  742.     AddrBlock                       afpAddrBlock;               /*block in AFP login */
  743.     void *                          afpSCBPtr;                  /*SCB pointer in AFP login */
  744.     AttnRoutineUPP                  afpAttnRoutine;             /*routine pointer in AFP login */
  745.     UInt8                           ccbFill[144];               /*CCB memory allocated for driver  Login needs only 150 bytes BUT CCB really starts in the middle of AFPSCBPtr and also clobbers AFPAttnRoutine. */
  746. };
  747. typedef struct AFPLoginPrm              AFPLoginPrm;
  748. struct XCallParam {
  749.     QElem *                         qLink;
  750.     short                           qType;
  751.     short                           ioTrap;
  752.     Ptr                             ioCmdAddr;
  753.     XPPCompletionUPP                ioCompletion;
  754.     OSErr                           ioResult;
  755.     long                            cmdResult;
  756.     short                           ioVRefNum;
  757.     short                           ioRefNum;
  758.     short                           csCode;
  759.     short                           xppSubCode;
  760.     UInt8                           xppTimeout;                 /*retry interval (seconds)*/
  761.     UInt8                           xppRetry;                   /*retry count*/
  762.     short                           filler1;
  763.     void *                          zipBuffPtr;                 /*pointer to buffer (must be 578 bytes)*/
  764.     short                           zipNumZones;                /*no. of zone names in this response*/
  765.     UInt8                           zipLastFlag;                /*non-zero if no more zones*/
  766.     UInt8                           filler2;                    /*filler*/
  767.     UInt8                           zipInfoField[70];           /*on initial call, set first word to zero*/
  768. };
  769. typedef struct XCallParam               XCallParam;
  770. union XPPParamBlock {
  771.     XPPPrmBlk                       XPP;
  772.     ASPGetparmsBlk                  GETPARM;
  773.     ASPAbortPrm                     ABORT;
  774.     ASPOpenPrm                      OPEN;
  775.     AFPLoginPrm                     LOGIN;
  776.     XCallParam                      XCALL;
  777. };
  778. struct ATPparms {
  779.     QElem *                         qLink;                      /*next queue entry*/
  780.     short                           qType;                      /*queue type*/
  781.     short                           ioTrap;                     /*routine trap*/
  782.     Ptr                             ioCmdAddr;                  /*routine address*/
  783.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  784.     OSErr                           ioResult;                   /*result code*/
  785.     long                            userData;                   /*Command result (ATP user bytes)*/
  786.     short                           reqTID;                     /*request transaction ID*/
  787.     short                           ioRefNum;                   /*driver reference number*/
  788.     short                           csCode;                     /*Call command code*/
  789.     UInt8                           atpSocket;                  /*currbitmap for requests or ATP socket number*/
  790.     UInt8                           atpFlags;                   /*control information*/
  791.     AddrBlock                       addrBlock;                  /*source/dest. socket address*/
  792.     short                           reqLength;                  /*request/response length*/
  793.     void *                          reqPointer;                 /*->request/response Data*/
  794.     void *                          bdsPointer;                 /*->response BDS */
  795. };
  796. typedef struct ATPparms                 ATPparms;
  797. struct SendReqparms {
  798.     QElem *                         qLink;                      /*next queue entry*/
  799.     short                           qType;                      /*queue type*/
  800.     short                           ioTrap;                     /*routine trap*/
  801.     Ptr                             ioCmdAddr;                  /*routine address*/
  802.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  803.     OSErr                           ioResult;                   /*result code*/
  804.     long                            userData;                   /*Command result (ATP user bytes)*/
  805.     short                           reqTID;                     /*request transaction ID*/
  806.     short                           ioRefNum;                   /*driver reference number*/
  807.     short                           csCode;                     /*Call command code*/
  808.     UInt8                           atpSocket;                  /*currbitmap for requests or ATP socket number*/
  809.     UInt8                           atpFlags;                   /*control information*/
  810.     AddrBlock                       addrBlock;                  /*source/dest. socket address*/
  811.     short                           reqLength;                  /*request/response length*/
  812.     void *                          reqPointer;                 /*->request/response Data*/
  813.     void *                          bdsPointer;                 /*->response BDS */
  814.     UInt8                           numOfBuffs;                 /*numOfBuffs */
  815.     UInt8                           timeOutVal;                 /*timeout interval */
  816.     UInt8                           numOfResps;                 /*number of responses actually received */
  817.     UInt8                           retryCount;                 /*number of retries */
  818.     short                           intBuff;                    /*used internally for NSendRequest */
  819.     UInt8                           TRelTime;                   /*TRelease time for extended send request */
  820.     SInt8                           filler0;
  821. };
  822. typedef struct SendReqparms             SendReqparms;
  823. struct ATPmisc1 {
  824.     QElem *                         qLink;                      /*next queue entry*/
  825.     short                           qType;                      /*queue type*/
  826.     short                           ioTrap;                     /*routine trap*/
  827.     Ptr                             ioCmdAddr;                  /*routine address*/
  828.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  829.     OSErr                           ioResult;                   /*result code*/
  830.     long                            userData;                   /*Command result (ATP user bytes)*/
  831.     short                           reqTID;                     /*request transaction ID*/
  832.     short                           ioRefNum;                   /*driver reference number*/
  833.     short                           csCode;                     /*Call command code*/
  834.     UInt8                           atpSocket;                  /*currbitmap for requests or ATP socket number*/
  835.     UInt8                           atpFlags;                   /*control information*/
  836.     AddrBlock                       addrBlock;                  /*source/dest. socket address*/
  837.     short                           reqLength;                  /*request/response length*/
  838.     void *                          reqPointer;                 /*->request/response Data*/
  839.     void *                          bdsPointer;                 /*->response BDS */
  840.     union {
  841.         UInt8                           bitMap;                 /*bitmap received */
  842.         UInt8                           numOfBuffs;             /*number of responses being sent*/
  843.         UInt8                           rspNum;                 /*sequence number*/
  844.     }                                 u;
  845. };
  846. typedef struct ATPmisc1                 ATPmisc1;
  847. struct ATPmisc2 {
  848.     QElem *                         qLink;                      /*next queue entry*/
  849.     short                           qType;                      /*queue type*/
  850.     short                           ioTrap;                     /*routine trap*/
  851.     Ptr                             ioCmdAddr;                  /*routine address*/
  852.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  853.     OSErr                           ioResult;                   /*result code*/
  854.     long                            userData;                   /*Command result (ATP user bytes)*/
  855.     short                           reqTID;                     /*request transaction ID*/
  856.     short                           ioRefNum;                   /*driver reference number*/
  857.     short                           csCode;                     /*Call command code*/
  858.     UInt8                           atpSocket;                  /*currbitmap for requests or ATP socket number*/
  859.     UInt8                           atpFlags;                   /*control information*/
  860.     AddrBlock                       addrBlock;                  /*source/dest. socket address*/
  861.     short                           reqLength;                  /*request/response length*/
  862.     void *                          reqPointer;                 /*->request/response Data*/
  863.     void *                          bdsPointer;                 /*->response BDS */
  864.     UInt8                           filler;
  865.     UInt8                           bdsSize;                    /*number of BDS elements */
  866.     short                           transID;                    /*transaction ID recd. */
  867. };
  868. typedef struct ATPmisc2                 ATPmisc2;
  869. struct Killparms {
  870.     QElem *                         qLink;                      /*next queue entry*/
  871.     short                           qType;                      /*queue type*/
  872.     short                           ioTrap;                     /*routine trap*/
  873.     Ptr                             ioCmdAddr;                  /*routine address*/
  874.     ATPCompletionUPP                ioCompletion;               /*ATPCompletionUPP or MPPCompletionUPP*/
  875.     OSErr                           ioResult;                   /*result code*/
  876.     long                            userData;                   /*Command result (ATP user bytes)*/
  877.     short                           reqTID;                     /*request transaction ID*/
  878.     short                           ioRefNum;                   /*driver reference number*/
  879.     short                           csCode;                     /*Call command code*/
  880.     UInt8                           atpSocket;                  /*currbitmap for requests or ATP socket number*/
  881.     UInt8                           atpFlags;                   /*control information*/
  882.     AddrBlock                       addrBlock;                  /*source/dest. socket address*/
  883.     short                           reqLength;                  /*request/response length*/
  884.     void *                          reqPointer;                 /*->request/response Data*/
  885.     void *                          bdsPointer;                 /*->response BDS */
  886.     void *                          aKillQEl;                   /*ptr to i/o queue element to cancel*/
  887. };
  888. typedef struct Killparms                Killparms;
  889. union ATPParamBlock {
  890.     ATPparms                        ATP;                        /*General ATP parms*/
  891.     SendReqparms                    SREQ;                       /*sendrequest parms*/
  892.     ATPmisc1                        OTH1;                       /*and a few others*/
  893.     ATPmisc2                        OTH2;                       /*and a few others*/
  894.     Killparms                       KILL;                       /*and a few others*/
  895. };
  896. #if OPAQUE_UPP_TYPES
  897. #if CALL_NOT_IN_CARBON
  898.     EXTERN_API(ATalkTransitionEventUPP)
  899.     NewATalkTransitionEventUPP     (ATalkTransitionEventProcPtr userRoutine);
  900.     EXTERN_API(MPPCompletionUPP)
  901.     NewMPPCompletionUPP            (MPPCompletionProcPtr    userRoutine);
  902.     EXTERN_API(ATPCompletionUPP)
  903.     NewATPCompletionUPP            (ATPCompletionProcPtr    userRoutine);
  904.     EXTERN_API(XPPCompletionUPP)
  905.     NewXPPCompletionUPP            (XPPCompletionProcPtr    userRoutine);
  906.     EXTERN_API(AttnRoutineUPP)
  907.     NewAttnRoutineUPP              (AttnRoutineProcPtr      userRoutine);
  908.     EXTERN_API(MPPProtocolHandlerUPP)
  909.     NewMPPProtocolHandlerUPP       (MPPProtocolHandlerProcPtr userRoutine);
  910.     EXTERN_API(DDPSocketListenerUPP)
  911.     NewDDPSocketListenerUPP        (DDPSocketListenerProcPtr userRoutine);
  912.     EXTERN_API(void)
  913.     DisposeATalkTransitionEventUPP    (ATalkTransitionEventUPP userUPP);
  914.     EXTERN_API(void)
  915.     DisposeMPPCompletionUPP        (MPPCompletionUPP        userUPP);
  916.     EXTERN_API(void)
  917.     DisposeATPCompletionUPP        (ATPCompletionUPP        userUPP);
  918.     EXTERN_API(void)
  919.     DisposeXPPCompletionUPP        (XPPCompletionUPP        userUPP);
  920.     EXTERN_API(void)
  921.     DisposeAttnRoutineUPP          (AttnRoutineUPP          userUPP);
  922.     EXTERN_API(void)
  923.     DisposeMPPProtocolHandlerUPP    (MPPProtocolHandlerUPP  userUPP);
  924.     EXTERN_API(void)
  925.     DisposeDDPSocketListenerUPP    (DDPSocketListenerUPP    userUPP);
  926.     EXTERN_API(long)
  927.     InvokeATalkTransitionEventUPP    (long                  eventCode,
  928.                                     ATQEntryPtr             qElem,
  929.                                     void *                  eventParameter,
  930.                                     ATalkTransitionEventUPP userUPP);
  931.     EXTERN_API(void)
  932.     InvokeMPPCompletionUPP         (MPPPBPtr                thePBptr,
  933.                                     MPPCompletionUPP        userUPP);
  934.     EXTERN_API(void)
  935.     InvokeATPCompletionUPP         (ATPPBPtr                thePBptr,
  936.                                     ATPCompletionUPP        userUPP);
  937.     EXTERN_API(void)
  938.     InvokeXPPCompletionUPP         (XPPParmBlkPtr           thePBptr,
  939.                                     XPPCompletionUPP        userUPP);
  940.     EXTERN_API(void)
  941.     InvokeAttnRoutineUPP           (short                   sessRefnum,
  942.                                     short                   attnBytes,
  943.                                     AttnRoutineUPP          userUPP);
  944.     EXTERN_API(Boolean)
  945.     InvokeMPPProtocolHandlerUPP    (Ptr                     SCCAddr1,
  946.                                     Ptr                     SCCAddr2,
  947.                                     Ptr                     MPPLocalVars,
  948.                                     Ptr                     nextFreeByteInRHA,
  949.                                     Ptr                     ReadPacketAndReadRestPtr,
  950.                                     short                   numBytesLeftToReadInPacket,
  951.                                     MPPProtocolHandlerUPP   userUPP);
  952.     EXTERN_API(Boolean)
  953.     InvokeDDPSocketListenerUPP     (Ptr                     SCCAddr1,
  954.                                     Ptr                     SCCAddr2,
  955.                                     Ptr                     MPPLocalVars,
  956.                                     Ptr                     nextFreeByteInRHA,
  957.                                     Ptr                     ReadPacketAndReadRestPtr,
  958.                                     UInt8                   packetDestinationNumber,
  959.                                     short                   numBytesLeftToReadInPacket,
  960.                                     DDPSocketListenerUPP    userUPP);
  961. #endif  /* CALL_NOT_IN_CARBON */
  962. #else
  963.     enum { uppATalkTransitionEventProcInfo = 0x00000FF1 };          /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  964.     enum { uppMPPCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  965.     enum { uppATPCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  966.     enum { uppXPPCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  967.     enum { uppAttnRoutineProcInfo = 0x00061002 };                   /* register no_return_value Func(2_bytes:D0, 2_bytes:D1) */
  968.     enum { uppMPPProtocolHandlerProcInfo = 0x0000007F };            /* SPECIAL_CASE_PROCINFO(7) */
  969.     enum { uppDDPSocketListenerProcInfo = 0x0000008F };             /* SPECIAL_CASE_PROCINFO(8) */
  970.     #define NewATalkTransitionEventUPP(userRoutine)                 (ATalkTransitionEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppATalkTransitionEventProcInfo, GetCurrentArchitecture())
  971.     #define NewMPPCompletionUPP(userRoutine)                        (MPPCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMPPCompletionProcInfo, GetCurrentArchitecture())
  972.     #define NewATPCompletionUPP(userRoutine)                        (ATPCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppATPCompletionProcInfo, GetCurrentArchitecture())
  973.     #define NewXPPCompletionUPP(userRoutine)                        (XPPCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppXPPCompletionProcInfo, GetCurrentArchitecture())
  974.     #define NewAttnRoutineUPP(userRoutine)                          (AttnRoutineUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAttnRoutineProcInfo, GetCurrentArchitecture())
  975.     #define NewMPPProtocolHandlerUPP(userRoutine)                   (MPPProtocolHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMPPProtocolHandlerProcInfo, GetCurrentArchitecture())
  976.     #define NewDDPSocketListenerUPP(userRoutine)                    (DDPSocketListenerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDDPSocketListenerProcInfo, GetCurrentArchitecture())
  977.     #define DisposeATalkTransitionEventUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  978.     #define DisposeMPPCompletionUPP(userUPP)                        DisposeRoutineDescriptor(userUPP)
  979.     #define DisposeATPCompletionUPP(userUPP)                        DisposeRoutineDescriptor(userUPP)
  980.     #define DisposeXPPCompletionUPP(userUPP)                        DisposeRoutineDescriptor(userUPP)
  981.     #define DisposeAttnRoutineUPP(userUPP)                          DisposeRoutineDescriptor(userUPP)
  982.     #define DisposeMPPProtocolHandlerUPP(userUPP)                   DisposeRoutineDescriptor(userUPP)
  983.     #define DisposeDDPSocketListenerUPP(userUPP)                    DisposeRoutineDescriptor(userUPP)
  984.     #define InvokeATalkTransitionEventUPP(eventCode, qElem, eventParameter, userUPP)  (long)CALL_THREE_PARAMETER_UPP((userUPP), uppATalkTransitionEventProcInfo, (eventCode), (qElem), (eventParameter))
  985.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  986.     #pragma parameter InvokeMPPCompletionUPP(__A0, __A1)
  987.     void InvokeMPPCompletionUPP(MPPPBPtr thePBptr, MPPCompletionUPP userUPP) = 0x4E91;
  988.     #else
  989.         #define InvokeMPPCompletionUPP(thePBptr, userUPP)               CALL_ONE_PARAMETER_UPP((userUPP), uppMPPCompletionProcInfo, (thePBptr))
  990.     #endif
  991.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  992.     #pragma parameter InvokeATPCompletionUPP(__A0, __A1)
  993.     void InvokeATPCompletionUPP(ATPPBPtr thePBptr, ATPCompletionUPP userUPP) = 0x4E91;
  994.     #else
  995.         #define InvokeATPCompletionUPP(thePBptr, userUPP)               CALL_ONE_PARAMETER_UPP((userUPP), uppATPCompletionProcInfo, (thePBptr))
  996.     #endif
  997.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  998.     #pragma parameter InvokeXPPCompletionUPP(__A0, __A1)
  999.     void InvokeXPPCompletionUPP(XPPParmBlkPtr thePBptr, XPPCompletionUPP userUPP) = 0x4E91;
  1000.     #else
  1001.         #define InvokeXPPCompletionUPP(thePBptr, userUPP)               CALL_ONE_PARAMETER_UPP((userUPP), uppXPPCompletionProcInfo, (thePBptr))
  1002.     #endif
  1003.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1004.     #pragma parameter InvokeAttnRoutineUPP(__D0, __D1, __A0)
  1005.     void InvokeAttnRoutineUPP(short sessRefnum, short attnBytes, AttnRoutineUPP userUPP) = 0x4E90;
  1006.     #else
  1007.         #define InvokeAttnRoutineUPP(sessRefnum, attnBytes, userUPP)    CALL_TWO_PARAMETER_UPP((userUPP), uppAttnRoutineProcInfo, (sessRefnum), (attnBytes))
  1008.     #endif
  1009.     #define InvokeMPPProtocolHandlerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, numBytesLeftToReadInPacket, userUPP)  (Boolean)CALL_SIX_PARAMETER_UPP((userUPP), uppMPPProtocolHandlerProcInfo, (SCCAddr1), (SCCAddr2), (MPPLocalVars), (nextFreeByteInRHA), (ReadPacketAndReadRestPtr), (numBytesLeftToReadInPacket))
  1010.     #define InvokeDDPSocketListenerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, packetDestinationNumber, numBytesLeftToReadInPacket, userUPP)  (Boolean)CALL_SEVEN_PARAMETER_UPP((userUPP), uppDDPSocketListenerProcInfo, (SCCAddr1), (SCCAddr2), (MPPLocalVars), (nextFreeByteInRHA), (ReadPacketAndReadRestPtr), (packetDestinationNumber), (numBytesLeftToReadInPacket))
  1011. #endif
  1012. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  1013. #define NewATalkTransitionEventProc(userRoutine)                NewATalkTransitionEventUPP(userRoutine)
  1014. #define NewMPPCompletionProc(userRoutine)                       NewMPPCompletionUPP(userRoutine)
  1015. #define NewATPCompletionProc(userRoutine)                       NewATPCompletionUPP(userRoutine)
  1016. #define NewXPPCompletionProc(userRoutine)                       NewXPPCompletionUPP(userRoutine)
  1017. #define NewAttnRoutineProc(userRoutine)                         NewAttnRoutineUPP(userRoutine)
  1018. #define NewMPPProtocolHandlerProc(userRoutine)                  NewMPPProtocolHandlerUPP(userRoutine)
  1019. #define NewDDPSocketListenerProc(userRoutine)                   NewDDPSocketListenerUPP(userRoutine)
  1020. #define CallATalkTransitionEventProc(userRoutine, eventCode, qElem, eventParameter) InvokeATalkTransitionEventUPP(eventCode, qElem, eventParameter, userRoutine)
  1021. #define CallMPPCompletionProc(userRoutine, thePBptr)            InvokeMPPCompletionUPP(thePBptr, userRoutine)
  1022. #define CallATPCompletionProc(userRoutine, thePBptr)            InvokeATPCompletionUPP(thePBptr, userRoutine)
  1023. #define CallXPPCompletionProc(userRoutine, thePBptr)            InvokeXPPCompletionUPP(thePBptr, userRoutine)
  1024. #define CallAttnRoutineProc(userRoutine, sessRefnum, attnBytes) InvokeAttnRoutineUPP(sessRefnum, attnBytes, userRoutine)
  1025. #define CallMPPProtocolHandlerProc(userRoutine, SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, numBytesLeftToReadInPacket) InvokeMPPProtocolHandlerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, numBytesLeftToReadInPacket, userRoutine)
  1026. #define CallDDPSocketListenerProc(userRoutine, SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, packetDestinationNumber, numBytesLeftToReadInPacket) InvokeDDPSocketListenerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, packetDestinationNumber, numBytesLeftToReadInPacket, userRoutine)
  1027. #if CALL_NOT_IN_CARBON
  1028. EXTERN_API( OSErr )
  1029. OpenXPP                         (short *                xppRefnum);
  1030. EXTERN_API( OSErr )
  1031. ASPOpenSession                  (XPPParmBlkPtr          thePBptr,
  1032.                                  Boolean                async);
  1033. EXTERN_API( OSErr )
  1034. ASPCloseSession                 (XPPParmBlkPtr          thePBptr,
  1035.                                  Boolean                async);
  1036. EXTERN_API( OSErr )
  1037. ASPAbortOS                      (XPPParmBlkPtr          thePBptr,
  1038.                                  Boolean                async);
  1039. EXTERN_API( OSErr )
  1040. ASPGetParms                     (XPPParmBlkPtr          thePBptr,
  1041.                                  Boolean                async);
  1042. EXTERN_API( OSErr )
  1043. ASPCloseAll                     (XPPParmBlkPtr          thePBptr,
  1044.                                  Boolean                async);
  1045. EXTERN_API( OSErr )
  1046. ASPUserWrite                    (XPPParmBlkPtr          thePBptr,
  1047.                                  Boolean                async);
  1048. EXTERN_API( OSErr )
  1049. ASPUserCommand                  (XPPParmBlkPtr          thePBptr,
  1050.                                  Boolean                async);
  1051. EXTERN_API( OSErr )
  1052. ASPGetStatus                    (XPPParmBlkPtr          thePBptr,
  1053.                                  Boolean                async);
  1054. #define ASPGetStatusSync(paramBlock) ASPGetStatus((paramBlock), false)
  1055. EXTERN_API( OSErr )
  1056. AFPCommand                      (XPPParmBlkPtr          thePBptr,
  1057.                                  Boolean                async);
  1058. EXTERN_API( OSErr )
  1059. GetLocalZones                   (XPPParmBlkPtr          thePBptr,
  1060.                                  Boolean                async);
  1061. EXTERN_API( OSErr )
  1062. GetZoneList                     (XPPParmBlkPtr          thePBptr,
  1063.                                  Boolean                async);
  1064. EXTERN_API( OSErr )
  1065. GetMyZone                       (XPPParmBlkPtr          thePBptr,
  1066.                                  Boolean                async);
  1067. EXTERN_API( OSErr )
  1068. PAttachPH                       (MPPPBPtr               thePBptr,
  1069.                                  Boolean                async);
  1070. EXTERN_API( OSErr )
  1071. PDetachPH                       (MPPPBPtr               thePBptr,
  1072.                                  Boolean                async);
  1073. EXTERN_API( OSErr )
  1074. PWriteLAP                       (MPPPBPtr               thePBptr,
  1075.                                  Boolean                async);
  1076. EXTERN_API( OSErr )
  1077. POpenSkt                        (MPPPBPtr               thePBptr,
  1078.                                  Boolean                async);
  1079. EXTERN_API( OSErr )
  1080. PCloseSkt                       (MPPPBPtr               thePBptr,
  1081.                                  Boolean                async);
  1082. EXTERN_API( OSErr )
  1083. PWriteDDP                       (MPPPBPtr               thePBptr,
  1084.                                  Boolean                async);
  1085. EXTERN_API( OSErr )
  1086. PRegisterName                   (MPPPBPtr               thePBptr,
  1087.                                  Boolean                async);
  1088. EXTERN_API( OSErr )
  1089. PLookupName                     (MPPPBPtr               thePBptr,
  1090.                                  Boolean                async);
  1091. #define PLookupNameSync(paramBlock) PLookupName((paramBlock), false)
  1092. EXTERN_API( OSErr )
  1093. PConfirmName                    (MPPPBPtr               thePBptr,
  1094.                                  Boolean                async);
  1095. EXTERN_API( OSErr )
  1096. PRemoveName                     (MPPPBPtr               thePBptr,
  1097.                                  Boolean                async);
  1098. EXTERN_API( OSErr )
  1099. PSetSelfSend                    (MPPPBPtr               thePBptr,
  1100.                                  Boolean                async);
  1101. EXTERN_API( OSErr )
  1102. PKillNBP                        (MPPPBPtr               thePBptr,
  1103.                                  Boolean                async);
  1104. EXTERN_API( OSErr )
  1105. PGetAppleTalkInfo               (MPPPBPtr               thePBptr,
  1106.                                  Boolean                async);
  1107. EXTERN_API( OSErr )
  1108. PATalkClosePrep                 (MPPPBPtr               thePBptr,
  1109.                                  Boolean                async);
  1110. EXTERN_API( OSErr )
  1111. POpenATPSkt                     (ATPPBPtr               thePBptr,
  1112.                                  Boolean                async);
  1113. EXTERN_API( OSErr )
  1114. PCloseATPSkt                    (ATPPBPtr               thePBPtr,
  1115.                                  Boolean                async);
  1116. EXTERN_API( OSErr )
  1117. PSendRequest                    (ATPPBPtr               thePBPtr,
  1118.                                  Boolean                async);
  1119. EXTERN_API( OSErr )
  1120. PGetRequest                     (ATPPBPtr               thePBPtr,
  1121.                                  Boolean                async);
  1122. EXTERN_API( OSErr )
  1123. PSendResponse                   (ATPPBPtr               thePBPtr,
  1124.                                  Boolean                async);
  1125. EXTERN_API( OSErr )
  1126. PAddResponse                    (ATPPBPtr               thePBPtr,
  1127.                                  Boolean                async);
  1128. EXTERN_API( OSErr )
  1129. PRelTCB                         (ATPPBPtr               thePBPtr,
  1130.                                  Boolean                async);
  1131. EXTERN_API( OSErr )
  1132. PRelRspCB                       (ATPPBPtr               thePBPtr,
  1133.                                  Boolean                async);
  1134. EXTERN_API( OSErr )
  1135. PNSendRequest                   (ATPPBPtr               thePBPtr,
  1136.                                  Boolean                async);
  1137. EXTERN_API( OSErr )
  1138. PKillSendReq                    (ATPPBPtr               thePBPtr,
  1139.                                  Boolean                async);
  1140. EXTERN_API( OSErr )
  1141. PKillGetReq                     (ATPPBPtr               thePBPtr,
  1142.                                  Boolean                async);
  1143. EXTERN_API( OSErr )
  1144. ATPKillAllGetReq                (ATPPBPtr               thePBPtr,
  1145.                                  Boolean                async);
  1146. EXTERN_API( void )
  1147. BuildLAPwds                     (Ptr                    wdsPtr,
  1148.                                  Ptr                    dataPtr,
  1149.                                  short                  destHost,
  1150.                                  short                  prototype,
  1151.                                  short                  frameLen);
  1152. EXTERN_API( void )
  1153. BuildDDPwds                     (Ptr                    wdsPtr,
  1154.                                  Ptr                    headerPtr,
  1155.                                  Ptr                    dataPtr,
  1156.                                  AddrBlock              netAddr,
  1157.                                  short                  ddpType,
  1158.                                  short                  dataLen);
  1159. EXTERN_API( void )
  1160. NBPSetEntity                    (Ptr                    buffer,
  1161.                                  ConstStr32Param        nbpObject,
  1162.                                  ConstStr32Param        nbpType,
  1163.                                  ConstStr32Param        nbpZone);
  1164. EXTERN_API( void )
  1165. NBPSetNTE                       (Ptr                    ntePtr,
  1166.                                  ConstStr32Param        nbpObject,
  1167.                                  ConstStr32Param        nbpType,
  1168.                                  ConstStr32Param        nbpZone,
  1169.                                  short                  socket);
  1170. EXTERN_API( short )
  1171. GetBridgeAddress                (void);
  1172. EXTERN_API( short )
  1173. BuildBDS                        (Ptr                    buffPtr,
  1174.                                  Ptr                    bdsPtr,
  1175.                                  short                  buffSize);
  1176. EXTERN_API( OSErr )
  1177. MPPOpen                         (void);
  1178. EXTERN_API( OSErr )
  1179. LAPAddATQ                       (ATQEntryPtr            theATQEntry);
  1180. EXTERN_API( OSErr )
  1181. LAPRmvATQ                       (ATQEntryPtr            theATQEntry);
  1182. EXTERN_API( OSErr )
  1183. ATPLoad                         (void);
  1184. EXTERN_API( OSErr )
  1185. ATPUnload                       (void);
  1186. EXTERN_API( OSErr )
  1187. NBPExtract                      (Ptr                    theBuffer,
  1188.                                  short                  numInBuf,
  1189.                                  short                  whichOne,
  1190.                                  EntityName *           abEntity,
  1191.                                  AddrBlock *            address);
  1192. EXTERN_API( OSErr )
  1193. GetNodeAddress                  (short *                myNode,
  1194.                                  short *                myNet);
  1195. EXTERN_API( Boolean )
  1196. IsMPPOpen                       (void);
  1197. EXTERN_API( Boolean )
  1198. IsATPOpen                       (void);
  1199. EXTERN_API( void )
  1200. ATEvent                         (long                   event,
  1201.                                  Ptr                    infoPtr);
  1202. EXTERN_API( OSErr )
  1203. ATPreFlightEvent                (long                   event,
  1204.                                  long                   cancel,
  1205.                                  Ptr                    infoPtr);
  1206. /*
  1207.     The following routines are obsolete and will not be supported on
  1208.     PowerPC. Equivalent functionality is provided by the routines
  1209.     above.
  1210. */
  1211. #endif  /* CALL_NOT_IN_CARBON */
  1212. #if TARGET_CPU_68K
  1213. #if CALL_NOT_IN_CARBON
  1214. EXTERN_API( OSErr )
  1215. MPPClose                        (void);
  1216. EXTERN_API( OSErr )
  1217. LAPOpenProtocol                 (ABByte                 theLAPType,
  1218.                                  Ptr                    protoPtr);
  1219. EXTERN_API( OSErr )
  1220. LAPCloseProtocol                (ABByte                 theLAPType);
  1221. EXTERN_API( OSErr )
  1222. LAPWrite                        (ATLAPRecHandle         abRecord,
  1223.                                  Boolean                async);
  1224. EXTERN_API( OSErr )
  1225. LAPRead                         (ATLAPRecHandle         abRecord,
  1226.                                  Boolean                async);
  1227. EXTERN_API( OSErr )
  1228. LAPRdCancel                     (ATLAPRecHandle         abRecord);
  1229. EXTERN_API( OSErr )
  1230. DDPOpenSocket                   (short *                theSocket,
  1231.                                  Ptr                    sktListener);
  1232. EXTERN_API( OSErr )
  1233. DDPCloseSocket                  (short                  theSocket);
  1234. EXTERN_API( OSErr )
  1235. DDPRead                         (ATDDPRecHandle         abRecord,
  1236.                                  Boolean                retCksumErrs,
  1237.                                  Boolean                async);
  1238. EXTERN_API( OSErr )
  1239. DDPWrite                        (ATDDPRecHandle         abRecord,
  1240.                                  Boolean                doChecksum,
  1241.                                  Boolean                async);
  1242. EXTERN_API( OSErr )
  1243. DDPRdCancel                     (ATDDPRecHandle         abRecord);
  1244. EXTERN_API( OSErr )
  1245. ATPOpenSocket                   (AddrBlock              addrRcvd,
  1246.                                  short *                atpSocket);
  1247. EXTERN_API( OSErr )
  1248. ATPCloseSocket                  (short                  atpSocket);
  1249. EXTERN_API( OSErr )
  1250. ATPSndRequest                   (ATATPRecHandle         abRecord,
  1251.                                  Boolean                async);
  1252. EXTERN_API( OSErr )
  1253. ATPRequest                      (ATATPRecHandle         abRecord,
  1254.                                  Boolean                async);
  1255. EXTERN_API( OSErr )
  1256. ATPReqCancel                    (ATATPRecHandle         abRecord,
  1257.                                  Boolean                async);
  1258. EXTERN_API( OSErr )
  1259. ATPGetRequest                   (ATATPRecHandle         abRecord,
  1260.                                  Boolean                async);
  1261. EXTERN_API( OSErr )
  1262. ATPSndRsp                       (ATATPRecHandle         abRecord,
  1263.                                  Boolean                async);
  1264. EXTERN_API( OSErr )
  1265. ATPAddRsp                       (ATATPRecHandle         abRecord);
  1266. EXTERN_API( OSErr )
  1267. ATPResponse                     (ATATPRecHandle         abRecord,
  1268.                                  Boolean                async);
  1269. EXTERN_API( OSErr )
  1270. ATPRspCancel                    (ATATPRecHandle         abRecord,
  1271.                                  Boolean                async);
  1272. EXTERN_API( OSErr )
  1273. NBPRegister                     (ATNBPRecHandle         abRecord,
  1274.                                  Boolean                async);
  1275. EXTERN_API( OSErr )
  1276. NBPLookup                       (ATNBPRecHandle         abRecord,
  1277.                                  Boolean                async);
  1278. EXTERN_API( OSErr )
  1279. NBPConfirm                      (ATNBPRecHandle         abRecord,
  1280.                                  Boolean                async);
  1281. EXTERN_API( OSErr )
  1282. NBPRemove                       (EntityPtr              abEntity);
  1283. EXTERN_API( OSErr )
  1284. NBPLoad                         (void);
  1285. EXTERN_API( OSErr )
  1286. NBPUnload                       (void);
  1287. #endif  /* CALL_NOT_IN_CARBON */
  1288. #endif  /* TARGET_CPU_68K */
  1289. #if PRAGMA_STRUCT_ALIGN
  1290.     #pragma options align=reset
  1291. #elif PRAGMA_STRUCT_PACKPUSH
  1292.     #pragma pack(pop)
  1293. #elif PRAGMA_STRUCT_PACK
  1294.     #pragma pack()
  1295. #endif
  1296. #ifdef PRAGMA_IMPORT_OFF
  1297. #pragma import off
  1298. #elif PRAGMA_IMPORT
  1299. #pragma import reset
  1300. #endif
  1301. #ifdef __cplusplus
  1302. }
  1303. #endif
  1304. #endif /* __APPLETALK__ */