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

device only, because it understands the Ethernet packet format. The following<br />

counters are updated:<br />

ifInOctets<br />

ifInNUcastPkts<br />

ifOutUcastPkts<br />

ifInMulticastPkts<br />

ifOutMulticastPkts<br />

ifHCInOctets<br />

ifHCOutOctets<br />

ifHCInMulticastPkts<br />

ifHCOutMulticastPkts<br />

ifCounterDiscontinuityTime<br />

ifInUcastPkts<br />

ifOutOctets<br />

ifOutNUcastPkts<br />

ifInBroadcastPkts<br />

ifOutBroadcastPkts<br />

ifHCInUcastPkts<br />

ifHCOutUcastPkts<br />

ifHCInBroadcastPkts<br />

ifHCOutBroadcastPkts<br />

This function should be called immediately after the netMblkToBufCopy( )<br />

function has been completed. The first 6 bytes in the resulting buffer must<br />

contain the destination MAC address; the second 6 bytes of the buffer must<br />

contain the source MAC address.<br />

The type of MAC address (that is, broadcast, multicast, or unicast) is<br />

determined by the following:<br />

broadcast address<br />

multicast address<br />

unicast address<br />

ff:ff:ff:ff:ff:ff<br />

The first bit is set<br />

Any other address not matching the above<br />

RETURNS: ERROR if the M2_ID is NULL or the ctrl is invalid, OK if the<br />

counters were updated.<br />

STATUS m2If8023PacketCount<br />

(<br />

M2_ID * pId, /* The pointer to the device M2_ID object */<br />

UINT ctrl, /* Update In or Out counters */<br />

UCHAR * pPkt, /* The incoming/outgoing packet */<br />

ULONG pktLen /* Length of the packet */<br />

)<br />

m2IfCounterUpdate. Increment interface counters.<br />

This function is used to directly update an interface counter. The counter is<br />

specified by ctrId and the amount by which to increment it is specified by value.<br />

If the counter rolls over, the ifCounterDiscontinuityTime is updated with the<br />

current system uptime.<br />

RETURNS: ERROR if the M2_ID is NULL, OK if the counter was updated.<br />

314

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

Saved successfully!

Ooh no, something went wrong!