Mac OS 9
AppleTalk.h File Reference

AppleTalk Interfaces. More...

#include <MacTypes.h>
#include <OSUtils.h>

Go to the source code of this file.

Data Structures

struct  LAPAdrBlock
 
struct  ATQEntry
 
struct  EntityName
 
struct  AddrBlock
 
struct  RetransType
 
struct  BDSElement
 
struct  ATLAPRec
 
struct  ATDDPRec
 
struct  ATNBPRec
 
struct  ATATPRec
 
struct  AFPCommandBlock
 
struct  WDSElement
 
struct  NTElement
 
struct  NamesTableEntry
 
struct  MPPparms
 
struct  LAPparms
 
struct  DDPparms
 
union  NBPPtrs
 
union  LookupConfirmParams
 
struct  NBPparms
 
struct  SetSelfparms
 
struct  NBPKillparms
 
struct  GetAppleTalkInfoParm
 
struct  ATalkClosePrepParm
 
union  MPPParamBlock
 
struct  XPPPrmBlk
 
struct  ASPGetparmsBlk
 
struct  ASPAbortPrm
 
struct  ASPOpenPrm
 
struct  AFPLoginPrm
 
struct  XCallParam
 
union  XPPParamBlock
 
struct  ATPparms
 
struct  SendReqparms
 
struct  ATPmisc1
 
struct  ATPmisc2
 
struct  Killparms
 
union  ATPParamBlock
 

Macros

#define MPPioCompletion   MPP.ioCompletion
 
#define MPPioResult   MPP.ioResult
 
#define MPPioRefNum   MPP.ioRefNum
 
#define MPPcsCode   MPP.csCode
 
#define LAPprotType   LAP.protType
 
#define LAPwdsPointer   LAP.u.wdsPointer
 
#define LAPhandler   LAP.u.handler
 
#define DDPsocket   DDP.socket
 
#define DDPchecksumFlag   DDP.checksumFlag
 
#define DDPwdsPointer   DDP.u.wdsPointer
 
#define DDPlistener   DDP.u.listener
 
#define NBPinterval   NBP.interval
 
#define NBPcount   NBP.count
 
#define NBPntQElPtr   NBP.nbpPtrs.ntQElPtr
 
#define NBPentityPtr   NBP.nbpPtrs.entityPtr
 
#define NBPverifyFlag   NBP.parm.verifyFlag
 
#define NBPretBuffPtr   NBP.parm.Lookup.retBuffPtr
 
#define NBPretBuffSize   NBP.parm.Lookup.retBuffSize
 
#define NBPmaxToGet   NBP.parm.Lookup.maxToGet
 
#define NBPnumGotten   NBP.parm.Lookup.numGotten
 
#define NBPconfirmAddr   NBP.parm.Confirm.confirmAddr
 
#define NBPnKillQEl   NBPKILL.nKillQEl
 
#define NBPnewSocket   NBP.parm.Confirm.newSocket
 
#define ATPioCompletion   ATP.ioCompletion
 
#define ATPioResult   ATP.ioResult
 
#define ATPuserData   ATP.userData
 
#define ATPreqTID   ATP.reqTID
 
#define ATPioRefNum   ATP.ioRefNum
 
#define ATPcsCode   ATP.csCode
 
#define ATPatpSocket   ATP.atpSocket
 
#define ATPatpFlags   ATP.atpFlags
 
#define ATPaddrBlock   ATP.addrBlock
 
#define ATPreqLength   ATP.reqLength
 
#define ATPreqPointer   ATP.reqPointer
 
#define ATPbdsPointer   ATP.bdsPointer
 
#define ATPtimeOutVal   SREQ.timeOutVal
 
#define ATPnumOfResps   SREQ.numOfResps
 
#define ATPretryCount   SREQ.retryCount
 
#define ATPnumOfBuffs   OTH1.u.numOfBuffs
 
#define ATPbitMap   OTH1.u.bitMap
 
#define ATPrspNum   OTH1.u.rspNum
 
#define ATPbdsSize   OTH2.bdsSize
 
#define ATPtransID   OTH2.transID
 
#define ATPaKillQEl   KILL.aKillQEl
 
#define NewATalkTransitionEventUPP(userRoutine)
 
#define NewMPPCompletionUPP(userRoutine)
 
#define NewATPCompletionUPP(userRoutine)
 
#define NewXPPCompletionUPP(userRoutine)
 
#define NewAttnRoutineUPP(userRoutine)
 
#define NewMPPProtocolHandlerUPP(userRoutine)
 
#define NewDDPSocketListenerUPP(userRoutine)
 
#define DisposeATalkTransitionEventUPP(userUPP)    DisposeRoutineDescriptor(userUPP)
 
#define DisposeMPPCompletionUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeATPCompletionUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeXPPCompletionUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeAttnRoutineUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeMPPProtocolHandlerUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeDDPSocketListenerUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeATalkTransitionEventUPP(eventCode, qElem, eventParameter, userUPP)
 
#define InvokeMPPCompletionUPP(thePBptr, userUPP)    CALL_ONE_PARAMETER_UPP((userUPP), uppMPPCompletionProcInfo, (thePBptr))
 
#define InvokeATPCompletionUPP(thePBptr, userUPP)    CALL_ONE_PARAMETER_UPP((userUPP), uppATPCompletionProcInfo, (thePBptr))
 
#define InvokeXPPCompletionUPP(thePBptr, userUPP)    CALL_ONE_PARAMETER_UPP((userUPP), uppXPPCompletionProcInfo, (thePBptr))
 
#define InvokeAttnRoutineUPP(sessRefnum, attnBytes, userUPP)
 
#define InvokeMPPProtocolHandlerUPP( SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, numBytesLeftToReadInPacket, userUPP)
 
#define InvokeDDPSocketListenerUPP( SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, packetDestinationNumber, numBytesLeftToReadInPacket, userUPP)
 
#define NewATalkTransitionEventProc(userRoutine)    NewATalkTransitionEventUPP(userRoutine)
 
#define NewMPPCompletionProc(userRoutine)   NewMPPCompletionUPP(userRoutine)
 
#define NewATPCompletionProc(userRoutine)   NewATPCompletionUPP(userRoutine)
 
#define NewXPPCompletionProc(userRoutine)   NewXPPCompletionUPP(userRoutine)
 
#define NewAttnRoutineProc(userRoutine)   NewAttnRoutineUPP(userRoutine)
 
#define NewMPPProtocolHandlerProc(userRoutine)    NewMPPProtocolHandlerUPP(userRoutine)
 
#define NewDDPSocketListenerProc(userRoutine)    NewDDPSocketListenerUPP(userRoutine)
 
#define CallATalkTransitionEventProc(userRoutine, eventCode, qElem, eventParameter)    InvokeATalkTransitionEventUPP(eventCode, qElem, eventParameter, userRoutine)
 
#define CallMPPCompletionProc(userRoutine, thePBptr)    InvokeMPPCompletionUPP(thePBptr, userRoutine)
 
#define CallATPCompletionProc(userRoutine, thePBptr)    InvokeATPCompletionUPP(thePBptr, userRoutine)
 
#define CallXPPCompletionProc(userRoutine, thePBptr)    InvokeXPPCompletionUPP(thePBptr, userRoutine)
 
#define CallAttnRoutineProc(userRoutine, sessRefnum, attnBytes)    InvokeAttnRoutineUPP(sessRefnum, attnBytes, userRoutine)
 
#define CallMPPProtocolHandlerProc( userRoutine, SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, numBytesLeftToReadInPacket)
 
#define CallDDPSocketListenerProc( userRoutine, SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, packetDestinationNumber, numBytesLeftToReadInPacket)
 
#define ASPGetStatusSync(paramBlock)   ASPGetStatus((paramBlock), false)
 
#define PLookupNameSync(paramBlock)   PLookupName((paramBlock), false)
 

Typedefs

typedef SInt8 ABCallType
 
typedef UInt8 ABProtoType
 
typedef Byte ABByte
 
typedef struct LAPAdrBlock LAPAdrBlock
 
typedef struct ATQEntry ATQEntry
 
typedef ATQEntryATQEntryPtr
 
typedef ATQEntryPtr qElem
 
typedef ATQEntryPtr void * eventParameter
 
typedef ATalkTransitionEventUPP ATalkTransitionEvent
 
typedef struct EntityName EntityName
 
typedef EntityNameEntityPtr
 
typedef struct AddrBlock AddrBlock
 
typedef struct RetransType RetransType
 
typedef struct BDSElement BDSElement
 
typedef BDSElement BDSType[8]
 
typedef BDSElementBDSPtr
 
typedef char BitMapType
 
typedef struct ATLAPRec ATLAPRec
 
typedef ATLAPRecATLAPRecPtr
 
typedef ATLAPRecPtrATLAPRecHandle
 
typedef struct ATDDPRec ATDDPRec
 
typedef ATDDPRecATDDPRecPtr
 
typedef ATDDPRecPtrATDDPRecHandle
 
typedef struct ATNBPRec ATNBPRec
 
typedef ATNBPRecATNBPRecPtr
 
typedef ATNBPRecPtrATNBPRecHandle
 
typedef struct ATATPRec ATATPRec
 
typedef ATATPRecATATPRecPtr
 
typedef ATATPRecPtrATATPRecHandle
 
typedef struct AFPCommandBlock AFPCommandBlock
 
typedef union MPPParamBlock MPPParamBlock
 
typedef union ATPParamBlock ATPParamBlock
 
typedef union XPPParamBlock XPPParamBlock
 
typedef MPPParamBlockMPPPBPtr
 
typedef ATPParamBlockATPPBPtr
 
typedef XPPParamBlockXPPParmBlkPtr
 
typedef struct WDSElement WDSElement
 
typedef struct NTElement NTElement
 
typedef struct NamesTableEntry NamesTableEntry
 
typedef struct MPPparms MPPparms
 
typedef struct LAPparms LAPparms
 
typedef struct DDPparms DDPparms
 
typedef union NBPPtrs NBPPtrs
 
typedef union LookupConfirmParams LookupConfirmParams
 
typedef struct NBPparms NBPparms
 
typedef struct SetSelfparms SetSelfparms
 
typedef struct NBPKillparms NBPKillparms
 
typedef struct GetAppleTalkInfoParm GetAppleTalkInfoParm
 
typedef struct ATalkClosePrepParm ATalkClosePrepParm
 
typedef struct XPPPrmBlk XPPPrmBlk
 
typedef struct ASPGetparmsBlk ASPGetparmsBlk
 
typedef struct ASPAbortPrm ASPAbortPrm
 
typedef struct ASPOpenPrm ASPOpenPrm
 
typedef ASPOpenPrmASPOpenPrmPtr
 
typedef struct AFPLoginPrm AFPLoginPrm
 
typedef struct XCallParam XCallParam
 
typedef struct ATPparms ATPparms
 
typedef struct SendReqparms SendReqparms
 
typedef struct ATPmisc1 ATPmisc1
 
typedef struct ATPmisc2 ATPmisc2
 
typedef struct Killparms Killparms
 

Enumerations

enum  { mppUnitNum = 9 , atpUnitNum = 10 , xppUnitNum = 40 }
 
enum  { mppRefNum = -10 , atpRefNum = -11 , xppRefNum = -41 }
 
enum  {
  lookupReply = 242 , writeLAP = 243 , detachPH = 244 , attachPH = 245 ,
  writeDDP = 246 , closeSkt = 247 , openSkt = 248 , loadNBP = 249 ,
  lastResident = 249 , confirmName = 250 , lookupName = 251 , removeName = 252 ,
  registerName = 253 , killNBP = 254 , unloadNBP = 255 , setSelfSend = 256 ,
  SetMyZone = 257 , GetATalkInfo = 258 , ATalkClosePrep = 259
}
 
enum  {
  nSendRequest = 248 , relRspCB = 249 , closeATPSkt = 250 , addResponse = 251 ,
  sendResponse = 252 , getRequest = 253 , openATPSkt = 254 , sendRequest = 255 ,
  relTCB = 256 , killGetReq = 257 , killSendReq = 258 , killAllGetReq = 259
}
 
enum  {
  openSess = 255 , closeSess = 254 , userCommand = 253 , userWrite = 252 ,
  getStatus = 251 , afpCall = 250 , getParms = 249 , abortOS = 248 ,
  closeAll = 247 , xCall = 246
}
 
