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 />

srcAddrOffset<br />

Offset into mBlk structure at which the source address starts.<br />

srcSize<br />

Size of source address.<br />

ctrlAddrOffset<br />

Reserved for future use.<br />

ctrlSize<br />

Reserved for future use.<br />

pktType<br />

Type of packet. For a list of valid packet types, see RFC 1700.<br />

dataOffset<br />

Offset into mBlk structure at which the packet data starts.<br />

Tracking Data That Passes Between the Driver and the Protocol: mBlk<br />

Use mBlk structures as a vehicle for passing packets between the driver and<br />

protocol layers. The mBlk structure is defined in netBufLib.h as follows:<br />

typedef struct mBlk<br />

{<br />

M_BLK_HDR mBlkHdr; /* header */<br />

M_PKT_HDR mBlkPktHdr; /* pkthdr */<br />

CL_BLK * pClBlk; /* pointer to cluster blk */<br />

} M_BLK;<br />

mBlkHdr<br />

Contains a pointer to an mHdr structure. For the most part, you should have<br />

no need to access or set this member directly and can treat it as opaque. The<br />

only exception is when you must chain this mBlk to another. In that case, you<br />

need to set the value of mBlk.mHdr.mNext or mBlk.mBlkHdr.mNextPkt or<br />

both. Use mBlk.mBlkHdr.mNext to point to the next mBlk in a chain of<br />

mBlks. Use mBlk.mHdr.mNextPkt to point to an mBlk that contains the head<br />

of the next packet.<br />

mBlkPktHdr<br />

Contains a pointer to an pktHdr structure. You should have no need to access<br />

or set this member directly and can treat it as opaque.<br />

pClBlk<br />

Contains a pointer to an clBlk structure. You should have no need to access or<br />

set this member directly and can treat it as opaque. However, if you are not<br />

288

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

Saved successfully!

Ooh no, something went wrong!