EAttachPH
EParamBlkPtr thePBptr; address of an EParamBlock structure Boolean async; 0=await completion; 1=immediate return your own protocol handler for a specific protocol type, or you can use it to
particular protocol type. .
thePBptr is a pointer to an EParamBlock structure. The relevant fields are as follows:
¨ ioResult short 2 16 Result code
Æ csCode short 2 26 Always ENetAttachPH
Æ eProtType short 2 28 Ethernet protocol type Æ ePointer long 4 30 Pointer to protocol handler
async is a Boolean value. Use FALSE for normal ( synchronous) operation or TRUE to function asynchronously. See Async I/O. noErr (0) No error
LAPProtErr (-94) Protocol handler is already attached or node's
protocol table is full.
protocol handler each time it receives a packet with the protocol type you
protocol handler, then you can use the ERead command to read packets with that protocol type.
The ioResult parameter 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 parameter is a routine selector; it is
always equal to ENetAttachPH for this function.
You specify the protocol type in the eProtType parameter and provide a pointer to the protocol handler in the ePointer parameter. If you specify NIL
protocol handler for that protocol type. Specify 0 for the eProtType parameter to attach a protocol handler for the IEEE 802.3 protocol, which
uses protocol types 0 through 0x05DC
0 and thus receives all 802.3 protocol packets. Instead of using the
EAttachPH function to install a protocol handler for an 802.3 Ethernet protocol type, you should use the L802Attach routine. In the case of an
type you specified with the L802Attach routine, the 802.2 protocol handler
passes the packet on to your protocol handler.
For more information about IEEE 802.2 and 802.3 protocols, see