enum  { ATTransOpen = 0 , ATTransClose = 2 , ATTransClosePrep = 3 , ATTransCancelClose = 4 }
 
enum  {
  afpByteRangeLock = 1 , afpVolClose = 2 , afpDirClose = 3 , afpForkClose = 4 ,
  afpCopyFile = 5 , afpDirCreate = 6 , afpFileCreate = 7 , afpDelete = 8 ,
  afpEnumerate = 9 , afpFlush = 10 , afpForkFlush = 11 , afpGetDirParms = 12 ,
  afpGetFileParms = 13 , afpGetForkParms = 14 , afpGetSInfo = 15 , afpGetSParms = 16 ,
  afpGetVolParms = 17 , afpLogin = 18 , afpContLogin = 19 , afpLogout = 20 ,
  afpMapID = 21 , afpMapName = 22 , afpMove = 23 , afpOpenVol = 24 ,
  afpOpenDir = 25 , afpOpenFork = 26 , afpRead = 27 , afpRename = 28 ,
  afpSetDirParms = 29 , afpSetFileParms = 30 , afpSetForkParms = 31 , afpSetVolParms = 32 ,
  afpWrite = 33 , afpGetFlDrParms = 34 , afpSetFlDrParms = 35 , afpDTOpen = 48 ,
  afpDTClose = 49 , afpGetIcon = 51 , afpGtIcnInfo = 52 , afpAddAPPL = 53 ,
  afpRmvAPPL = 54 , afpGetAPPL = 55 , afpAddCmt = 56 , afpRmvCmt = 57 ,
  afpGetCmt = 58 , afpAddIcon = 192
}
 
enum  { xppLoadedBit = 5 , scbMemSize = 192 , xppFlagClr = 0 }
 
enum  { xppFlagSet = 128 }
 
enum  { lapSize = 20 , ddpSize = 26 , nbpSize = 26 , atpSize = 56 }
 
enum  {
  atpXOvalue = 32 , atpEOMvalue = 16 , atpSTSvalue = 8 , atpTIDValidvalue = 2 ,
  atpSendChkvalue = 1
}
 
enum  { zipGetLocalZones = 5 , zipGetZoneList = 6 , zipGetMyZone = 7 }
 
enum  { LAPMgrPtr = 0x0B18 }
 
enum  { LAPMgrCall = 2 , LAddAEQ = 23 , LRmvAEQ = 24 }
 
enum  {
  tLAPRead = 0 , tLAPWrite = 1 , tDDPRead = 2 , tDDPWrite = 3 ,
  tNBPLookup = 4 , tNBPConfirm = 5 , tNBPRegister = 6 , tATPSndRequest = 7 ,
  tATPGetRequest = 8 , tATPSdRsp = 9 , tATPAddRsp = 10 , tATPRequest = 11 ,
  tATPResponse = 12
}
 
enum  { lapProto = 0 , ddpProto = 1 , nbpProto = 2 , atpProto = 3 }
 
enum  { uppATalkTransitionEventProcInfo = 0x00000FF1 }
 
enum  { uppMPPCompletionProcInfo = 0x00009802 }
 
enum  { uppATPCompletionProcInfo = 0x00009802 }
 
enum  { uppXPPCompletionProcInfo = 0x00009802 }
 
enum  { uppAttnRoutineProcInfo = 0x00061002 }
 
enum  { uppMPPProtocolHandlerProcInfo = 0x0000007F }
 
enum  { uppDDPSocketListenerProcInfo = 0x0000008F }
 

Functions

typedef CALLBACK_API_C (long, ATalkTransitionEventProcPtr)(long eventCode
 
typedef STACK_UPP_TYPE (ATalkTransitionEventProcPtr) ATalkTransitionEventUPP
 
typedef CALLBACK_API_REGISTER68K (void, MPPCompletionProcPtr,(MPPPBPtr thePBptr))
 
typedef CALLBACK_API_REGISTER68K (void, ATPCompletionProcPtr,(ATPPBPtr thePBptr))
 
typedef CALLBACK_API_REGISTER68K (void, XPPCompletionProcPtr,(XPPParmBlkPtr thePBptr))
 
typedef CALLBACK_API_REGISTER68K (void, AttnRoutineProcPtr,(short sessRefnum, short attnBytes))
 
typedef REGISTER_UPP_TYPE (MPPCompletionProcPtr) MPPCompletionUPP
 
typedef REGISTER_UPP_TYPE (ATPCompletionProcPtr) ATPCompletionUPP
 
typedef REGISTER_UPP_TYPE (XPPCompletionProcPtr) XPPCompletionUPP
 
typedef REGISTER_UPP_TYPE (AttnRoutineProcPtr) AttnRoutineUPP
 
typedef CALLBACK_API_REGISTER68K (Boolean, MPPProtocolHandlerProcPtr,(Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, short numBytesLeftToReadInPacket))
 
typedef CALLBACK_API_REGISTER68K (Boolean, DDPSocketListenerProcPtr,(Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, UInt8 packetDestinationNumber, short numBytesLeftToReadInPacket))
 
typedef REGISTER_UPP_TYPE (MPPProtocolHandlerProcPtr) MPPProtocolHandlerUPP
 
typedef REGISTER_UPP_TYPE (DDPSocketListenerProcPtr) DDPSocketListenerUPP
 
ATalkTransitionEventUPP NewATalkTransitionEventUPP (ATalkTransitionEventProcPtr userRoutine)
 
MPPCompletionUPP NewMPPCompletionUPP (MPPCompletionProcPtr userRoutine)
 
ATPCompletionUPP NewATPCompletionUPP (ATPCompletionProcPtr userRoutine)
 
XPPCompletionUPP NewXPPCompletionUPP (XPPCompletionProcPtr userRoutine)
 
AttnRoutineUPP NewAttnRoutineUPP (AttnRoutineProcPtr userRoutine)
 
MPPProtocolHandlerUPP NewMPPProtocolHandlerUPP (MPPProtocolHandlerProcPtr userRoutine)
 
DDPSocketListenerUPP NewDDPSocketListenerUPP (DDPSocketListenerProcPtr userRoutine)
 
void DisposeATalkTransitionEventUPP (ATalkTransitionEventUPP userUPP)
 
void DisposeMPPCompletionUPP (MPPCompletionUPP userUPP)
 
void DisposeATPCompletionUPP (ATPCompletionUPP userUPP)
 
void DisposeXPPCompletionUPP (XPPCompletionUPP userUPP)
 
void DisposeAttnRoutineUPP (AttnRoutineUPP userUPP)
 
void DisposeMPPProtocolHandlerUPP (MPPProtocolHandlerUPP userUPP)
 
void DisposeDDPSocketListenerUPP (DDPSocketListenerUPP userUPP)
 
long InvokeATalkTransitionEventUPP (long eventCode, ATQEntryPtr qElem, void *eventParameter, ATalkTransitionEventUPP userUPP)
 
void InvokeMPPCompletionUPP (MPPPBPtr thePBptr, MPPCompletionUPP userUPP)
 
void InvokeATPCompletionUPP (ATPPBPtr thePBptr, ATPCompletionUPP userUPP)
 
void InvokeXPPCompletionUPP (XPPParmBlkPtr thePBptr, XPPCompletionUPP userUPP)
 
void InvokeAttnRoutineUPP (short sessRefnum, short attnBytes, AttnRoutineUPP userUPP)
 
Boolean InvokeMPPProtocolHandlerUPP (Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, short numBytesLeftToReadInPacket, MPPProtocolHandlerUPP userUPP)
 
Boolean InvokeDDPSocketListenerUPP (Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, UInt8 packetDestinationNumber, short numBytesLeftToReadInPacket, DDPSocketListenerUPP userUPP)
 
OSErr OpenXPP (short *xppRefnum)
 Open XPP driver. More...
 
OSErr ASPOpenSession (XPPParmBlkPtr thePBptr, Boolean async)
 Initiate a workstation/server session. More...
 
OSErr ASPCloseSession (XPPParmBlkPtr thePBptr, Boolean async)
 Close a workstation/server session. More...
 
OSErr ASPAbortOS (XPPParmBlkPtr thePBptr, Boolean async)
 Abort a pending ASPOpenSession call. More...
 
OSErr ASPGetParms (XPPParmBlkPtr thePBptr, Boolean async)
 Get three ASP parameters. More...
 
OSErr ASPCloseAll (XPPParmBlkPtr thePBptr, Boolean async)
 Close every active session. More...
 
OSErr ASPUserWrite (XPPParmBlkPtr thePBptr, Boolean async)
 Transfer data on a session. More...
 
OSErr ASPUserCommand (XPPParmBlkPtr thePBptr, Boolean async)
 Send a command to the server. More...
 
OSErr ASPGetStatus (XPPParmBlkPtr thePBptr, Boolean async)
 Get server status. More...
 
OSErr AFPCommand (XPPParmBlkPtr thePBptr, Boolean async)
 Pass an AFP command to the server. More...
 
OSErr GetLocalZones (XPPParmBlkPtr thePBptr, Boolean async)
 Get AppleTalk zone names on the local network. More...
 
OSErr GetZoneList (XPPParmBlkPtr thePBptr, Boolean async)
 Returns a list of all the zone names on the internet. More...
 
OSErr GetMyZone (XPPParmBlkPtr thePBptr, Boolean async)
 Get AppleTalk zone name. More...
 
OSErr PAttachPH (MPPPBPtr thePBptr, Boolean async)
 Add a protocol handler to the protocol table. More...
 
OSErr PDetachPH (MPPPBPtr thePBptr, Boolean async)
 Remove protocol type and handler from protocol table. More...
 
OSErr PWriteLAP (MPPPBPtr thePBptr, Boolean async)
 Send a frame to another node. More...
 
OSErr POpenSkt (MPPPBPtr thePBptr, Boolean async)
 Add a socket and listener to the socket table. More...
 
OSErr PCloseSkt (MPPPBPtr thePBptr, Boolean async)
 Remove specified socket from the socket table. More...
 
OSErr PWriteDDP (MPPPBPtr thePBptr, Boolean async)
 Send a datagram to another socket. More...
 
OSErr PRegisterName (MPPPBPtr thePBptr, Boolean async)
 Add the name and address of an entity to names table. More...
 
OSErr PLookupName (MPPPBPtr thePBptr, Boolean async)
 Return the addresses of all entities with a specified name. More...
 
OSErr PConfirmName (MPPPBPtr thePBptr, Boolean async)
 Confirm that an entity still exists. More...
 
OSErr PRemoveName (MPPPBPtr thePBptr, Boolean async)
 Remove an entity name for the names table. More...
 
OSErr PSetSelfSend (MPPPBPtr thePBptr, Boolean async)
 Enable or disable intranode delivery. More...
 
OSErr PKillNBP (MPPPBPtr thePBptr, Boolean async)
 Kill a PLookUpName , PRegisterName , or PConfirmName. More...
 
OSErr PGetAppleTalkInfo (MPPPBPtr thePBptr, Boolean async)
 PGetAppleTalkInfo Obtain information about The .MPP Driver. More...
 
OSErr PATalkClosePrep (MPPPBPtr thePBptr, Boolean async)
 Request permission to close The .MPP Driver. More...
 
OSErr POpenATPSkt (ATPPBPtr thePBptr, Boolean async)
 Open a socket for the purpose of receiving requests. More...
 
OSErr PCloseATPSkt (ATPPBPtr thePBPtr, Boolean async)
 Close a specified socket. More...
 
OSErr PSendRequest (ATPPBPtr thePBPtr, Boolean async)
 Send a request to another socket and wait for response. More...
 
OSErr PGetRequest (ATPPBPtr thePBPtr, Boolean async)
 Receive a request sent by a PSendRequest call. More...
 
OSErr PSendResponse (ATPPBPtr thePBPtr, Boolean async)
 Send a response to a socket. More...
 
OSErr PAddResponse (ATPPBPtr thePBPtr, Boolean async)
 Send an additional response packet. More...
 
OSErr PRelTCB (ATPPBPtr thePBPtr, Boolean async)
 Dequeue a PSendRequest call. More...
 
OSErr PRelRspCB (ATPPBPtr thePBPtr, Boolean async)
 Cancel a PSendResponse call. More...
 
OSErr PNSendRequest (ATPPBPtr thePBPtr, Boolean async)
 Send an ATP request to another socket. More...
 
OSErr PKillSendReq (ATPPBPtr thePBPtr, Boolean async)
 Abort a PNSendRequest or PSendRequest. More...
 
OSErr PKillGetReq (ATPPBPtr thePBPtr, Boolean async)
 Kill a PGetRequest. More...
 
OSErr ATPKillAllGetReq (ATPPBPtr thePBPtr, Boolean async)
 ATPKillAllGetReq Cancel all calls to ATPGetRequest. More...
 
void BuildLAPwds (Ptr wdsPtr, Ptr dataPtr, short destHost, short prototype, short frameLen)
 
void BuildDDPwds (Ptr wdsPtr, Ptr headerPtr, Ptr dataPtr, AddrBlock netAddr, short ddpType, short dataLen)
 
void NBPSetEntity (Ptr buffer, ConstStr32Param nbpObject, ConstStr32Param nbpType, ConstStr32Param nbpZone)
 
void NBPSetNTE (Ptr ntePtr, ConstStr32Param nbpObject, ConstStr32Param nbpType, ConstStr32Param nbpZone, short socket)
 Build a Names Table Entry. More...
 
short GetBridgeAddress (void)
 GetBridgeAddress Get bridge's current address. More...
 
short BuildBDS (Ptr buffPtr, Ptr bdsPtr, short buffSize)
 Build a BDS. More...
 
OSErr MPPOpen (void)
 
OSErr LAPAddATQ (ATQEntryPtr theATQEntry)
 Add an entry to the queue. More...
 
OSErr LAPRmvATQ (ATQEntryPtr theATQEntry)
 Remove entry from AppleTalk Transition Queue. More...
 
OSErr ATPLoad (void)
 
OSErr ATPUnload (void)
 
OSErr NBPExtract (Ptr theBuffer, short numInBuf, short whichOne, EntityName *abEntity, AddrBlock *address)
 
OSErr GetNodeAddress (short *myNode, short *myNet)
 Get caller's node ID and network number. More...
 
Boolean IsMPPOpen (void)
 Is the .MPP driver loaded and running? More...
 
Boolean IsATPOpen (void)
 Is the .ATP driver loaded and running? More...
 
void ATEvent (long event, Ptr infoPtr)
 Call all routines with specified event code. More...
 
OSErr ATPreFlightEvent (long event, long cancel, Ptr infoPtr)
 

Detailed Description

AppleTalk Interfaces.

Introduced In: System 8.5
Avaliable From: Universal Interfaces 3.4.1
Copyright: © 1985-2001 by Apple Computer, Inc., all rights reserved

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Macro Definition Documentation

◆ CallDDPSocketListenerProc

#define CallDDPSocketListenerProc (   userRoutine,
  SCCAddr1,
  SCCAddr2,
  MPPLocalVars,
  nextFreeByteInRHA,
  ReadPacketAndReadRestPtr,
  packetDestinationNumber,
  numBytesLeftToReadInPacket 
)
Value:
InvokeDDPSocketListenerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, \
nextFreeByteInRHA, ReadPacketAndReadRestPtr, \
packetDestinationNumber, \
numBytesLeftToReadInPacket, userRoutine)
Boolean InvokeDDPSocketListenerUPP(Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, UInt8 packetDestinationNumber, short numBytesLeftToReadInPacket, DDPSocketListenerUPP userUPP)

