02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

VxWorks 5.5<br />

<strong>BSP</strong> Developer’s <strong>Guide</strong><br />

pSpare<br />

Expects the pointer passed into muxBind( ) as pSpare.<br />

Restarting Protocols: stackTxRestartRtn( )<br />

The MUX uses the stackTxRestartRtn( ) to restart protocols that had to stop<br />

transmitting because the device was out of resources. In high-traffic situations, a<br />

muxSend( ) can return END_ERR_BLOCK. This error return indicates that the<br />

device is out of resources for transmitting more packets and that the protocol<br />

should wait before trying to transmit any more packets.<br />

When the device has determined that it has enough resources to start transmitting<br />

again, it can call the muxTxRestart( ) function, which, in turn, calls the protocol’s<br />

stackTxRestartRtn( ).<br />

Your stackTxRestartRtn( ) must take the following form:<br />

void muxTxRestart<br />

(<br />

void* pCookie /* Returned by muxBind() call. */<br />

)<br />

The parameters are:<br />

pCookie<br />

Expects the pointer returned as the function value of the muxBind( ) for this<br />

protocol. This pointer identifies the device to which the MUX has bound this<br />

protocol.<br />

H.6.2 Network Layer to Data Link Layer Address Resolution<br />

The MUX provides several functions for adding network layer to data link layer<br />

address resolution functions. Resolving a network layer address into a data link<br />

layer address is usually carried out by a separate protocol. In most IP over Ethernet<br />

environments this is carried out by ARP (the Address Resolution Protocol).<br />

Using the MUX any protocol/datalink can register its own address resolution<br />

function. The functions are added and deleted by the following pair of routines:<br />

STATUS muxAddrResFuncAdd<br />

(<br />

long ifType, /* Media interface type from m2Lib.h */<br />

long protocol, /* Protocol type from RFC 1700 */<br />

FUNCPTR addrResFunc /* Function to call. */<br />

)<br />

310

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!