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.

H<br />

Implementing a MUX-Based Network Interface Driver<br />

Table H-2<br />

Ioctl Commands and Data Types (Continued)<br />

Command Function Data Type<br />

EIOCMULTIADD Add multicast address. char*<br />

EIOCMULTIDEL Delete multicast address. char*<br />

EIOCMULTIGET Get multicast list. MULTI_TABLE*<br />

EIOCPOLLSTART Set device into polling mode. NULL<br />

EIOCPOLLSTOP Set device into interrupt mode. NULL<br />

EIOCGFBUF Get minimum first buffer for chaining. int<br />

EIOCGMIB2<br />

Get the MIB-II counters from the<br />

driver.<br />

M2_INTERFACETBL*<br />

Sending Data Out on the Device: endSend( )<br />

The MUX calls your endSend( ) entry point when it has data to send out on the<br />

device. Your endSend( ) must take the following form:<br />

STATUS endSend<br />

(<br />

void* pCookie, /* device structure */<br />

M_BLK_ID pMblk, /* data to send */<br />

)<br />

This function should return OK, ERROR, or END_ERR_BLOCK.<br />

The value END_ERROR_BLOCK should be returned if the packet cannot be<br />

transmitted at this time because it is in polling mode, or because of a lack of<br />

resources. In either case, the packet is not freed from the mBlk chain.<br />

The value OK is returned upon successful acceptance of the data packet. If an error<br />

occurs then ERROR is returned and errno should be set. In these cases, the data<br />

packet is freed from the mBlk chain.<br />

The parameters are:<br />

pCookie<br />

Passes a pointer to the END_OBJ structure returned by endLoad( ).<br />

H<br />

293

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

Saved successfully!

Ooh no, something went wrong!