◆ CallMPPProtocolHandlerProc

#define CallMPPProtocolHandlerProc (   userRoutine,
  SCCAddr1,
  SCCAddr2,
  MPPLocalVars,
  nextFreeByteInRHA,
  ReadPacketAndReadRestPtr,
  numBytesLeftToReadInPacket 
)
Value:
InvokeMPPProtocolHandlerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, \
nextFreeByteInRHA, ReadPacketAndReadRestPtr, \
numBytesLeftToReadInPacket, userRoutine)
Boolean InvokeMPPProtocolHandlerUPP(Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, short numBytesLeftToReadInPacket, MPPProtocolHandlerUPP userUPP)

◆ InvokeATalkTransitionEventUPP

#define InvokeATalkTransitionEventUPP (   eventCode,
  qElem,
  eventParameter,
  userUPP 
)
Value:
(long)CALL_THREE_PARAMETER_UPP((userUPP), uppATalkTransitionEventProcInfo, \
(eventCode), (qElem), (eventParameter))
Definition: AppleTalk.h:319

◆ InvokeAttnRoutineUPP

#define InvokeAttnRoutineUPP (   sessRefnum,
  attnBytes,
  userUPP 
)
Value:
CALL_TWO_PARAMETER_UPP((userUPP), uppAttnRoutineProcInfo, (sessRefnum), \
(attnBytes))

◆ InvokeDDPSocketListenerUPP

#define InvokeDDPSocketListenerUPP (   SCCAddr1,
  SCCAddr2,
  MPPLocalVars,
  nextFreeByteInRHA,
  ReadPacketAndReadRestPtr,
  packetDestinationNumber,
  numBytesLeftToReadInPacket,
  userUPP 
)
Value:
(Boolean) CALL_SEVEN_PARAMETER_UPP( \
(userUPP), uppDDPSocketListenerProcInfo, (SCCAddr1), (SCCAddr2), \
(MPPLocalVars), (nextFreeByteInRHA), (ReadPacketAndReadRestPtr), \
(packetDestinationNumber), (numBytesLeftToReadInPacket))
unsigned char Boolean
Definition: MacTypes.h:318

◆ InvokeMPPProtocolHandlerUPP

#define InvokeMPPProtocolHandlerUPP (   SCCAddr1,
  SCCAddr2,
  MPPLocalVars,
  nextFreeByteInRHA,
  ReadPacketAndReadRestPtr,
  numBytesLeftToReadInPacket,
  userUPP 
)
Value:
(Boolean) CALL_SIX_PARAMETER_UPP( \
(userUPP), uppMPPProtocolHandlerProcInfo, (SCCAddr1), (SCCAddr2), \
(MPPLocalVars), (nextFreeByteInRHA), (ReadPacketAndReadRestPtr), \
(numBytesLeftToReadInPacket))

◆ NewATalkTransitionEventProc

#define NewATalkTransitionEventProc (   userRoutine)     NewATalkTransitionEventUPP(userRoutine)

CALL_NOT_IN_CARBON support for pre-Carbon UPP routines: New...Proc and Call...Proc

◆ NewATalkTransitionEventUPP

#define NewATalkTransitionEventUPP (   userRoutine)
Value:
(ATalkTransitionEventUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppATalkTransitionEventProcInfo, \
GetCurrentArchitecture())
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)

4_bytes Func(4_bytes, 4_bytes, 4_bytes)

◆ NewATPCompletionUPP

#define NewATPCompletionUPP (   userRoutine)
Value:
(ATPCompletionUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppATPCompletionProcInfo, \
GetCurrentArchitecture())

register no_return_value Func(4_bytes:A0)

◆ NewAttnRoutineUPP

#define NewAttnRoutineUPP (   userRoutine)
Value:
(AttnRoutineUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppAttnRoutineProcInfo, \
GetCurrentArchitecture())

register no_return_value Func(2_bytes:D0, 2_bytes:D1)

◆ NewDDPSocketListenerUPP

#define NewDDPSocketListenerUPP (   userRoutine)
Value:
(DDPSocketListenerUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
uppDDPSocketListenerProcInfo, \
GetCurrentArchitecture())

SPECIAL_CASE_PROCINFO(8)

◆ NewMPPCompletionUPP

#define NewMPPCompletionUPP (   userRoutine)
Value:
(MPPCompletionUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppMPPCompletionProcInfo, \
GetCurrentArchitecture())

register no_return_value Func(4_bytes:A0)

◆ NewMPPProtocolHandlerUPP

#define NewMPPProtocolHandlerUPP (   userRoutine)
Value:
(MPPProtocolHandlerUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
uppMPPProtocolHandlerProcInfo, \
GetCurrentArchitecture())

SPECIAL_CASE_PROCINFO(7)

◆ NewXPPCompletionUPP

#define NewXPPCompletionUPP (   userRoutine)
Value:
(XPPCompletionUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppXPPCompletionProcInfo, \
GetCurrentArchitecture())

register no_return_value Func(4_bytes:A0)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
mppUnitNum 

Driver unit numbers (ADSP is dynamic)

atpUnitNum 

MPP unit number

xppUnitNum 

ATP unit number

◆ anonymous enum

anonymous enum
Enumerator
mppRefNum 

Driver refNums (ADSP is dynamic)

atpRefNum 

MPP reference number

xppRefNum 

ATP reference number

◆ anonymous enum

anonymous enum
Enumerator
lookupReply 

.MPP csCodes

writeLAP 

This command queued to ourself

detachPH 

Write out LAP packet

attachPH 

Detach LAP protocol handler

writeDDP 

Attach LAP protocol handler

closeSkt 

Write out DDP packet

openSkt 

Close DDP socket

loadNBP 

Open DDP socket

lastResident 

Load NBP command-executing code

confirmName 

Last resident command

lookupName 

Confirm name

removeName 

Look up name on internet

registerName 

Remove name from Names Table

killNBP 

Register name in Names Table

unloadNBP 

Kill outstanding NBP request

setSelfSend 

Unload NBP command code

SetMyZone 

MPP: Set to allow writes to self

GetATalkInfo 

Set my zone name

ATalkClosePrep 

get AppleTalk information

◆ anonymous enum

anonymous enum
Enumerator
nSendRequest 

.ATP csCodes

relRspCB 

NSendRequest code

closeATPSkt 

Release RspCB

addResponse 

Close ATP socket

sendResponse 

Add response code | Require open skt

getRequest 

Send response code

openATPSkt 

Get request code

sendRequest 

Open ATP socket

relTCB 

Send request code

killGetReq 

Release TCB

killSendReq 

Kill GetRequest

killAllGetReq 

Kill SendRequest

◆ anonymous enum

anonymous enum
Enumerator
openSess 

.XPP csCodes

closeSess 

Open session

userCommand 

Close session

userWrite 

User command

getStatus 

User write

afpCall 

Get status

getParms 

AFP command (buffer has command code)

abortOS 

Get parameters

closeAll 

Abort open session request

xCall 

Close all open sessions

◆ anonymous enum

anonymous enum
Enumerator
ATTransOpen 

Transition Queue transition types

ATTransClose 

AppleTalk has opened

ATTransClosePrep 

AppleTalk is about to close

ATTransCancelClose 

Is it OK to close AppleTalk ?

◆ anonymous enum

anonymous enum
Enumerator
afpVolClose 

AFPCall command codes

afpDirClose 

AFPCall command codes

afpForkClose 

AFPCall command codes

afpCopyFile 

AFPCall command codes

afpDirCreate 

AFPCall command codes

afpFileCreate 

AFPCall command codes

afpDelete 

AFPCall command codes

afpEnumerate 

AFPCall command codes

afpFlush 

AFPCall command codes

afpForkFlush 

AFPCall command codes

afpGetDirParms 

AFPCall command codes

afpGetFileParms 

AFPCall command codes

afpGetForkParms 

AFPCall command codes

afpGetSInfo 

AFPCall command codes

afpGetSParms 

AFPCall command codes

afpGetVolParms 

AFPCall command codes

afpLogin 

AFPCall command codes

afpContLogin 

AFPCall command codes

afpLogout 

AFPCall command codes

afpMapID 

AFPCall command codes

afpMapName 

AFPCall command codes

afpMove 

AFPCall command codes

afpOpenVol 

AFPCall command codes

afpOpenDir 

AFPCall command codes

afpOpenFork 

AFPCall command codes

afpRead 

AFPCall command codes

afpRename 

AFPCall command codes

afpSetDirParms 

AFPCall command codes

afpSetFileParms 

AFPCall command codes

afpSetForkParms 

AFPCall command codes

afpSetVolParms 

AFPCall command codes

afpWrite 

AFPCall command codes

afpGetFlDrParms 

AFPCall command codes

afpSetFlDrParms 

AFPCall command codes

afpDTOpen 

AFPCall command codes

afpDTClose 

AFPCall command codes

afpGetIcon 

AFPCall command codes

afpGtIcnInfo 

AFPCall command codes

afpAddAPPL 

AFPCall command codes

afpRmvAPPL 

AFPCall command codes

afpGetAPPL 

AFPCall command codes

afpAddCmt 

AFPCall command codes

