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

particular device. Your protocol should implement a restart routine so that it can<br />

take advantage of this system.<br />

Protocol Shutdown<br />

When a protocol is finished using an interface, or for some reason wants to shut<br />

itself down, it calls the muxUnbind( ) routine. This routine tells the MUX to<br />

deallocate the NET_PROTOCOL and other memory allocated specifically for the<br />

protocol.<br />

H.6.1 Protocol to MUX API<br />

This section presents the routines and data structures that the protocol uses to<br />

interact with the MUX. Most of the work is handled by the MUX routines (listed in<br />

Table H-4). Unlike the driver entry points described earlier, you do not implement<br />

the MUX routines. These routines are utilities that you can call from within your<br />

protocol. For specific information on these MUX routines, see the appropriate<br />

reference entry.<br />

However, these MUX routines do not comprise the entire MUX/protocol interface.<br />

In addition, a protocol must implement a set of standardized routines that handle<br />

things such as shutting down the protocol, restarting the protocol, passing data up<br />

to the protocol, and passing error messages up to the protocol.<br />

Table H-4<br />

MUX Interface Routines<br />

MUX Routine<br />

muxDevLoad( )<br />

muxDevStart( )<br />

muxBind( )<br />

muxSend( )<br />

muxDataPacketGet( )<br />

muxAddressForm( )<br />

muxIoctl( )<br />

muxMCastAddrAdd( )<br />

Purpose<br />

Loads a device into the MUX.<br />

Starts a device from the MUX.<br />

Hooks a protocol to the MUX.<br />

Accepts a packet from the protocol and passes it to the device.<br />

Gets an mBlk containing packet data only. The link-level<br />

header information is omitted.<br />

Forms an address into an outgoing packet.<br />

Accesses control functions.<br />

Adds a multicast address to the list maintained for a device.<br />

H<br />

305

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

Saved successfully!

Ooh no, something went wrong!