02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

VxWorks 5.5<br />

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

The routine is of the following form:<br />

STATUS endPacketDataGet<br />

(<br />

M_BLK_ID pBuff, /* packet data and address information */<br />

LL_HDR_INFO* pLinkHdrInfo /* structure to hold link-level info. */<br />

)<br />

The parameters are:<br />

pBuff<br />

Expects a pointer to the mBlk that still contains both header and packet data.<br />

pLinkHdrInfo<br />

Returns an LL_HDR_INFO structure containing header information that is<br />

dependent upon the particular data-link layer that the END implements. For<br />

more information, see Tracking Link-Level Information: LL_HDR_INFO, p.287.<br />

Return Addressing Information: endPacketAddrGet( )<br />

This routine must retrieve the address information associated with a packet. Some<br />

common cases are provided in endLib. The last two parameters are used for<br />

networks where the hardware source and destination addresses at the ultimate<br />

endpoint can differ from the local source and destination addresses. This routine<br />

should return OK or ERROR. If there is an error, it must set errno.<br />

The routine is of the following form:<br />

STATUS endPacketAddrGet<br />

(<br />

M_BLK_ID pMblk, /* M_BLK_ID of the packet */<br />

M_BLK_ID pSrc, /* local source of packet */<br />

M_BLK_ID pDst, /* local destination of packet */<br />

M_BLK_ID pESrc, /* end source of packet */<br />

M_BLK_ID pEDst /* end destination of packet */<br />

)<br />

pMblk<br />

Expects a pointer to the mBlk structure from which you want to extract<br />

address information.<br />

pSrc<br />

Expects NULL or a pointer to the mBlk structure into which to write the<br />

extracted source address (local) of the packet.<br />

300

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

Saved successfully!

Ooh no, something went wrong!