afpRmvCmt 

AFPCall command codes

afpGetCmt 

AFPCall command codes

afpAddIcon 

AFPCall command codes

◆ anonymous enum

anonymous enum
Enumerator
scbMemSize 

XPP bit in PortBUse

xppFlagClr 

Size of memory for SCB

◆ anonymous enum

anonymous enum
Enumerator
atpEOMvalue 

ATP exactly-once bit

atpSTSvalue 

ATP End-Of-Message bit

atpTIDValidvalue 

ATP Send-Transmission-Status bit

atpSendChkvalue 

ATP trans. ID valid bit

◆ anonymous enum

anonymous enum
Enumerator
LAddAEQ 

Offset to LAP routines

LRmvAEQ 

LAPAddATQ routine selector

Function Documentation

◆ AFPCommand()

OSErr AFPCommand ( XPPParmBlkPtr  thePBptr,
Boolean  async 
)

Pass an AFP command to the server.

The AFPCommand function can have one of the following formats:
• General
• Login
• AFPWrite
• AFPRead
General Command Format
The general command format for the AFPCommad function passes an AFP
command to the server. This format is used for all AFP calls except AFPLogin,
AFPRead, and AFPWrite.
xParamBlock is a pointer to an XPPParamBlock structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
←cmdResult long 418AFP command result
←csCode short 226Always afpCall
←sessRefNum short 228Session reference number
←aspTimeout char 130Retry interval in seconds
←cbSize short 232Command buffer siz
←cbPtr Ptr 434Command buffer
↔rbSize short 238Reply buffer size and reply size
←rbPtr Ptr 440Reply buffer pointer
↔wdSize short 244Write data size
←wdPtr Ptr 446Write data pointer
←ccbStart 296 bytes 296 50Start of memory for CCB
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to function asynchronously. See Async I/O .
Returns
an operating system Error Code .
aspBufTooSmall (-1067) Reply is bigger than response buffer; the buffer will
be filled, data will be truncated
aspParamErr (-1070) Invalid session number; session has been closed
aspSessClosed (-1072) Session already in process of closing
aspSizeErr (-1073) Command block size is bigger than MaxCmdSize
afpParmErr (-5019) AFP command block size is equal to zero. This error
will also be returned if the command byte in the
command block is equal to 0 or 0xFF (255) or
GetSrvrStatus(15)
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ASPAbortOS()

OSErr ASPAbortOS ( XPPParmBlkPtr  thePBptr,
Boolean  async 
)

Abort a pending ASPOpenSession call.

ASPAbortOS aborts a pending ASPOpenSession call.
xParamBlock is a pointer to a parameter block structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
←csCode short 226AlwaysASPAbortOS
←abortSCBPointer short 228Pointer to session control block
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code .
cbNotFound (-1102) Control Block (SCB ) not found, Pointer did not point
to an open session SCB
Note
The aborted ASPOpenSession call will return a reqAborted error.
AbortSCBPointer points to the original SCB used in the pending
ASPOpenSession call.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ASPCloseAll()

OSErr ASPCloseAll ( XPPParmBlkPtr  thePBptr,
Boolean  async 
)

Close every active session.

ASPCloseAll closes every session that the driver has active, aborting all
active requests and invoking the attention routines where provided.
xParamBlock is a pointer to a parameter block structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
←csCode short 226Always ASPCloseAll
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code .
Note
This call should be used carefully. ASPCloseAll can be used as a system
level resource for making sure all sessions are closed prior to closing the
driver.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ASPCloseSession()

OSErr ASPCloseSession ( XPPParmBlkPtr  thePBptr,
Boolean  async 
)

Close a workstation/server session.

ASPCloseSession closes a session between a workstation and a server.
xParamBlock is a pointer to a parameter block structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
←csCode short 226AlwaysASPCloseSession
←sessRefnum short 228Session reference number
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
aspParamErr (-1070) Server returned bad (positive) error code
aspSessClosed (-1072) Session already in process of closing
Note
 This call aborts any calls that are active on the session, closes the session,
and calls the attention routine, if any, with an attention code of zero (zero is
invalid as a real attention code).
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ASPGetParms()

OSErr ASPGetParms ( XPPParmBlkPtr  thePBptr,
Boolean  async 
)

Get three ASP parameters.

ASPGetParms returns three ASP parameters. This call does not require an
open session.
xParamBlock is a pointer to a parameter block structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
←csCode short 226AlwaysASPGetParms
←aspMaxCmdSize short 228Maximum size of command block
←aspQuantumSize short 230Maximum data size
←numSess short 232Number of sessions
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code .
Note
aspMaxCmdSize is the maximum size of a command that can be sent to the
server.
ASPQuantumSize is the maximum size of data that can be transferred to the
server in a Write request or from the server in a command reply.
NumSess is the number of concurrent sessions supported by the driver.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ASPGetStatus()

OSErr ASPGetStatus ( XPPParmBlkPtr  thePBptr,
Boolean  async 
)

Get server status.

ASPGetStatus returns server status.This call is also used as GetServerInfo
at the AFP level. This call is unique in that it transfers data over the network
without having a session open. This call does not pass any data but requests that
server status be returned.
xParamBlock is a pointer to a parameter block structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
←csCode short 226AlwaysASPGetStatus
←aspTimeout char 130Retry interval in seconds
←aspRetry char 131Number of retries
←serverAddr short 232Server socket address
↔rbSize short 238Reply buffer and reply size
←rbPtr Ptr 440Reply buffer pointer
←ccbStart record 150 50Start of memory for CCB
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code .
aspBufTooSmall (-1067) Reply is bigger than response buffer; the buffer will
be filled, data will be truncated
aspNoServer (-1069) No response from server at address used in call
Note
 ASPTimeOut is the interval in seconds between retries of the call.
ASPRetry is the number of retries that will be attempted.
ServerAddr is the network identifier or address of the socket on which the
server is listening.
RBSize is passed and indicates the size of the reply buffer in bytes expected
by the command. RBSize is also returned and indicates the size of the reply
that was actually returned.
RBPtr points to the reply buffer.
CCBStart is the start of the memory to be used by the .XPP driver for the
command control block. The size of this block is equal to a maximum of 150
bytes.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ASPOpenSession()

OSErr ASPOpenSession ( XPPParmBlkPtr  thePBptr,
Boolean  async 
)

Initiate a workstation/server session.

ASPOpenSession initiates a session between a workstation and a server.
xParamBlock is a pointer to a parameter block structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
←csCode short 226AlwaysASPOpenSession
←sessRefnum short 228Session reference number
←aspTimeout char 130Retry interval in seconds
←aspRetry char 131Number of retries
←serverAddr long 432Server socket address
←scbPointer Ptr 436Pointer to session control block
←attnRoutine Ptr 440Pointer to attention routine
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
aspBadVersNum (-1066) Sever cannot support the offered version number
aspNoMoreSess (-1068) Driver cannot support another session
aspNoservers (-1069) No servers at that address, or the server did not
respond to the request
aspParamErr (-1070) Server returned bad (positive) error code
aspServerBusy (-1071) Server cannot open another session
reqAborted (-1105) OpenSess was aborted by an AbortOS
Note
 SessRefnum is a unique number identifying the open session between the
workstation and the server. The SessRefnum is returned when the function
completes successfully and is used in all calls to identify the session.
ASPTimeOut is the interval in seconds between retries of the open session
request.
ASPRetry is the number of retries that will be attempted.
ServerAddr is the network identifier or address of the socket on which the
server is listening.
SCBPointer points to a nonrelocatable block of data for the session control
block (SCB) that the .XPP driver reserves for use in maintaining an open
session. The SCB size is defined by the constant scbMemSize. The SCB is a
locked block and as long as the session is open, the SCB cannot be modified in
any way by the application. There is one SCB for each open session. This
block can be reused when an ASPCloseSession call is issued and completed
for that session, or when the session is indicated as closed through return of
aspParamErr as the result of a call for that session.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ASPUserCommand()

OSErr ASPUserCommand ( XPPParmBlkPtr  thePBptr,
Boolean  async 
)

Send a command to the server.

ASPUserCommand sends a command to the server on a session.
xParamBlock is a pointer to a parameter block structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
←cmdResult long 418ASP command result
←csCode short 226AlwaysASPUserCommand
←sessRefnum short 228Session number
←aspTimeout char 130Retry interval in seconds
←cbSize short 232Command block size
←cbPtr Ptr 434Command block pointer
↔rbSize short 238Reply buffer and reply size
←rbPtr Ptr 440Reply buffer pointer
←ccbStart record 150 50Start of memory for CCB
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code .
aspBufTooSmall (-1067) Reply is bigger than response buffer; the buffer will
be filled, data will be truncated
aspParamErr (-1070) Server returned bad (positive) error code
aspSessClosed (-1072) Session already in process of closing
aspSizeErr (-1073) Command block size is buffer than MaxCmdSize
Note
 SessRefnum is the session reference number returned in the
ASPOpenSession call.
ASPTimeOut is the interval in seconds between retries of the call. Notice
that there is no aspRetry field (retries are infinite). The command will be
retried at the prescribed interval until completion or the session is closed.
CBSize is the size in bytes of the command data that is to be written on the
session. The size of the command block must not exceed the value of
aspMaxCmdSize returned by the ASPGetParms call.
CBPtr points to the command data.
RBSize is passed and indicates the size of the reply buffer in bytes expected
by the command. RBSize is also returned and indicates the size of the reply
that was actually returned.
RBPtr points to the reply buffer.
CCBStart is the start of the memory to be used by the .XPP driver for the
command control block. The size of this block is equal to a maximum of 150
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ASPUserWrite()

OSErr ASPUserWrite ( XPPParmBlkPtr  thePBptr,
Boolean  async 
)

Transfer data on a session.

ASPUserWrite transfers data on a session. It is one of the two main calls
that can be used to transfer data on an ASP session. It returns data in two
different places. Four bytes of data are returned in the cmdResult field and a
variable size reply buffer is also returned.
xParamBlock is a pointer to a parameter block structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
←cmdResult long 418ASP command result
←csCode short 226AlwaysASPUserWrite
←sessRefnum short 228Session reference number
←aspTimeout char 130Retry interval in seconds
←cbSize short 232Command block size
←cbPtr Ptr 434Command block pointer
↔rbSize short 238Reply buffer size and reply size
←rbPtr Ptr 440Reply buffer pointer
←wdSize short 244Write data size
←wdPtr Ptr 446Write data pointer
←ccbStart record 296 50Start of memory for CCB
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code .
aspBufTooSmall (-1067) Reply is bigger than response buffer; the buffer will
be filled, data will be truncated
aspParamErr (-1070) Server returned bad (positive) error code
aspSessClosed (-1072) Session already in process of closing
aspSizeErr (-1073) Command block size is buffer than MaxCmdSize
Note
 CmdResult is four bytes of data returned by the server.
SessRefnum is the session reference number returned in the
ASPOpenSession call
ASPTimeOut is the interval in seconds between retries of the call. Notice
that there is no aspRetry field (retries are infinite). The command will be
retried at the prescribed interval until completion or the session is closed.
CBSize is the size in bytes of the command data that is to be written on the
session. The size of the command block must not exceed the value of
aspMaxCmdSize returned by the ASPGetParms call. Note that this buffer
is not the data to be written by the command but only the data of the
command itself.
CBPtr points to the command data.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ATEvent()

void ATEvent ( long  event,
Ptr  infoPtr 
)

Call all routines with specified event code.

Parameters
infoPtrAddress of your custom routine
ATEvent calls all of the routines in the AppleTalk Transition Queue with the
AppleTalk transition event code you specify in the event parameter.
eventcan be any 4-byte character code that starts with an uppercase
letter-that is, any value in the range 0x041 00 00 00 through
0x05A FF FF FF
infoPtrpoint to any information that you want to make available to the
AppleTalk Transition Queue routines
Returns
none
Note
You can use the infoPtr parameter to point to any information that you
want to make available to the AppleTalk Transition Queue routines; for an
ADSP-open transition, for example, you might pass a pointer to the
parameter block used by the dspOpen routine. If you do not want to pass any
information to the AppleTalk Transition Queue routines, set the infoPtr
parameter to NIL.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ATPKillAllGetReq()

OSErr ATPKillAllGetReq ( ATPPBPtr  thePBPtr,
Boolean  async 
)

