Important: The information in this document is obsolete and should not be used for new development.
EDetachPH
TheEDetachPH
function detaches a protocol handler from the .ENET driver.
FUNCTION EDetachPH (thePBptr: EParamBlkPtr; async: Boolean): OSErr;
thePBptr
- A pointer to a parameter block of type
EParamBlock
.async
- A Boolean value that specifies whether the function should be
executed asynchronously or synchronously. SpecifyTRUE
for asynchronous execution.
--> ioCompletion ProcPtr A pointer to completion routine. <-- ioResult OSErr The result code. --> ioRefNum Integer The driver reference number. --> csCode Integer Always ENetDetachPH
for this function.--> eProtType Integer The Ethernet protocol typ.
Field Description
eProtType
- The protocol type whose protocol handler you want to remove.
DESCRIPTION
You use theEDetachPH
function to remove from the .ENET driver a protocol handler that you attached using theEAttachPH
function. When you call theEDetachPH
function to remove the protocol handler,EDetachPH
removes the protocol type from the node's protocol table. Once the protocol type is removed from the node's table, the .ENET driver no longer delivers packets with that protocol type. You specify the protocol type in theeProtType
parameter.If you specified your protocol type and attached the default protocol handler,
EDetachPH
removes the entry from the node's protocol table. When you call
theEDetachPH
function, any pending calls to theERead
function terminate with
thereqAborted
result code.TOKEN RING AND FDDI CONSIDERATIONS
This function is available for token ring and FDDI also. However, Apple Computer, Inc. recommends that you use the LAP Manager interface to attach and detach a protocol handler for token ring and FDDI. To detach a protocol handler, you use the LAP Manager'sL802Detach
routine. For information about theL802Detach
routine, see the chapter "Link-Access Protocol (LAP) Manager" in this book.Note that if you use this function for token ring or FDDI, you must set the
ioRefNum
field to the driver reference number that theOpenSlot
orOpenDriver
function returns. For token ring, you can only detach a protocol handler for protocol type 0.ASSEMBLY-LANGUAGE INFORMATION
To execute theEDetachPH
function from assembly language, call the_Control
trap macro with a value ofENetDetachPH
in thecsCode
field of the parameter block.
To execute the_Control
trap asynchronously, include the value,ASYNC
in the
operand field.RESULT CODES
noErr 0 No error LAPProtErr -94 No protocol handler is attached