Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking /
Chapter 2 - AppleTalk Utilities / AppleTalk Utilities Reference
Routines / Enabling Intranode Delivery of DDP Packets


PSetSelfSend

The PSetSelfSend function enables or disables the AppleTalk intranode
delivery service.

FUNCTION PSetSelfSend (thePBptr: MPPPBPtr; async: Boolean): OSErr;
thePBptr
A pointer to an MPP parameter block.
async
A Boolean that specifies whether the function should be executed asynchronously. Specify TRUE for asynchronous execution.
-->ioCompletionProcPtrA pointer to a completion routine.
<--ioResultOSErrThe function result.
-->ioRefNumIntegerThe .MPP driver reference number.
-->csCodeIntegerAlways setSelfSend.
-->newSelfFlagByteA flag that turns intranode delivery on or off.
<--oldSelfFlagByteA flag that reports the previous state of intranode delivery, whether it was on or off.

Field Description
newSelfFlag
A flag that enables or disables the intranode delivery feature. Set this field to a nonzero number to enable the feature; set it to zero to turn off the feature.
oldSelfFlag
A flag indicating the previous state of the intranode delivery feature. The PSetSelfSend function returns this value. A nonzero value indicates that intranode delivery was enabled; a value of
zero indicates it was disabled.
DESCRIPTION
The PSetSelfSend function turns on or off the intranode delivery feature that allows you to send a packet to another socket on the same node. You can use this feature, for example, to send data from an application to a print spooler that is running in the background on the same node.

When PSetSelfSend is enabled, you can send packets to socket clients on your node from all levels of the AppleTalk protocol stack for which there are programming interfaces. The PSetSelfSend function returns in the oldSelfFlag field the previous setting for the intranode delivery feature so that you can restore it later, if you want to. Because intranode delivery is enabled on most systems running AppleTalk, you should assume that it is turned on and take this into account when you write your code.

Note that intranode delivery applies to the user node applications. Sending packets between a multinode application and user node applications on the same machine is independent of the intranode delivery feature. A multinode is treated as a virtual node distinct from the user node; both the user node and the multinode have their own
node IDs.

SPECIAL CONSIDERATIONS
Enabling or disabling the intranode delivery feature affects the entire node. For example, an application that uses NBP to look up names and then display them to a user might not expect to receive names of other network-visible entities within its own node; when intranode delivery is enabled, this will occur.

ASSEMBLY-LANGUAGE INFORMATION
To execute the PSetSelfSend function from assembly language, call the _Control trap macro with a value of setSelfSend in the csCode field of the parameter block.

RESULT CODES
noErr0No error

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996