ATPKillAllGetReq Cancel all calls to ATPGetRequest.

ATPKillAllGetReq function cancels all pending asynchronous calls to the
ATPGetRequest function for the socket you specify with the atpSocket
parameter.
thePBptr is a pointer to an ATPParamBlock structure. The relevant fields are
as follows:
Out-In Name Type SizeOffsetDescription
→csCode short 226AlwaysATPKillAllGetReq
→atpSocket char 128Sockets for which to cancel all calls to
ATPGetRequest
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
cbNotFound (-1102) Control block not found; no pending asynchronous
calls
Note
The ATPKillAllGetReq function also calls the completion routine for
each call to the ATPGetRequest function with the value reqAborted
(-1105) in the D0 register.
Unlike the ATPCloseSocket function, the ATPKillAllGetReq function
does not close the socket. You should call the ATPKillAllGetReq function
before closing a socket. The csCode parameter is a routine selector,
automatically set by the high-level language interface. It is always equal to
ATPKillAllGetReq for this function.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ATPLoad()

OSErr ATPLoad ( void  )

ATPLoad()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ATPreFlightEvent()

OSErr ATPreFlightEvent ( long  event,
long  cancel,
Ptr  infoPtr 
)

ATPreFlightEvent()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ATPUnload()

OSErr ATPUnload ( void  )

ATPUnload()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ BuildBDS()

short BuildBDS ( Ptr  buffPtr,
Ptr  bdsPtr,
short  buffSize 
)

Build a BDS.

BuildBDS builds a BDS, for use with ATP calls
bufPtris the BDS structure's address.
bdsPtris the BDS's address.
buffSize specifies the length of the data buffer.
Returns
a short
Note
The buffer will be broken up into pieces of maximum size (578 bytes).
The user bytes in the BDS are not modified by this routine. This routine is
provided only as a convenience, generally, the caller will be able to build
the BDS completely from a high-level language without it.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ BuildDDPwds()

void BuildDDPwds ( Ptr  wdsPtr,
Ptr  headerPtr,
Ptr  dataPtr,
AddrBlock  netAddr,
short  ddpType,
short  dataLen 
)

BuildDDPwds()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ BuildLAPwds()

void BuildLAPwds ( Ptr  wdsPtr,
Ptr  dataPtr,
short  destHost,
short  prototype,
short  frameLen 
)

BuildLAPwds()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ DisposeATalkTransitionEventUPP()

void DisposeATalkTransitionEventUPP ( ATalkTransitionEventUPP  userUPP)

DisposeATalkTransitionEventUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeATPCompletionUPP()

void DisposeATPCompletionUPP ( ATPCompletionUPP  userUPP)

DisposeATPCompletionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeAttnRoutineUPP()

void DisposeAttnRoutineUPP ( AttnRoutineUPP  userUPP)

DisposeAttnRoutineUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeDDPSocketListenerUPP()

void DisposeDDPSocketListenerUPP ( DDPSocketListenerUPP  userUPP)

DisposeDDPSocketListenerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeMPPCompletionUPP()

void DisposeMPPCompletionUPP ( MPPCompletionUPP  userUPP)

DisposeMPPCompletionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeMPPProtocolHandlerUPP()

void DisposeMPPProtocolHandlerUPP ( MPPProtocolHandlerUPP  userUPP)

DisposeMPPProtocolHandlerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeXPPCompletionUPP()

void DisposeXPPCompletionUPP ( XPPCompletionUPP  userUPP)

DisposeXPPCompletionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ GetBridgeAddress()

short GetBridgeAddress ( void  )

GetBridgeAddress Get bridge's current address.

GetBridgeAddress returns the current address of a bridge.
Returns
a short, the current address of the bridge.
Note
A zero is returned in the low byte if there is no current address.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetLocalZones()

OSErr GetLocalZones ( XPPParmBlkPtr  thePBptr,
Boolean  async 
)

Get AppleTalk zone names on the local network.

