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

STATUS endMCastAddAddr<br />

(<br />

void* pCookie, /* pointer to a device-identifying END_OBJ structure */<br />

char* pAddress /* pointer to address to add */<br />

)<br />

To help you manage a list of multicast addresses, VxWorks provides the library<br />

etherMultiLib.<br />

This function should return OK or ERROR. If an error occurs, it should set errno.<br />

The parameters are:<br />

pCookie<br />

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

pAddress<br />

Passes in a pointer to the address you want to add to the list. To help you<br />

manage a list of multicast addresses, VxWorks includes the library,<br />

etherMultiLib.<br />

Within your endMCastAddrAdd( ), you must reconfigure the interface in a<br />

hardware-specific way. This reconfiguration should let the driver receive<br />

frames from the specified address and then pass those frames up to the higher<br />

layer.<br />

Deleting a Multicast Address: endMCastAddrDel( )<br />

Your endMCastAddrDel( ) entry point must delete an address from the multicast<br />

table maintained by the device. Your endMCastAddrDel( ) must take the<br />

following form:<br />

H<br />

STATUS endMCastDelAddr<br />

(<br />

void* pCookie, /* pointer to a device-identifying END_OBJ structure */<br />

char* pAddress /* pointer to address to delete */<br />

)<br />

This function should return OK or ERROR. If an error occurred, it should set errno.<br />

The parameters are:<br />

pCookie<br />

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

pAddress<br />

Passes a pointer to the address you must delete. To help you manage a list of<br />

multicast addresses, VxWorks includes the library, etherMultiLib.<br />

297

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

Saved successfully!

Ooh no, something went wrong!