GetLocalZones returns a list of all the zone names on the local network-that
is, the network that includes the node on which your application is running.
thePBptr is a pointer to an XPPParamBlock structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
←ioResult short 216Result code
→csCode short 226Routine selector; always xCall
→xppSubCode short 228Routine selector; zipGetMyZone
→xppTimeOut char 130Retry interval in seconds
→xppRetry char 131Retry count
→zipBuffPtr long 434Pointer to data buffer
←zipNumZones short 238Number of names returned
→zipLastFlag char 140Nonzero if no more names
→zipInfoField 70 bytes 7042For use by ZIP; first word set to 0
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
noBrideErr (-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
Note
The ioResult field returns the result of the function. If you call the
function asynchronously, the function sets this field to 1 as soon as it
begins execution, and it changes the field to the actual result code when it
completes execution. The csCode and xppSubCode fields are routine selectors
and are automatically set by the high-level language interface to xCall and
zipGetLocalZones for this function. The xppTimeOut field specifies the
amount of time, in seconds, that The .ATP Driver should wait between
attempts to obtain the data. A value of 3 or 4 for the xppTimeOut field
generally gives good results. The xppRetry field specifies the number of
times The .ATP Driver should attempt to obtain the data before returning
the reqFailed (request failed) result code. A value of 3 or 4 for the
xppRetry field usually works well.
The zipBuffPtr field is a pointer to a 578-byte data buffer that you must
allocate. ZIP returns the zone names into this buffer as a packed array of
high-level language strings. The zipNumZones parameter returns the
number of zone names that ZIP placed in the data buffer.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetMyZone()

OSErr GetMyZone ( XPPParmBlkPtr  thePBptr,
Boolean  async 
)

Get AppleTalk zone name.

GetMyZone returns only the AppleTalk zone name of the node on which the
application is running.
thePBptr is a pointer to an XPPParamBlock structure. The relevant fields are
as follows:
Out-In Name Type SizeOffsetDescription
←ioResult short 216Result code
→csCode short 226Routine selector; always xCall
→xppSubCode short 228Routine selector; zipGetMyZone
→xppTimeOut char 130Retry interval in seconds
→xppRetry char 131Retry count
→zipBuffPtr long 434Pointer to data buffer
→zipInfoField 70 bytes 7042For use by ZIP; first word set to 0
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
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
Note
The GetMyZone function returns only the AppleTalk zone name of the node
on which your application is running.
The ioResult field returns the result of the function. If you call the
function asynchronously, the function sets this field to 1 as soon as it
begins execution, and it changes the field to the actual result code when it
completes execution. The csCode and xppSubCode fields are routine selectors
and are automatically set by the high-level language interface to xCall and
zipGetMyZone for this function. The xppTimeOut field specifies the amount
of time, in seconds, that The .ATP Driver should wait between attempts to
obtain the data. A value of 3 or 4 for the xppTimeOut field generally gives
good results. The xppRetry field specifies the number of times
The .ATP Driver should attempt to obtain the data before returning the
reqFailed (request failed) result code. A value of 3 or 4 for the xppRetry
field usually works well.
The zipBuffPtr field is a pointer to a 33-byte data buffer that you must
allocate. ZIP returns the zone name into this buffer as a high-level language
string. The zipInfoField field is a 70-byte data buffer that you must allocate
for use by ZIP. You must set the first word of this buffer to 0 before you
call the GetMyZone function.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetNodeAddress()

OSErr GetNodeAddress ( short *  myNode,
short *  myNet 
)

Get caller's node ID and network number.

GetNodeAddress returns the current node ID and network number of the
caller.
myNode points to the caller's current network node ID.
myNetpoints to the current network number of the caller.
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
noMPPErr (-3102) MPP driver not installed
Note
 If myNet contains 0, this means that a bridge has not yet been found.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetZoneList()

OSErr GetZoneList ( XPPParmBlkPtr  thePBptr,
Boolean  async 
)

Returns a list of all the zone names on the internet.

GetZoneList returns a complete list of all the zone names on the internet.
thePBptr is a pointer to an XPPParamBlock structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
←ioResult short 216Result code
→csCode short 226Routine selector; always xCall
→xppSubCode short 228Routine selector; zipGetMyZone
→xppTimeOut char 130Retry interval in seconds
→xppRetry char 131Retry count
→zipBuffPtr long 434Pointer to data buffer
←zipNumZones short 238Number of names returned
→zipLastFlag char 140Nonzero if no more names
→zipInfoField 70 bytes 7042For use by ZIP; first word set to 0
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
noBrideErr (-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
Note
To obtain a list of only the zone names on the local network, use the
GetLocalZones function instead.
The ioResult field returns the result of the function. If you call the
function asynchronously, the function sets this field to 1 as soon as it
begins execution, and it changes the field to the actual result code when it
completes execution. The csCode and xppSubCode fields are routine selectors
and are automatically set by the high-level language interface to xCall and
zipGetZoneList for this function. The xppTimeOut field specifies the amount
of time, in seconds, that The .ATP Driver should wait between attempts to
obtain the data. A value of 3 or 4 for the xppTimeOut field generally gives
good results. The xppRetry field specifies the number of times
The .ATP Driver should attempt to obtain the data before returning the
reqFailed (request failed) result code. A value of 3 or 4 for the xppRetry
field usually works well.
The zipBuffPtr field is a pointer to a 578-byte data buffer that you must
allocate. ZIP returns the zone names into this buffer as high-level language
strings. The zipNumZones parameter returns the number of zone names that
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ InvokeATalkTransitionEventUPP()

long InvokeATalkTransitionEventUPP ( long  eventCode,
ATQEntryPtr  qElem,
void *  eventParameter,
ATalkTransitionEventUPP  userUPP 
)

InvokeATalkTransitionEventUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeATPCompletionUPP()

void InvokeATPCompletionUPP ( ATPPBPtr  thePBptr,
ATPCompletionUPP  userUPP 
)

InvokeATPCompletionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeAttnRoutineUPP()

void InvokeAttnRoutineUPP ( short  sessRefnum,
short  attnBytes,
AttnRoutineUPP  userUPP 
)

InvokeAttnRoutineUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeDDPSocketListenerUPP()

Boolean InvokeDDPSocketListenerUPP ( Ptr  SCCAddr1,
Ptr  SCCAddr2,
Ptr  MPPLocalVars,
Ptr  nextFreeByteInRHA,
Ptr  ReadPacketAndReadRestPtr,
UInt8  packetDestinationNumber,
short  numBytesLeftToReadInPacket,
DDPSocketListenerUPP  userUPP 
)

InvokeDDPSocketListenerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeMPPCompletionUPP()

void InvokeMPPCompletionUPP ( MPPPBPtr  thePBptr,
MPPCompletionUPP  userUPP 
)

InvokeMPPCompletionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeMPPProtocolHandlerUPP()

Boolean InvokeMPPProtocolHandlerUPP ( Ptr  SCCAddr1,
Ptr  SCCAddr2,
Ptr  MPPLocalVars,
Ptr  nextFreeByteInRHA,
Ptr  ReadPacketAndReadRestPtr,
short  numBytesLeftToReadInPacket,
MPPProtocolHandlerUPP  userUPP 
)

InvokeMPPProtocolHandlerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeXPPCompletionUPP()

void InvokeXPPCompletionUPP ( XPPParmBlkPtr  thePBptr,
XPPCompletionUPP  userUPP 
)

InvokeXPPCompletionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ IsATPOpen()

Boolean IsATPOpen ( void  )

Is the .ATP driver loaded and running?

IsATPOpen returns TRUE if the .ATP driver is loaded and running.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ IsMPPOpen()

Boolean IsMPPOpen ( void  )

Is the .MPP driver loaded and running?

IsMPPOpen returns TRUE if the .MPP driver is loaded and running.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ LAPAddATQ()

OSErr LAPAddATQ ( ATQEntryPtr  theATQEntry)

Add an entry to the queue.

LAPAddATQ adds an entry to the AppleTalk Transition Queue.
theATQEntry is a pointer to an ATQEntry data structure. The CallAddr field of the
data structure holds a pointer to the routine that AppleTalk calls for
any AppleTalk transition event.
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
Note
From assembly language, you add and remove AppleTalk Transition Queue
entries by placing a routine selector in the D0 register, placing a pointer to
your AppleTalk Transition Queue entry in the A0 register, and executing a
JSR instruction to an offset past the start of LAP Manager . The start of
LAP Manager is contained in the global variable LAPMgrPtr (0x0B18).
The offset to LAP Manager routines is given by the constant LAPMgrCall
(2).
Here is assembly-language code that adds or removes AppleTalk Transition
Queue entries:
LAPMgrPtr EQU 0x0B18 ;LAP Manager entry point
LAPMgrCall EQU 2 ;offset to LAP Manager
routines
MOVEQ #RSel,D0 ;place routine selector
; in D0 (23 to add an entry,
;24 to remove one)
MOVE.L LAPMgrPtr,A n;put pointer to LAP Mgr in A n
MOVE.L ATQEntry,A0 ;put ATQ entry in A0
JSR LAPMgrCall(A n);jump to start of LAP Mgr
;routines
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ LAPRmvATQ()

OSErr LAPRmvATQ ( ATQEntryPtr  theATQEntry)

Remove entry from AppleTalk Transition Queue.

LAPRmvATQ removes an entry from the AppleTalk Transition Queue
theATQEntry is a pointer to an ATQEntry data structure.
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
qErr(-1) Queue element not found
Note
You must not call the LAPRmvATQ function at interrupt time or through a
callback routine. This restriction is to prevent any routine from removing
an entry from the AppleTalk Transition Queue while another routine is in
the process of adding or removing an entry.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ MPPOpen()

OSErr MPPOpen ( void  )

MPPOpen()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ NBPExtract()

OSErr NBPExtract ( Ptr  theBuffer,
short  numInBuf,
short  whichOne,
EntityName abEntity,
AddrBlock address 
)

NBPExtract()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ NBPSetEntity()

void NBPSetEntity ( Ptr  buffer,
ConstStr32Param  nbpObject,
ConstStr32Param  nbpType,
ConstStr32Param  nbpZone 
)

NBPSetEntity()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ NBPSetNTE()

void NBPSetNTE ( Ptr  ntePtr,
ConstStr32Param  nbpObject,
ConstStr32Param  nbpType,
ConstStr32Param  nbpZone,
short  socket 
)

Build a Names Table Entry.

NBPSetNTE builds an NBP names table entry, for use with
PRegistername  call. Given a names table entry of at least the size of the
EntityName data structure plus nine bytes (108 bytes), this routine sets
the indicated object, type, zone and socket in that names table entry.
ntePtris the names table entry's address.
nbpObject is the names table entry object.
nbpType is the names table entry type.
nbpZone is the names table entry zone.
Returns
none
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ NewATalkTransitionEventUPP()

ATalkTransitionEventUPP NewATalkTransitionEventUPP ( ATalkTransitionEventProcPtr  userRoutine)

NewATalkTransitionEventUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewATPCompletionUPP()

ATPCompletionUPP NewATPCompletionUPP ( ATPCompletionProcPtr  userRoutine)

NewATPCompletionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewAttnRoutineUPP()

AttnRoutineUPP NewAttnRoutineUPP ( AttnRoutineProcPtr  userRoutine)

NewAttnRoutineUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewDDPSocketListenerUPP()

DDPSocketListenerUPP NewDDPSocketListenerUPP ( DDPSocketListenerProcPtr  userRoutine)

NewDDPSocketListenerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewMPPCompletionUPP()

MPPCompletionUPP NewMPPCompletionUPP ( MPPCompletionProcPtr  userRoutine)

NewMPPCompletionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewMPPProtocolHandlerUPP()

MPPProtocolHandlerUPP NewMPPProtocolHandlerUPP ( MPPProtocolHandlerProcPtr  userRoutine)

NewMPPProtocolHandlerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewXPPCompletionUPP()

XPPCompletionUPP NewXPPCompletionUPP ( XPPCompletionProcPtr  userRoutine)

NewXPPCompletionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ OpenXPP()

OSErr OpenXPP ( short *  xppRefnum)

Open XPP driver.

CALL_NOT_IN_CARBON

OpenXPP opens the XPP driver.
Returns
an operating system Error Code .
noErr(0) No error
portInUse (-97) Port B is already in use
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PAddResponse()

OSErr PAddResponse ( ATPPBPtr  thePBPtr,
Boolean  async 
)

Send an additional response packet.

PAddResponse sends an additional response packet to a socket that has
already been send the initial part of a response via PSendResponse .
thePBptr iis a pointer to an ATPParamBlock structure.
Out-In Name Type SizeOffset Description
→ userData long 418 user bytes from TRel
→ csCode short 226 always addResponse
→ atpSocket char 128 socket number
→ atpFlags char 129 control information
→ addrBlock AddrBlock 430 response destination
→ reqLength short 234 response size
→ reqPointer Ptr 436 pointer to response
→ rspNum char 144 sequence number
→ transID short 248 transaction ID
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
badATPSkt (-1099) Bad responding socket
badBuffNum (-1100) Sequence number out to range
noSendResp (-1103) PAddResponse issued before PSendResponse
noDataArea (-1104) Too many outstanding ATP calls
Note
userData contains the four user bytes. atpSocket contains the socket
number from which the response should be sent. The end-of-message flag
in atpFlags should be set if this response packet is the final packet in the
transaction composed of a group of packets and the number of responses is
less than requested. addrBlock indicates the socket to which the response
should be sent. reqLength and reqPointer contain the size (in bytes) and
location of the response to send; rspNum indicates the sequence number of
the response (in the range 0 to 7). transID must contain the transaction
ID.
Warning: If the transaction is part of an exactly-once transaction, the
buffer used in the PAddResponse call must not be altered or
released until the corresponding PSendResponse call has
completed.
To send a request to another socket and get a response, call
PSendRequest . The call terminates when either an entire response is
received or a specified retry timeout interval elapses. To open a socket for
the purpose of responding to requests, call POpenATPSkt . Then call
PGetRequest to receive a request; when a request is received, the call is
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PATalkClosePrep()

OSErr PATalkClosePrep ( MPPPBPtr  thePBptr,
Boolean  async 
)

Request permission to close The .MPP Driver.

PATalkClosePrep calls each routine listed in the AppleTalk Transition
Queue to request permission to close The .MPP Driver
thePBptr is a pointer to an .MPP parameter block structure. The relevant
fields are as follows:
Out-In Name Type SizeOffsetDescription
→csCode short 226Always PATalkClosePrep
←appName Ptr 428Pointer to application that denies request
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
closeErr (-24) Permission to close .MPP was denied
Note
The PATalkClosePrep function calls each routine listed in the AppleTalk
Transition Queue to request permission to close The .MPP Driver .
If a routine in the AppleTalk Transition Queue denies permission to close
The .MPP Driver , that routine can return a pointer to a high-level
language string. The high-level language string should contain the name of
the application that placed the entry in the AppleTalk Transition Queue. The
PATalkClosePrep function returns that pointer in the appName field.
The function also returns the result code closeErr, indicating that the
calling routine has been denied permission to close The .MPP Driver . The
routine that called PATalkClosePrep can then display a dialog box telling
the user the name of the application that is currently using AppleTalk and
asking whether to close AppleTalk anyway.
The csCode parameter is a routine selector; it is always equal to
PATalkClosePrep for this function.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PAttachPH()

OSErr PAttachPH ( MPPPBPtr  thePBptr,
Boolean  async 
)

Add a protocol handler to the protocol table.

PAttachPH adds the protocol handler pointed to by the handler field of the
LAPparms structure to the node's protocol table.
thePBptr iis a pointer to an LAPparms structure.
Out-In Name Type SizeOffset Description
→ csCode short 226always attachPH
→ protType char 128ALAP protocol type
→ handler Ptr 430protocol handler
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
lapProtErr (-94) Error attaching protocol type
Note
handler is the protocol handler to add to the protocol table. protType
specifies what kind of frame the protocol handler can service. After
PAttachPH is called, the protocol handler is called for each incoming
frame whose ALAP protocol type equals protType .
Most programs will never need to call ALAP, because higher-level
protocols will automatically call ALAP as necessary. If you do want to send a
frame directly via ALAP, call the PWriteLAP function. There is no
PReadLAP function. If you want to read ALAP frames, you must call
PAttachPH to add your protocol handler to the node's protocol handler
table. The ALAP module will examine every incoming frame and call your
protocol handler for each frame received with the correct ALAP protocol.
When your program no longer wants to receive frames with a particular
ALAP protocol type value, it can call PDetachPH to remove the
corresponding protocol handler from the protocol handler table.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PCloseATPSkt()

OSErr PCloseATPSkt ( ATPPBPtr  thePBPtr,
Boolean  async 
)

Close a specified socket.

PCloseATPSkt closes the socket whose number is specified in the atpSocket
parameter of the ATPparms structure, for the purpose of receiving requests.
thePBptr iis a pointer to an ATPparms structure.
Out-In Name Type SizeOffset Description
→ csCode short 226 always closeATPSkt
→ atpSocket char 128 socket number
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
noDataArea (-1104) Too many outstanding ATP calls
Note
To send a request to another socket and get a response, call
PSendRequest . The call terminates when either an entire response is
received or a specified retry timeout interval elapses. To open a socket for
the purpose of responding to requests, call POpenATPSkt . Then call
PGetRequest to receive a request; when a request is received, the call is
completed. After receiving and servicing a request, call PSendResponse
to return response information. If you cannot or do not want to send the
entire response all at once, make a PSendResponse call to send some of
the response, and then call PAddResponse later to send the remainder of
the response. To close a socket opened for the purpose of sending responses,
call PCloseATPSkt .
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PCloseSkt()

OSErr PCloseSkt ( MPPPBPtr  thePBptr,
Boolean  async 
)

Remove specified socket from the socket table.

PCloseSkt removes the entry of the specified socket from the socket table.
thePBptr iis a pointer to an DDPparms structure.
Out-In Name Type SizeOffset Description
→ csCode short 226always closeSkt
→ socket char 128socket number
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
ddpSktErr (-91) Socket error
Note
If you pass a socket number of 0, or if you attempt to close a socket that
isn't open, PCloseSkt will return a ddpSktErr .
Before it can use a socket, the program must call POpenSkt which adds a
socket and its socket listener to the socket table. When a client is finished
using a socket, call PCloseSkt , which removes the socket's entry from the
socket table. To send a datagram via DDP, call PWriteDDP . If you want to
read DDP datagrams, you must write your own socket listener. DDP will
send every incoming datagram for that socket to your socket listener.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PConfirmName()

OSErr PConfirmName ( MPPPBPtr  thePBptr,
Boolean  async 
)

Confirm that an entity still exists.

PConfirmName confirms that an entity known by name and address still
exists (is still entered in the names directory).
thePBptr is a pointer to an NBPparms structure.
Out-In Name Type SizeOffset Description
→ csCode short 226always confirmName
→ interval char 128retry interval
↔ count char 129retry count
→ entityPtr Ptr 430pointer to entity name
→ confirmAddr AddrBlock 434entity address
← newSocket char 138socket number
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
nbpNoConfirm (-1025) Name not confirmed
nbpConfDiff (-1026) Name confirmed for a different socket
Note
entityPtr points to the entity's name (built using NBPSetEntity ).
confirmAddr specifies the address to be confirmed. No meta-characters
are allowed in the entity name. interval and count contain the retry
interval and the retry count. The socket number of the entity is returned in
newSocket .
When an entity wants to communicate via an AppleTalk network, it should
call PRegisterName to place its name and internet address in the names
table. When an entity no longer wants to communicate on the network, or is
being shut down, it should call PLookupName , which returns a list of all
entities with the name you specify. If you already know the address of an
entity, and want only to confirm that it still exists, call PConfirmName .
PConfirmName is more efficient than PLookupName in terms of
network traffic.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PDetachPH()

OSErr PDetachPH ( MPPPBPtr  thePBptr,
Boolean  async 
)

Remove protocol type and handler from protocol table.

PDetachPH removes from the node's protocol table the specified ALAP
protocol type and corresponding protocol handler.
thePBptr iis a pointer to an LAPparms structure.
Out-In Name Type SizeOffset Description
→ csCode short 226always detachPH
→ protType char 128ALAP protocol type
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
lapProtErr (-94) Error attaching protocol type
Note
protType specifies the type of the protocol handler to remove.
Most programs will never need to call ALAP, because higher-level
protocols will automatically call ALAP as necessary. If you do want to send a
frame directly via ALAP, call the PWriteLAP function. There is no
PReadLAP function. If you want to read ALAP frames, you must call
PAttachPH to add your protocol handler to the node's protocol handler
table. The ALAP module will examine every incoming frame and call your
protocol handler for each frame received with the correct ALAP protocol.
When your program no longer wants to receive frames with a particular
ALAP protocol type value, it can call PDetachPH to remove the
corresponding protocol handler from the protocol handler table.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PGetAppleTalkInfo()

OSErr PGetAppleTalkInfo ( MPPPBPtr  thePBptr,
Boolean  async 
)

PGetAppleTalkInfo Obtain information about The .MPP Driver.

PGetAppleTalkInfo returns information about The .MPP Driver . If the
node on which your program is running happens also to be running AppleTalk
Internet Router software in the background, more than one set of .MPP global
variables may be in RAM. .
thePBptr is a pointer to a device control entry (DCE) structure. The relevant
fields are as follows:
Out-InName Type SizeOffsetDescription
←ioResult short 216Result code
→csCode short 226Always PGetAppleTalkInfo
→version short 228Version of function
←varsPtr long 430Pointer to .MPP globals
←dcePtr long 434Pointer to DCE for .MPP
←portID short 238Port number
←configuration long 440Configuration flags
←selfSend short 244Nonzero if self-send is enabled
←netLo short 246Low value of the network range
←netHi short 248High value of the network range
←ourAddr long 450Local 24-bit AppleTalk address
←routerAddr long 45424-bit address of router
←numOfPHs short 258Max number of protocol handlers
←numOfSkts short 260Max number of static sockets
←numNBPEs short 262Max concurrent NBP requests
←ntQueue long 464Pointer to registered names table
↔laLength short 268Length in bytes of data link address
(extended networks only)
→linkAddr long 470Pointer to data link address buffer
(extended networks only)
→zoneName long 474Pointer to zone name buffer
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
paramErr (-50) Version number is too high
Note
To make sure you are obtaining information about The .MPP Driver that
handles application software, always use the PGetAppleTalkInfo function
rather than the Device Manager 's PBControl function. If you are using
assembly language or want to use the PBControl function, you must be
sure to use a device driver reference number of -10 for
The .MPP Driver
Field descriptions
ioResult The result of the function. When you execute the function
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PGetRequest()

OSErr PGetRequest ( ATPPBPtr  thePBPtr,
Boolean  async 
)

Receive a request sent by a PSendRequest call.

PGetRequest sets up the mechanism to receive a request sent by a
PSendRequest call.
thePBptr iis a pointer to an ATPParamBlock structure.
Out-In Name Type SizeOffset Description
← userData long 418 user bytes
→ csCode short 226 always getRequest
→ atpSocket char 128 socket number
← atpFlags char 129 control information
← addrBlock AddrBlock 430 destination socket address
↔ reqLength short 234 request size in bytes
→ reqPointer Ptr 436 pointer to request data
← bitMap Ptr 440 bitmap
← transID short 248 transaction ID
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
badATPSkt (-1099) Bad responding socket
Note
userData returns the four user bytes from the request. atpSocket contains
the socket number of the socket that should listen for a request. The
internet address of the socket from which the request was sent is returned
in addrBlock. reqLength and reqPointer indicate the size (in bytes) and
location of a buffer to store the incoming request. The actual size of the
request is returned in reqLength . The transaction bitmap and transaction ID
will be returned in bitMap and transID. The exactly-once flag in atpFlags
will be set if the request is part of an exactly-once transaction.
To send a request to another socket and get a response, call
PSendRequest . The call terminates when either an entire response is
received or a specified retry timeout interval elapses. To open a socket for
the purpose of responding to requests, call POpenATPSkt . Then call
PGetRequest to receive a request; when a request is received, the call is
completed. After receiving and servicing a request, call PSendResponse
to return response information. If you cannot or do not want to send the
entire response all at once, make a PSendResponse call to send some of
the response, and then call PAddResponse later to send the remainder of
the response. To close a socket opened for the purpose of sending responses,
call PCloseATPSkt .
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PKillGetReq()

OSErr PKillGetReq ( ATPPBPtr  thePBPtr,
Boolean  async 
)

Kill a PGetRequest.

PKillGetReq aborts a PGetRequest
thePBptr is a pointer to an ATPParamBlock structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
→csCode short 226Always PKillGetReq
→aKillQEl Ptr 144Pointer to a queue element
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
cbNotFound (-1102) aKIllQEl does not point to a GetReq queue element
Note
PKillGetReq will abort a specific outstanding PGetRequest call (as
opposed to closing the socket, which aborts all outstanding PGetRequest
calls on that socket). The call will be completed with a reqAborted error. To
abort a PGetRequest , place a pointer to the queue element of the call to
abort in aKillQEl and issue the PKillGetReq call.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PKillNBP()

OSErr PKillNBP ( MPPPBPtr  thePBptr,
Boolean  async 
)

Kill a PLookUpName , PRegisterName , or PConfirmName.

PKillNBP aborts an outstanding PLookUpName , PRegisterName , or
PConfirmName request.
thePBptr is a pointer to an ATPParamBlock structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
→csCode short 226Always PKillNBP
→aKillQEl Ptr 128Pointer to a queue element
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
cbNotFound (-1102) aKIllQEl does not point to a valid NBP queue element
Note
PKillNBP will abort an outstanding PLookUpName , PRegisterName ,
or PConfirmName request. To abort one of these calls, place a pointer to
the queue element of the call to abort in aKillQEl and issue the PKillNBP
call. The call will be completed with a reqAborted error.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PKillSendReq()

OSErr PKillSendReq ( ATPPBPtr  thePBPtr,
Boolean  async 
)

Abort a PNSendRequest or PSendRequest.

PKillSendReq aborts PNSendRequest or PSendRequest calls.
thePBptr is a pointer to an ATPParamBlock structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
→csCode short 226Always PKillSendRequest
→aKillQEl Ptr 144Pointer to a queue element
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
cbNotFound -1102 aKillQEl does not point to a SendReq or NSendReq
queue element
Note
PKillSendReq is functionally equivalent to PRelTCB , except that it
takes different arguments, and will abort both PSendRequest and
PNSendRequest . To abort one of these calls, place a pointer to the queue
element of the call to abort in aKillQEl and issue the PKillSendReq .
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PLookupName()

OSErr PLookupName ( MPPPBPtr  thePBptr,
Boolean  async 
)

Return the addresses of all entities with a specified name.

PLookupName returns the addresses of all entities with a specified name.
thePBptr is a pointer to an NBPparms structure.
Out-In Name Type SizeOffset Description
→ csCode short 226always lookupName
→ interval char 128retry interval
↔ count char 129retry count
→ entityPtr Ptr 430pointer to entity name
→ retBuffPtr Ptr 434pointer to buffer
→ retBuffSize short 240buffer size in bytes
→ maxToGet short 240matches to get
← numGotten short 242matches found
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
nbpBuffOvr (-1024) Buffer overflow
Note
PLookupName returns the addresses of all entities with a specified name.
entityPtr points to the entity's name (built using NBPSetEntity ).
Meta-characters are allowed in the entity name. retBuffPtr and retBuffSize
contain the location and size of an area of memory in which the tuples
describing the entity names and their corresponding addresses should be
returned. maxToGet indicates the maiximum number of matching names to
find addresses for; the actual number of addresses found is returned in
numGotten . interval and count contain the retry interval and the retry
count. PLookupName completes when either the number of matches is
equal to or greater than maxToGet , or the retry count has been exceeded.
The count field is decremented for each retransmission.
numGotten is first set to 0 and then incremented with each match found.
You can test the value in this field, and can start examining the received
address in the buffer while the lookup continues.
Use NBPExtract to extract entity names from the buffer pointed to by
retBuffPtr .
When an entity wants to communicate via an AppleTalk network, it should
call PRegisterName to place its name and internet address in the names
table. When an entity no longer wants to communicate on the network, or is
being shut down, it should call PLookupName , which returns a list of all
entities with the name you specify. If you already know the address of an
entity, and want only to confirm that it still exists, call PConfirmName .
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PNSendRequest()

OSErr PNSendRequest ( ATPPBPtr  thePBPtr,
Boolean  async 
)

Send an ATP request to another socket.

PNSendRequest sends an ATP request to another socket.
thePBptr is a pointer to an ATPParamBlock structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
←userData long 418User bytes
←reqTID short 222Transaction ID used in request
→csCode short 226Always sendRequest
→atpSocket short 228Socket to send request on; current bitmap
↔atpFlags char 129control information
→addrBlock long 430Destination socket address
→reqLength short 234Request size in bytes
→reqPointer Ptr 436Pointer to request data
→bdsPointer Ptr 440Pointer to response BDS
←numOfBuffs char 144Number of responses expected
→timeOutVal char 145Timeout interval
→numOfResps char 146Number of responses received
→retryCount char 147Number of retries
←intBuff short 248Used internally
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
reqFailed (-1096) SendRequest failed: retry count exceeded
tooManyReqs (-1097) Too many concurrent requests
noDataArea (-1104) Too many outstanding ATP calls
reqAborted (-1105) Request canceled by user
Note
The PNSendRequest call is functionally equivalent to the PSendRequest
call, however, PNSendRequest allows you to specify, in the atpSocket
field, the socket through which the request is to be sent. This socket must
have previously opened through an POpenATPSkt request (otherwise a
badATPSkt error will be returned). Note that PNSendRequest . Note that
PNSendRequest requires two additional bytes of memory at the end of the
parameter block, immediately following the retryCount. These bytes are
for the internal use of the AppleTalk Manager and should not be modified
while the PNSendRequest call is active.
There is a machine-dependent limit as to the number of of concurrent
PNSendRequests that can be active on a given socket. If this limit is
exceeded, the error tooManyReqs is returned.
One additional difference between PSendRequest and PNSendRequest is
that PNSendRequest is that a PNSendRequest can only be aborted by a
PKillSendReq call, whereas a PSendRequest can be aborted by either a
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ POpenATPSkt()

OSErr POpenATPSkt ( ATPPBPtr  thePBptr,
Boolean  async 
)

Open a socket for the purpose of receiving requests.

POpenATPSkt opens a socket for the purpose of receiving requests.
thePBptr iis a pointer to an ATPparms structure.
Out-In Name Type SizeOffset Description
→ csCode short 226 always openATPSkt
↔ atpSocket char 128 socket number
→ addrBlock AddrBlock 430 socket request specification
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
tooManySkts (-1074) Too many responding sockets
noDataArea (-1104) Too many outstanding ATP calls
Note
atpSocket contains the socket number of the socket to open. If it's 0, a
number is dynamically assigned and returned in atpSocket. addrBlock
contains a specification of the socket addresss from which requests will be
accepted. A 0 in the network number, node ID, or socket number field of
addrBlock means that requests will be accepted from every network, node,
or socket, respectively.
To send a request to another socket and get a response, call
PSendRequest . The call terminates when either an entire response is
received or a specified retry timeout interval elapses. To open a socket for
the purpose of responding to requests, call POpenATPSkt . Then call
PGetRequest to receive a request; when a request is received, the call is
completed. After receiving and servicing a request, call PSendResponse
to return response information. If you cannot or do not want to send the
entire response all at once, make a PSendResponse call to send some of
the response, and then call PAddResponse later to send the remainder of
the response. To close a socket opened for the purpose of sending responses,
call PCloseATPSkt .
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ POpenSkt()

OSErr POpenSkt ( MPPPBPtr  thePBptr,
Boolean  async 
)

Add a socket and listener to the socket table.

POpenSkt adds a socket and its socket listener to the socket table
thePBptr iis a pointer to an DDPparms structure.
Out-In Name Type SizeOffset Description
→ csCode short 226always openSkt
↔ socket char 128socket number
→ listener Ptr 430socket listener
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
ddpSktErr (-91) Socket error
Note
If the socket parameter is nozero, it must be in the range 64 to 127, and it
specifies the socket's number; if socket is 0, POpenSkt opens a socket
with a socket number in the range 128 to 254, and returns it in the socket
parameter. listener contains a pointer to the socket listener.
POpenSkt will return ddpSktErr if you pass the number of an already
opened socket, if you pass a socket number greater than 127, or if the
socket table is full (the socket table can hold a maximum of 12 sockets).
Before it can use a socket, the program must call POpenSkt which adds a
socket and its socket listener to the socket table. When a client is finished
using a socket, call PCloseSkt , which removes the socket's entry from the
socket table. To send a datagram via DDP, call PWriteDDP . If you want to
read DDP datagrams, you must write your own socket listener. DDP will
send every incoming datagram for that socket to your socket listener.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PRegisterName()

OSErr PRegisterName ( MPPPBPtr  thePBptr,
Boolean  async 
)

Add the name and address of an entity to names table.

PRegisterName adds the name and address of an entity to the node's names
table.
thePBptr is a pointer to an NBPparms structure.
Out-In Name Type SizeOffset Description
→ csCode short 226always registerName
→ interval char 128retry interval
↔ count char 129retry count
→ ntQElPtr Ptr 430names table element pointer
→ verifyFlag char 134set if verify needed
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
nbpDuplicate (-1027) Duplicate name already exists
nbpNISErr (-1029) Error opening names information socket
Note
ntQElPtr points to a names table entry containing the entity's name and
internet address (built using NBPSetNTE ). Meta-characters aren't
allowed in the object and type fields of the entity name; the zone field,
however, must contain the meta-character "*". If verifyFlag is TRUE,
PRegisterName checks on the network to see if the name is already in
use, and returns a result code of nbpDuplicate if so. interval and count
contain the retry interval in eight-tick units and the retry count. When a
retry is made, the count field is modified.
Warning: The names table entry passes to PRegisterName remains the
property of NBP until removed from the names table. Don't
attempt to remove or modify it. If you've allocated memory
using a NewHandle call, you must lock it as long as the name is
registered.
Warning: verifyFlag should normally be set before calling
PRegisterName .
When an entity wants to communicate via an AppleTalk network, it should
call PRegisterName to place its name and internet address in the names
table. When an entity no longer wants to communicate on the network, or is
being shut down, it should call PLookupName , which returns a list of all
entities with the name you specify. If you already know the address of an
entity, and want only to confirm that it still exists, call PConfirmName .
PConfirmName is more efficient than PLookupName in terms of
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PRelRspCB()

OSErr PRelRspCB ( ATPPBPtr  thePBPtr,
Boolean  async 
)

Cancel a PSendResponse call.

In an exactly-once transaction, PRelRspCB cancels the specified
PSendResponse call, without waiting for the release timer to expire or a
TRel packet to be received. No error is returned for the PSendResponse call.
When called to cancel a transaction that isn't using exactly-once service,
PRelRspCB returns cbNotFound . The transaction ID can be obtained from
the reqTID field of the PSendResponse queue entry; see the description of
PSendResponse for details.
thePBptr iis a pointer to an ATPParamBlock structure.
Out-In Name Type SizeOffset Description
→ csCode short 226 always relRspCB
→ atpSocket char 128 socket number that request was
received on
→ addrBlock AddrBlock 430 destination of request
→ transID short 248 transaction ID of request
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
cbNotFound (-1102) ATP control block not found
Note
To send a request to another socket and get a response, call
PSendRequest . The call terminates when either an entire response is
received or a specified retry timeout interval elapses. To open a socket for
the purpose of responding to requests, call POpenATPSkt . Then call
PGetRequest to receive a request; when a request is received, the call is
completed. After receiving and servicing a request, call PSendResponse
to return response information. If you cannot or do not want to send the
entire response all at once, make a PSendResponse call to send some of
the response, and then call PAddResponse later to send the remainder of
the response. To close a socket opened for the purpose of sending responses,
call PCloseATPSkt .
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PRelTCB()

OSErr PRelTCB ( ATPPBPtr  thePBPtr,
Boolean  async 
)

Dequeue a PSendRequest call.

PRelTCB dequeues the specified PSendRequest call and returns the result
code reqAborted for the aborted call. The transaction ID can be obtained from
the reqTID field of the PSendRequest call; see PSendRequest for details.
thePBptr iis a pointer to an ATPParamBlock structure.
Out-In Name Type SizeOffset Description
→ csCode short 226 always relTCB
→ addrBlock AddrBlock 430 destination of request
→ transID short 248 transaction ID of request
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
cbNotFound (-1102) ATP control block not found
noDataArea (-1104) Too many outstanding ATP calls
Note
To send a request to another socket and get a response, call
PSendRequest . The call terminates when either an entire response is
received or a specified retry timeout interval elapses. To open a socket for
the purpose of responding to requests, call POpenATPSkt . Then call
PGetRequest to receive a request; when a request is received, the call is
completed. After receiving and servicing a request, call PSendResponse
to return response information. If you cannot or do not want to send the
entire response all at once, make a PSendResponse call to send some of
the response, and then call PAddResponse later to send the remainder of
the response. To close a socket opened for the purpose of sending responses,
call PCloseATPSkt .
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PRemoveName()

OSErr PRemoveName ( MPPPBPtr  thePBptr,
Boolean  async 
)

Remove an entity name for the names table.

PRemoveName removes an entity name from the names table of the given
entity's node.
thePBptr iis a pointer to an NBPparms structure.
Out-In Name Type SizeOffset Description
→ csCode short 226always removeName
→ entityPtr Ptr 430pointer to entity name
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
nbpNotFound (-1028) Name not found
Note
When an entity wants to communicate via an AppleTalk network, it should
call PRegisterName to place its name and internet address in the names
table. When an entity no longer wants to communicate on the network, or is
being shut down, it should call PLookupName , which returns a list of all
entities with the name you specify. If you already know the address of an
entity, and want only to confirm that it still exists, call PConfirmName .
PConfirmName is more efficient than PLookupName in terms of
network traffic.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PSendRequest()

OSErr PSendRequest ( ATPPBPtr  thePBPtr,
Boolean  async 
)

Send a request to another socket and wait for response.

PSendRequest sends a request to another socket and waits for a reponse.
thePBptr iis a pointer to an SendReqparms structure.
Out-In Name Type SizeOffset Description
→ userData long 418 user bytes
← reqTID short 222 transaction ID used in request
→ csCode short 226 always sendRequest
← atpSocket char 128 bit map
↔ atpFlags char 129 control information
→ addrBlock AddrBlock 430 destination socket address
→ reqLength short 234 request size in bytes
→ reqPointer Ptr 436 pointer to request data
→ bdsPointer Ptr 440 pointer to response BDS
→ numOfBuffs char 144 number of responses expected
→ timeOutVal char 145 timeout interval
→ numOfResps char 146 number of responses received
→ retryCount char 147 number of retries
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
reqFailed (-1096) Retry count exceeded
tooManyReqs (-1097) Too many concurrent requests
noDataArea (-1104) Too many outstanding ATP calls
reqAborted (-1105) Request cancelled by user
Note
userData contains the four user bytes. addrBlock indicates the socket to
which the request should be sent. reqLength and reqPointer contain the size
and location of the request too send. bdsPointer points to a response BDS
where the responses are to be returned; numOfBuffs indicates the number of
responses requested. The number of responses received is returned in
numOfResps . If a nonzero value is returned in numOfResps , you can
examine atpSocket to determine which packets of the transaction were
actually received. and to detect pieces for higher-level recovery.
timeOutVal indicates the number of seconds that PSendRequest should
wait for a response before resending the request. retryCount indicates the
maximum number or retries PSendRequest should attempt. The
end-of-message flag of atpFlags will be set if the EOM Bit is set in the last
packet received in a valid response sequence. The exactly-once flag should
be set if you want the request to be part of an exactly-once transaction.
To cancel a PSendRequest call, you need the transaction ID; it's returned
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PSendResponse()

OSErr PSendResponse ( ATPPBPtr  thePBPtr,
Boolean  async 
)

Send a response to a socket.

PSendResponse sends a response to a socket.
thePBptr iis a pointer to an ATPParamBlock structure.
Out-In Name Type SizeOffset Description
← userData long 418 user bytes from TRel
→ csCode short 226 always sendResponse
→ atpSocket char 128 socket number
→ atpFlags char 129 control information
→ addrBlock AddrBlock 430 response destination
→ bdsPointer Ptr 432 pointer to response BDS
→ numBuffs char 144 number of response packets being
sent
→ bdsSize Ptr 145 BDS size in elements
→ transID short 248 transaction ID
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
badATPSkt (-1099) Bad responding socket
badBuffNum (-1100) Sequence number out to range
noRelErr (-1101) No release received
noDataArea (-1104) Too many outstanding ATP calls
Note
If the response was part of an exactly-once transaction, userData will
contain the user bytes from the TRel packet. atpSocket contains the socket
number from which the response should be sent. The end-of-message flag
in atpFlags should be set if the response contains the final packet in a
transaction composed of a group of packets and the number of responses is
less than requested. addrBlock indicates the address of the socket to which
the response should be sent. bdsPointer points to a response BDS containing
room for the maximum number of responses to be sent; bdsSize contains
this maximum number. numOfBuffs contains the number or response
packets to be sent in this call; you may wish to make PAddResponse calls
to complete the response. transID indicates the transaction ID of the
associated request.
During exactly-once transactions, PSendResponse doesn't complete until
either a TRel packet is received from the socket that made the request, or
the retry count is exceeded.
To send a request to another socket and get a response, call
PSendRequest . The call terminates when either an entire response is
received or a specified retry timeout interval elapses. To open a socket for
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PSetSelfSend()

OSErr PSetSelfSend ( MPPPBPtr  thePBptr,
Boolean  async 
)

Enable or disable intranode delivery.

PSetSelfSend enables or disables the intranode deliver feature of the
AppleTalk Manager .
thePBptr is a pointer to an MPPParamBlock structure. The relevant fields are
as follows:
Out-InName Type SizeOffsetDescription
→csCode short 226Always PSetSelfSend
→newSelfFlag short 228New SelfSend flag
←oldSelfFlag char 129Old SelfSend flag
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
Note
If newSelfFlag is nonzero, the feature will be enabled; otherwise it will be
disabled. The previous value of the flag will be returned in oldSelfFlag.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PWriteDDP()

OSErr PWriteDDP ( MPPPBPtr  thePBptr,
Boolean  async 
)

Send a datagram to another socket.

PWriteDDP sends a datagram to another socket.
thePBptr iis a pointer to an DDPparms structure.
Out-In Name Type SizeOffset Description
→ csCode short 226 always closeSkt
→ socket char 128 socket number
→ checksumFlag char 129 checksum flag
→ wdsPointer Ptr 430 write data structure
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
ddpSktErr (-91) Socket Error
ddpLenErr (-92) Datagram length too big
noBridgeErr (-93) No bridge found
Note
wdsPointer points to a write data structure containing the datagram and the
address of the destination socket. If the checksumFlag is TRUE,
PWriteDDP will compute the checksum for all datagrams requiring long
headers.
Before it can use a socket, the program must call POpenSkt which adds a
socket and its socket listener to the socket table. When a client is finished
using a socket, call PCloseSkt , which removes the socket's entry from the
socket table. To send a datagram via DDP, call PWriteDDP . If you want to
read DDP datagrams, you must write your own socket listener. DDP will
send every incoming datagram for that socket to your socket listener.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PWriteLAP()

OSErr PWriteLAP ( MPPPBPtr  thePBptr,
Boolean  async 
)

Send a frame to another node.

PWriteLAP sends a frame to another node
thePBptr iis a pointer to an LAPparms structure.
Out-In Name Type SizeOffset Description
→ csCode short 226always writeLAP
→ wdsPointer Ptr 430write data structure
asyncis a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O .
Returns
an operating system Error Code . It will be one of:
noErr(0) No error
ddpLengthErr (-92) Packet length exceeds maximum
lapProtErr (-94) Invalid ALAP protocol type
excessCollsns (-95) No CTS received after 32 RTS's
Note
The frame data and destination of the frame are described by the write data
structure pointed to by wdsPointer. The first two data bytes of an ALAP
frame sent to another computer using the AppleTalk Manager must
indicate the length of the frame in bytes. The ALAP protocol type must be in
the range 1 to 127.
Most programs will never need to call ALAP, because higher-level
protocols will automatically call ALAP as necessary. If you do want to send a
frame directly via ALAP, call the PWriteLAP function. There is no
PReadLAP function. If you want to read ALAP frames, you must call
PAttachPH to add your protocol handler to the node's protocol handler
table. The ALAP module will examine every incoming frame and call your
protocol handler for each frame received with the correct ALAP protocol.
When your program no longer wants to receive frames with a particular
ALAP protocol type value, it can call PDetachPH to remove the
corresponding protocol handler from the protocol handler table.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available